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); }
/// <summary> /// 窗口 Load 时被触发 /// </summary> public override void OnMyFormLoad() { this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); base.OnMyFormLoad(); }
private void EntityBarcodeFoundDupDlg_Load(object sender, EventArgs e) { // webbrowser this.m_webExternalHostItem.Initial(this.MainForm, this.webBrowser_item); this.webBrowser_item.ObjectForScripting = this.m_webExternalHostItem; this.m_webExternalHostBiblio.Initial(this.MainForm, this.webBrowser_biblio); this.webBrowser_biblio.ObjectForScripting = this.m_webExternalHostBiblio; this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); if (String.IsNullOrEmpty(this.ItemText) == false) { #if NO Global.SetHtmlString(this.webBrowser_item, this.ItemText, this.MainForm.DataDir, "entitybarcodedup_item"); #endif this.m_webExternalHostItem.SetHtmlString(this.ItemText, "entitybarcodedup_item"); } if (String.IsNullOrEmpty(this.BiblioText) == false) { #if NO Global.SetHtmlString(this.webBrowser_biblio, this.BiblioText, this.MainForm.DataDir, "entitybarcodedup_item"); #endif this.m_webExternalHostBiblio.SetHtmlString(this.BiblioText, "entitybarcodedup_biblio"); } }
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); }
/*public*/ bool CanCallNew(Commander commander, int msg) { if (this.m_nInViewing > 0) { // 缓兵之计 // this.Stop(); commander.AddMessage(msg); return false; // 还不能启动 } return true; // 可以启动 }
private void ItemInfoForm_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.binaryResControl1.ContentChanged -= new ContentChangedEventHandler(binaryResControl1_ContentChanged); this.binaryResControl1.ContentChanged += new ContentChangedEventHandler(binaryResControl1_ContentChanged); this.binaryResControl1.GetChannel -= binaryResControl1_GetChannel; this.binaryResControl1.GetChannel += binaryResControl1_GetChannel; this.binaryResControl1.ReturnChannel -= binaryResControl1_ReturnChannel; this.binaryResControl1.ReturnChannel += binaryResControl1_ReturnChannel; this.binaryResControl1.Stop = this.stop; } // webbrowser this.m_webExternalHost_item.Initial(this.MainForm, this.webBrowser_itemHTML); this.webBrowser_itemHTML.ObjectForScripting = this.m_webExternalHost_item; this.m_chargingInterface.Initial(this.MainForm, this.webBrowser_borrowHistory); this.m_chargingInterface.CallFunc += m_chargingInterface_CallFunc; this.webBrowser_borrowHistory.ObjectForScripting = this.m_chargingInterface; this.m_webExternalHost_biblio.Initial(this.MainForm, this.webBrowser_biblio); this.webBrowser_biblio.ObjectForScripting = this.m_webExternalHost_biblio; this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); this.Text = this.DbTypeCaption; ClearBorrowHistoryPage(); }
private void ChargingForm_Load(object sender, EventArgs e) { if (this.MainForm != null) { MainForm.SetControlFont(this, this.MainForm.DefaultFont); } if (this.NoBiblioAndItemInfo == true) { ChangeLayout(true); } this.MainForm.AppInfo.LoadMdiSize += new EventHandler(AppInfo_LoadMdiSize); this.MainForm.AppInfo.SaveMdiSize += new EventHandler(AppInfo_SaveMdiSize); // LoadSize(); this.FuncState = this.FuncState; // 使"操作"按钮文字显示正确 string strDisplayFormat = this.MainForm.AppInfo.GetString( "charging_form", "display_format", "HTML"); if (strDisplayFormat == "HTML") this.DisplayState = DisplayState.HTML; else this.DisplayState = DisplayState.TEXT; // webbrowser this.m_webExternalHost_readerInfo.Initial(this.MainForm, this.webBrowser_reader); this.webBrowser_reader.ObjectForScripting = this.m_webExternalHost_readerInfo; // 2009/10/18 this.m_webExternalHost_itemInfo.Initial(this.MainForm, this.webBrowser_item); this.webBrowser_item.ObjectForScripting = this.m_webExternalHost_itemInfo; this.m_webExternalHost_biblioInfo.Initial(this.MainForm, this.webBrowser_biblio); this.webBrowser_biblio.ObjectForScripting = this.m_webExternalHost_biblioInfo; #if NO // this.VerifyReaderPassword = this.VerifyReaderPassword; // 使"校验读者密码"按钮文字状态显示正确 this.VerifyReaderPassword = this.MainForm.AppInfo.GetBoolean( "charging_form", "verify_reader_password", false); #endif if (this.VerifyReaderPassword == true) { this.label_verifyReaderPassword.Visible = true; this.textBox_readerPassword.Visible = true; this.button_verifyReaderPassword.Visible = true; } else { this.label_verifyReaderPassword.Visible = false; this.textBox_readerPassword.Visible = false; this.button_verifyReaderPassword.Visible = false; } if (this.PatronBarcodeAllowHanzi == false) this.textBox_readerBarcode.ImeMode = System.Windows.Forms.ImeMode.Disable; this.SwitchFocus(READER_BARCODE, null); #if NO // 窗口打开时初始化 this.m_bSuppressScriptErrors = !this.MainForm.DisplayScriptErrorDialog; #endif // API.PostMessage(this.Handle, WM_LOADSIZE, 0, 0); this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); SetReaderRenderString("(空)"); SetBiblioRenderString("(空)"); SetItemRenderString("(空)"); }
private void BiblioSearchForm_Load(object sender, EventArgs e) { this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); this.MainForm.AppInfo.LoadMdiSize += new EventHandler(AppInfo_LoadMdiSize); this.MainForm.AppInfo.SaveMdiSize += new EventHandler(AppInfo_SaveMdiSize); this.MainForm.FillBiblioFromList(this.comboBox_from); this.m_strUsedMarcQueryFilename = this.MainForm.AppInfo.GetString( "bibliosearchform", "usedMarcQueryFilename", ""); // 恢复上次退出时保留的检索途径 string strFrom = this.MainForm.AppInfo.GetString( "bibliosearchform", "search_from", ""); if (String.IsNullOrEmpty(strFrom) == false) this.comboBox_from.Text = strFrom; this.checkedComboBox_biblioDbNames.Text = this.MainForm.AppInfo.GetString( "bibliosearchform", "biblio_db_name", "<全部>"); this.comboBox_matchStyle.Text = this.MainForm.AppInfo.GetString( "bibliosearchform", "match_style", "前方一致"); bool bHideMatchStyle = this.MainForm.AppInfo.GetBoolean( "biblio_search_form", "hide_matchstyle", false); if (bHideMatchStyle == true) { this.label_matchStyle.Visible = false; this.comboBox_matchStyle.Visible = false; this.comboBox_matchStyle.Text = "前方一致"; // 隐藏后,采用缺省值 } string strSaveString = this.MainForm.AppInfo.GetString( "bibliosearchform", "query_lines", "^^^"); this.dp2QueryControl1.Restore(strSaveString); comboBox_matchStyle_TextChanged(null, null); /* // FillFromList(); // this.BeginInvoke(new Delegate_FillFromList(FillFromList)); EnableControls(false); API.PostMessage(this.Handle, API.WM_USER + 100, 0, 0); */ if (this.MainForm != null) this.MainForm.FixedSelectedPageChanged += new EventHandler(MainForm_FixedSelectedPageChanged); UpdateMenu(); #if NO if (this.MainForm.NormalDbProperties == null || this.MainForm.BiblioDbFromInfos == null || this.MainForm.BiblioDbProperties == null) { this.tableLayoutPanel_main.Enabled = false; } #endif { string strError = ""; List<string> codes = null; // 获得全部可用的图书馆代码。注意,并不包含 "" (全局) int nRet = this.MainForm.GetAllLibraryCodes(out codes, out strError); if (nRet == -1) MessageBox.Show(this, strError); else { this.comboBox_location.Items.Clear(); this.comboBox_location.Items.Add("<不筛选>"); foreach (string code in codes) { this.comboBox_location.Items.Add(code); } } this.comboBox_location.Text = this.MainForm.AppInfo.GetString( "bibliosearchform", "location_filter", "<不筛选>"); } }
private void ItemInfoForm_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 // webbrowser this.m_webExternalHost_item.Initial(this.MainForm, this.webBrowser_itemHTML); this.webBrowser_itemHTML.ObjectForScripting = this.m_webExternalHost_item; this.m_webExternalHost_biblio.Initial(this.MainForm, this.webBrowser_biblio); this.webBrowser_biblio.ObjectForScripting = this.m_webExternalHost_biblio; this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); this.Text = this.DbTypeCaption; }
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(); }
private void ReaderInfoForm_Load(object sender, EventArgs e) { if (this.MainForm != null) { MainForm.SetControlFont(this, this.MainForm.DefaultFont); #if NO // 窗口打开时初始化 this.m_bSuppressScriptErrors = !this.MainForm.DisplayScriptErrorDialog; #endif } #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.readerEditControl1.SetReadOnly("librarian"); this.readerEditControl1.GetValueTable += new GetValueTableEventHandler(readerEditControl1_GetValueTable); this.readerEditControl1.Initializing = false; // 如果没有此句,一开始在空模板上修改就不会变色 // this.binaryResControl1.ContentChanged -= new ContentChangedEventHandler(binaryResControl1_ContentChanged); this.binaryResControl1.ContentChanged += new ContentChangedEventHandler(binaryResControl1_ContentChanged); this.binaryResControl1.Channel = this.Channel; this.binaryResControl1.Stop = this.stop; // webbrowser this.m_webExternalHost.Initial(this.MainForm, this.webBrowser_readerInfo); this.m_webExternalHost.GetLocalPath -= new GetLocalFilePathEventHandler(m_webExternalHost_GetLocalPath); this.m_webExternalHost.GetLocalPath += new GetLocalFilePathEventHandler(m_webExternalHost_GetLocalPath); 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); string strSelectedTemplates = this.MainForm.AppInfo.GetString( "readerinfo_form", "selected_templates", ""); if (String.IsNullOrEmpty(strSelectedTemplates) == false) { selected_templates.Build(strSelectedTemplates); } API.PostMessage(this.Handle, WM_SET_FOCUS, 0, 0); }
private void dp2SearchForm_Load(object sender, EventArgs e) { #if NO if (this.MainForm.TestMode == true) { MessageBox.Show(this.MainForm, "dp2 检索窗需要先设置序列号(正式模式)才能使用"); API.PostMessage(this.Handle, API.WM_CLOSE, 0, 0); return; } #endif #if SN // 检查序列号 // DateTime start_day = new DateTime(2014, 11, 15); // 2014/11/15 以后强制启用序列号功能 // if (DateTime.Now >= start_day || this.MainForm.IsExistsSerialNumberStatusFile() == true) { // 在用户目录中写入一个隐藏文件,表示序列号功能已经启用 this.MainForm.WriteSerialNumberStatusFile(); string strError = ""; int nRet = this.MainForm.VerifySerialCode("dp2 检索窗需要先设置序列号才能使用", "", false, out strError); if (nRet == -1) { #if NO MessageBox.Show(this.MainForm, "dp2 检索窗需要先设置序列号才能使用"); API.PostMessage(this.Handle, API.WM_CLOSE, 0, 0); return; #endif } else { // 为全部服务器设置 verified 标志 if (this.MainForm.Servers != null) this.MainForm.Servers.SetAllVerified(true); } } #else // 为全部服务器设置 verified 标志 this.MainForm.Servers.SetAllVerified(true); #endif // EventLoadFinish.Reset(); this.BinDir = Environment.CurrentDirectory; this.commander = new Commander(this); this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy); this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy); SetLayout(this.LayoutName); this.MainForm.AppInfo.LoadMdiSize += new EventHandler(AppInfo_LoadMdiSize); this.MainForm.AppInfo.SaveMdiSize += new EventHandler(AppInfo_SaveMdiSize); LoadSize(); this.Channels = new LibraryChannelCollection(); this.Channels.BeforeLogin += new BeforeLoginEventHandle(Channels_BeforeLogin); this.Channels.AfterLogin += new AfterLoginEventHandle(Channels_AfterLogin); #if NO stop = new DigitalPlatform.Stop(); stop.Register(MainForm.stopManager, true); // 和容器关联 #endif // this.dp2ResTree1.TestMode = this.MainForm.TestMode; this.dp2ResTree1.stopManager = MainForm.stopManager; this.dp2ResTree1.Servers = MainForm.Servers; // 引用 this.dp2ResTree1.Channels = this.Channels; // 引用 this.dp2ResTree1.cfgCache = this.MainForm.cfgCache; string strSortTables = this.MainForm.AppInfo.GetString( "dp2_search", "sort_tables", ""); this.dp2ResTree1.sort_tables = dp2ResTree.RestoreSortTables(strSortTables); this.dp2ResTree1.CheckBoxes = this.MainForm.AppInfo.GetBoolean( "dp2_search", "enable_checkboxes", false); this.dp2ResTree1.Fill(null); this.textBox_simple_queryWord.Text = this.MainForm.AppInfo.GetString( "dp2_search_simple_query", "word", ""); this.comboBox_simple_matchStyle.Text = this.MainForm.AppInfo.GetString( "dp2_search_simple_query", "matchstyle", "前方一致"); this.textBox_mutiline_queryContent.Text = this.MainForm.AppInfo.GetString( "dp2_search_muline_query", "content", ""); this.comboBox_multiline_matchStyle.Text = this.MainForm.AppInfo.GetString( "dp2_search_muline_query", "matchstyle", "前方一致"); string strWidths = this.MainForm.AppInfo.GetString( "dp2searchform", "record_list_column_width", ""); if (String.IsNullOrEmpty(strWidths) == false) { ListViewUtil.SetColumnHeaderWidth(this.listView_browse, strWidths, true); } string strSaveString = this.MainForm.AppInfo.GetString( "dp2searchform", "query_lines", "^^^"); this.dp2QueryControl1.Restore(strSaveString); // 按照上次保存的路径展开resdircontrol树 string strResDirPath = this.MainForm.AppInfo.GetString( "dp2_search_simple_query", "resdirpath", ""); if (strResDirPath != null) { this.Update(); object[] pList = { strResDirPath }; this.BeginInvoke(new Delegate_ExpandResDir(ExpandResDir), pList); } else { this.EventLoadFinish.Set(); } comboBox_matchStyle_TextChanged(null, null); }
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)); }
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); }
private void AmerceForm_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); API.PostMessage(this.Handle, WM_LOADSIZE, 0, 0); /* this.listView_amerced.SmallImageList = this.imageList_itemType; this.listView_amerced.LargeImageList = this.imageList_itemType; * */ this.checkBox_fillSummary.Checked = this.MainForm.AppInfo.GetBoolean( "amerce_form", "fill_summary", true); if (this.LayoutMode == "左右分布") this.splitContainer_main.Orientation = Orientation.Vertical; }