예제 #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     m_customMenu = SystemMenu.FromForm(this);
     m_customMenu.AppendSeparator();
     m_customMenu.AppendMenu(ABOUTMENU, "About Wechoid...");
     RemoveContextMenu(this);
     // Apply skin
     Telerik.WinControls.Themes.DesertTheme thm = new Telerik.WinControls.Themes.DesertTheme();
     ThemeResolutionService.ApplyThemeToControlTree(this, "Desert");
     About1.showAbout();
 }
예제 #2
0
 private void frmMain_Load(object sender, System.EventArgs e)
 {
     try
     {
         m_SystemMenu = SystemMenu.FromForm(this);
         // Add a separator ...
         m_SystemMenu.AppendSeparator();
         // ... and an "About" entry
         m_SystemMenu.AppendMenu(m_AboutID, "About this...");
         // And a "Reset" item on top
         m_SystemMenu.InsertSeparator(0);
         m_SystemMenu.InsertMenu(0, m_ResetID, "Reset Systemmenu");
     }
     catch (NoSystemMenuException /* err */)
     {
         // Do some error handling
     }
 }
예제 #3
0
        void ResetMenuStates(bool doReset)
        {
            try
            {
                if (doReset)
                {
                    SystemMenu.ResetSystemMenu(this);
                }

                m_SystemMenu = SystemMenu.FromForm(this);

                m_SystemMenu.AppendSeparator();
                //TODO: позволяет переключится в full screen только после пересоздания формы
                m_SystemMenu.AppendMenu(m_SeparateWindow, "Allow full screen (and show the form in task bar)", this.ShowInTaskbar ? ItemFlags.mfChecked : ItemFlags.mfUnchecked);
                m_SystemMenu.AppendMenu(m_TopMode, "Keep the form \"On Top\" mode", this.TopMost ? ItemFlags.mfChecked : ItemFlags.mfUnchecked);
                m_SystemMenu.AppendMenu(m_StretchVideoToFit, "Stretch Video to Fit", this.StretchVideoToFit ? ItemFlags.mfChecked : ItemFlags.mfUnchecked);
//                m_SystemMenu.InsertSeparator(0);
//                m_SystemMenu.InsertMenu(0, m_TopMode, "Enable \"On Top\" mode", (this.TopMostManualExplicit ? ItemFlags.mfChecked : ItemFlags.mfUnchecked));
            }
            catch (NoSystemMenuException /* err */)
            {
                // Do some error handling
            }
        }