当前位置: 首页>>代码示例>>C#>>正文


C# ContextMenuStrip.ResumeLayout方法代码示例

本文整理汇总了C#中System.Windows.Forms.ContextMenuStrip.ResumeLayout方法的典型用法代码示例。如果您正苦于以下问题:C# ContextMenuStrip.ResumeLayout方法的具体用法?C# ContextMenuStrip.ResumeLayout怎么用?C# ContextMenuStrip.ResumeLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ContextMenuStrip的用法示例。


在下文中一共展示了ContextMenuStrip.ResumeLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeComponent

        private void InitializeComponent()
        {
            TrayIcon = new NotifyIcon();
            TrayIcon.BalloonTipIcon = ToolTipIcon.Info;
            TrayIcon.Text = "STORJ Virtual Disk";
            TrayIcon.Icon = Properties.Resources.TrayIcon;

            TrayIconContextMenu = new ContextMenuStrip();
            CloseMenuItem = new ToolStripMenuItem();
            TrayIconContextMenu.SuspendLayout();

            // 
            // TrayIconContextMenu
            // 
            this.TrayIconContextMenu.Items.AddRange(new ToolStripItem[] {
            this.CloseMenuItem});
            this.TrayIconContextMenu.Name = "TrayIconContextMenu";
            this.TrayIconContextMenu.Size = new Size(153, 70);

            // 
            // CloseMenuItem
            // 
            this.CloseMenuItem.Name = "CloseMenuItem";
            this.CloseMenuItem.Size = new Size(152, 22);
            this.CloseMenuItem.Text = "Exit";
            this.CloseMenuItem.Click += new EventHandler(this.CloseMenuItem_Click);

            TrayIconContextMenu.ResumeLayout(false);
            TrayIcon.ContextMenuStrip = TrayIconContextMenu;
        }
开发者ID:Mrkebubun,项目名称:StorjVirtualDisk,代码行数:30,代码来源:Main.cs

示例2: TaskBarIconMenu

        public TaskBarIconMenu()
        {
            TrayIcon_Menu = new ContextMenuStrip();
            TrayIcon_Artist = new ToolStripLabel();
            TrayIcon_Title = new ToolStripLabel();
            TrayIcon_Diff = new ToolStripLabel();
            TrayIcon_Play = new ToolStripMenuItem();
            TrayIcon_PlayNext = new ToolStripMenuItem();
            TrayIcon_PlayPrev = new ToolStripMenuItem();
            TrayIcon_Exit = new ToolStripMenuItem();
            TrayIcon_Menu.SuspendLayout();

            TrayIcon_Menu.Items.AddRange(new ToolStripItem[] {
                TrayIcon_Artist,
                TrayIcon_Title,
                TrayIcon_Diff,
                TrayIcon_Play,
                TrayIcon_PlayNext,
                TrayIcon_PlayPrev,
                TrayIcon_Exit});
            TrayIcon_Menu.Name = "TrayIcon_Menu";
            TrayIcon_Menu.Size = new Size(176, 176);
            // TrayIcon_Artist
            TrayIcon_Artist.Name = "TrayIcon_Artist";
            TrayIcon_Artist.Text = LanguageManager.Get("TrayIcon_Aritst_Text");
            TrayIcon_Artist.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Title
            TrayIcon_Title.Name = "TrayIcon_Title";
            TrayIcon_Title.Text = LanguageManager.Get("TrayIcon_Title_Text");
            TrayIcon_Title.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Diff
            TrayIcon_Diff.Name = "TrayIcon_Diff";
            TrayIcon_Diff.Text = LanguageManager.Get("TrayIcon_Diff_Text");
            TrayIcon_Diff.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Play
            TrayIcon_Play.Name = "TrayIcon_Play";
            TrayIcon_Play.Text = LanguageManager.Get("TrayIcon_Play_Pause_Text");
            TrayIcon_Play.Click += delegate { SendKeys.Send("%{F5}"); };
            // TrayIcon_PlayNext
            TrayIcon_PlayNext.Name = "TrayIcon_PlayNext";
            TrayIcon_PlayNext.Text = LanguageManager.Get("TrayIcon_PlayNext_Text");
            TrayIcon_PlayNext.Click += delegate { SendKeys.Send("%{RIGHT}"); };
            // TrayIcon_PlayNext
            TrayIcon_PlayPrev.Name = "TrayIcon_PlayPrev";
            TrayIcon_PlayPrev.Text = LanguageManager.Get("TrayIcon_PlayPrev_Text");
            TrayIcon_PlayPrev.Click += delegate { SendKeys.Send("%{LEFT}"); };
            // TrayIcon_Exit
            TrayIcon_Exit.Name = "TrayIcon_Exit";
            TrayIcon_Exit.Text = LanguageManager.Get("TrayIcon_Exit_Text");
            TrayIcon_Exit.Click += delegate
            {
                if (
                    MessageBox.Show(LanguageManager.Get("Comfirm_Exit_Text"), LanguageManager.Get("Tip_Text"),
                        MessageBoxButtons.YesNo) != DialogResult.Yes) return;
                Core.MainIsVisible = false;
                Core.Exit();
                Environment.Exit(0);
            };
            TrayIcon_Menu.ResumeLayout(false);
        }
