Пример #1
0
 void graphCreator1_MyEvent(object sender, MyEventArgs e)
 {
     label1.Text = String.Format("{0},{1}", e.X, e.Y);
 }
Пример #2
0
 protected virtual void OnMyEvent(MyEventArgs e)
 {
     MyEvent(this, e);
 }
Пример #3
0
        private void GraphViewer_MouseMove(object sender, MouseEventArgs e)
        {
            MyEventArgs ea = new MyEventArgs();
            ea.X = e.X;
            ea.Y = e.Y;
            if (MyEvent!= null) MyEvent(this, ea);
            /*
            Point p;
            Status.x = e.X;
            Status.y = e.Y;
            ////if (hoverLabel != null) Controls.Remove(hoverLabel);

            if (!hover)
            {
                p = FindNear(e.X, e.Y, 2);
                if (p != null)
                {
                    //hover = true;
                    hoverLabel = new Label();
                    hoverLabel.Text = p.N.ToString();
                    hoverLabel.Font = new Font(FontFamily.GenericMonospace, 8); ;
                    hoverLabel.AutoSize = true;
                    //Pen p = new Pen(Color.Black);
                    this.Controls.Add(hoverLabel);
                    hoverLabel.BorderStyle = BorderStyle.FixedSingle;
                    hoverLabel.Top = p.X + 10;
                    hoverLabel.Left = p.Y + 10;
                    //hoverLabel = lbl;
                }
            }
            else { hover = false; Controls.Remove(hoverLabel); }
             */
        }
Пример #4
0
 void graphCreator1_MyEvent(object sender, MyEventArgs e)
 {
     label1.Text = String.Format("{0},{1}", e.X, e.Y);
 }