Пример #1
0
 /// <summary>
 ///     Constructor sets up the menu and sets the required properties
 ///     in order thay this may be displayed over the top of it's parent
 ///     form.
 /// </summary>
 private ActiveMenuImpl(Form form)
 {
     InitializeComponent();
     items = new ActiveItemsImpl();
     items.CollectionModified += ItemsCollectionModified;
     parentForm = form;
     Show(form);
     parentForm.Disposed += ParentFormDisposed;
     Visible              = false;
     isActivated          = form.WindowState != FormWindowState.Minimized;
     themeFactory         = new ThemeFactory(form);
     theme           = themeFactory.GetTheme();
     originalMinSize = form.MinimumSize;
     AttachHandlers();
     ToolTip.ShowAlways = true;
     TopMost            = form.TopMost;
     TopMost            = false;
     spillOverMode      = SpillOverMode.IncreaseSize;
 }
Пример #2
0
 /// <summary>
 ///     When the style is changed we need to re-calc button sizes as well as positions.
 /// </summary>
 private void TitleButtonSystemColorsChanged(object sender, EventArgs e)
 {
     theme = themeFactory.GetTheme();
     CalcSize();
     OnPosition();
 }