public MasterItem(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm) { m_node = node; m_eKind = kind; m_term = sTerm; m_citations = new List<MasterItemCitation>(); XmlNode nd = node.SelectSingleNode("abbrev"); m_abbrevWs = XmlUtils.GetManditoryAttributeValue(nd, "ws"); m_abbrev = nd.InnerText; nd = node.SelectSingleNode("term"); m_termWs = XmlUtils.GetManditoryAttributeValue(nd, "ws"); m_term = nd.InnerText; nd = node.SelectSingleNode("def"); if (nd != null) { m_defWs = XmlUtils.GetManditoryAttributeValue(nd, "ws"); m_def = nd.InnerText; } foreach (XmlNode citNode in node.SelectNodes("citation")) { string sWs = XmlUtils.GetOptionalAttributeValue(citNode, "ws"); if (sWs == null) sWs = "en"; m_citations.Add(new MasterItemCitation(sWs, citNode.InnerText)); } }
private void InitDlg(string className, GlossListTreeView treeView) { m_sClassName = className; m_tvMasterList = treeView; // // Required for Windows Form Designer support // InitializeComponent(); AccessibleName = GetType().Name; m_tvMasterList.TerminalsUseCheckBoxes = true; iCheckedCount = 0; pictureBox1.Image = m_imageListPictures.Images[0]; m_btnOK.Enabled = false; // Disable until we are able to support interaction with the DB list of POSes. m_rtbDescription.ReadOnly = true; // Don't allow any editing DoExtraInit(); }
private void InitDlg(string className, GlossListTreeView treeView) { m_sClassName = className; m_tvMasterList = treeView; // // Required for Windows Form Designer support // InitializeComponent(); m_tvMasterList.TerminalsUseCheckBoxes = true; iCheckedCount = 0; pictureBox1.Image = m_imageListPictures.Images[0]; m_btnOK.Enabled = false; // Disable until we are able to support interaction with the DB list of POSes. m_rtbDescription.ReadOnly = true; // Don't allow any editing DoExtraInit(); helpProvider = new System.Windows.Forms.HelpProvider(); helpProvider.HelpNamespace = FwApp.App.HelpFile; helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0)); helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic); }
public MasterListDlg(string className, GlossListTreeView treeView) { InitDlg(className, treeView); }
public MasterListDlg() { GlossListTreeView treeView = new GlossListTreeView(); InitDlg("FsClosedFeature", treeView); }
public MasterPhonologicalFeature(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm) : base(node, kind, sTerm) { }
public MasterInflectionFeature(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm) : base(node, kind, sTerm) { }
/// <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(MGADialog)); System.Windows.Forms.TableLayoutPanel panelGlossComponents; System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; System.Windows.Forms.Panel panel1; System.Windows.Forms.Panel panelInsertRemove; System.Windows.Forms.TableLayoutPanel panelSelectedGloss; System.Windows.Forms.TableLayoutPanel tableLayoutPanelSelectedGloss; System.Windows.Forms.Panel panel; System.Windows.Forms.Panel panel2; System.Windows.Forms.Panel panelTop; System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; this.splitContainerVertical = new System.Windows.Forms.SplitContainer(); this.groupBoxGlossComponents = new System.Windows.Forms.GroupBox(); this.comboGlossListItem = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox(); this.labelGlossListItem = new System.Windows.Forms.Label(); this.checkBoxShowUsed = new System.Windows.Forms.CheckBox(); this.buttonInfo = new System.Windows.Forms.Button(); this.buttonInsert = new System.Windows.Forms.Button(); this.buttonRemove = new System.Windows.Forms.Button(); this.groupBoxSelectedGloss = new System.Windows.Forms.GroupBox(); this.buttonMoveUp = new System.Windows.Forms.Button(); this.buttonMoveDown = new System.Windows.Forms.Button(); this.buttonModify = new System.Windows.Forms.Button(); this.buttonHelp = new System.Windows.Forms.Button(); this.buttonAcceptGloss = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.labelConstructedGlossForPrompt = new System.Windows.Forms.Label(); this.labelAllomorph = new System.Windows.Forms.Label(); this.textBoxResult = new System.Windows.Forms.TextBox(); this.splitContainerHorizontal = new System.Windows.Forms.SplitContainer(); this.treeViewGlossListItem = new SIL.FieldWorks.LexText.Controls.MGA.GlossListTreeView(); this.glossListBoxGloss = new SIL.FieldWorks.LexText.Controls.MGA.GlossListBox(); panelGlossComponents = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); panel1 = new System.Windows.Forms.Panel(); panelInsertRemove = new System.Windows.Forms.Panel(); panelSelectedGloss = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanelSelectedGloss = new System.Windows.Forms.TableLayoutPanel(); panel = new System.Windows.Forms.Panel(); panel2 = new System.Windows.Forms.Panel(); panelTop = new System.Windows.Forms.Panel(); tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.splitContainerVertical.Panel1.SuspendLayout(); this.splitContainerVertical.Panel2.SuspendLayout(); this.splitContainerVertical.SuspendLayout(); panelGlossComponents.SuspendLayout(); this.groupBoxGlossComponents.SuspendLayout(); tableLayoutPanel1.SuspendLayout(); panel1.SuspendLayout(); panelInsertRemove.SuspendLayout(); panelSelectedGloss.SuspendLayout(); this.groupBoxSelectedGloss.SuspendLayout(); tableLayoutPanelSelectedGloss.SuspendLayout(); panel.SuspendLayout(); panel2.SuspendLayout(); panelTop.SuspendLayout(); tableLayoutPanel2.SuspendLayout(); this.splitContainerHorizontal.Panel1.SuspendLayout(); this.splitContainerHorizontal.Panel2.SuspendLayout(); this.splitContainerHorizontal.SuspendLayout(); this.SuspendLayout(); // // splitContainerVertical // resources.ApplyResources(this.splitContainerVertical, "splitContainerVertical"); this.splitContainerVertical.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; this.splitContainerVertical.Name = "splitContainerVertical"; // // splitContainerVertical.Panel1 // this.splitContainerVertical.Panel1.Controls.Add(panelGlossComponents); this.splitContainerVertical.Panel1.Controls.Add(panelInsertRemove); // // splitContainerVertical.Panel2 // this.splitContainerVertical.Panel2.Controls.Add(panelSelectedGloss); resources.ApplyResources(this.splitContainerVertical.Panel2, "splitContainerVertical.Panel2"); // // panelGlossComponents // resources.ApplyResources(panelGlossComponents, "panelGlossComponents"); panelGlossComponents.Controls.Add(this.groupBoxGlossComponents, 0, 0); panelGlossComponents.Controls.Add(this.buttonInfo, 0, 1); panelGlossComponents.Name = "panelGlossComponents"; // // groupBoxGlossComponents // this.groupBoxGlossComponents.Controls.Add(tableLayoutPanel1); resources.ApplyResources(this.groupBoxGlossComponents, "groupBoxGlossComponents"); this.groupBoxGlossComponents.Name = "groupBoxGlossComponents"; this.groupBoxGlossComponents.TabStop = false; // // tableLayoutPanel1 // resources.ApplyResources(tableLayoutPanel1, "tableLayoutPanel1"); tableLayoutPanel1.Controls.Add(panel1, 0, 0); tableLayoutPanel1.Controls.Add(this.checkBoxShowUsed, 0, 2); tableLayoutPanel1.Controls.Add(this.treeViewGlossListItem, 0, 1); tableLayoutPanel1.Name = "tableLayoutPanel1"; // // panel1 // panel1.Controls.Add(this.comboGlossListItem); panel1.Controls.Add(this.labelGlossListItem); resources.ApplyResources(panel1, "panel1"); panel1.Name = "panel1"; // // comboGlossListItem // resources.ApplyResources(this.comboGlossListItem, "comboGlossListItem"); this.comboGlossListItem.Name = "comboGlossListItem"; // // labelGlossListItem // resources.ApplyResources(this.labelGlossListItem, "labelGlossListItem"); this.labelGlossListItem.Name = "labelGlossListItem"; // // checkBoxShowUsed // resources.ApplyResources(this.checkBoxShowUsed, "checkBoxShowUsed"); this.checkBoxShowUsed.Name = "checkBoxShowUsed"; // // buttonInfo // resources.ApplyResources(this.buttonInfo, "buttonInfo"); this.buttonInfo.Name = "buttonInfo"; this.buttonInfo.Click += new System.EventHandler(this.OnInfoButtonClick); // // panelInsertRemove // panelInsertRemove.Controls.Add(this.buttonInsert); panelInsertRemove.Controls.Add(this.buttonRemove); resources.ApplyResources(panelInsertRemove, "panelInsertRemove"); panelInsertRemove.Name = "panelInsertRemove"; panelInsertRemove.TabStop = true; // // buttonInsert // resources.ApplyResources(this.buttonInsert, "buttonInsert"); this.buttonInsert.Name = "buttonInsert"; this.buttonInsert.Click += new System.EventHandler(this.OnInsertButtonClick); // // buttonRemove // resources.ApplyResources(this.buttonRemove, "buttonRemove"); this.buttonRemove.Name = "buttonRemove"; this.buttonRemove.Click += new System.EventHandler(this.OnRemoveButtonClick); // // panelSelectedGloss // resources.ApplyResources(panelSelectedGloss, "panelSelectedGloss"); panelSelectedGloss.Controls.Add(this.groupBoxSelectedGloss, 0, 0); panelSelectedGloss.Controls.Add(panel2, 0, 1); panelSelectedGloss.Name = "panelSelectedGloss"; // // groupBoxSelectedGloss // this.groupBoxSelectedGloss.Controls.Add(tableLayoutPanelSelectedGloss); resources.ApplyResources(this.groupBoxSelectedGloss, "groupBoxSelectedGloss"); this.groupBoxSelectedGloss.Name = "groupBoxSelectedGloss"; this.groupBoxSelectedGloss.TabStop = false; // // tableLayoutPanelSelectedGloss // resources.ApplyResources(tableLayoutPanelSelectedGloss, "tableLayoutPanelSelectedGloss"); tableLayoutPanelSelectedGloss.Controls.Add(this.glossListBoxGloss, 0, 0); tableLayoutPanelSelectedGloss.Controls.Add(panel, 1, 0); tableLayoutPanelSelectedGloss.Name = "tableLayoutPanelSelectedGloss"; // // panel // panel.Controls.Add(this.buttonMoveUp); panel.Controls.Add(this.buttonMoveDown); panel.Controls.Add(this.buttonModify); resources.ApplyResources(panel, "panel"); panel.Name = "panel"; // // buttonMoveUp // resources.ApplyResources(this.buttonMoveUp, "buttonMoveUp"); this.buttonMoveUp.Name = "buttonMoveUp"; this.buttonMoveUp.Click += new System.EventHandler(this.OnMoveUpButtonClick); // // buttonMoveDown // resources.ApplyResources(this.buttonMoveDown, "buttonMoveDown"); this.buttonMoveDown.Name = "buttonMoveDown"; this.buttonMoveDown.Click += new System.EventHandler(this.OnMoveDownButtonClick); // // buttonModify // resources.ApplyResources(this.buttonModify, "buttonModify"); this.buttonModify.Name = "buttonModify"; this.buttonModify.Click += new System.EventHandler(this.OnModifyButtonClick); // // panel2 // panel2.Controls.Add(this.buttonHelp); panel2.Controls.Add(this.buttonAcceptGloss); panel2.Controls.Add(this.buttonCancel); resources.ApplyResources(panel2, "panel2"); panel2.Name = "panel2"; // // buttonHelp // resources.ApplyResources(this.buttonHelp, "buttonHelp"); this.buttonHelp.Name = "buttonHelp"; this.buttonHelp.Click += new System.EventHandler(this.OnHelpButtonClick); // // buttonAcceptGloss // this.buttonAcceptGloss.DialogResult = System.Windows.Forms.DialogResult.OK; resources.ApplyResources(this.buttonAcceptGloss, "buttonAcceptGloss"); this.buttonAcceptGloss.Name = "buttonAcceptGloss"; this.buttonAcceptGloss.Click += new System.EventHandler(this.OnAcceptGlossButtonClick); // // buttonCancel // this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; resources.ApplyResources(this.buttonCancel, "buttonCancel"); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Click += new System.EventHandler(this.OnCancelButtonClick); // // panelTop // panelTop.Controls.Add(tableLayoutPanel2); panelTop.Controls.Add(this.textBoxResult); resources.ApplyResources(panelTop, "panelTop"); panelTop.Name = "panelTop"; panelTop.TabStop = true; // // tableLayoutPanel2 // resources.ApplyResources(tableLayoutPanel2, "tableLayoutPanel2"); tableLayoutPanel2.Controls.Add(this.labelConstructedGlossForPrompt, 0, 0); tableLayoutPanel2.Controls.Add(this.labelAllomorph, 0, 1); tableLayoutPanel2.Name = "tableLayoutPanel2"; // // labelConstructedGlossForPrompt // resources.ApplyResources(this.labelConstructedGlossForPrompt, "labelConstructedGlossForPrompt"); this.labelConstructedGlossForPrompt.Name = "labelConstructedGlossForPrompt"; // // labelAllomorph // resources.ApplyResources(this.labelAllomorph, "labelAllomorph"); this.labelAllomorph.Name = "labelAllomorph"; // // textBoxResult // resources.ApplyResources(this.textBoxResult, "textBoxResult"); this.textBoxResult.Name = "textBoxResult"; // // splitContainerHorizontal // resources.ApplyResources(this.splitContainerHorizontal, "splitContainerHorizontal"); this.splitContainerHorizontal.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.splitContainerHorizontal.Name = "splitContainerHorizontal"; // // splitContainerHorizontal.Panel1 // this.splitContainerHorizontal.Panel1.Controls.Add(this.splitContainerVertical); // // splitContainerHorizontal.Panel2 // this.splitContainerHorizontal.Panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); // // treeViewGlossListItem // resources.ApplyResources(this.treeViewGlossListItem, "treeViewGlossListItem"); this.treeViewGlossListItem.HideSelection = false; this.treeViewGlossListItem.ItemHeight = 16; this.treeViewGlossListItem.Name = "treeViewGlossListItem"; this.treeViewGlossListItem.TerminalsUseCheckBoxes = false; this.treeViewGlossListItem.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnGlossListTreeSelect); // // glossListBoxGloss // resources.ApplyResources(this.glossListBoxGloss, "glossListBoxGloss"); this.glossListBoxGloss.FormattingEnabled = true; this.glossListBoxGloss.MGADialog = null; this.glossListBoxGloss.Name = "glossListBoxGloss"; this.glossListBoxGloss.SelectedIndexChanged += new System.EventHandler(this.OnGlossListBoxSelectedIndexChanged); // // MGADialog // this.AcceptButton = this.buttonAcceptGloss; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonCancel; this.Controls.Add(this.splitContainerHorizontal); this.Controls.Add(panelTop); this.HelpButton = true; this.Name = "MGADialog"; this.splitContainerVertical.Panel1.ResumeLayout(false); this.splitContainerVertical.Panel2.ResumeLayout(false); this.splitContainerVertical.ResumeLayout(false); panelGlossComponents.ResumeLayout(false); this.groupBoxGlossComponents.ResumeLayout(false); tableLayoutPanel1.ResumeLayout(false); panel1.ResumeLayout(false); panelInsertRemove.ResumeLayout(false); panelSelectedGloss.ResumeLayout(false); this.groupBoxSelectedGloss.ResumeLayout(false); tableLayoutPanelSelectedGloss.ResumeLayout(false); panel.ResumeLayout(false); panel2.ResumeLayout(false); panelTop.ResumeLayout(false); panelTop.PerformLayout(); tableLayoutPanel2.ResumeLayout(false); this.splitContainerHorizontal.Panel1.ResumeLayout(false); this.splitContainerHorizontal.Panel2.ResumeLayout(false); this.splitContainerHorizontal.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) return; if( disposing ) { if(components != null) { components.Dispose(); } if (m_tvMasterList != null) m_tvMasterList.Dispose(); } m_cache = null; m_selFeatDefn = null; m_featureList = null; m_mediator = null; m_tvMasterList = null; base.Dispose( disposing ); }
public void WritingSystemDefaultsToEnglishTest() { GlossListTreeView myTVGL = new GlossListTreeView(); // sXmlFile doesn't have any "fr" items in it; so it should default to English myTVGL.LoadGlossListTreeFromXml(sXmlFile, "fr"); Assert.IsTrue(myTVGL.WritingSystemAbbrev == "en", "Expected writing system to default to English, but it did not."); }
public void Init() { treeViewGlossList = new GlossListTreeView(); treeViewGlossList.LoadGlossListTreeFromXml(sXmlFile, "en"); dom.Load(sXmlFile); }