• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DigitalPlatform.Stop类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DigitalPlatform.Stop的典型用法代码示例。如果您正苦于以下问题:C# Stop类的具体用法?C# Stop怎么用?C# Stop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Stop类属于DigitalPlatform命名空间,在下文中一共展示了Stop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: EaccForm_FormClosed

        private void EaccForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (stop != null) // 脱离关联
            {
                stop.Style = StopStyle.None;    // 需要强制中断
                stop.DoStop();

                stop.Unregister();	// 和容器关联
                stop = null;
            }

            if (this.MainForm != null && this.MainForm.AppInfo != null)
            {
                MainForm.AppInfo.SetString(
                    "eacc_form",
                    "unihan_filename",
                    this.textBox_unihanFilenames.Text);
                MainForm.AppInfo.SetString(
                    "eacc_form",
                    "e2u_filename",
                    this.textBox_e2uFilename.Text);
                /*
                MainForm.applicationInfo.SetString(
                    "eacc_form",
                    "u2e_filename",
                    this.textBox_u2eFilename.Text);
                 * */
            }
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:29,代码来源:EaccForm.cs


示例2: EaccForm_Load

        private void EaccForm_Load(object sender, EventArgs e)
        {
            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联


            this.textBox_unihanFilenames.Text = MainForm.AppInfo.GetString(
                "eacc_form",
                "unihan_filename",
                "");
            this.textBox_e2uFilename.Text = MainForm.AppInfo.GetString(
                "eacc_form",
                "e2u_filename",
                "");
            /*
            this.textBox_u2eFilename.Text = MainForm.applicationInfo.GetString(
                "eacc_form",
                "u2e_filename",
                "");
             * */

            Global.FillEncodingList(this.comboBox_codePage,
                false);

        }
开发者ID:renyh1013,项目名称:dp2,代码行数:25,代码来源:EaccForm.cs


示例3: DtlpLogForm_Load

        private void DtlpLogForm_Load(object sender, EventArgs e)
        {
            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联


            // 初始化ChannelArray
            channelArray.appInfo = MainForm.AppInfo;
            channelArray.AskAccountInfo += new AskDtlpAccountInfoEventHandle(channelArray_AskAccountInfo);
            /*
            channelArray.procAskAccountInfo = new Delegate_AskAccountInfo(
                this.AskAccountInfo);
             * */

            // 准备唯一的通道
            if (this.Channel == null)
            {
                this.Channel = channelArray.CreateChannel(0);
            }

            this.textBox_serverAddr.Text = MainForm.AppInfo.GetString(
    "dtlplogform",
    "serveraddr",
    ""); 

            this.textBox_logFileName.Text = MainForm.AppInfo.GetString(
    "dtlplogform",
    "logfilename",
    "");

            this.marcEditor_record.FieldNameCaptionWidth = 0;

        }
开发者ID:renyh1013,项目名称:dp2,代码行数:33,代码来源:DtlpLogForm.cs


示例4: ClockForm_Load

        private void ClockForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }

            this.dateTimePicker1.Value = DateTime.Now;

#if NO
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            this.Channel.AfterLogin -= new AfterLoginEventHandle(Channel_AfterLogin);
            this.Channel.AfterLogin += new AfterLoginEventHandle(Channel_AfterLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            // API.PostMessage(this.Handle, WM_PREPARE, 0, 0);
            this.BeginInvoke(new Action(Initial));

            this.timer1.Start();
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:27,代码来源:ClockForm.cs


示例5: ReaderManageForm_Load

        private void ReaderManageForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }

#if NO
            MainForm.AppInfo.LoadMdiChildFormStates(this,
    "mdi_form_state");
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            this.GetValueTable += new GetValueTableEventHandler(ReaderManageForm_GetValueTable);

            // webbrowser
            this.m_webExternalHost.Initial(this.MainForm, this.webBrowser_normalInfo);
            this.webBrowser_normalInfo.ObjectForScripting = this.m_webExternalHost;

            this.commander = new Commander(this);
            this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
            this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);

        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:30,代码来源:ReaderManageForm.cs


