public My_Graph(Schematix.FSM.Constructor_Core core) { this.core = core; figures = new List <My_Figure>(); selectedFigure = null; selectedFigureList = new List <My_Figure>(); }
public void Constructor_MouseMove(object sender, MouseEventArgs e) { try { Point p = paper.ConvertToBitmapCoordinate(e); if (Lock == true) { MouseEventArgs newE = new MouseEventArgs(e.Button, e.Clicks, p.X, p.Y, e.Delta); if (group_selector.active == true) { group_selector.MouseMove(sender, newE); return; } foreach (Schematix.FSM.My_Figure figure in SelectedFigureList) { figure.mouse_move(sender, newE); } } else { Schematix.FSM.My_Figure fig = bitmap.SelectElem(p); if (fig != null) { if (SelectedFigure != null) { SelectedFigure.Selected = false; fig.Selected = true; SelectedFigure.Select(bitmap.SelectedColor); SelectedFigure = fig; form.Invalidate(); } else { SelectedFigure = fig; SelectedFigure.Selected = true; SelectedFigure.Select(bitmap.SelectedColor); form.Invalidate(); } } else { if (SelectedFigure != null) { SelectedFigure.Selected = false; SelectedFigure = null; form.Invalidate(); } } } } catch (Exception ex) { MessageBox.Show(ex.Message, "Fatal Error :) (MouseMove)", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }