public MainForm() { //Initialize the WinForm InitializeComponent(); _stickyWindow = new StickyWindow(this); }
public EnvironmentLightingEditorForm(MainForm parent) { InitializeComponent(); _mainForm = parent; _stickyWindow = new StickyWindow(this); }
public Form2() { InitializeComponent(); stickyWindow = new StickyWindow( this ); checkStickOnMove.Checked = stickyWindow.StickOnMove; checkStickOnResize.Checked = stickyWindow.StickOnResize; checkStickToOthers.Checked = stickyWindow.StickToOther; checkStickToScreen.Checked = stickyWindow.StickToScreen; }
void window_Loaded(object sender, RoutedEventArgs e) { StickyWindow = new StickyWindow(this); StickyWindow.StickToScreen = true; StickyWindow.StickToOther = true; StickyWindow.StickOnResize = true; StickyWindow.StickOnMove = true; StickyWindow.MoveStuckTogether = false; if (!UiUtils.IsOnScreen(this)) UiUtils.CenterWindow(this); }
/// <summary> /// Sets up the form for the current instance. /// </summary> /// <param name="instanceName">The name of the instance to display.</param> public MainForm(string instanceName) { try { InitializeComponent(); } catch (COMException loE) { Logger.Error("Error initializing main view: {0}", loE); if ((uint)loE.ErrorCode == 0x80040154) { MessageBox.Show(this, Resources.Incorrect_bittedness_of_OotD, Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); throw; } } try { InstanceName = instanceName; // Uniquely identify the previous/next buttons for use in an ugly hack below. ButtonNext.Tag = Guid.NewGuid(); ButtonPrevious.Tag = Guid.NewGuid(); SuspendLayout(); LoadSettings(); ResumeLayout(); SendWindowToBack(); // hook up sticky window instance and events to let us know when resizing/moving // has ended so we can update the form dimensions in the preferences. _stickyWindow = new StickyWindow(this); _stickyWindow.MoveEnded += (sender, args) => { SaveFormDimensions(); }; _stickyWindow.ResizeEnded += (sender, args) => { SaveFormDimensions(); }; // hook up event to keep the date in the header bar up to date OutlookViewControl.SelectionChange += OnAxOutlookViewControlOnSelectionChange; } catch (Exception ex) { Logger.Error(ex, "Error initializing window."); MessageBox.Show(this, Resources.ErrorInitializingApp + Environment.NewLine + ex.Message, Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); throw; } }
public SpawnpointEditor(MainForm parent) { InitializeComponent(); _mainForm = parent; _stickyWindow = new StickyWindow(this); }
public ExitEditor(MainForm mainForm) { InitializeComponent(); _mainForm = mainForm; _stickyWindow = new StickyWindow(this); }
/// <summary> /// A new StickyWindow is initalised, which says the filter window /// should stick to the application main window. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Mask_Options_Loaded(object sender, RoutedEventArgs e) { stickyWindow = new StickyWindow(this); stickyWindow.StickToScreen = false; stickyWindow.StickToOther = true; stickyWindow.StickOnResize = true; stickyWindow.StickOnMove = true; }