开发者ID:xc0102,项目名称:OSUplayer,代码行数:60,代码来源:TaskBarIconMenu.cs

示例3: NotificationProvider

        static NotificationProvider()
        {
            _notifyIcon = new NotifyIcon
            {
                //BalloonTipIcon = ToolTipIcon.Info,
                Visible = true,
                Icon = Resources.lensert_icon_fresh,
                Text = "Lensert"
            };

            _backlog = new ConcurrentQueue<Notification>();

            _notifyIcon.BalloonTipClicked += OnBalloonClicked;
            _notifyIcon.BalloonTipClosed += OnBalloonClosed;

            var trayIconContextMenu = new ContextMenuStrip();
            var closeMenuItem = new ToolStripMenuItem();
            trayIconContextMenu.SuspendLayout();

            trayIconContextMenu.Items.AddRange(new ToolStripItem[] {closeMenuItem});
            trayIconContextMenu.Name = "trayIconContextMenu";
            trayIconContextMenu.Size = new Size(153, 70);

            closeMenuItem.Name = "closeMenuItem";
            closeMenuItem.Size = new Size(152, 22);
            closeMenuItem.Text = "Close";
            closeMenuItem.Click += CloseMenuItem_Click;

            trayIconContextMenu.ResumeLayout(false);
            _notifyIcon.ContextMenuStrip = trayIconContextMenu;
        }
开发者ID:zwolsman,项目名称:lensert-win,代码行数:31,代码来源:NotificationProvider.cs

示例4: ImgyazurIcon

        private ImgyazurIcon()
        {
            contextMenuStrip = new ContextMenuStrip();
            contextMenuStrip.SuspendLayout();

            exitMenuItem = new ToolStripMenuItem();
            exitMenuItem.Name = "exitMenuItem";
            exitMenuItem.Text = "Exit";
            exitMenuItem.Click += new EventHandler(exitMenuItem_Click);

            startOnBootMenuItem = new ToolStripMenuItem();
            startOnBootMenuItem.Name = "startOnBootMenuItem";
            startOnBootMenuItem.Text = "Start On Boot";
            startOnBootMenuItem.CheckOnClick = true;
            if (rkApp.GetValue("imgyazur") == null)
                startOnBootMenuItem.Checked = false;
            else
                startOnBootMenuItem.Checked = true;
            startOnBootMenuItem.CheckedChanged += new EventHandler(startOnBootMenuItem_CheckedChanged);

            copyAfterUploadMenuItem = new ToolStripMenuItem();
            copyAfterUploadMenuItem.Name = "copyAfterUploadMenuItem";
            copyAfterUploadMenuItem.Text = "Copy URL After Upload";
            copyAfterUploadMenuItem.CheckOnClick = true;
            copyAfterUploadMenuItem.Checked = Properties.Settings.Default.copyToClipboard;
            copyAfterUploadMenuItem.CheckedChanged += new EventHandler(copyAfterUploadMenuItem_CheckedChanged);

            openAfterUploadMenuItem = new ToolStripMenuItem();
            openAfterUploadMenuItem.Name = "openAfterUploadMenuItem";
            openAfterUploadMenuItem.Text = "Open URL After Upload";
            openAfterUploadMenuItem.CheckOnClick = true;
            openAfterUploadMenuItem.Checked = Properties.Settings.Default.openAfterUpload;
            openAfterUploadMenuItem.CheckedChanged += new EventHandler(openAfterUploadMenuItem_CheckedChanged);

            changeHotkeyMenuItem = new ToolStripMenuItem();
            changeHotkeyMenuItem.Name = "changeHotkeyMenuItem";
            changeHotkeyMenuItem.Text = "Change Hotkey";
            changeHotkeyMenuItem.Click += new EventHandler(changeHotkeyMenuItem_Click);

            contextMenuStrip.Items.AddRange(new ToolStripItem[] { startOnBootMenuItem, copyAfterUploadMenuItem, openAfterUploadMenuItem, changeHotkeyMenuItem, exitMenuItem });
            contextMenuStrip.Name = "contextMenuStrip";

            contextMenuStrip.ResumeLayout(false);

            notifyIcon = new NotifyIcon();
            notifyIcon.BalloonTipText = "imgyazur";
            notifyIcon.Text = defaultText;
            notifyIcon.Visible = true;
            notifyIcon.Icon = Properties.Resources.imgur;
            notifyIcon.ContextMenuStrip = contextMenuStrip;
            notifyIcon.MouseClick += new MouseEventHandler(notifyIcon_MouseClick);
            notifyIcon.ShowBalloonTip(10000, "imgyazur is now running", "Press " + keyComboSettings.ToKeyCombo().ToString() + " or click this icon to start capturing.", ToolTipIcon.Info);

            Hook KeyboardHook = new Hook("imgyazur keyboard hook");
            KeyboardHook.KeyDownEvent += GlobalKeyDown;
        }
开发者ID:pwfff,项目名称:imgyazur,代码行数:56,代码来源:imgyazurIcon.cs

