void UpdateSize() { FRAME_DISPLAY_SIZE = _guiController.AdjustSizeFrom96DpiToSystemDpi((int)(FRAME_DISPLAY_SIZE_96DPI * _zoomLevel)); this.Height = chkRunNextLoop.Height + lblLoopTitle.Height + FRAME_DISPLAY_SIZE + 28; _loopDisplayY = chkRunNextLoop.Top + chkRunNextLoop.Height + 2; btnNewFrame.Width = FRAME_DISPLAY_SIZE; btnNewFrame.Height = FRAME_DISPLAY_SIZE; btnNewFrame.Top = _loopDisplayY; _framelessWidth = Math.Min(chkRunNextLoop.Width, this.Width + this.Left); UpdateControlWidth(); Invalidate(); }
public ViewLoopEditor(ViewLoop loopToEdit, GUIController guiController) { InitializeComponent(); _selectedFrame = -1; _loop = loopToEdit; lblLoopTitle.Text = "Loop " + _loop.ID + " (" + _loop.DirectionDescription + ")"; chkRunNextLoop.DataBindings.Add("Checked", _loop, "RunNextLoop", false, DataSourceUpdateMode.OnPropertyChanged); _isLastLoop = false; _loopDisplayY = chkRunNextLoop.Top + chkRunNextLoop.Height + 2; FRAME_DISPLAY_SIZE = guiController.AdjustSizeFrom96DpiToSystemDpi(FRAME_DISPLAY_SIZE_96DPI); btnNewFrame.Width = FRAME_DISPLAY_SIZE; btnNewFrame.Height = FRAME_DISPLAY_SIZE; btnNewFrame.Top = _loopDisplayY; _framelessWidth = Math.Max(chkRunNextLoop.Width + 10, Screen.PrimaryScreen.Bounds.Width); UpdateControlWidth(); }