//Menu: File -> New private void NewFile() { int newpage = this.NewPage(); tcSheets.SelectedIndex = newpage; CurrentEditor.Refresh(); }
//Refresh button private void btnRefresh_Click(object sender, EventArgs e) { if (CurrentEditor == null) { return; } CurrentEditor.Refresh(); }
//"Удалить фигуру" private void btnDelete_Click(object sender, EventArgs e) { if (CurrentEditor != null) { int[] a = new int[lvShapes.SelectedIndices.Count]; lvShapes.SelectedIndices.CopyTo(a, 0); CurrentEditor.DeleteFigures(a); CurrentEditor.Refresh(); } }
//Изменился индекс текущей вкладки private void tcSheets_SelectedIndexChanged(object sender, EventArgs e) { AfterDraw(); if (CurrentEditor == null) { lvShapes.Items.Clear(); } else { CurrentEditor.Refresh(); } }
//Press "+" in preview area private void pbPlus_Click(object sender, EventArgs e) { if (CurrentPb == null) { return; } if (CurrentPb.Width > 2400) { return; } CurrentPb.Width += 400; CurrentPb.Height += 400; CurrentEditor.RedefineXY( CurrentPb.Width, CurrentPb.Height); CurrentEditor.Refresh(); }
//Press "-" in preview area private void pbMinus_Click(object sender, EventArgs e) { if (CurrentPb == null) { return; } if ((CurrentPb.Width <= tcSheets.Width) || (CurrentPb.Height <= tcSheets.Height)) { return; } CurrentPb.Width -= 400; CurrentPb.Height -= 400; CurrentEditor.RedefineXY( CurrentPb.Width, CurrentPb.Height); CurrentEditor.Refresh(); }