示例5: InitializeComponent

 private void InitializeComponent()
 {
     components = new Container();
     _notifyIcon1 = new NotifyIcon(components);
     _contextMenuStrip1 = new ContextMenuStrip(components);
     _btnAbout = new ToolStripMenuItem();
     _btnStop = new ToolStripMenuItem();
     _btnSettings = new ToolStripMenuItem();
     _btnUpdates = new ToolStripMenuItem();
     _contextMenuStrip1.SuspendLayout();
     _notifyIcon1.ContextMenuStrip = _contextMenuStrip1;
     var imgStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("WallpaperChange.favicon.ico");
     if (imgStream != null)
     {
         var ico = new Icon(imgStream);
         _notifyIcon1.Icon = ico;
     }
     _notifyIcon1.Tag = "WallpaperChange";
     _notifyIcon1.Text = @"WallpaperChange";
     _notifyIcon1.Visible = true;
     _contextMenuStrip1.Items.AddRange(new ToolStripItem[] {_btnAbout, _btnUpdates, _btnSettings, _btnStop});
     _contextMenuStrip1.Name = "_contextMenuStrip1";
     _contextMenuStrip1.Size = new Size(176, 76);
     _btnAbout.Name = "_btnAbout";
     _btnAbout.AutoSize = true;
     _btnAbout.Text = @"About";
     _btnAbout.Click += btnAbout_Click;
     _btnStop.Name = "_btnStop";
     _btnStop.AutoSize = true;
     _btnStop.Text = @"Stop";
     _btnStop.Click += btnStop_Click;
     _btnSettings.Name = "_btnSettings";
     _btnSettings.Text = @"Settings";
     _btnSettings.AutoSize = true;
     _btnSettings.Click += btnSettings_Click;
     _btnUpdates.Name = "_btnUpdates";
     _btnUpdates.Text = CheckForApplicationUpdates;
     _btnUpdates.AutoSize = true;
     _btnUpdates.Click += btnUpdates_Click;
     _contextMenuStrip1.ResumeLayout(false);
     _wallpaperTimer = new Timer {AutoReset = false};
     _wallpaperTimer.Elapsed += WallpaperTimerElapsed;
     _wallpaperTimer.Interval = 10000;
     WallpaperTimerElapsed(null, null);
     _updateTimer = new Timer {AutoReset = false};
     _updateTimer.Elapsed += (sender, args) => CheckForUpdates();
     _updateTimer.Interval = TimeSpan.FromDays(1).TotalMilliseconds;
     CheckForUpdates();
 }
开发者ID:rwood,项目名称:WallpaperChange,代码行数:49,代码来源:SysTrayApplicationContext.cs

示例6: UpPhotoGUI

        public UpPhotoGUI(MainWindow newParent)
        {
            Application.EnableVisualStyles();

            parent = newParent;

            UpPhotoTrayMenu = new ContextMenuStrip(components);
            UpPhotoTrayMenu.SuspendLayout();

            UpPhotoTrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
            {
                AboutItem,
                ViewItem,
                ExitItem,
                DownloadPhotosItem
            });

            AboutItem.Text = "About UpPhoto";
            AboutItem.Click += (x, y) => { Process.Start(@"http://www.upphoto.ca/instructions.php"); };

            ViewItem.Text = "View UpPhoto folder";
            ViewItem.Click += ViewItem_Click;

            ExitItem.Text = "Exit";
            ExitItem.Click += ExitItem_Click;

            DownloadPhotosItem.Text = "Download my photos from Facebook";
            DownloadPhotosItem.CheckOnClick = true;
            DownloadPhotosItem.Checked = false;

            UpPhotoIcon = new NotifyIcon(components);
            UpPhotoIcon.ContextMenuStrip = UpPhotoTrayMenu;
            UpPhotoIcon.Text = "UpPhoto";
            UpPhotoIcon.Visible = true;
            UpPhotoIcon.MouseClick += TrayIcon_Click;
            UpPhotoIcon.DoubleClick += ViewItem_Click;

            UpPhotoIcon.BalloonTipTitle = "Thank you for using UpPhoto!";
            UpPhotoIcon.BalloonTipText = "Click on this icon to view your UpPhoto folder. Put photos in the folder, and they will be uploaded to Facebook.";

            UpPhotoTrayMenu.ResumeLayout(true);
        }
开发者ID:drew-gross,项目名称:UpPhoto,代码行数:42,代码来源:UpPhotoGUI.cs

示例7: InitializeComponent

        private void InitializeComponent()
        {
            TrayIcon = new NotifyIcon();

            TrayIcon.BalloonTipIcon = ToolTipIcon.Info;
            //TrayIcon.BalloonTipText = "O Serviço Sihl está em execução! Para fechar clique com o botão direito!";
            TrayIcon.BalloonTipTitle = "Sihl Suporte";
            TrayIcon.Text = "Sihl Suporte";

            //The icon is added to the project resources.
            projeto = Assembly.LoadFrom(Environment.CurrentDirectory + @"\SihlHosting.exe");
            TrayIcon.Icon = new Icon(Path.GetDirectoryName(projeto.Location) + "\\suporte.ico");

            //Optional - handle doubleclicks on the icon:
            TrayIcon.DoubleClick += TrayIcon_DoubleClick;

            //Optional - Add a context menu to the TrayIcon:
            TrayIconContextMenu = new ContextMenuStrip();
            CloseMenuItem = new ToolStripMenuItem();
            TrayIconContextMenu.SuspendLayout();

            // 
            // TrayIconContextMenu
            // 
            this.TrayIconContextMenu.Items.AddRange(new ToolStripItem[] {
            this.CloseMenuItem});
            this.TrayIconContextMenu.Name = "TrayIconContextMenu";
            this.TrayIconContextMenu.Size = new Size(153, 70);
            // 
            // CloseMenuItem
            // 
            this.CloseMenuItem.Name = "CloseMenuItem";
            this.CloseMenuItem.Size = new Size(152, 22);
            this.CloseMenuItem.Text = "Fechar Sihl Suporte";
            this.CloseMenuItem.Click += new EventHandler(this.CloseMenuItem_Click);

            TrayIconContextMenu.ResumeLayout(false);

            TrayIcon.ContextMenuStrip = TrayIconContextMenu;
        }
