private void SelectItemDialog_Load(object sender, EventArgs e) { this.MainForm.FillBiblioFromList(this.comboBox_from); #if NO { _floatingMessage = new FloatingMessageForm(this); _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.Show(this); } #endif this._floatingMessage.RectColor = Color.Purple; stopManager.Initial(this.button_stop, (object)this.toolStripStatusLabel1, (object)this.toolStripProgressBar1); if (stop != null) stop.Unregister(); stop = new DigitalPlatform.Stop(); stop.Register(stopManager, true); // 和容器关联 if (this.AutoSearch == true && string.IsNullOrEmpty(this.textBox_queryWord.Text) == false) { this.BeginInvoke(new Action<object, EventArgs>(button_search_Click), this, new EventArgs()); } if (StringUtil.CompareVersion(this.MainForm.ServerVersion, "2.33") < 0) { MessageBox.Show(this, "选择册记录功能要求 dp2Library 版本必须在 2.33 以上。当前 dp2Library 的版本为 " + this.MainForm.ServerVersion.ToString() + ",请及时升级"); } }
/// <summary> /// 窗口 Load 时被触发 /// </summary> public virtual void OnMyFormLoad() { if (this.MainForm == null) { return; } stop = new DigitalPlatform.Stop(); stop.Register(MainForm.stopManager, true); // 和容器关联 { _floatingMessage = new FloatingMessageForm(this, true); // _floatingMessage.AutoHide = false; _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.RectColor = Color.Green; _floatingMessage.Show(this); if (this.MainForm != null) { this.MainForm.Move += new EventHandler(MainForm_Move); } } }
private void AmazonSearchForm_Load(object sender, EventArgs e) { FillFrom(); this._idFont = new System.Drawing.Font(this.Font.Name, this.Font.Size * 2, FontStyle.Bold); this._titleFont = new System.Drawing.Font(this.Font.Name, this.Font.Size * (float)1.2, FontStyle.Bold); { _floatingMessage = new FloatingMessageForm(this); _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.AutoHide = false; _floatingMessage.Show(this); this._floatingMessage.OnResizeOrMove(); } BeginThread(); if (this.AutoSearch == true && string.IsNullOrEmpty(this.textBox_queryWord.Text) == false) { this.BeginInvoke(new Action <object, EventArgs>(button_search_Click), this, new EventArgs()); } }
private void InputItemBarcodeDialog_Load(object sender, EventArgs e) { if (this.AppInfo != null) { string strWidths = this.AppInfo.GetString( "input_item_barcode_dialog", "list_column_width", ""); if (String.IsNullOrEmpty(strWidths) == false) { ListViewUtil.SetColumnHeaderWidth(this.listView_barcodes, strWidths, true); } } this.m_nOriginDisplayColumnWidth = this.columnHeader_volumeDisplay.Width; if (this.SeriesMode == false) { this.columnHeader_volumeDisplay.Width = 0; } FillBookItemList(); { _floatingMessage = new FloatingMessageForm(this); _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.Show(this); } }
private void EntityRegisterWizard_Load(object sender, EventArgs e) { _biblio.MainForm = this.MainForm; _base.MainForm = this.MainForm; if (this._imageManager != null) this._imageManager.TempFileDir = this.MainForm.UserTempDir; this._originTitle = this.Text; SetTitle(); SetButtonState(); LoadServerXml(); #if NO { _floatingMessage = new FloatingMessageForm(this, true); // _floatingMessage.AutoHide = false; _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.RectColor = Color.Green; _floatingMessage.Show(this); // _floatingMessage.Text = "test"; //_floatingMessage.Clicked += _floatingMessage_Clicked; } #endif #if NO this.MainForm.Move += new EventHandler(MainForm_Move); #endif this.MainForm.Activated += MainForm_Activated; this.MainForm.Deactivate += MainForm_Deactivate; // this.MainForm.MessageFilter += MainForm_MessageFilter; { this.UiState = this.MainForm.AppInfo.GetString("entityRegisterWizard", "uistate", ""); // 缺省值 检索途径 if (string.IsNullOrEmpty(this.comboBox_from.Text) == true && this.comboBox_from.Items.Count > 0) this.comboBox_from.Text = this.comboBox_from.Items[0] as string; #if NO // 缺省值 书目重要字段 if (string.IsNullOrEmpty(this.textBox_settings_importantFields.Text) == true) this.textBox_settings_importantFields.Text = "010,200,210,215,686,69*,7**".Replace(",", "\r\n"); #endif } SetControlsColor(this._colorStyle); this._genData = new GenerateData(this, this); this._genData.ScriptFileName = "dp2circulation_marc_autogen_2.cs"; this._genData.DetailHostType = typeof(BiblioItemsHost); // 刚打开窗口,设定输入焦点 this.BeginInvoke(new Action(SetStartFocus)); }
/// <summary> /// 窗口 Load 时被触发 /// </summary> public virtual void OnMyFormLoad() { if (this.MainForm == null) return; 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 -= Channel_Idle; this.Channel.Idle += Channel_Idle; stop = new DigitalPlatform.Stop(); stop.Register(MainForm.stopManager, true); // 和容器关联 { _floatingMessage = new FloatingMessageForm(this, true); // _floatingMessage.AutoHide = false; _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.RectColor = Color.Green; _floatingMessage.Show(this); // _floatingMessage.Text = "test"; //_floatingMessage.Clicked += _floatingMessage_Clicked; if (this.MainForm != null) this.MainForm.Move -= new EventHandler(MainForm_Move); } }
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 EntityRegisterForm_Load(object sender, EventArgs e) { // this.entityRegisterControl1.Channel = this.Channel; this.entityRegisterControl1.Progress = this.stop; this.entityRegisterControl1.MainForm = this.MainForm; string strFileName = Path.Combine(this.MainForm.DataDir, "ajax-loader.gif"); this.entityRegisterControl1.LoaderImage = Image.FromFile(strFileName); // TODO: 异步加快窗口打开速度? LoadServerXml(); OpenScanBarcodeForm(); #if NO { _floatingMessage = new FloatingMessageForm(this); _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.Show(this); } #endif }
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 RelationDialog_Load(object sender, EventArgs e) { string strError = ""; int nRet = Program.MainForm.VerifySerialCode("relationdialog", false, out strError); if (nRet == -1) { MessageBox.Show(this, "RelationDialog 需要先设置序列号才能使用"); API.PostMessage(this.Handle, API.WM_CLOSE, 0, 0); return; } _stopManager.Initial(this.toolStripButton_stop, (object)this.toolStripLabel_message, (object)null); _stop = new DigitalPlatform.Stop(); _stop.Register(this._stopManager, true); // 和容器关联 { _floatingMessage = new FloatingMessageForm(this, true); _floatingMessage.AutoHide = false; _floatingMessage.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.Size * 2, FontStyle.Bold); _floatingMessage.Opacity = 0.7; _floatingMessage.RectColor = Color.Green; _floatingMessage.Show(this); } this.BeginInvoke(new Action<string>(Process), this._defaultStyle); }