Exemplo 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();
         }
     }
 }
Exemplo 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");
         }
     }
 }
Exemplo 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();
				}
			}
		}
Exemplo n.º 4
0
 private void UpdateItemText(TypeEditorBase editor)
 {
     listViewShowItems.SelectedItems[0].SubItems[0].Text = editor.Text;
     listViewShowItems.Columns[0].Width = -1;
 }
Exemplo n.º 5
0
        public void OnTextChanged(object sender, EventArgs e)
        {
            TypeEditorBase editor = sender as TypeEditorBase;

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

            listViewShowItems.SelectedItems[0].SubItems[0].Text = editor.Text;
        }
Exemplo 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");
         }
     }
 }