开发者ID:thiagomoreiraboby,项目名称:SuporteOnline,代码行数:40,代码来源:HostingNotifyIcon.cs

示例8: InitTray

        private void InitTray()
        {
            TrayIcon = new NotifyIcon();
            TrayIcon.Visible = true;
            TrayIcon.Icon = SystemIcons.Asterisk;
            TrayIcon.DoubleClick += new System.EventHandler(this.trayTrayIcon_DoubleClick);

            var ContextMenu = new ContextMenuStrip();
            var CloseMenuItem = new ToolStripMenuItem();
            ContextMenu.SuspendLayout();

            ContextMenu.Items.Add(CloseMenuItem);

            CloseMenuItem.Name = "ContextMenu";
            CloseMenuItem.Text = "Exit";
            CloseMenuItem.Click += new EventHandler((e, b) => {
                this.Close();
                Environment.Exit(0);
            });

            ContextMenu.ResumeLayout(false);
            TrayIcon.ContextMenuStrip = ContextMenu;
        }
开发者ID:aldialimucaj,项目名称:lego,代码行数:23,代码来源:MainWindow.xaml.cs

示例9: InitializeComponent


//.........这里部分代码省略.........
     cmenTabStartChat.Name = "cmenTabStartChat";
     cmenTabStartChat.Size = new Size(201, 22);
     cmenTabStartChat.Text = @"Start Chat (VNC)";
     cmenTabStartChat.Visible = false;
     //
     //cmenTabTransferFile
     //
     cmenTabTransferFile.Image = Resources.SSHTransfer;
     cmenTabTransferFile.Name = "cmenTabTransferFile";
     cmenTabTransferFile.Size = new Size(201, 22);
     cmenTabTransferFile.Text = @"Transfer File (SSH)";
     //
     //cmenTabRefreshScreen
     //
     cmenTabRefreshScreen.Image = Resources.Refresh;
     cmenTabRefreshScreen.Name = "cmenTabRefreshScreen";
     cmenTabRefreshScreen.Size = new Size(201, 22);
     cmenTabRefreshScreen.Text = @"Refresh Screen (VNC)";
     //
     //cmenTabSendSpecialKeys
     //
     cmenTabSendSpecialKeys.DropDownItems.AddRange(new ToolStripItem[]
     {
         cmenTabSendSpecialKeysCtrlAltDel,
         cmenTabSendSpecialKeysCtrlEsc
     });
     cmenTabSendSpecialKeys.Image = Resources.Keyboard;
     cmenTabSendSpecialKeys.Name = "cmenTabSendSpecialKeys";
     cmenTabSendSpecialKeys.Size = new Size(201, 22);
     cmenTabSendSpecialKeys.Text = @"Send special Keys (VNC)";
     //
     //cmenTabSendSpecialKeysCtrlAltDel
     //
     cmenTabSendSpecialKeysCtrlAltDel.Name = "cmenTabSendSpecialKeysCtrlAltDel";
     cmenTabSendSpecialKeysCtrlAltDel.Size = new Size(141, 22);
     cmenTabSendSpecialKeysCtrlAltDel.Text = @"Ctrl+Alt+Del";
     //
     //cmenTabSendSpecialKeysCtrlEsc
     //
     cmenTabSendSpecialKeysCtrlEsc.Name = "cmenTabSendSpecialKeysCtrlEsc";
     cmenTabSendSpecialKeysCtrlEsc.Size = new Size(141, 22);
     cmenTabSendSpecialKeysCtrlEsc.Text = @"Ctrl+Esc";
     //
     //cmenTabExternalApps
     //
     cmenTabExternalApps.Image = (Image)(resources.GetObject("cmenTabExternalApps.Image"));
     cmenTabExternalApps.Name = "cmenTabExternalApps";
     cmenTabExternalApps.Size = new Size(201, 22);
     cmenTabExternalApps.Text = @"External Applications";
     //
     //cmenTabSep1
     //
     cmenTabSep1.Name = "cmenTabSep1";
     cmenTabSep1.Size = new Size(198, 6);
     //
     //cmenTabRenameTab
     //
     cmenTabRenameTab.Image = Resources.Rename;
     cmenTabRenameTab.Name = "cmenTabRenameTab";
     cmenTabRenameTab.Size = new Size(201, 22);
     cmenTabRenameTab.Text = @"Rename Tab";
     //
     //cmenTabDuplicateTab
     //
     cmenTabDuplicateTab.Name = "cmenTabDuplicateTab";
     cmenTabDuplicateTab.Size = new Size(201, 22);
     cmenTabDuplicateTab.Text = @"Duplicate Tab";
     //
     //cmenTabReconnect
     //
     cmenTabReconnect.Image = (Image)(resources.GetObject("cmenTabReconnect.Image"));
     cmenTabReconnect.Name = "cmenTabReconnect";
     cmenTabReconnect.Size = new Size(201, 22);
     cmenTabReconnect.Text = @"Reconnect";
     //
     //cmenTabDisconnect
     //
     cmenTabDisconnect.Image = Resources.Pause;
     cmenTabDisconnect.Name = "cmenTabDisconnect";
     cmenTabDisconnect.Size = new Size(201, 22);
     cmenTabDisconnect.Text = @"Disconnect";
     //
     //cmenTabPuttySettings
     //
     cmenTabPuttySettings.Name = "cmenTabPuttySettings";
     cmenTabPuttySettings.Size = new Size(201, 22);
     cmenTabPuttySettings.Text = @"PuTTY Settings";
     //
     //Connection
     //
     ClientSize = new Size(632, 453);
     Controls.Add(TabController);
     Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0));
     Icon = Resources.mRemote_Icon;
     Name = "Connection";
     TabText = @"UI.Window.Connection";
     Text = @"UI.Window.Connection";
     cmenTab.ResumeLayout(false);
     ResumeLayout(false);
 }