示例6: ChangePasswordForm_Load

        private void ChangePasswordForm_Load(object sender, EventArgs e)
        {
            this.Channels = new LibraryChannelCollection();
            this.Channels.BeforeLogin += new BeforeLoginEventHandle(Channels_BeforeLogin);
            this.Channels.AfterLogin += new AfterLoginEventHandle(Channels_AfterLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联

        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:10,代码来源:ChangePasswordForm.cs


示例7: XmlDetailForm_Load

        private void XmlDetailForm_Load(object sender, EventArgs e)
        {
            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联

            Global.FillEncodingList(this.comboBox_originDataEncoding,
                false);

            this.NeedIndentXml = this.MainForm.AppInfo.GetBoolean(
                "xmldetailform",
                "need_indent_xml",
                true);

            API.PostMessage(this.Handle, WM_LOADSIZE, 0, 0);
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:15,代码来源:XmlDetailForm.cs


示例8: HtmlPrintForm_Load

        private void HtmlPrintForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }
            // 把第一页装入
            this.LoadPageFile();

            this.EnableButtons();

            DisplayPageInfoLine();

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:16,代码来源:HtmlPrintForm.cs


示例9: PassGateForm_Load

        private void PassGateForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }

#if NO
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            // webbrowser
            this.m_webExternalHost.Initial(this.MainForm, this.webBrowser_readerInfo);
            this.webBrowser_readerInfo.ObjectForScripting = this.m_webExternalHost;

            this.commander = new Commander(this);
            this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
            this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);

            this.AcceptButton = this.button_passGate;

            this.textBox_gateName.Text = this.MainForm.AppInfo.GetString(
                "passgate_form",
                "gate_name",
                "");
            this.checkBox_displayReaderDetailInfo.Checked = this.MainForm.AppInfo.GetBoolean(
                "passgate_form",
                "display_reader_detail_info",
                true);
            this.checkBox_hideBarcode.Checked = this.MainForm.AppInfo.GetBoolean(
                "passgate_form",
                "hide_barcode",
                false);
            this.checkBox_hideReaderName.Checked = this.MainForm.AppInfo.GetBoolean(
                "passgate_form",
                "hide_readername",
                false);

            this.StartWorkerThread();
        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:46,代码来源:PassGateForm.cs


示例10: QuickChangeBiblioForm_Load

        private void QuickChangeBiblioForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }

#if NO
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif
        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:17,代码来源:QuickChangeBiblioForm.cs


示例11: Initial

        // 初始化数据成员
        public int Initial(
            MainForm mainform,
            string[] aPaths,
            string strMessage,
            LibraryChannel channel,
            Stop stop,
            out string strError)
        {
            strError = "";

            this.MainForm = mainform;
            this.Channel = channel;
            this.stop = stop;
            this.aPaths = aPaths;

            this.textBox_message.Text = strMessage;

            this.InfoColor = InfoColor.LightRed; // 红色表示警告

            return 0;
        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:22,代码来源:ItemBarcodeDupDlg.cs


示例12: SelectPatronDialog_Load

        private void SelectPatronDialog_Load(object sender, EventArgs e)
        {
            _stopManager.Initial(this.toolStripButton_stop,
(object)this.toolStripLabel_message,
(object)null);

            stop = new DigitalPlatform.Stop();
            stop.Register(this._stopManager, true);	// 和容器关联

            FillRecPath();

            EnableControls(false);

            this.m_webExternalHost_patron.Initial(this.MainForm, this.webBrowser_patron);
            this.webBrowser_patron.ObjectForScripting = this.m_webExternalHost_patron;

            MessageVisible = MessageVisible;

            // API.PostMessage(this.Handle, WM_LOAD_ALL_DATA, 0, 0);
            this.BeginInvoke(new Action(Initial));
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:21,代码来源:SelectPatronDialog.cs


示例13: Initial

        public void Initial(MainForm main_form,
            bool bDoEvents = false)
        {
            this._doEvents = bDoEvents;
            this.MainForm = main_form;

            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            this.Channel.AfterLogin -= new AfterLoginEventHandle(Channel_AfterLogin);
            this.Channel.AfterLogin += new AfterLoginEventHandle(Channel_AfterLogin);

            this.Channel.Idle -= new IdleEventHandler(Channel_Idle);
            this.Channel.Idle += new IdleEventHandler(Channel_Idle);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联

            return;
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:22,代码来源:ExternalChannel.cs


示例14: ActivateForm_Load

        private void ActivateForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }
#if NO
            MainForm.AppInfo.LoadMdiChildFormStates(this,
    "mdi_form_state");
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            this.readerEditControl_old.SetReadOnly("librarian");
            this.readerEditControl_old.GetValueTable += new GetValueTableEventHandler(readerEditControl1_GetValueTable);
            this.readerEditControl_old.Initializing = false;   // 如果没有此句,一开始在空模板上修改就不会变色

            this.readerEditControl_new.SetReadOnly("librarian");
            this.readerEditControl_new.GetValueTable += new GetValueTableEventHandler(readerEditControl1_GetValueTable);
            this.readerEditControl_new.Initializing = false;   // 如果没有此句,一开始在空模板上修改就不会变色


            // webbrowser
            this.m_webExternalHost_new.Initial(this.MainForm, this.webBrowser_newReaderInfo);
            this.webBrowser_newReaderInfo.ObjectForScripting = this.m_webExternalHost_new;

            this.m_webExternalHost_old.Initial(this.MainForm, this.webBrowser_oldReaderInfo);
            this.webBrowser_oldReaderInfo.ObjectForScripting = this.m_webExternalHost_old;

            // commander
            this.commander = new Commander(this);
            this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
            this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);
        }
