Esempio n. 1
0
 private void SetCurrentEditor(string action)
 {
     if (action == "")
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
         }
     }
     else
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
             currentEditor.OnTextChanged -= OnTextChanged;
         }
         if (SelectedShowItem != null)
         {
             SelectedShowItem.Action      = ActionStringToAction(action);
             currentEditor                = SelectedShowItem.Editor;
             currentEditor.Location       = new Point(4, 16);
             currentEditor.Dock           = DockStyle.Fill;
             currentEditor.OnTextChanged += OnTextChanged;
             groupBoxItemEdit.Controls.Add(currentEditor);
         }
         else
         {
             //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
             MessageBoxForm.msgIcon = SystemIcons.Information;                     //this is used if you want to add a system icon to the message form.
             var messageBox = new MessageBoxForm("SetCurrentEditor: SelectedShowItem == null",
                                                 "Color Setup", false, false);
             messageBox.ShowDialog();
         }
     }
 }
Esempio n. 2
0
 private void SetCurrentEditor(string action)
 {
     if (action == "")
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
         }
     }
     else
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
         }
         if (SelectedShowItem != null)
         {
             SelectedShowItem.Action      = ActionStringToAction(action);
             currentEditor                = SelectedShowItem.Editor;
             currentEditor.Location       = new Point(4, 16);
             currentEditor.Width          = groupBoxItemEdit.Width - (currentEditor.Left * 2);
             currentEditor.OnTextChanged += OnTextChanged;
             groupBoxItemEdit.Controls.Add(currentEditor);
         }
         else
         {
             MessageBox.Show("SetCurrentEditor: SelectedShowItem == null");
         }
     }
 }
Esempio n. 3
0
		private void SetCurrentEditor(string action)
		{
			if (action == "")
			{
				if (currentEditor != null)
				{
					groupBoxItemEdit.Controls.Remove(currentEditor);
				}
			}
			else
			{
				if (currentEditor != null)
				{
					groupBoxItemEdit.Controls.Remove(currentEditor);
				}
				if (SelectedShowItem != null)
				{
					SelectedShowItem.Action = ActionStringToAction(action);
					currentEditor = SelectedShowItem.Editor;
					currentEditor.Location = new Point(4, 16);
					currentEditor.Dock=DockStyle.Fill;
					currentEditor.OnTextChanged += OnTextChanged;
					groupBoxItemEdit.Controls.Add(currentEditor);
				}
				else
				{
					//messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
					MessageBoxForm.msgIcon = SystemIcons.Information; //this is used if you want to add a system icon to the message form.
					var messageBox = new MessageBoxForm("SetCurrentEditor: SelectedShowItem == null",
										"Color Setup", false, false);
					messageBox.ShowDialog();
				}
			}
		}
Esempio n. 4
0
 private void UpdateItemText(TypeEditorBase editor)
 {
     listViewShowItems.SelectedItems[0].SubItems[0].Text = editor.Text;
     listViewShowItems.Columns[0].Width = -1;
 }
Esempio n. 5
0
        public void OnTextChanged(object sender, EventArgs e)
        {
            TypeEditorBase editor = sender as TypeEditorBase;

            UpdateItemText(editor);
        }
Esempio n. 6
0
        public void OnTextChanged(object sender, EventArgs e)
        {
            TypeEditorBase editor = sender as TypeEditorBase;

            listViewShowItems.SelectedItems[0].SubItems[0].Text = editor.Text;
        }
Esempio n. 7
0
 private void SetCurrentEditor(string action)
 {
     if (action == "")
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
         }
     }
     else
     {
         if (currentEditor != null)
         {
             groupBoxItemEdit.Controls.Remove(currentEditor);
         }
         if (SelectedShowItem != null)
         {
             SelectedShowItem.Action = ActionStringToAction(action);
             currentEditor = SelectedShowItem.Editor;
             currentEditor.Location = new Point(4, 16);
             currentEditor.Width = groupBoxItemEdit.Width - (currentEditor.Left * 2);
             currentEditor.OnTextChanged += OnTextChanged;
             groupBoxItemEdit.Controls.Add(currentEditor);
         }
         else
         {
             MessageBox.Show("SetCurrentEditor: SelectedShowItem == null");
         }
     }
 }