开发者ID:mRemoteNG,项目名称:mRemoteNG,代码行数:101,代码来源:ConnectionWindow.Designer.cs

示例10: AddZone

        protected void AddZone(MapZone zone)
        {
            TreeNode node = new TreeNode(zone.Name);
            node.Tag = zone;
            zonesNode.Nodes.Add(node);

            ContextMenuStrip menu = new ContextMenuStrip();
            menu.ShowCheckMargin = false;
            menu.ShowImageMargin = false;
            menu.SuspendLayout();

            ToolStripButton button = new ToolStripButton("Load Layer...");
            button.Tag = zone;
            button.Click += new EventHandler(loadLayerHandler);
            menu.Items.Add(button);

            menu.ResumeLayout();

            // update menu width
            int w = 0;
            foreach (ToolStripItem item in menu.Items)
            {
                if (item.Width > w)
                {
                    w = item.Width;
                }
            }
            menu.Width = w;

            node.ContextMenuStrip = menu;
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:31,代码来源:TerrainAssembler.cs

示例11: getSessionMenuItems

        /// <summary>
        /// Add the array of menu items to the system tray
        /// </summary>
        /// <param name="cms">The menu</param>
        /// <param name="parent">The root of the systray menu</param>
        public override void getSessionMenuItems(ContextMenuStrip cms, ToolStripItemCollection parent)
        {
            // Suspend the layout before modification
            cms.SuspendLayout();

            parent.Clear();

            // Setup the System tray array of menu items
            ToolStripMenuItem[] tsmiArray = new ToolStripMenuItem[getSessionController().getSessionList().Count];
            int i = 0;
            foreach (Session s in getSessionController().getSessionList())
            {
                tsmiArray[i] = new ToolStripMenuItem(s.SessionDisplayText, null, listBox1_DoubleClick);
                // Make sure the menu item is tagged with the session
                tsmiArray[i].Tag = s;
                i++;
            }

            if ( tsmiArray != null )
                parent.AddRange(tsmiArray);

            // Now resume the layout
            cms.ResumeLayout();
        }
开发者ID:verbitan,项目名称:PuTTY-Session-Manager,代码行数:29,代码来源:SessionListControl.cs

示例12: InitializeComponent

        private void InitializeComponent()
        {
            _niTrayicon = new NotifyIcon();
            _niTrayicon.BalloonTipIcon = ToolTipIcon.Info;
            _niTrayicon.BalloonTipTitle = "TimeNazi";
            _niTrayicon.BalloonTipText = "TimeNazi has been launched!";
            _niTrayicon.Text = "TimeNazi";
            _niTrayicon.Icon = Properties.Resources.clock_16;
            _niTrayicon.MouseUp += _niTrayicon_MouseUp;
            _niTrayicon.Visible = true;

            _cmsTrayIconContextMenu = new ContextMenuStrip();
            _cmsTrayIconContextMenu.SuspendLayout();

            //
            // MenuItemClose
            //
            _tsmiMenuItemExit = new ToolStripMenuItem();
            _tsmiMenuItemExit.Name = "MenuItemClose";
            _tsmiMenuItemExit.Text = "Exit";
            _tsmiMenuItemExit.Click += _tsmiMenuItemClose_Click;
            //
            // MenuItemSettings
            //
            _tsmiMenuItemSettings = new ToolStripMenuItem();
            _tsmiMenuItemSettings.Name = "MenuItemSettings";
            _tsmiMenuItemSettings.Text = "Settings";
            _tsmiMenuItemSettings.Click += _tsmiMenuItemSettings_Click;
            //
            // _tssSeparator
            //
            _tssSeparator = new ToolStripSeparator();
            //
            // MenuItemShowClock
            //
            _tsmiMenuItemShowClock = new ToolStripMenuItem();
            _tsmiMenuItemShowClock.Text = "Show clock";
            _tsmiMenuItemShowClock.CheckOnClick = true;
            //
            // _tsmiMenuItemEnable
            //
            _tsmiMenuItemEnable = new ToolStripMenuItem();
            _tsmiMenuItemEnable.Text = "Enabled";
            _tsmiMenuItemEnable.CheckOnClick = true;
            _tsmiMenuItemEnable.Checked = true;
            //
            // MenuItemAbout
            //
            var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
            _tsmiMenuItemAbout = new ToolStripMenuItem();
            _tsmiMenuItemAbout.Name = "MenuItemAbout";
            _tsmiMenuItemAbout.Text = string.Format("{0} v{1}.{2}.{3}", versionInfo.ProductName, versionInfo.ProductMajorPart, versionInfo.ProductMinorPart, versionInfo.ProductBuildPart);
            _tsmiMenuItemAbout.ToolTipText = string.Format("{0}, {1}", versionInfo.LegalCopyright, versionInfo.CompanyName);
            _tsmiMenuItemAbout.Enabled = false;

            //
            // TrayIconContextMenu
            //
            _cmsTrayIconContextMenu.Items.AddRange(new ToolStripItem[] { _tsmiMenuItemAbout, new ToolStripSeparator(), _tsmiMenuItemSettings, _tsmiMenuItemShowClock, _tsmiMenuItemEnable, _tssSeparator, _tsmiMenuItemExit });
            _cmsTrayIconContextMenu.Name = "TrayIconContextMenu";

            _cmsTrayIconContextMenu.ResumeLayout(false);
            _niTrayicon.ContextMenuStrip = _cmsTrayIconContextMenu;

            //_niTrayicon.BalloonTipIcon = ToolTipIcon.Warning;
            //_niTrayicon.BalloonTipText = "Last minute!";
            //_niTrayicon.BalloonTipTitle = "Warning!";
            //_niTrayicon.ShowBalloonTip(10000);
        }
开发者ID:notisrac,项目名称:TimeNazi,代码行数:69,代码来源:TimeNaziApplicationContext.cs

示例13: InitializeComponent


//.........这里部分代码省略.........
            this.labelStaticSource.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.labelStaticSource.Location = new System.Drawing.Point(0, 0);
            this.labelStaticSource.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
            this.labelStaticSource.Name = "labelStaticSource";
            this.labelStaticSource.Size = new System.Drawing.Size(49, 13);
            this.labelStaticSource.TabIndex = 0;
            this.labelStaticSource.Text = "Source:";
            // 
            // SourceLayoutPanel
            // 
            this.SourceLayoutPanel.AutoSize = true;
            this.SourceLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.SourceLayoutPanel.Controls.Add(this.labelStaticSource);
            this.SourceLayoutPanel.Controls.Add(this.labelSource);
            this.SourceLayoutPanel.Location = new System.Drawing.Point(9, 70);
            this.SourceLayoutPanel.Margin = new System.Windows.Forms.Padding(0);
            this.SourceLayoutPanel.Name = "SourceLayoutPanel";
            this.SourceLayoutPanel.Size = new System.Drawing.Size(195, 13);
            this.SourceLayoutPanel.TabIndex = 2;
            // 
            // openPreset
            // 
            this.openPreset.DefaultExt = "plist";
            this.openPreset.Filter = "Plist Files|*.plist";
            // 
            // File_ChapterImport
            // 
            this.File_ChapterImport.Filter = "CSV Files|*.csv";
            // 
            // frmMain
            // 
            this.AllowDrop = true;
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoSize = true;
            this.ClientSize = new System.Drawing.Size(1002, 583);
            this.Controls.Add(this.tableLayoutPanel3);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.SourceLayoutPanel);
            this.Controls.Add(this.frmMainMenu);
            this.Controls.Add(this.tableLayoutPanel2);
            this.Controls.Add(this.labelPreset);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.StatusStrip);
            this.Controls.Add(this.tableLayoutPanel1);
            this.Controls.Add(this.tabs_panel);
            this.Controls.Add(this.labelStaticDestination);
            this.DoubleBuffered = true;
            this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.KeyPreview = true;
            this.MinimumSize = new System.Drawing.Size(900, 500);
            this.Name = "frmMain";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "HandBrake";
            notifyIconMenu.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();
            this.ChaptersMenu.ResumeLayout(false);
            this.presets_menu.ResumeLayout(false);
            this.frmMainMenu.ResumeLayout(false);
            this.frmMainMenu.PerformLayout();
            this.tab_audio.ResumeLayout(false);
            this.tab_video.ResumeLayout(false);
            this.tab_video.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.tab_picture.ResumeLayout(false);
            this.tabs_panel.ResumeLayout(false);
            this.tab_filters.ResumeLayout(false);
            this.tab_subtitles.ResumeLayout(false);
            this.tab_chapters.ResumeLayout(false);
            this.tab_chapters.PerformLayout();
            this.tab_advanced.ResumeLayout(false);
            this.tab_query.ResumeLayout(false);
            this.tab_query.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            this.splitContainer1.Panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            this.presetsToolStrip.ResumeLayout(false);
            this.presetsToolStrip.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.StatusStrip.ResumeLayout(false);
            this.StatusStrip.PerformLayout();
            this.tableLayoutPanel2.ResumeLayout(false);
            this.tableLayoutPanel2.PerformLayout();
            this.tableLayoutPanel3.ResumeLayout(false);
            this.tableLayoutPanel3.PerformLayout();
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.SourceLayoutPanel.ResumeLayout(false);
            this.SourceLayoutPanel.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
