void ToolButton(object o, EventArgs e) { if (project.task((o as Button).Tag)) { Canavas.Invalidate(); RefreshList(); } selectbutton(o as Button); }
void Canavas_MouseWheel(object sender, MouseEventArgs e) { bool up = e.Delta > 0; view.Zoom *= up ? 1.05 : 0.95; view.ConfigView(); Canavas.Invalidate(); }
void Canavas_MouseMove(object sender, MouseEventArgs e) { bool invalidate = false; if (drag_point) { invalidate = DragPoint(e.Location); } else if (handmode) { Task(e.Location); } else { if (drag) { Cursor.Current = Cursors.NoMove2D; view.ConfigView(e.Location); invalidate = true; } else { bool nothing_here = true; try { invalidate = ScanArea(e.Location, true, ref nothing_here, invalidate); } catch { } if (project.Task != null) { if (project.refresh) { view.MousePosition = e.Location; invalidate = true; } else { Cursor.Current = Cursors.Cross; } } } } if (invalidate) { Canavas.Invalidate(); } }
private void Input_KeyDown(object sender, KeyEventArgs e) { if (e.KeyValue == 13) { var str = input.Text; Function fs = new Function(); fs.function = parse(str); fs.Properties.Name = project.GenerateName("n"); project.functions.Add(fs); if (Execute()) { Canavas.Invalidate(); RefreshList(); } else { project.NameRemouved(fs.Properties.Name); project.functions.Remove(fs); } } }
void OnSize(object o, EventArgs e) { var spliter = container.SplitterDistance; container.Width = ClientSize.Width; container.Height = ClientSize.Height - btm_panel.Height - toolbar.Height; toolbar.Width = ClientSize.Width; Canavas.Size = new Size(container.Panel2.ClientSize.Width, container.Panel2.ClientSize.Height - properties_panel.Height); Canavas.Location = new Point(0, properties_panel.Height); properties_panel.Width = Canavas.Width; btm_panel.Width = ClientSize.Width; input.Width = btm_panel.Width - input.Location.X - 50; info.Location = new Point(btm_panel.Width - info.Width - 10, 5); btm_panel.Location = new Point(0, container.ClientRectangle.Bottom + toolbar.Height); container.SplitterDistance = spliter; project.view.size = Canavas.Size; project.view.WindowSize = ClientSize; project.view.ConfigView(); textBox2.Location = Canavas.Location; textBox2.Size = Canavas.Size; Canavas.Invalidate(); }
void Canavas_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { project.task(null, project.Task); Canavas.Invalidate(); } else { bool invalidate = false; try { invalidate = ScanArea(e.Location, false, ref drag_point, invalidate); } catch { } if (project.Task != null) { drag_point = Task(e.Location); invalidate = true; try { RefreshList(); } catch (Exception e) { } } else if (!drag_point) { view.dx = e.X - view.x; view.dy = e.Y - view.y; drag = true; } if (invalidate) { Canavas.Invalidate(); } } }
public void ObjectTextLeave(object o, EventArgs e) { List(o, container.Panel1, true, true); Canavas.Invalidate(); }
public void CheckBox(object o, EventArgs e) { List(o); Canavas.Invalidate(); }