private void reloadSystemMenu() { //not critical try { Utils.SystemMenu.ResetSystemMenu(this); Utils.SystemMenu sm = Utils.SystemMenu.FromForm(this); if (sm != null) { if (sm.AppendSeparator()) { sm.Append(DECOUPLE_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DECOUPLE_WINDOW)); sm.Append(DOCK_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DOCK_WINDOW)); sm.Append(TOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_TOPMOST_WINDOW)); sm.Append(NOTTOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_NOTTOPMOST_WINDOW)); if (UtilsSettings.Instance.DecoupledChildWindows != null && UtilsSettings.Instance.DecoupledChildWindows.Contains(this.GetType().FullName) && UtilsSettings.Instance.TopMostWindows != null && UtilsSettings.Instance.TopMostWindows.Contains(this.GetType().FullName)) { sm.Append(OPAQUEWHENIACTIVE_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_OPAQUEWHENIACTIVE)); } } else { ShowIcon = false; } } else { ShowIcon = false; } } catch { } }
private void reloadSystemMenu() { //not critical try { Utils.SystemMenu.ResetSystemMenu(this); Utils.SystemMenu sm = Utils.SystemMenu.FromForm(this); if (sm != null) { if (sm.AppendSeparator()) { sm.Append(DECOUPLE_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DECOUPLE_WINDOW)); sm.Append(DOCK_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DOCK_WINDOW)); sm.Append(TOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_TOPMOST_WINDOW)); sm.Append(NOTTOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_NOTTOPMOST_WINDOW)); } } } catch { } }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); //not critical try { Utils.SystemMenu sm = Utils.SystemMenu.FromForm(this); if (sm != null) { if (sm.AppendSeparator()) { sm.Append(DECOUPLE_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DECOUPLE_WINDOW)); sm.Append(DOCK_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_DOCK_WINDOW)); sm.Append(TOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_TOPMOST_WINDOW)); sm.Append(NOTTOPMOST_WINDOW_ID, Utils.LanguageSupport.Instance.GetTranslation(STR_NOTTOPMOST_WINDOW)); } } } catch { } }