Пример #1
0
 public Form()
 {
     instance = this;
     InitializeComponent();
     shapes         = new List <Shape>();
     DoubleBuffered = true;
     timer          = new Timer();
     timer.Tick    += Timer_Tick;
     time           = 0;
     shapeType      = 0;
     drawningType   = 0;
     t             = 99;
     random        = new Random();
     isDrag        = false;
     radiusForm    = new Radius();
     dynamicsForm  = new Dynamics();
     Radius.RC    += this.OnRadiusChanged;
     Dynamics.TC  += this.OnTimeChanged;
     fileName      = "";
     isChanged     = false;
     KeyPreview    = true;
     undo          = new Stack <Change>();
     redo          = new Stack <Change>();
     Change.shapes = shapes;
 }
Пример #2
0
 private void changeTimeButton_Click(object sender, EventArgs e)
 {
     if (dynamicsForm.IsDisposed)
     {
         dynamicsForm = new Dynamics();
     }
     if (!dynamicsForm.IsAccessible)
     {
         dynamicsForm.Activate();
     }
     if (dynamicsForm.WindowState == FormWindowState.Minimized)
     {
         dynamicsForm.WindowState = FormWindowState.Normal;
     }
     if (dynamicsForm.WindowState == FormWindowState.Maximized)
     {
         dynamicsForm.WindowState = FormWindowState.Normal;
     }
     dynamicsForm.Show();
 }