void OpenWindow(Base control) { Control.WindowControl window = new Control.WindowControl(GetCanvas()); window.Caption = String.Format("Window {0}", m_WindowCount); window.SetSize(rand.Next(200, 400), rand.Next(200, 400)); window.SetPosition(rand.Next(700), rand.Next(400)); m_WindowCount++; }
void OpenWindow(GUIControl control) { Control.WindowControl window = new Control.WindowControl(GetCanvas(),"",false); window.Caption = String.Format("Window {0}", m_WindowCount); window.SetSize(rand.Next(200, 400), rand.Next(200, 400)); window.SetPosition(rand.Next(700), rand.Next(400)); m_WindowCount++; }
void OpenWindow(Base control, EventArgs args) { Control.WindowControl window = new Control.WindowControl(GetCanvas()); window.Title = String.Format("Window {0}", m_WindowCount); window.SetSize(rand.Next(200, 400), rand.Next(200, 400)); window.SetPosition(rand.Next(700), rand.Next(400)); m_WindowCount++; }
private void OpenWindow(Base control, EventArgs args) { Control.WindowControl window = new Control.WindowControl(GetCanvas()) { Title = String.Format("Window {0}", m_WindowCount) }; window.SetSize(rand.Next(200, 400), rand.Next(200, 400)); window.SetPosition(rand.Next(700), rand.Next(400)); m_WindowCount++; }
void OpenWindow(ControlBase control, EventArgs args) { Control.WindowControl window = new Control.WindowControl(GetCanvas()); window.Title = String.Format("Window {0}", m_WindowCount); window.SetSize(rand.Next(200, 400), rand.Next(200, 400)); window.SetPosition(rand.Next(700), rand.Next(400)); Control.Button b1 = new Control.Button(window); b1.Text = "Test"; var size = window.DrawAreaSize; b1.SetPosition(size.X - b1.Width, size.Y - b1.Height); window.Resized += (s, e) => { var size2 = window.DrawAreaSize; b1.SetPosition(size2.X - b1.Width, size2.Y - b1.Height); }; m_WindowCount++; }