Exemple #1
0
 private void edit_InputReceived(object sender, EditPacketEventArgs e)
 {
     if (EditPacketEvent != null)
     {
         EditPacketEvent.Invoke(sender, e);
     }
 }
Exemple #2
0
        void Graph_EditPacketEvent(object sender, EditPacketEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new EventHandler <EditPacketEventArgs>(Graph_EditPacketEvent), sender, e);
            }
            else
            {
                using (EditPacketForm frm = new EditPacketForm())
                {
                    frm.Frame             = e.Frame;
                    frm.Selector          = e.SelectPath;
                    frm.DisplayColor      = ColorValueConverter.ToColor(e.Color);
                    frm.DisplayTag        = e.Tag;
                    frm.ShowDisableEditor = true;
                    frm.ShowReadOnly      = true;

                    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        e.Frame = frm.Frame;
                    }

                    if (frm.DisableEditor)
                    {
                        if (e.Sender != null)
                        {
                            e.Sender.Enabled = false;
                        }
                    }
                }
            }
        }
Exemple #3
0
 private void service_EditPacketEvent(object sender, EditPacketEventArgs e)
 {
     if (EditPacketEvent != null)
     {
         EditPacketEvent(sender, e);
     }
 }
Exemple #4
0
        void _service_EditPacketEvent(object sender, EditPacketEventArgs e)
        {
            EditPacketForm frm = CreateEditor(e);

            try
            {
                frm.WaitEvent.WaitOne();

                if (frm.DialogResult == DialogResult.OK)
                {
                    e.Frame = frm.Frame;
                }

                if (frm.DisableEditor)
                {
                    if (e.Sender != null)
                    {
                        e.Sender.Enabled = false;
                    }
                }
            }
            finally
            {
                DisposeEditor(frm);
            }
        }
Exemple #5
0
        EditPacketForm CreateEditor(EditPacketEventArgs e)
        {
            if (InvokeRequired)
            {
                return((EditPacketForm)Invoke(new Func <EditPacketEventArgs, EditPacketForm>(CreateEditor), e));
            }
            else
            {
                EditPacketForm frm = new EditPacketForm();

                frm.Frame             = e.Frame;
                frm.Selector          = e.SelectPath;
                frm.DisplayColor      = ColorValueConverter.ToColor(e.Color);
                frm.DisplayTag        = e.Tag;
                frm.ShowDisableEditor = true;
                frm.ShowReadOnly      = true;

                frm.Show();

                frm.Activate();

                return(frm);
            }
        }
Exemple #6
0
 private void service_EditPacketEvent(object sender, EditPacketEventArgs e)
 {
     EditPacketEvent?.Invoke(sender, e);
 }