Exemple #1
0
        private void QuickChargingForm_Load(object sender, EventArgs e)
        {
            // this.Channel.Idle += new IdleEventHandler(Channel_Idle);
            // 被专门的线程使用,因而不需要出让控制权
            this.ChannelDoEvents = false;

            if (this.DisplayFormat == "卡片")
            {
                this.splitContainer_main.Panel1.Controls.Remove(this.webBrowser_reader);
                this.AddFreeControl(this.webBrowser_reader);    // 2015/11/7

                _cardControl = new PatronCardControl();
                _cardControl.Dock = DockStyle.Fill;
                this.splitContainer_main.Panel1.Controls.Add(_cardControl);
            }

            // webbrowser
            this.m_webExternalHost_readerInfo.Initial(this.MainForm, this.webBrowser_reader);
            this.m_webExternalHost_readerInfo.OutputDebugInfo += new OutputDebugInfoEventHandler(m_webExternalHost_readerInfo_OutputDebugInfo);
            // this.m_webExternalHost_readerInfo.WebBrowser = this.webBrowser_reader;  //
            this.webBrowser_reader.ObjectForScripting = this.m_webExternalHost_readerInfo;

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

            this._summaryChannel.Initial(this.MainForm);
            this._barcodeChannel.Initial(this.MainForm);

            this.FuncState = this.FuncState;

            this._taskList.Channel = this.Channel;
            this._taskList.stop = this.stop;
            this._taskList.Container = this;
            this._taskList.BeginThread();

            // this._summaryList.Channel = this._summaryChannel;
            // this._summaryList.stop = this.stop;
            this._summaryList.Container = this;
            this._summaryList.BeginThread();
#if NO
            {
                _floatingMessage = new FloatingMessageForm(this);
                _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold);
                // _floatingMessage.TopMost = true;
                // _floatingMessage.Text = "正在处理,请不要让读者离开 ...";
                _floatingMessage.Opacity = 0.7;
                _floatingMessage.Show(this);
            }
#endif
            this._floatingMessage.RectColor = Color.Purple;

#if NO
            this.MainForm.Move += new EventHandler(MainForm_Move);
#endif

            this.toolStripButton_enableHanzi.Checked = this.MainForm.AppInfo.GetBoolean(
                "quickchargingform",
                "eanble_hanzi",
                false);
            this.toolStripButton_upperInput.Checked = this.MainForm.AppInfo.GetBoolean(
                "quickchargingform",
                "upper_input",
                true);
            {   // 恢复列宽度
                string strWidths = this.MainForm.AppInfo.GetString(
                               "quickchargingform",
                                "tasklist_column_width",
                               "");
                if (String.IsNullOrEmpty(strWidths) == false)
                {
                    DpTable.SetColumnHeaderWidth(this.dpTable_tasks,
                        strWidths,
                        false);
                }
            }

            this.SetControlsColor(this.DisplayStyle);
            if (this.DisplayFormat == "HTML")
            {
                SetReaderHtmlString("(空)");
            }

            // this.BeginInvoke(new Action(FillLibraryCodeListMenu));
        }
Exemple #2
0
        private void QuickChargingForm_Load(object sender, EventArgs e)
        {
            this.Channel.Idle += new IdleEventHandler(Channel_Idle);

            if (this.DisplayFormat == "卡片")
            {
                _cardControl = new PatronCardControl();
                _cardControl.Dock = DockStyle.Fill;

                this.splitContainer_main.Panel1.Controls.Remove(this.webBrowser_reader);
                this.splitContainer_main.Panel1.Controls.Add(_cardControl);
            }

            // webbrowser
            this.m_webExternalHost_readerInfo.Initial(this.MainForm, this.webBrowser_reader);
            this.m_webExternalHost_readerInfo.OutputDebugInfo += new OutputDebugInfoEventHandler(m_webExternalHost_readerInfo_OutputDebugInfo);
            // this.m_webExternalHost_readerInfo.WebBrowser = this.webBrowser_reader;  //
            this.webBrowser_reader.ObjectForScripting = this.m_webExternalHost_readerInfo;

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

            this._summaryChannel.Initial(this.MainForm);
            this._barcodeChannel.Initial(this.MainForm);

            if (this.DisplayFormat == "HTML")
            {
                SetReaderHtmlString("(空)");
            }

            this.FuncState = this.FuncState;

            this._taskList.Channel = this.Channel;
            this._taskList.stop = this.stop;
            this._taskList.Container = this;
            this._taskList.BeginThread();

#if NO
            {
                _floatingMessage = new FloatingMessageForm(this);
                _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold);
                // _floatingMessage.TopMost = true;
                // _floatingMessage.Text = "正在处理,请不要让读者离开 ...";
                _floatingMessage.Opacity = 0.7;
                _floatingMessage.Show(this);
            }
#endif
            this._floatingMessage.RectColor = Color.Purple;

#if NO
            this.MainForm.Move += new EventHandler(MainForm_Move);
#endif

            this.toolStripButton_enableHanzi.Checked = this.MainForm.AppInfo.GetBoolean(
                "quickchargingform",
                "eanble_hanzi",
                false);
            this.toolStripButton_upperInput.Checked = this.MainForm.AppInfo.GetBoolean(
                "quickchargingform",
                "upper_input",
                true);
        }