Example #1
0
 protected virtual void OnInsertMGAGlossListItem(GlossListEventArgs glea)
 {
     if (InsertMGAGlossListItem != null)
     {
         InsertMGAGlossListItem(this, glea);
     }
 }
Example #2
0
        public void OnInsertButtonClick(object obj, EventArgs ea)
        {
            CheckDisposed();

            MasterInflectionFeature mif = (MasterInflectionFeature)treeViewGlossListItem.SelectedNode.Tag;

            if (mif == null)
            {
                return;                 // just to be safe
            }
            GlossListBoxItem glbiNew = new GlossListBoxItem(mif.Node,
                                                            treeViewGlossListItem.AfterSeparator, treeViewGlossListItem.ComplexNameSeparator,
                                                            treeViewGlossListItem.ComplexNameFirst);
            GlossListBoxItem glbiConflict;

            if (glossListBoxGloss.NewItemConflictsWithExtantItem(glbiNew, out glbiConflict))
            {
                const string ksPath   = "/group[@id='Linguistics']/group[@id='Morphology']/group[@id='MGA']/";
                string       sMsg1    = m_mediator.StringTbl.GetStringWithXPath("ItemConflictDlgMessage", ksPath);
                string       sMsg     = String.Format(sMsg1, glbiConflict.ToString());
                string       sCaption = m_mediator.StringTbl.GetStringWithXPath("ItemConflictDlgCaption", ksPath);
                MessageBox.Show(sMsg, sCaption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            // raise event
            GlossListEventArgs glea = new GlossListEventArgs(glbiNew);

            OnInsertMGAGlossListItem(glea);
            buttonAcceptGloss.Enabled = true;
            EnableMoveUpDownButtons();
            ShowGloss();
        }
Example #3
0
		private void OnInsertItem(object sender, GlossListEventArgs glea)
		{
			// Adds the GlossListBoxItem contained within the GlossListEventArgs object
			Items.Add(glea.GlossListBoxItem);
		}
Example #4
0
 private void OnInsertItem(object sender, GlossListEventArgs glea)
 {
     // Adds the GlossListBoxItem contained within the GlossListEventArgs object
     Items.Add(glea.GlossListBoxItem);
 }
Example #5
0
		protected virtual void OnInsertMGAGlossListItem(GlossListEventArgs glea)
		{
			if (InsertMGAGlossListItem != null)
				InsertMGAGlossListItem(this, glea);
		}
Example #6
0
		public void OnInsertButtonClick(object obj, EventArgs ea)
		{
			CheckDisposed();

			MasterInflectionFeature mif = (MasterInflectionFeature)treeViewGlossListItem.SelectedNode.Tag;
			if (mif == null)
				return; // just to be safe
			GlossListBoxItem glbiNew = new GlossListBoxItem(m_cache, mif.Node,
				treeViewGlossListItem.AfterSeparator, treeViewGlossListItem.ComplexNameSeparator,
				treeViewGlossListItem.ComplexNameFirst);
			GlossListBoxItem glbiConflict;
			if (glossListBoxGloss.NewItemConflictsWithExtantItem(glbiNew, out glbiConflict))
			{
				const string ksPath = "/group[@id='Linguistics']/group[@id='Morphology']/group[@id='MGA']/";
				string sMsg1 = m_mediator.StringTbl.GetStringWithXPath("ItemConflictDlgMessage", ksPath);
				string sMsg = String.Format(sMsg1, glbiConflict.ToString());
				string sCaption = m_mediator.StringTbl.GetStringWithXPath("ItemConflictDlgCaption", ksPath);
				MessageBox.Show(sMsg, sCaption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				return;
			}
			// raise event
			GlossListEventArgs glea = new GlossListEventArgs(glbiNew);
			OnInsertMGAGlossListItem(glea);
			buttonAcceptGloss.Enabled = true;
			EnableMoveUpDownButtons();
			ShowGloss();
		}