开发者ID:Eddy805,项目名称:HandBrake,代码行数:101,代码来源:frmMain.Designer.cs

示例14: createContextMenuStrip


//.........这里部分代码省略.........
            rotateToolStripMenuItem.Text = "Rotate";


            torch.Size = new System.Drawing.Size(152, 22);
            torch.Text = "LED";
            torch.CheckOnClick = true;
            torch.CheckedChanged += (s, d) =>
            {
                try
                {
                    WebClient wc = new WebClient();
                    wc.DownloadString("http://" + (s as ToolStripMenuItem).OwnerItem.Text + ":8080/" + (!torch.Checked ? "disable" : "enable") + "torch");
                }
                catch { }
            };
            focus.Size = new System.Drawing.Size(152, 22);
            focus.Text = "Focus";
            focus.CheckOnClick = true;
            focus.CheckedChanged += (s, d) =>
            {
                try
                {
                    WebClient wc = new WebClient();
                    wc.DownloadString("http://" + (s as ToolStripMenuItem).OwnerItem.Text + ":8080/" + (!focus.Checked ? "no" : "") + "focus");
                }
                catch { }
            };

            serverToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            serverToolStripMenuItem.Text = pb.pbInfo.Server;

            //http://192.168.1.8:8080/enabletorch
            //http://192.168.1.8:8080/focus
            //http://192.168.1.8:8080/disabletorch

            //http://192.168.1.8:8080/enabletorch


            serverToolStripMenuItem.Click += (s, d) => {
                Process.Start("http://" + (s as ToolStripMenuItem).Text + ":8080");
            };
            serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            torch,
            focus});


            // 
            // rotate0
            // 
            rotate0.Size = new System.Drawing.Size(152, 22);
            rotate0.Text = "0";
            rotate0.Click += (a, b) =>
            {
                pbInfo pbi = pb.pbInfo;
                pb.Image.RotateFlip(Stuff.getRotateFlipType(360-pbi.Rotate));
                pbi.Rotate = 0;
                pb.Size = new Size(320, 240);
                pb.Refresh();
            };
            // 
            // rotate90
            // 
            rotate90.Size = new System.Drawing.Size(152, 22);
            rotate90.Text = "90";
            rotate90.Click += (a, b) => {
                pbInfo pbi = pb.pbInfo;
                pb.Image.RotateFlip(Stuff.getRotateFlipType(360 - pbi.Rotate));
                pbi.Rotate = 90;
                pb.Size = new Size(240, 320);
                pb.Refresh();            
            };
            // 
            // rotate180
            // 
            rotate180.Size = new System.Drawing.Size(152, 22);
            rotate180.Text = "180";
            rotate180.Click += (a, b) =>
            {
                pbInfo pbi = pb.pbInfo;
                pb.Image.RotateFlip(Stuff.getRotateFlipType(360 - pbi.Rotate));
                pbi.Rotate = 180;
                pb.Size = new Size(320, 240);
                pb.Refresh();
            };
            // 
            // rotate270
            // 
            rotate270.Size = new System.Drawing.Size(152, 22);
            rotate270.Text = "270";
            rotate270.Click += (a, b) =>
            {
                pbInfo pbi = pb.pbInfo;
                pb.Image.RotateFlip(Stuff.getRotateFlipType(360 - pbi.Rotate));
                pbi.Rotate = 270;
                pb.Size = new Size(240, 320);
                pb.Refresh();
            };
            contextMenuStrip1.ResumeLayout();
            return contextMenuStrip1;
        }
