예제 #1
0
        //Menu: File -> New
        private void NewFile()
        {
            int newpage = this.NewPage();

            tcSheets.SelectedIndex = newpage;
            CurrentEditor.Refresh();
        }
예제 #2
0
        //Refresh button
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            if (CurrentEditor == null)
            {
                return;
            }

            CurrentEditor.Refresh();
        }
예제 #3
0
 //"Удалить фигуру"
 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();
     }
 }
예제 #4
0
        //Изменился индекс текущей вкладки
        private void tcSheets_SelectedIndexChanged(object sender, EventArgs e)
        {
            AfterDraw();

            if (CurrentEditor == null)
            {
                lvShapes.Items.Clear();
            }
            else
            {
                CurrentEditor.Refresh();
            }
        }
예제 #5
0
        //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();
        }
예제 #6
0
        //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();
        }