protected void ReplaceMatchingItemsControl() { if (m_mediator == null) return; XmlNode xnWindow = (XmlNode)m_mediator.PropertyTable.GetValue("WindowConfiguration"); if (xnWindow == null) return; XmlNode xnControl = xnWindow.SelectSingleNode("controls/parameters/guicontrol[@id=\"matchingReversalEntries\"]"); if (xnControl == null) return; // Replace the current matchingEntries object with the one specified in the XML. MatchingEntries newME = DynamicLoader.CreateObject(xnControl) as MatchingEntries; if (newME != null) { CopyBasicControlInfo(matchingEntries, newME); this.Controls.Remove(matchingEntries); matchingEntries.Dispose(); matchingEntries = newME; this.Controls.Add(matchingEntries); (matchingEntries as MatchingEntries).SelectionChanged += new SIL.FieldWorks.Common.Utils.FwSelectionChangedEventHandler(this.matchingEntries_SelectionChanged); (matchingEntries as MatchingEntries).RestoreFocus += new EventHandler(matchingEntries_RestoreFocus); // Reset Tab indices of direct child controls of the form. ResetTabOrder(); (newME as MatchingReversalEntriesBrowser).Initialize(m_cache, FontHeightAdjuster.StyleSheetFromMediator(m_mediator), m_mediator, m_owningIndex); } }
/// <summary> /// /// </summary> /// <param name="newME">the new control to use. if null, just remove the existing control.</param> protected void ReplaceMatchingEntriesControl(MatchingEntries newME) { if (newME != null) { newME.Location = matchingEntries.Location; newME.Size = matchingEntries.Size; newME.Name = matchingEntries.Name; newME.AccessibleName = matchingEntries.AccessibleName; newME.TabStop = matchingEntries.TabStop; newME.TabIndex = matchingEntries.TabIndex; newME.Anchor = matchingEntries.Anchor; } this.groupBox2.Controls.Remove(matchingEntries); matchingEntries.SelectionChanged -= new SIL.FieldWorks.Common.Utils.FwSelectionChangedEventHandler(this.matchingEntries_SelectionChanged); bool fAddSearchingChanged = false; if (matchingEntries.HasSearchingChanged) { fAddSearchingChanged = true; matchingEntries.SearchingChanged -= new EventHandler(matchingEntries_SearchingChanged); } matchingEntries.RestoreFocus -= new EventHandler(matchingEntries_RestoreFocus); matchingEntries.Dispose(); matchingEntries = newME; if (matchingEntries != null) { this.groupBox2.Controls.Add(matchingEntries); matchingEntries.SelectionChanged += new SIL.FieldWorks.Common.Utils.FwSelectionChangedEventHandler(this.matchingEntries_SelectionChanged); if (fAddSearchingChanged) matchingEntries.SearchingChanged += new EventHandler(matchingEntries_SearchingChanged); matchingEntries.RestoreFocus += new EventHandler(matchingEntries_RestoreFocus); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReversalEntryGoDlg)); this.m_tbForm = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.label1 = new System.Windows.Forms.Label(); this.btnHelp = new System.Windows.Forms.Button(); this.btnInsert = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.matchingEntries = new SIL.FieldWorks.LexText.Controls.MatchingEntries(); ((System.ComponentModel.ISupportInitialize)(this.m_tbForm)).BeginInit(); this.SuspendLayout(); // // m_tbForm // this.m_tbForm.AdjustStringHeight = true; this.m_tbForm.AllowMultipleLines = false; this.m_tbForm.BackColor = System.Drawing.SystemColors.Window; this.m_tbForm.controlID = null; resources.ApplyResources(this.m_tbForm, "m_tbForm"); this.m_tbForm.Name = "m_tbForm"; this.m_tbForm.SelectionLength = 0; this.m_tbForm.SelectionStart = 0; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // btnHelp // resources.ApplyResources(this.btnHelp, "btnHelp"); this.btnHelp.Name = "btnHelp"; this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); // // btnInsert // resources.ApplyResources(this.btnInsert, "btnInsert"); this.btnInsert.Name = "btnInsert"; // // btnOK // resources.ApplyResources(this.btnOK, "btnOK"); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Name = "btnOK"; // // btnClose // resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.Name = "btnClose"; // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // matchingEntries // resources.ApplyResources(this.matchingEntries, "matchingEntries"); this.matchingEntries.Name = "matchingEntries"; this.matchingEntries.TabStop = false; // // ReversalEntryGoDlgNew // this.AcceptButton = this.btnOK; resources.ApplyResources(this, "$this"); this.CancelButton = this.btnClose; this.Controls.Add(this.matchingEntries); this.Controls.Add(this.label2); this.Controls.Add(this.btnHelp); this.Controls.Add(this.btnInsert); this.Controls.Add(this.btnOK); this.Controls.Add(this.btnClose); this.Controls.Add(this.label1); this.Controls.Add(this.m_tbForm); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ReversalEntryGoDlgNew"; ((System.ComponentModel.ISupportInitialize)(this.m_tbForm)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InsertEntryDlg)); this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.tbLexicalForm = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.tbGloss = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.btnHelp = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.cbMorphType = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox(); this.cbComplexFormType = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.labelArrow = new System.Windows.Forms.Label(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.linkSimilarEntry = new System.Windows.Forms.LinkLabel(); this.matchingEntries = new SIL.FieldWorks.LexText.Controls.MatchingEntries(); this.m_toolTipSlotCombo = new System.Windows.Forms.ToolTip(this.components); this.m_msaGroupBox = new SIL.FieldWorks.LexText.Controls.MSAGroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label3 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.m_lnkAssistant = new System.Windows.Forms.LinkLabel(); ((System.ComponentModel.ISupportInitialize)(this.tbLexicalForm)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbGloss)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); this.SuspendLayout(); // // btnOK // resources.ApplyResources(this.btnOK, "btnOK"); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Name = "btnOK"; // // btnCancel // resources.ApplyResources(this.btnCancel, "btnCancel"); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Name = "btnCancel"; // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // tbLexicalForm // this.tbLexicalForm.AdjustStringHeight = true; this.tbLexicalForm.AllowMultipleLines = false; this.tbLexicalForm.BackColor = System.Drawing.SystemColors.Window; this.tbLexicalForm.controlID = null; resources.ApplyResources(this.tbLexicalForm, "tbLexicalForm"); this.tbLexicalForm.HasBorder = true; this.tbLexicalForm.Name = "tbLexicalForm"; this.tbLexicalForm.SelectionLength = 0; this.tbLexicalForm.SelectionStart = 0; this.tbLexicalForm.TabStop = true; this.tbLexicalForm.TextChanged += new System.EventHandler(this.tbLexicalForm_TextChanged); // // tbGloss // this.tbGloss.AdjustStringHeight = true; this.tbGloss.AllowMultipleLines = false; this.tbGloss.BackColor = System.Drawing.SystemColors.Window; this.tbGloss.controlID = null; resources.ApplyResources(this.tbGloss, "tbGloss"); this.tbGloss.HasBorder = true; this.tbGloss.Name = "tbGloss"; this.tbGloss.SelectionLength = 0; this.tbGloss.SelectionStart = 0; this.tbGloss.TabStop = true; this.tbGloss.TextChanged += new System.EventHandler(this.tbGloss_TextChanged); // // btnHelp // resources.ApplyResources(this.btnHelp, "btnHelp"); this.btnHelp.Name = "btnHelp"; this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // cbMorphType // this.cbMorphType.AllowSpaceInEditBox = false; this.cbMorphType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; resources.ApplyResources(this.cbMorphType, "cbMorphType"); this.cbMorphType.Name = "cbMorphType"; this.cbMorphType.SelectedIndexChanged += new System.EventHandler(this.cbMorphType_SelectedIndexChanged); // // cbComplexFormType // this.cbComplexFormType.AllowSpaceInEditBox = false; this.cbComplexFormType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; resources.ApplyResources(this.cbComplexFormType, "cbComplexFormType"); this.cbComplexFormType.Name = "cbComplexFormType"; this.cbComplexFormType.SelectedIndexChanged += new System.EventHandler(this.cbComplexFormType_SelectedIndexChanged); // // groupBox2 // resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Controls.Add(this.labelArrow); this.groupBox2.Controls.Add(this.linkSimilarEntry); this.groupBox2.Controls.Add(this.matchingEntries); this.groupBox2.Name = "groupBox2"; this.groupBox2.TabStop = false; // // labelArrow // resources.ApplyResources(this.labelArrow, "labelArrow"); this.labelArrow.ImageList = this.imageList1; this.labelArrow.Name = "labelArrow"; this.labelArrow.Click += new System.EventHandler(this.btnSimilarEntry_Click); // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Fuchsia; this.imageList1.Images.SetKeyName(0, "GoToArrow.bmp"); // // linkSimilarEntry // resources.ApplyResources(this.linkSimilarEntry, "linkSimilarEntry"); this.linkSimilarEntry.Name = "linkSimilarEntry"; this.linkSimilarEntry.TabStop = true; this.linkSimilarEntry.Click += new System.EventHandler(this.btnSimilarEntry_Click); // // matchingEntries // resources.ApplyResources(this.matchingEntries, "matchingEntries"); this.matchingEntries.Name = "matchingEntries"; this.matchingEntries.TabStop = false; this.matchingEntries.SelectionChanged += new SIL.FieldWorks.Common.Utils.FwSelectionChangedEventHandler(this.matchingEntries_SelectionChanged); // // m_toolTipSlotCombo // this.m_toolTipSlotCombo.AutoPopDelay = 5000; this.m_toolTipSlotCombo.InitialDelay = 250; this.m_toolTipSlotCombo.ReshowDelay = 100; this.m_toolTipSlotCombo.ShowAlways = true; // // m_msaGroupBox // resources.ApplyResources(this.m_msaGroupBox, "m_msaGroupBox"); this.m_msaGroupBox.MSAType = SIL.FieldWorks.FDO.MsaType.kNotSet; this.m_msaGroupBox.Name = "m_msaGroupBox"; this.m_msaGroupBox.Slot = null; // // groupBox1 // this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.cbMorphType); this.groupBox1.Controls.Add(this.cbComplexFormType); this.groupBox1.Controls.Add(this.tbLexicalForm); this.groupBox1.Controls.Add(this.label2); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // // groupBox3 // this.groupBox3.Controls.Add(this.m_lnkAssistant); this.groupBox3.Controls.Add(this.tbGloss); resources.ApplyResources(this.groupBox3, "groupBox3"); this.groupBox3.Name = "groupBox3"; this.groupBox3.TabStop = false; // // m_lnkAssistant // resources.ApplyResources(this.m_lnkAssistant, "m_lnkAssistant"); this.m_lnkAssistant.Name = "m_lnkAssistant"; this.m_lnkAssistant.TabStop = true; this.m_lnkAssistant.VisitedLinkColor = System.Drawing.Color.Blue; this.m_lnkAssistant.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkAssistant_LinkClicked); // // InsertEntryDlg // this.AcceptButton = this.btnOK; resources.ApplyResources(this, "$this"); this.CancelButton = this.btnCancel; this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox1); this.Controls.Add(this.m_msaGroupBox); this.Controls.Add(this.groupBox2); this.Controls.Add(this.btnHelp); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "InsertEntryDlg"; this.ShowInTaskbar = false; this.Load += new System.EventHandler(this.InsertEntryDlg_Load); this.Closed += new System.EventHandler(this.InsertEntryDlg_Closed); this.Closing += new System.ComponentModel.CancelEventHandler(this.InsertEntryDlg_Closing); ((System.ComponentModel.ISupportInitialize)(this.tbLexicalForm)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbGloss)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); this.ResumeLayout(false); }