开发者ID:Hagser,项目名称:csharp,代码行数:101,代码来源:Form1.cs

示例15: InitializeGUI


//.........这里部分代码省略.........
            mMenuItemDepthSnapping.CheckOnClick = true;
            mMenuItemDepthSnapping.Click += new System.EventHandler(mMenuItemSnapping_Click);

            mEditorContextMenu = new ContextMenuStrip(new System.ComponentModel.Container());
            /************************************************************************
             * TODO:
             * Add images to the context menu items.
             *
             * Jay Sternfield	-	2011/11/16
             ************************************************************************/
            mContextItemLoadPrefab = new ToolStripMenuItem("Load Prefab");
            mContextItemAddTrigger = new ToolStripMenuItem("Add Trigger");
            mContextItemAddParticle = new ToolStripMenuItem("Add Particle");
            //mContextItemEditComponents = new ToolStripMenuItem("Edit Components");
            mContextItemLoadPrefab.Click += new System.EventHandler(mContextItemLoadPrefab_Click);
            mContextItemAddTrigger.Click += new System.EventHandler(mContextItemAddTrigger_Click);
            mContextItemAddParticle.Click += new System.EventHandler(mContextItemAddParticle_Click);
            //mContextItemAddParticle.Click += new System.EventHandler(mContextItemAddParticle_Click);
            //mContextItemAddParticle.Click += new System.EventHandler(mContextItemAddParticle_Click);
            mEditorContextMenu.SuspendLayout();
            mEditorContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                mContextItemLoadPrefab, mContextItemAddTrigger, mContextItemAddParticle});
            mEditorContextMenu.Name = "mEditorContextMenu";
            mEditorContextMenu.Size = new System.Drawing.Size(200, 28);
            mEditorContextMenu.MouseLeave += new EventHandler(mEditorContextMenu_MouseLeave);

            mObjectPanel = new Panel();
            mObjectPanel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
            mObjectPanel.Size = new System.Drawing.Size(240, FNA.Game_cl.BaseInstance.WindowHeight - 22);
            mObjectPanel.Dock = DockStyle.Left;
            Panel titlePanel = new Panel();
            titlePanel.Dock = DockStyle.Top;
            titlePanel.Size = new System.Drawing.Size(mObjectPanel.Width, 22);
            Label titleLabel = new Label();
            titleLabel.Dock = DockStyle.Fill;
            titleLabel.Text = "Object Panel";
            titlePanel.Controls.Add(titleLabel);
            mObjectPanelTree = new TreeView();
            mObjectPanelTree.Dock = DockStyle.Fill;
            //mObjectPanelTree.AllowDrop = true;
            mObjectPanelTree.HideSelection = false;
            mObjectPanelTree.DoubleClick += new EventHandler(mObjectPanelTree_DoubleClick);
            mObjectPanelTree.AfterSelect += new TreeViewEventHandler(mObjectPanelTree_AfterSelect);
            //Splitter midSplitter = new Splitter();
            //midSplitter.BackColor = System.Drawing.Color.DarkGray;
            //midSplitter.Dock = DockStyle.Bottom;
            mObjectPanelSplitter = new Splitter();
            mObjectPanelSplitter.Dock = DockStyle.Right;
            mObjectPanelSplitter.SplitPosition = mObjectPanel.Width - 4;
            mObjectPanelSplitter.MouseDown += new MouseEventHandler(mObjectPanelSplitter_MouseDown);
            mObjectPanelSplitter.MouseUp += new MouseEventHandler(mObjectPanelSplitter_MouseUp);

            mObjectPanel.Controls.Add(mObjectPanelTree);
            mObjectPanel.Controls.Add(titlePanel);
            //mObjectPanel.Controls.Add(midSplitter);
            mObjectPanel.Controls.Add(mObjectPanelSplitter);

            mPrefabPanel = new Panel();
            mPrefabPanel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
            mPrefabPanel.Size = new System.Drawing.Size(240, FNA.Game_cl.BaseInstance.WindowHeight - 22);
            mPrefabPanel.Dock = DockStyle.Right;
            mPrefabPanelTree = new TreeView();
            mPrefabPanelTree.Dock = DockStyle.Fill;
            //mPrefabPanelTree.AllowDrop = true;
            mPrefabPanelTree.HideSelection = false;
            mPrefabPanelTree.MouseDown += new MouseEventHandler(mPrefabPanelTree_MouseDown);
            mPrefabPanelTree.MouseClick += new MouseEventHandler(mPrefabPanelTree_MouseClick);

            titlePanel = new Panel();
            titlePanel.Dock = DockStyle.Top;
            titlePanel.Size = new System.Drawing.Size(mPrefabPanel.Width, 22);
            titleLabel = new Label();
            titleLabel.Dock = DockStyle.Fill;
            titleLabel.Text = "Prefab Panel";
            titlePanel.Controls.Add(titleLabel);

            mPrefabPanelSplitter = new Splitter();
            mPrefabPanelSplitter.Dock = DockStyle.Left;
            mPrefabPanelSplitter.SplitPosition = 4;
            mPrefabPanelSplitter.MouseDown += new MouseEventHandler(mPrefabPanelSplitter_MouseDown);
            mPrefabPanelSplitter.MouseUp += new MouseEventHandler(mPrefabPanelSplitter_MouseUp);

            mPrefabPanel.Controls.Add(mPrefabPanelTree);
            mPrefabPanel.Controls.Add(titlePanel);
            mPrefabPanel.Controls.Add(mPrefabPanelSplitter);

            windowForm.Controls.Add(mEditorMenuStrip);
            windowForm.Controls.Add(mEditorStatusStrip);
            windowForm.Controls.Add(mObjectPanel);
            windowForm.Controls.Add(mPrefabPanel);

            windowForm.MainMenuStrip = mEditorMenuStrip;
            windowForm.ContextMenuStrip = mEditorContextMenu;

            mEditorMenuStrip.ResumeLayout(false);
            mEditorMenuStrip.PerformLayout();
            mEditorStatusStrip.ResumeLayout(false);
            mEditorStatusStrip.PerformLayout();
            mEditorContextMenu.ResumeLayout(false);
        }
开发者ID:IDGASoft,项目名称:Molydeux,代码行数:101,代码来源:WorldEditor.cs


注:本文中的System.Windows.Forms.ContextMenuStrip.ResumeLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。