开发者ID:paopaofeng,项目名称:dp2,代码行数:39,代码来源:ActivateForm.cs


示例15: CheckBorrowInfoForm_Load

        private void CheckBorrowInfoForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }
#if NO
            MainForm.AppInfo.LoadMdiChildFormStates(this,
    "mdi_form_state");
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);

            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            Global.ClearForPureTextOutputing(this.webBrowser_resultInfo);

            this.checkBox_displayPriceString.Checked = this.MainForm.AppInfo.GetBoolean(
                "check_borrowinfo_form",
                "display_price_string",
                true);

            this.checkBox_forceCNY.Checked = this.MainForm.AppInfo.GetBoolean(
                "check_borrowinfo_form",
                "force_cny",
                false);

            this.checkBox_overwriteExistPrice.Checked = this.MainForm.AppInfo.GetBoolean(
                "check_borrowinfo_form",
                "overwrite_exist_price",
                false);

        }
开发者ID:renyh1013,项目名称:dp2,代码行数:36,代码来源:CheckBorrowInfoForm.cs


示例16: ChangePasswordForm_Load

        private void ChangePasswordForm_Load(object sender, EventArgs e)
        {
            if (this.MainForm != null)
            {
                MainForm.SetControlFont(this, this.MainForm.DefaultFont);
            }
#if NO
            this.Channel.Url = this.MainForm.LibraryServerUrl;

            this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
            this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);


            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);	// 和容器关联
#endif

            bool bReader = this.MainForm.AppInfo.GetBoolean(
                "default_account",
                "isreader",
                false);
            if (bReader == false)
            {
                this.textBox_reader_oldPassword.Enabled = false;
            }
            else
            {
                this.textBox_reader_comment.Text = "这是读者为自己修改密码。";
                this.tabControl_main.Controls.Remove(this.tabPage_worker);
                this.AddFreeControl(this.tabPage_worker);   // 2015/11/7
            }

            checkBox_worker_force_CheckedChanged(this, null);

            API.PostMessage(this.Handle, WM_FIRST_SETFOCUS, 0, 0);
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:36,代码来源:ChangePasswordForm.cs


示例17: GetFileSize

        // 获得一个日志文件的尺寸
        // return:
        //      -2  此类型的日志尚未启用
        //      -1  error
        //      0   file not found
        //      1   found
        static int GetFileSize(
            Stop stop,
            LibraryChannel channel,
            string strCacheDir,
            string strLogFileName,
            LogType logType,
            out long lServerFileSize,
            out long lCacheFileSize,
            out string strError)
        {
            strError = "";
            lServerFileSize = 0;
            lCacheFileSize = 0;

            string strCacheFilename = PathUtil.MergePath(strCacheDir, strLogFileName);

            FileInfo fi = new FileInfo(strCacheFilename);
            if (fi.Exists == true)
                lCacheFileSize = fi.Length;

            stop.SetMessage("正获得日志文件 " + strLogFileName + " 的尺寸...");

            string strXml = "";
            long lAttachmentTotalLength = 0;
            byte[] attachment_data = null;

            string strStyle = "level-0";
            if ((logType & LogType.AccessLog) != 0)
                strStyle += ",accessLog";

            // 获得日志文件尺寸
            // return:
            //      -1  error
            //      0   file not found
            //      1   succeed
            //      2   超过范围
            long lRet = channel.GetOperLog(
                stop,
                strLogFileName,
                -1,    // lIndex,
                -1, // lHint,
                strStyle,
                "", // strFilter
                out strXml,
                out lServerFileSize,
                0,  // lAttachmentFragmentStart,
                0,  // nAttachmentFramengLength,
                out attachment_data,
                out lAttachmentTotalLength,
                out strError);
            if (lRet == 0)
            {
                lServerFileSize = 0;
                Debug.Assert(lServerFileSize == 0, "");
                return 0;
            }
            if (lRet != 1)
                return -1;
            if (lServerFileSize == -1)
            {
                strError = "日志尚未启用";
                return -2;
            }
            Debug.Assert(lServerFileSize >= 0, "");
            return 1;
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:72,代码来源:OperLogLoader.cs


示例18: EntityForm_Load


//.........这里部分代码省略.........
            // 初始化册控件
            this.entityControl1.GetMacroValue -= new GetMacroValueHandler(issueControl1_GetMacroValue);
            this.entityControl1.GetMacroValue += new GetMacroValueHandler(issueControl1_GetMacroValue);

            this.entityControl1.ContentChanged -= new ContentChangedEventHandler(issueControl1_ContentChanged);
            this.entityControl1.ContentChanged += new ContentChangedEventHandler(issueControl1_ContentChanged);

            this.entityControl1.GetParameterValue -= new GetParameterValueHandler(entityControl1_GetParameterValue);
            this.entityControl1.GetParameterValue += new GetParameterValueHandler(entityControl1_GetParameterValue);

            this.entityControl1.VerifyBarcode -= new VerifyBarcodeHandler(entityControl1_VerifyBarcode);
            this.entityControl1.VerifyBarcode += new VerifyBarcodeHandler(entityControl1_VerifyBarcode);

            this.entityControl1.EnableControlsEvent -= new EnableControlsHandler(entityControl1_EnableControls);
            this.entityControl1.EnableControlsEvent += new EnableControlsHandler(entityControl1_EnableControls);

            this.entityControl1.LoadRecord -= new LoadRecordHandler(entityControl1_LoadRecord111);
            this.entityControl1.LoadRecord += new LoadRecordHandler(entityControl1_LoadRecord111);

            // 2009/2/24 
            this.entityControl1.GenerateData -= new GenerateDataEventHandler(entityControl1_GenerateData);
            this.entityControl1.GenerateData += new GenerateDataEventHandler(entityControl1_GenerateData);

            /*
            // 2009/2/24 
            this.entityControl1.GenerateAccessNo -= new GenerateDataEventHandler(entityControl1_GenerateAccessNo);
            this.entityControl1.GenerateAccessNo += new GenerateDataEventHandler(entityControl1_GenerateAccessNo); 
             * */

            this.entityControl1.ShowMessage -= entityControl1_ShowMessage;
            this.entityControl1.ShowMessage += entityControl1_ShowMessage;

            ////this.entityControl1.Channel = this.Channel;
            this.entityControl1.Stop = this.Progress;
            this.entityControl1.MainForm = this.MainForm;

            this.EnableItemsPage(false);


            // 初始化期控件

            // 2008/12/27 
            this.issueControl1.GenerateEntity -= new GenerateEntityEventHandler(issueControl1_GenerateEntity);
            this.issueControl1.GenerateEntity += new GenerateEntityEventHandler(issueControl1_GenerateEntity);

            // 2008/12/24 
            this.issueControl1.GetOrderInfo -= new GetOrderInfoEventHandler(issueControl1_GetOrderInfo);
            this.issueControl1.GetOrderInfo += new GetOrderInfoEventHandler(issueControl1_GetOrderInfo);

            this.issueControl1.GetItemInfo -= new GetItemInfoEventHandler(issueControl1_GetItemInfo);
            this.issueControl1.GetItemInfo += new GetItemInfoEventHandler(issueControl1_GetItemInfo);

            this.issueControl1.GetMacroValue -= new GetMacroValueHandler(issueControl1_GetMacroValue);
            this.issueControl1.GetMacroValue += new GetMacroValueHandler(issueControl1_GetMacroValue);

            this.issueControl1.ContentChanged -= new ContentChangedEventHandler(issueControl1_ContentChanged);
            this.issueControl1.ContentChanged += new ContentChangedEventHandler(issueControl1_ContentChanged);

            this.issueControl1.EnableControlsEvent -= new EnableControlsHandler(entityControl1_EnableControls);
            this.issueControl1.EnableControlsEvent += new EnableControlsHandler(entityControl1_EnableControls);

            this.issueControl1.ChangeItem -= new ChangeItemEventHandler(issueControl1_ChangeItem);
            this.issueControl1.ChangeItem += new ChangeItemEventHandler(issueControl1_ChangeItem);

            // 2010/4/27
            this.issueControl1.LoadRecord -= new LoadRecordHandler(entityControl1_LoadRecord111);
开发者ID:renyh1013,项目名称:dp2,代码行数:67,代码来源:EntityForm.cs


示例19: DoStopAll

        // 停止所有Stop对象,包括当前激活的Stop对象。这是指stopExclude参数==null
        // 用stopExclude参数可以改变函数行为,不停止某个指定的对象。
        // locks: 集合写锁
        public void DoStopAll(Stop stopExclude)
        {
            WriteDebugInfo("collection write lock 6\r\n");
            this.m_collectionlock.AcquireWriterLock(Stop.m_nLockTimeout);
            try
            {
                for (int i = 0; i < stops.Count; i++)
                {
                    Stop temp = (Stop)stops[i];
                    if (stopExclude != temp)
                        temp.DoStop();
                }
            }
            finally
            {
                this.m_collectionlock.ReleaseWriterLock();
                WriteDebugInfo("collection write unlock 6\r\n");

            }

            //SetToolTipText();
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:25,代码来源:Stop.cs


示例20: ChangeState

        // 设状态, 供Stop调
        // locks: 集合读锁(如果bLock == true)
        public void ChangeState(Stop stop,
            StateParts parts,
            bool bLock)
        {
            if (stops.Count == 0)
                return;

            // TODO: 这里的整个逻辑有问题: 即便视觉上不表现,内存也应当兑现修改,以备后面切换时显示出来。动态不那么及时更新是可以的,但是关键状态变化,例如显示、隐藏等动作,一定要兑现到内存
            if (stop != null && stop.ProgressValue == -1)
            {
                if ((parts & StateParts.ProgressValue) != 0)
                {
                    // 如果为隐藏progress的意图,
                    // 将max和min都设置为-1,以便将来刷新的时候能体现隐藏
                    // 2011/10/12
                    stop.ProgressMax = -1;
                    stop.ProgressMin = -1;
                }
            }

            if (bLock == true)
            {
                WriteDebugInfo("collection read lock 7\r\n");
                this.m_collectionlock.AcquireReaderLock(Stop.m_nLockTimeout);
            }
            bool bLoop = false;
            Stop active = null;

            try
            {

                if (bMultiple == false)
                {
                    if (stop == null)
                    {
                        stop = (Stop)stops[stops.Count - 1];
                    }
                    else
                    {
                        if (stop != stops[stops.Count - 1])
                            return;
                    }
                    bLoop = stop.State == 0 ? true : false;
                    active = stop;
                }
                else
                {
                    bool bFound = false;
                    for (int i = 0; i < stops.Count; i++)
                    {
                        Stop temp = (Stop)stops[i];
                        if (bLoop == false)
                        {
                            if (temp.State == 0)
                                bLoop = true;
                        }

                        if (stop == temp)
                        {
                            bFound = true;
                            active = temp;
                            break;
                        }
                    }
                    if (bFound == false)
                        return;

                }
                // 移走


            }
            finally
            {
                if (bLock == true)
                {
                    this.m_collectionlock.ReleaseReaderLock();
                    WriteDebugInfo("collection read unlock 7\r\n");
                }
            }

            //if (m_stopToolButton != null) //???
            //{
            if ((parts & StateParts.StopButton) != 0)
                EnableStopButtons(bLoop);

            if ((parts & StateParts.ReverseButtons) != 0)
                EnableReverseButtons(!bLoop,
                    parts);
            //}

            //if (m_messageStatusBar != null) 
            //{
            if ((parts & StateParts.Message) != 0)
                InternalSetMessage(active.Message);
            //}

            if ((parts & StateParts.ProgressRange) != 0)
//.........这里部分代码省略.........
开发者ID:renyh1013,项目名称:dp2,代码行数:101,代码来源:Stop.cs



注:本文中的DigitalPlatform.Stop类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Client.ResPath类代码示例发布时间:2022-05-24
下一篇:
C# Network.RawPDU类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap