public void AddAction(IAction action) { string ID = action.ID; System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem(ID); menuItem.Click += new System.EventHandler(this.MainWindow_ActionSelect); menuItem.Tag = action; System.Windows.Forms.MenuItem menuMain = this.menuItemActions; if (menuMain == null) { LoggerFactory.Default.Log("Could not register IAction in IDE", action.EffectiveID); return; }; string category = action.Category; if ((category == "") || (category == null)) { menuMain.MenuItems.Add(menuItem); } else { System.Windows.Forms.MenuItem categoryItem = findCategoryMenu(menuMain, category); if (categoryItem == null) { categoryItem = new System.Windows.Forms.MenuItem(category); menuMain.MenuItems.Add(categoryItem); } addSortedActionInCategory(categoryItem, menuItem); } }
public Main() { InitializeComponent(); if (isDebug.Equals("false")) this.Topmost = true; this.notifyIcon = new System.Windows.Forms.NotifyIcon(); this.notifyIcon.BalloonTipText = "多电站演示系统正在运行!"; this.notifyIcon.Text = "多电站演示系统!"; this.notifyIcon.Icon = new System.Drawing.Icon("favicon.ico"); this.notifyIcon.Visible = true; this.notifyIcon.ShowBalloonTip(1000); this.notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_MouseClick); System.Windows.Forms.MenuItem showWindow = new System.Windows.Forms.MenuItem("显示界面"); showWindow.Click += new EventHandler(showWindow_Click); System.Windows.Forms.MenuItem exitSystem = new System.Windows.Forms.MenuItem("退出"); exitSystem.Click += new EventHandler(exitSystem_Click); System.Windows.Forms.MenuItem[] menuItems = new System.Windows.Forms.MenuItem[] { showWindow, exitSystem }; this.notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(menuItems); this.StateChanged += new EventHandler(MainWindow_StateChanged); setHook(); autoRun(); //GC.Collect(); //GC.WaitForPendingFinalizers(); //GC.Collect(); }
protected override void OnStartup(System.Windows.StartupEventArgs e) { var language = SettingVM.Instance.Language; ResourcesHelper.SetLanguage(language); UpdateLanguage(); SettingVM.Instance.PropertyChanged += Instance_PropertyChanged; _notifyIcon.Icon = RemoteShutdown.Client.Properties.Resources.app; _notifyIcon.Visible = true; _setting.Click += Setting_Click; _exit.Click += Exit_Click; System.Windows.Forms.MenuItem[] childen = new System.Windows.Forms.MenuItem[] { _setting, _exit }; _notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(childen); _notifyIcon.MouseClick += NotifyIcon_MouseClick; if (SettingVM.Instance.First) // 设置开机运行 { SettingVM.Instance.Boot = true; SettingVM.Instance.First = false; ShowSettingWindow(); } base.OnStartup(e); }
public void AddMenuItem(string name,Action action) { System.Windows.Forms.MenuItem item = new System.Windows.Forms.MenuItem(name); item.Click += new EventHandler(delegate { action.Invoke(); }); this.notifyIcon.ContextMenu.MenuItems.Add(item); }
public static void Start(EventHandler onShow, EventHandler onClose, EventHandler onShowLogs) { RefreshTaskbarNotificationArea(); AppDomain.CurrentDomain.ProcessExit += new EventHandler(CurrentDomain_ProcessExit); _notifyIcon = new System.Windows.Forms.NotifyIcon(); Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/ServerFS2;component/FS2.ico")).Stream; _notifyIcon.Icon = new System.Drawing.Icon(iconStream); _notifyIcon.Visible = true; _notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(); var menuItem1 = new System.Windows.Forms.MenuItem(); menuItem1.Text = "Показать"; menuItem1.Click += new EventHandler(onShow); _notifyIcon.ContextMenu.MenuItems.Add(menuItem1); var menuItem2 = new System.Windows.Forms.MenuItem(); menuItem2.Text = "Выход"; menuItem2.Click += new EventHandler(onClose); _notifyIcon.ContextMenu.MenuItems.Add(menuItem2); var menuItem3 = new System.Windows.Forms.MenuItem(); menuItem3.Text = "Логи"; menuItem3.Click += new EventHandler(onShowLogs); _notifyIcon.ContextMenu.MenuItems.Add(menuItem3); _notifyIcon.Text = "Сервер FS2"; }
// private bool firstShowTip = true; private void InitNotifyIcon() { trayContextMenu = new System.Windows.Forms.ContextMenu(); trayExitMenuItem = new System.Windows.Forms.MenuItem(); trayMiniMenuItem = new System.Windows.Forms.MenuItem(); trayViewHistorymenuItem = new System.Windows.Forms.MenuItem(); trayContextMenu.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { trayViewHistorymenuItem, trayMiniMenuItem, trayExitMenuItem }); trayViewHistorymenuItem.Index = 0; trayViewHistorymenuItem.Text = "查看历史记录(&H)"; trayViewHistorymenuItem.Click += new EventHandler(TrayViewHistoryMenuItem_Click); trayMiniMenuItem.Index = 1; trayMiniMenuItem.Text = "隐藏悬浮窗(&M)"; trayMiniMenuItem.Click += new EventHandler(TrayMiniMenuItem_Click); trayExitMenuItem.Index = 2; trayExitMenuItem.Text = "退出(&E)"; trayExitMenuItem.Click += new EventHandler(TrayExitMenuItem_Click); notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.BalloonTipText = "SmartMe已最小化到托盘,双击此处恢复窗口"; notifyIcon.BalloonTipTitle = "SmartMe"; notifyIcon.Text = "SmartMe"; notifyIcon.Icon = new System.Drawing.Icon("icon.ico"); notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_Click); notifyIcon.ContextMenu = this.trayContextMenu; ShowTrayIcon(true); // Always show the icon }
public override void Load() { m_form = new FormWidget("Scale Bar Legend"); m_form.Location = oDefaultLocation; m_form.ClientSize = new System.Drawing.Size(150, 60); m_form.Text = "Scale Bar Legend"; m_form.BackgroundColor = WidgetBackgroundColor; m_form.ParentWidget = DrawArgs.NewRootWidget; m_form.AutoHideHeader = true; m_form.VerticalScrollbarEnabled = false; m_form.HorizontalScrollbarEnabled = false; m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent); m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged); m_form.BorderEnabled = false; m_scaleBar = new ScaleBarWidget(); m_scaleBar.Location = new System.Drawing.Point(5, 0); m_form_OnResizeEvent(m_form, m_form.WidgetSize); m_scaleBar.ParentWidget = m_form; m_form.ChildWidgets.Add(m_scaleBar); bool visibility = false; m_menuItem = new System.Windows.Forms.MenuItem("Scale Bar Legend"); m_menuItem.Click += new EventHandler(m_menuItem_Click); m_menuItem.Checked = visibility; m_form.Visible = visibility; //ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem); DrawArgs.NewRootWidget.ChildWidgets.Add(m_form); base.Load(); }
private void InitializeComponent() { m_MainMenu = new System.Windows.Forms.MainMenu( ); // File sub-menu m_FileMenu = new System.Windows.Forms.MenuItem( "&File" ); m_FileExit = new System.Windows.Forms.MenuItem( "&Exit", this.FileExit, System.Windows.Forms.Shortcut.CtrlQ ); this.SuspendLayout( ); m_MainMenu.MenuItems.Add( m_FileMenu ); m_FileMenu.MenuItems.Add( m_FileExit ); this.Menu = m_MainMenu; m_Orthographic0 = new OrthographicViewControl( ); this.Controls.Add( m_Orthographic0 ); m_Orthographic0.Dock = System.Windows.Forms.DockStyle.Fill; m_Orthographic0.Location = new System.Drawing.Point( 0, 0 ); m_Orthographic0.Name = "Orthographic View 0"; this.components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Name = "BBBEditor"; this.Text = "Bang Bang Banquet Editor"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.ResumeLayout( false ); }
public MainWindow() { InitializeComponent(); this.IsPostPanelExpand = true; this.IsFunctionPanelExpand = true; this.IsMessagePostPanelExpand = true; this.AuthPanel.OkButton.Click += new RoutedEventHandler(OkButton_Click); this.AuthPanel.PrevButton.Click += new RoutedEventHandler(PrevButton_Click); this.AuthPanel.NextButton.Click += new RoutedEventHandler(NextButton_Click); this.ReplyPanel.ReplyButton.Click += new RoutedEventHandler(ReplyPanelReplyButton_Click); this.ReplyPanel.CancelButton.Click += new RoutedEventHandler(ReplyPanelCancelButton_Click); #region Task Tray int ScreenWidth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width; int Screenheigth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height; int AppWidth = (int)this.Width; int AppHeight = (int)this.Height; Canvas.SetLeft(this, ScreenWidth - AppWidth); //ScreenWidth / 2 - AppWidth / 2; Canvas.SetTop(this, Screenheigth - AppHeight); //Screenheigth / 2 - AppHeight / 2; this.StateChanged += new EventHandler(MainWindow_StateChanged); this.taskIcon = new System.Windows.Forms.NotifyIcon(); this.taskIcon.Visible = true; this.taskIcon.Icon = Properties.Resources.YammyyIcon; this.taskIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(taskIcon_MouseClick); this.taskIcon.ContextMenu = new System.Windows.Forms.ContextMenu(); System.Windows.Forms.MenuItem item = new System.Windows.Forms.MenuItem("&Exit", taskIconItemExit_Click); this.taskIcon.ContextMenu.MenuItems.Add(item); #endregion System.Threading.Thread th = new System.Threading.Thread(new System.Threading.ThreadStart(InitialCheck)); th.Start(); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.mainMenu = new System.Windows.Forms.MainMenu(this.components); this.menuItemSave = new System.Windows.Forms.MenuItem(); this.menuItemSettings = new System.Windows.Forms.MenuItem(); this.menuItemAbout = new System.Windows.Forms.MenuItem(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.SuspendLayout(); // // mainMenu // this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItemSave, this.menuItemSettings, this.menuItemAbout, this.menuItem1, this.menuItem2}); // // menuItemSave // this.menuItemSave.Index = 0; this.menuItemSave.Text = "Save image"; // // menuItemSettings // this.menuItemSettings.Index = 1; this.menuItemSettings.Text = "Setting"; // // menuItemAbout // this.menuItemAbout.Index = 2; this.menuItemAbout.Text = "About"; // // menuItem1 // this.menuItem1.Index = 3; this.menuItem1.Text = "Refresh"; // // menuItem2 // this.menuItem2.Index = 4; this.menuItem2.Text = "GC"; // // MainForm // this.AutoScaleBaseSize = new System.Drawing.Size(8, 21); this.ClientSize = new System.Drawing.Size(512, 512); this.MinimumSize = new System.Drawing.Size(160, 146); this.Name = "MainForm"; this.Text = "Fractals 0.5 BETA"; this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint); this.Resize += new System.EventHandler(this.Form1_Resize); this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picture_MouseUp); this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MainFormMouseMove); this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picture_MouseDown); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.mnuCancel = new System.Windows.Forms.MenuItem(); this.mnuAction = new System.Windows.Forms.MenuItem(); this.txtURL = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // mainMenu1 // // // mnuCancel // // // mnuOK // // // txtURL // this.txtURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtURL.BackColor = System.Drawing.Color.White; this.txtURL.ForeColor = System.Drawing.Color.Black; this.txtURL.Location = new System.Drawing.Point(0, 29); this.txtURL.Multiline = true; this.txtURL.Name = "txtURL"; this.txtURL.Size = new System.Drawing.Size(240, 91); this.txtURL.TabIndex = 0; // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.label1.ForeColor = System.Drawing.Color.LightGray; this.label1.Location = new System.Drawing.Point(4, 4); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(233, 20); this.label1.Text = "Enter the URL:"; // // URLForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScroll = true; this.BackColor = System.Drawing.Color.Black; this.ClientSize = new System.Drawing.Size(240, 268); this.Controls.Add(this.label1); this.Controls.Add(this.txtURL); this.Menu = this.mainMenu1; this.Name = "URLForm"; this.Text = "Enter a URL"; this.ResumeLayout(false); }
public WindowForm() { Text = "Window"; System.Windows.Forms.MainMenu menu = new System.Windows.Forms.MainMenu(); var item = new System.Windows.Forms.MenuItem(); item.Text = "Exit"; item.Click += new EventHandler(item_Click); menu.MenuItems.Add(item); Menu = menu; }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.MainMenu1 = new System.Windows.Forms.MainMenu(this.components); this.MenuItem1 = new System.Windows.Forms.MenuItem(); this.itmSaveAs = new System.Windows.Forms.MenuItem(); this.viewer = new AtasciiView(); this.SuspendLayout(); // // MainMenu1 // this.MainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MenuItem1}); // // MenuItem1 // this.MenuItem1.Index = 0; this.MenuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.itmSaveAs}); this.MenuItem1.MergeType = System.Windows.Forms.MenuMerge.MergeItems; this.MenuItem1.Text = "&File"; // // itmSaveAs // this.itmSaveAs.Index = 0; this.itmSaveAs.MergeOrder = 3; this.itmSaveAs.MergeType = System.Windows.Forms.MenuMerge.MergeItems; this.itmSaveAs.Text = "Save ATASCII As..."; this.itmSaveAs.Click += new System.EventHandler(this.itmSaveAs_Click); // // viewer // this.viewer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.viewer.Location = new System.Drawing.Point(0, 0); this.viewer.Name = "viewer"; this.viewer.Size = new System.Drawing.Size(304, 230); this.viewer.TabIndex = 0; // // AtasciiFileViewer // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(304, 242); this.Controls.Add(this.viewer); this.Menu = this.MainMenu1; this.Name = "AtasciiFileViewer"; this.Text = "AtasciiFileViewer"; this.Load += new System.EventHandler(this.AtasciiFileViewer_Load); this.ResumeLayout(false); }
public void AttachGui(GuiData guiData) { m_guiData = guiData; if (m_guiData.MainWindow is System.Windows.Forms.Form) { System.Windows.Forms.MenuItem menuItem = guiData.MenuItem as System.Windows.Forms.MenuItem; if (menuItem != null) { m_subMenuItem = new System.Windows.Forms.MenuItem("Debugger", menu_Click); menuItem.MenuItems.Add(m_subMenuItem); } } }
private void InitializeNotifyIcon() { _notifyIcon = new NotifyIcon { Text = Infrastructure.Constant.Wox, Icon = Properties.Resources.app, Visible = true }; _notifyIcon.Click += (o, e) => Visibility = Visibility.Visible; var open = new MenuItem(InternationalizationManager.Instance.GetTranslation("iconTrayOpen")); open.Click += (o, e) => Visibility = Visibility.Visible; var setting = new MenuItem(InternationalizationManager.Instance.GetTranslation("iconTraySettings")); setting.Click += (o, e) => App.API.OpenSettingDialog(); var exit = new MenuItem(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); exit.Click += (o, e) => Close(); MenuItem[] childen = { open, setting, exit }; _notifyIcon.ContextMenu = new ContextMenu(childen); }
public MainWindow() { _icon = new System.Windows.Forms.NotifyIcon(); _menu = new System.Windows.Forms.ContextMenu(); _menu.Popup += _menu_Popup; // Versioni precedenti _prevoiusVersions = new System.Windows.Forms.MenuItem(); _prevoiusVersions.Text = "Versioni precedenti..."; _prevoiusVersions.Click += (object sender, EventArgs args) => { ApplicationController.Instance.ShowPreviousVers(); }; _menu.MenuItems.Add(0,_prevoiusVersions); // Logout _logout = new System.Windows.Forms.MenuItem(); _logout.Text = "Logout"; _logout.Click += (object sender, EventArgs args) => { ApplicationController.Instance.Logout(); }; _menu.MenuItems.Add(1, _logout); // Login _login = new System.Windows.Forms.MenuItem(); _login.Text = "Login"; _login.Click += (object sender, EventArgs args) => { ApplicationController.Instance.RequireLogin(); }; _menu.MenuItems.Add(2, _login); // Exit _exit = new System.Windows.Forms.MenuItem(); _exit.Text = "Esci"; _exit.Click += (object sender, EventArgs args) => { ApplicationController.Instance.Shutdown(RETURN_VALUES.OK); }; _menu.MenuItems.Add(3, _exit); _icon.ContextMenu = _menu; //this.WindowState = System.Windows.WindowState.Maximized; _icon.Icon = new System.Drawing.Icon(@"rockbox_small.ico"); this._icon.Visible = true; InitializeComponent(); this.Left = (System.Windows.SystemParameters.WorkArea.Width - this.Width) + System.Windows.SystemParameters.WorkArea.Left; this.Top = (System.Windows.SystemParameters.WorkArea.Height - this.Height) + System.Windows.SystemParameters.WorkArea.Top; }
private System.Windows.Forms.ContextMenu GetContextMenu() { System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(); var exitItem = new System.Windows.Forms.MenuItem() { Text = "Exit" }; exitItem.Click += exitItem_Click; var settingsItem = new System.Windows.Forms.MenuItem() { Text = "Settings" }; settingsItem.Click += settingsItem_Click; menu.MenuItems.Add(settingsItem); menu.MenuItems.Add(exitItem); return menu; }
public MainWindow() { InitializeComponent(); System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon(); ni.Icon = System.Drawing.SystemIcons.Application; ni.Text = "Программа перезапуска КММ с пульта"; ni.Visible = true; ni.DoubleClick += delegate(object sender, EventArgs args) { this.Show(); this.WindowState = WindowState.Normal; }; System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu(); System.Windows.Forms.MenuItem menuItem1 = new System.Windows.Forms.MenuItem(); System.Windows.Forms.MenuItem menuItem2 = new System.Windows.Forms.MenuItem(); // Initialize contextMenu1 contextMenu1.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { menuItem1, menuItem2 }); // Initialize menuItem1 menuItem1.Index = 1; menuItem1.Text = "Выход"; menuItem1.Click += new System.EventHandler(menuItem1_Click); menuItem2.Index = 0; menuItem2.Text = "Открыть"; menuItem2.Click += new System.EventHandler(menuItem2_Click); ni.ContextMenu = contextMenu1; this.Hide(); serialPort = new SerialPort(); serialPort.DataReceived += serialPort_DataReceived; serialPort.PortName = Settings.Default.ComPortNameSetting; path1 = Settings.Default.Path1; nameexe1 = Settings.Default.NameExe1; try { serialPort.Open(); } catch (Exception) { MessageBox.Show("Не открывается порт " + Settings.Default.ComPortNameSetting + ".\nВыберите COM порт."); } }
public Window1(Border toastBorder,System.Windows.Forms.MenuItem miShowVB, MainWindow.Toast toast) { this.miShowVB = miShowVB; InitializeComponent(); rect1.Fill = new VisualBrush() { Visual = toastBorder}; timer.Tick += (s, e) => { txtIsPopupCycleRunning.Text = MKTwitch.IsPopupCycleRunning ? "true" : "false"; if(MKTwitch.MKTwitchTimer!=null) txtMKTwitchTimerEnabled.Text = MKTwitch.MKTwitchTimer.IsEnabled ? "true" : "false"; txtTopPos.Text = toast.TopPosition.ToString(); txtBottomPos.Text = toast.BottomPosition.ToString(); txtLeftPos.Text = toast.LeftPosition.ToString(); txtLastUpdate.Text = MKTwitch.LastPull.ToLongTimeString(); }; timer.Start(); }
private void OnStartup(object sender, StartupEventArgs e) { // Create the notification icon m_NotifyIcon = new System.Windows.Forms.NotifyIcon(); m_NotifyIcon.Icon = PerformantServer.Properties.Resources.DisconnectedIcon; m_NotifyIcon.Text = PerformantServer.Properties.Resources.DisconnectedTooltip; m_NotifyIcon.Visible = true; // Make menu System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem("&Quit"); menuItem.Click += Quit_Click; m_NotifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(new System.Windows.Forms.MenuItem[] { menuItem }); // Start the server m_Server = new Server(); m_Server.ConnectionChanged += Server_ConnectionChanged; m_Server.Start(); }
public void DetachGui() { if (m_guiData.MainWindow is System.Windows.Forms.Form) { if (m_subMenuItem != null) { m_subMenuItem.Parent.MenuItems.Remove(m_subMenuItem); m_subMenuItem.Dispose(); m_subMenuItem = null; } if (m_form != null) { m_form.AllowClose = true; m_form.Close(); m_form = null; } } m_guiData = null; }
protected override void OnStartup(StartupEventArgs e) { Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MouseEnhanceToggler", System.Reflection.Assembly.GetExecutingAssembly().Location); mouseIconEnabled = System.Drawing.Icon.FromHandle(MouseEnhanceToggler.Properties.Resources.MouseIconEnabled.GetHicon()); mouseIconDisabled = System.Drawing.Icon.FromHandle(MouseEnhanceToggler.Properties.Resources.MouseIconDisabled.GetHicon()); notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.Click += NotifyIcon_Click; var menuItems = new System.Windows.Forms.MenuItem[1]; menuItems[0] = new System.Windows.Forms.MenuItem("Quit", (obj, evt) => { Application.Current.Shutdown(); }); notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(menuItems); UpdateNotifyIcon(); notifyIcon.Visible = true; base.OnStartup(e); }
private void MakeIcon() { this.notifyIcon = new System.Windows.Forms.NotifyIcon(); this.notifyIcon.Icon = new System.Drawing.Icon("flowmonitor.ico"); this.notifyIcon.Text = "流量监控 - CA"; this.notifyIcon.Visible = true; this.notifyIcon.DoubleClick += new System.EventHandler(notifyIcon_DoubleClick); System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(); System.Windows.Forms.MenuItem close = new System.Windows.Forms.MenuItem(); close.Text = "退出"; close.Click += new EventHandler(delegate { this.Close(); }); menu.MenuItems.Add(close); this.notifyIcon.ContextMenu = menu; }
/// <summary> /// デザイナ サポートに必要なメソッドです。このメソッドの内容を /// コード エディタで変更しないでください。 /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FolderSelectDialog)); this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.cancelMenuItem = new System.Windows.Forms.MenuItem(); this.acceptMenuItem = new System.Windows.Forms.MenuItem(); this.folderTreeView = new System.Windows.Forms.TreeView(); this.SuspendLayout(); // // mainMenu1 // this.mainMenu1.MenuItems.Add(this.cancelMenuItem); this.mainMenu1.MenuItems.Add(this.acceptMenuItem); // // cancelMenuItem // resources.ApplyResources(this.cancelMenuItem, "cancelMenuItem"); this.cancelMenuItem.Click += new System.EventHandler(this.cancelMenuItem_Click); // // acceptMenuItem // resources.ApplyResources(this.acceptMenuItem, "acceptMenuItem"); this.acceptMenuItem.Click += new System.EventHandler(this.acceptMenuItem_Click); // // folderTreeView // resources.ApplyResources(this.folderTreeView, "folderTreeView"); this.folderTreeView.Name = "folderTreeView"; this.folderTreeView.PathSeparator = "\\"; this.folderTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.folderTreeView_BeforeExpand); // // FolderSelectDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; resources.ApplyResources(this, "$this"); this.Controls.Add(this.folderTreeView); this.Menu = this.mainMenu1; this.Name = "FolderSelectDialog"; this.ResumeLayout(false); }
private void initNotifyIcon() { notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.BalloonTipText = "Brilliantech Warehouse Print Serivce"; notifyIcon.Text = "Brilliantech Warehouse Print Serivce"; string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "i.ico"); notifyIcon.Icon = new System.Drawing.Icon(path); notifyIcon.Visible = true; notifyIcon.ShowBalloonTip(2000); notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_MouseClick); System.Windows.Forms.MenuItem item1 = new System.Windows.Forms.MenuItem("Menu 1"); System.Windows.Forms.MenuItem exit = new System.Windows.Forms.MenuItem("退出"); exit.Click += new EventHandler(exit_Click); System.Windows.Forms.MenuItem[] menus = new System.Windows.Forms.MenuItem[] { exit }; notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(menus); this.StateChanged += new EventHandler(MainWindow_StateChanged); }
public void AddConfigurationEditor(IConfigurationEditor editor) { string ID = editor.ID; System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem(ID); menuItem.Click += new System.EventHandler(this.MainWindow_ConfigurationEditorSelect); menuItem.Tag = editor; string category = editor.Category; if ((category == "") || (category == null)) { menuItemConfigurations.MenuItems.Add(menuItem); } else { System.Windows.Forms.MenuItem categoryItem = findCategoryMenu(menuItemConfigurations, category); if (categoryItem == null) { categoryItem = new System.Windows.Forms.MenuItem(category); menuItemConfigurations.MenuItems.Add(categoryItem); } categoryItem.MenuItems.Add(menuItem); } }
public void AddTester(ITester tester) { string ID = tester.GetID(); System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem(ID); menuItem.Click += new System.EventHandler(this.MainWindow_TesterSelect); menuItem.Tag = tester; string category = tester.GetCategory(); if ((category == "") || (category == null)) { menuItemTesters.MenuItems.Add(menuItem); } else { System.Windows.Forms.MenuItem categoryItem = findCategoryTester(category); if (categoryItem == null) { categoryItem = new System.Windows.Forms.MenuItem(category); menuItemTesters.MenuItems.Add(categoryItem); } addSortedTesterInCategory(categoryItem, menuItem); } }
private System.Windows.Forms.ContextMenu GetSystrayContextMenu() { var menu = new System.Windows.Forms.ContextMenu(); var exit = new System.Windows.Forms.MenuItem("Exit", (sender, args) => { m_ExtendedNotifyIcon.Dispose(); // So that the icon disappears and it looks like the app closed quickly. Close(); // Takes about two seconds to close. }); var settings = new System.Windows.Forms.MenuItem("Settings", (sender, args) => { var vm = (DataContext as NotifyWindowViewModel); if (vm != null) vm.IsShowSettings = true; extendedNotifyIcon_OnShowWindow(); }); menu.MenuItems.Add(settings); menu.MenuItems.Add(exit); return menu; }
public override void Load() { m_menuItem = new System.Windows.Forms.MenuItem("Compass"); m_menuItem.Click += new EventHandler(m_menuItem_Click); m_menuItem.Checked = World.Settings.ShowCompass; ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem); m_form = new FormWidget("Compass"); m_form.ClientSize = new System.Drawing.Size(200, 200); m_form.Location = new System.Drawing.Point(0, 400); m_form.BackgroundColor = World.Settings.WidgetBackgroundColor; m_form.AutoHideHeader = true; m_form.VerticalScrollbarEnabled = false; m_form.HorizontalScrollbarEnabled = false; m_form.BorderEnabled = false; m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent); m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged); m_compass = new Compass3DWidget(); m_compass.Location = new System.Drawing.Point(5, 0); m_compass.Font = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Bold); m_compass.ParentWidget = m_form; m_form_OnResizeEvent(m_form, m_form.WidgetSize); m_form.ChildWidgets.Add(m_compass); m_form.Visible = World.Settings.ShowCompass; DrawArgs.NewRootWidget.ChildWidgets.Add(m_form); m_toolbarItem = new WorldWind.NewWidgets.WidgetMenuButton( "Compass 3D", basePath + "\\Data\\Icons\\Interface\\compass2.png", m_form); ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_toolbarItem); base.Load(); }
public MainWindow() { TabaltHooks.AltTabHook(); TabaltHooks.AltTabPressed += this.OnAltTabPressed; TabaltHooks.ActivationRequested += this.OnActivationRequested; InitializeComponent(); this._notificationMenu = new System.Windows.Forms.ContextMenu(); var exitMenuItem = new System.Windows.Forms.MenuItem("&Quit", (s, e)=> Application.Current.Shutdown()); this._notificationMenu.MenuItems.Add(exitMenuItem); this._notificationIcon = new System.Windows.Forms.NotifyIcon(); this._notificationIcon.Text = "tabalt - An alternative ALT TAB implementation"; var x = Assembly.GetExecutingAssembly().Location; var dir = System.IO.Path.GetDirectoryName(x); var ico = System.IO.Path.Combine(dir, "logo.ico"); this._notificationIcon.Icon = new System.Drawing.Icon(ico); this._notificationIcon.Click += new EventHandler(_notificationIcon_Click); this._notificationIcon.ContextMenu = this._notificationMenu; this._notificationIcon.Visible = true; }
protected override void OnInitialized(EventArgs e) { // It seems like we need to show the window once before the hotkeys start working. Show(); Hide(); aboutMenuItem = new System.Windows.Forms.MenuItem("A&bout (License)", (_s, _e) => { MessageBox.Show(new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream("Contrastor.LICENSE")).ReadToEnd()); }); showHideMenuItem = new System.Windows.Forms.MenuItem("S&how/Hide", (_s, _e) => { Toggle(); }); pickFirstMenuItem = new System.Windows.Forms.MenuItem("Pick f&oreground color (Ctrl + Alt + F)", (_s, _e) => { PickColor(0); Show(); }); pickSecondMenuItem = new System.Windows.Forms.MenuItem("Pick b&ackground color (Ctrl + Alt + B)", (_s, _e) => { PickColor(1); Show(); }); quitMenuItem = new System.Windows.Forms.MenuItem("Q&uit", (_s, _e) => { Application.Current.Shutdown(); }); contextMenu = new System.Windows.Forms.ContextMenu(new[] { aboutMenuItem, showHideMenuItem, pickFirstMenuItem, pickSecondMenuItem, quitMenuItem }); // Adapted after: https://stackoverflow.com/a/1475775 notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.Text = "Contrastor"; notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_Click); notifyIcon.Icon = new System.Drawing.Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("Contrastor.app.ico")); notifyIcon.ContextMenu = contextMenu; notifyIcon.Visible = true; base.OnInitialized(e); }
async private void WindowX_ContentRendered(object sender, EventArgs e) { notifyicon.Visible = true; notifyicon.BalloonTipText = "Music Downloader UI"; notifyicon.Icon = System.Drawing.Icon.ExtractAssociatedIcon(System.Windows.Forms.Application.ExecutablePath); notifyicon.MouseClick += Notifyicon_MouseClick; System.Windows.Forms.MenuItem menu1 = new System.Windows.Forms.MenuItem("关闭"); menu1.Click += Menu1_Click; notifyicon.ContextMenu = new System.Windows.Forms.ContextMenu(new System.Windows.Forms.MenuItem[] { menu1 }); string result = ""; await Task.Run(() => { result = music.Update(); }); if (result == "Error") { NotifyError(); } if (result == "Needupdate") { NotifyUpdate(); } }
/// <summary> /// Creates notify icon and menu. /// </summary> private void CreateNotifyIcon() { System.Windows.Forms.NotifyIcon notifyicon; notifyicon = new System.Windows.Forms.NotifyIcon(); var currentBrightness = WmiFunctions.GetBrightnessLevel(); //System.Windows.Forms.MenuItem mnuPin = new System.Windows.Forms.MenuItem("Pin", new EventHandler(this.PinMenuEventHandler)); System.Windows.Forms.MenuItem mnuMonitorOff = new System.Windows.Forms.MenuItem("Power off display", new EventHandler(this.MonitorOffMenuEventHandler)); System.Windows.Forms.MenuItem mnuSleep = new System.Windows.Forms.MenuItem("Enter sleep mode", new EventHandler(this.SleepMenuEventHandler)); System.Windows.Forms.MenuItem mnuCaffiene = new System.Windows.Forms.MenuItem("Caffiene", new EventHandler(this.CaffieneMenuEventHandler)); mnuAutostart = new System.Windows.Forms.MenuItem("Autostart", new EventHandler(this.AutostartMenuEventHandler)); mnuAutostart.Checked = Autostart.CheckStartupFolderShortcutsExists(); System.Windows.Forms.MenuItem mnuExit = new System.Windows.Forms.MenuItem("Close", new EventHandler(this.ExitMenuEventHandler)); mnuLabel = new System.Windows.Forms.MenuItem(""); mnuLabel.Enabled = false; // greyed-out style label System.Windows.Forms.MenuItem[] menuitems = new System.Windows.Forms.MenuItem[] { mnuLabel, new System.Windows.Forms.MenuItem("-"), mnuMonitorOff, mnuSleep, new System.Windows.Forms.MenuItem("-"), mnuCaffiene, new System.Windows.Forms.MenuItem("-"), mnuAutostart, new System.Windows.Forms.MenuItem("-"), mnuExit }; System.Windows.Forms.ContextMenu contextmenu = new System.Windows.Forms.ContextMenu(menuitems); contextmenu.Popup += this.ContextMenuPopup; notifyicon.ContextMenu = contextmenu; notifyicon.MouseClick += this.NotifyIconClick; notifyicon.MouseDoubleClick += this.NotifyIconClick; notifyicon.Visible = true; DrawIcon.updateNotifyIcon(notifyicon, currentBrightness); this.NotifyIcon = notifyicon; }
private void InitializeComponent() { this.contextMenu1 = new System.Windows.Forms.ContextMenu(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); // // contextMenu1 // this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem3, this.menuItem1, this.menuItem2 }); // // menuItem3 // this.menuItem3.Index = 0; this.menuItem3.Text = "新規作成 - 前"; this.menuItem3.Click += new System.EventHandler(menuItem3_Click); // // menuItem1 // this.menuItem1.Index = 1; this.menuItem1.Text = "新規作成 - 子"; this.menuItem1.Click += new System.EventHandler(menuItem1_Click); // // menuItem2 // this.menuItem2.Index = 2; this.menuItem2.Text = "新規作成 - 後"; this.menuItem2.Click += new System.EventHandler(menuItem2_Click); // // MemoTreeView // this.LabelEdit = true; }
public MainWindow() { InitializeComponent(); Hide(); contextMenu1 = new System.Windows.Forms.ContextMenu(); menuItem3 = new System.Windows.Forms.MenuItem(); menuItem4 = new System.Windows.Forms.MenuItem(); contextMenu1.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { menuItem3, menuItem4 }); menuItem3.Index = 2; menuItem3.Text = "Exit"; menuItem3.Click += new System.EventHandler(this.menuItem2_Click); menuItem4.Index = 3; menuItem4.Text = "Wifi Relay"; menuItem4.Click += new System.EventHandler(this.menuItem4_Click); m_notifyIcon = new System.Windows.Forms.NotifyIcon(); m_notifyIcon.BalloonTipText = "Your Text"; m_notifyIcon.BalloonTipTitle = "Your Title"; m_notifyIcon.Text = "The Wifi Relay"; m_notifyIcon.Icon = new System.Drawing.Icon(AppDomain.CurrentDomain.BaseDirectory + "\\Images\\bulb_off.ico"); m_notifyIcon.ContextMenu = contextMenu1; if (m_notifyIcon != null) { m_notifyIcon.Visible = true; } m_notifyIcon.ShowBalloonTip(1000); }
private void setup_NotifyIcon() { Thread notifyThread = new Thread( delegate() { ni = new System.Windows.Forms.NotifyIcon(); ni.Icon = new System.Drawing.Icon("icon.ico"); ni.Text = "DNSZI Setting"; ni.Visible = true; ni.DoubleClick += new EventHandler(TrayDoubleClick); System.Windows.Forms.MenuItem item1 = new System.Windows.Forms.MenuItem(); item1.Index = 0; item1.Text = "E&xit"; item1.Click += new EventHandler(TrayCloseClick); ni.ContextMenu = new System.Windows.Forms.ContextMenu(); ni.ContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { item1 }); System.Windows.Forms.Application.Run(); }); notifyThread.Start(); }
private void Item_Click(object sender, EventArgs e) { System.Windows.Forms.MenuItem item = sender as System.Windows.Forms.MenuItem; if (item == null) { return; } if (item.Text == "&Show") { item.Text = "&Hide"; this.Show(); this.WindowState = WindowState.Normal; } else if (item.Text == "&Hide") { item.Text = "&Show"; this.Hide(); this.WindowState = WindowState.Minimized; } else if (item.Text == "&Exit") { this.Close(); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { // Configure and show a notification icon in the system tray this.notify = new System.Windows.Forms.NotifyIcon(); this.notify.BalloonTipText = "Hello, NotifyIcon!"; this.notify.Text = "Hello!"; this.notify.Icon = new System.Drawing.Icon("123.ico"); this.notify.Click += new EventHandler(Notify_Click); this.notify.ShowBalloonTip(1000); System.Windows.Forms.ContextMenu notifyIconMenu = new System.Windows.Forms.ContextMenu(); System.Windows.Forms.MenuItem notifyIconMenuItem3 = new System.Windows.Forms.MenuItem(); notifyIconMenuItem3.Index = 0; notifyIconMenuItem3.Text = "Exit"; notifyIconMenuItem3.Click += new EventHandler(Exit_Click); notifyIconMenu.MenuItems.Add(notifyIconMenuItem3); this.notify.ContextMenu = notifyIconMenu; this.notify.Visible = true; }
private System.Windows.Forms.MenuItem CreateSendingMenuItem() { var menuItem = new System.Windows.Forms.MenuItem(); menuItem.Click += (_, __) => UserSettings.TransferActive = !UserSettings.TransferActive; void UpdateMenuItem() { menuItem.Text = UserSettings.TransferActive ? "Sending Active" : "Sending Disabled"; menuItem.Checked = UserSettings.TransferActive; } //initial update UpdateMenuItem(); //update on changed setting UserSettings.PropertyChanged += (s, e) => { if (e.PropertyName == nameof(UserSettings.TransferActive)) { UpdateMenuItem(); } }; return(menuItem); }
/// <summary> /// 系统托盘图标初始化程序 /// </summary> public static void NotifyIcon_Init() { NI = new System.Windows.Forms.NotifyIcon(); NI.Icon = Properties.Resources.favicon; NI.Text = "录播姬"; //打开菜单项 System.Windows.Forms.MenuItem open = new System.Windows.Forms.MenuItem("显示主窗口"); open.Click += new EventHandler((s, e) => { Application.Current.MainWindow.Show(); Application.Current.MainWindow.Activate(); }); //设置菜单项 System.Windows.Forms.MenuItem setting = new System.Windows.Forms.MenuItem("设置"); setting.Click += new EventHandler((s, e) => { SettingWindow ss = new SettingWindow(); ss.Show(); }); //检查更新菜单项 System.Windows.Forms.MenuItem checkupdate = new System.Windows.Forms.MenuItem("检查更新"); checkupdate.Click += new EventHandler((s, e) => { }); //关于菜单项 System.Windows.Forms.MenuItem about = new System.Windows.Forms.MenuItem("关于"); about.Click += new EventHandler((s, e) => { AboutWindow a = new AboutWindow(); a.ShowDialog(); }); //退出菜单项 System.Windows.Forms.MenuItem exit = new System.Windows.Forms.MenuItem("退出"); exit.Click += new EventHandler((s, e) => { Bas.Exit(); }); //关联托盘控件 System.Windows.Forms.MenuItem[] childen = new System.Windows.Forms.MenuItem[] { open, setting, checkupdate, about, exit }; NI.ContextMenu = new System.Windows.Forms.ContextMenu(childen); NI.Click += new EventHandler((s, e) => { Application.Current.MainWindow.Show(); Application.Current.MainWindow.Activate(); }); NI.BalloonTipClicked += new EventHandler((s, e) => { Application.Current.MainWindow.Show(); Application.Current.MainWindow.Activate(); }); NI.Visible = true; }
public static System.Windows.Forms.MenuItem CreateItem(MenuItem item) { var menuItem = new System.Windows.Forms.MenuItem(); Action click = () => { }; menuItem.Click += (s, a) => click(); menuItem.Tag = Disposable.Combine( item.Menu.Select( submenu => submenu.Items .ObserveOn(DispatcherScheduler.Current) .UnsafeAsObservableList() .Select(CreateItem) .DisposeElements(i => i.Tag as IDisposable ?? Disposable.Empty) .Subscribe(change => change.ApplyLegacy(menuItem.MenuItems))) .Or(Disposable.Empty), item.Command.Action .CombineLatest(item.Name) .ObserveOn(DispatcherScheduler.Current) .Subscribe( cmdName => { menuItem.Text = cmdName.Item2; click = () => cmdName.Item1.Do(x => x()); }), item.IsToggled .ObserveOn(DispatcherScheduler.Current) .Subscribe( isToggled => menuItem.Checked = isToggled)); return(menuItem); }
/// <summary> /// Построение иконки трея /// </summary> private void BuildIcon() { mExit = new System.Windows.Forms.MenuItem(); mExit.Text = "Exit"; ControlItem = new System.Windows.Forms.MenuItem(); ControlItem.Text = "CTFL + SHIFT"; ControlItem.RadioCheck = true; AltItem = new System.Windows.Forms.MenuItem(); AltItem.Text = "ALT + SHIFT"; AltItem.RadioCheck = true; cMenu = new System.Windows.Forms.ContextMenu(); cMenu.MenuItems.Add(ControlItem); cMenu.MenuItems.Add(AltItem); cMenu.MenuItems.Add("-"); cMenu.MenuItems.Add(mExit); TrayIcon = new System.Windows.Forms.NotifyIcon(); TrayIcon.Icon = new System.Drawing.Icon(Application.GetResourceStream(new Uri("pack://application:,,,/KBLCService;component/app_icon.ico")).Stream); TrayIcon.Visible = true; TrayIcon.Text = "Keyboard Layout Changer Service"; TrayIcon.ContextMenu = cMenu; mExit.Click += (s, e) => { Utils.CloseApp(); }; ControlItem.Click += (s, e) => { SetMode(true); }; AltItem.Click += (s, e) => { SetMode(false); }; }
private TrayIcon(Window window) { notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.BalloonTipText = "mail2fs has been minimised. Click the tray icon to show."; notifyIcon.BalloonTipTitle = "mail2fs"; notifyIcon.Text = "mail2fs"; notifyIcon.Icon = Mail2FsResources.icon; var menuItem = new System.Windows.Forms.MenuItem { Text = "Quit", }; menuItem.Click += MenuItem_Click; notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(new[] { menuItem }); notifyIcon.Click += NotifyIcon_Click; this.window = window; window.Closed += Window_Closed; window.Closing += Window_Closing; }
public System.Windows.Forms.ContextMenu createClientMenu() { System.Windows.Forms.ContextMenu contextMenu; contextMenu = new System.Windows.Forms.ContextMenu(); menuItem1 = new System.Windows.Forms.MenuItem(); menuItem2 = new System.Windows.Forms.MenuItem(); menuItem3 = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { menuItem1 }); contextMenu.MenuItems.Add("-"); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { menuItem2, menuItem3 }); menuItem1.Index = 0; menuItem1.Text = "Automatisch an- oder abmelden"; menuItem1.Name = "autoAnmeldung"; menuItem2.Index = 1; if (Configuration.AutomatischeAnmeldung) { menuItem2.Text = "Abmelden"; } else { menuItem2.Text = "Anmelden"; } menuItem3.Index = 2; menuItem3.Text = "Beenden"; ConnectMenuWithClickHandler(ref menuItem1, new EventHandler(this.ClickAutoAnAbmelden)); ConnectMenuWithClickHandler(ref menuItem2, new EventHandler(this.ClickAnAbmelden)); ConnectMenuWithClickHandler(ref menuItem3, new EventHandler(this.ClickBeenden)); return(contextMenu); }
private void InitializeTrayIcon() { TrayIcon = new TrayIcon(); // Tray icon itself TrayIcon.NotifyIcon.BalloonTipTitle = "HunterPie"; TrayIcon.NotifyIcon.Text = "HunterPie"; TrayIcon.NotifyIcon.Icon = Properties.Resources.LOGO_HunterPie; TrayIcon.NotifyIcon.Visible = true; TrayIcon.NotifyIcon.MouseDoubleClick += OnTrayIconClick; // Menu items System.Windows.Forms.MenuItem ExitItem = new System.Windows.Forms.MenuItem() { Text = "Close" }; ExitItem.Click += OnTrayIconExitClick; System.Windows.Forms.MenuItem SettingsItem = new System.Windows.Forms.MenuItem() { Text = "Settings" }; SettingsItem.Click += OnTrayIconSettingsClick; TrayIcon.ContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { SettingsItem, ExitItem }); }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(); notify = new System.Windows.Forms.NotifyIcon(); notify.Icon = Properties.Resources.tray; notify.Visible = true; notify.ContextMenu = menu; notify.Text = "Test"; notify.DoubleClick += Noyify_DoubleClick; System.Windows.Forms.MenuItem item1 = new System.Windows.Forms.MenuItem(); menu.MenuItems.Add(item1); item1.Index = 0; item1.Text = "프로그램 종료"; item1.Click += delegate(object click, EventArgs eClick) { System.Windows.Application.Current.Shutdown(); notify.Dispose(); }; System.Windows.Forms.MenuItem item2 = new System.Windows.Forms.MenuItem(); menu.MenuItems.Add(item2); item2.Index = 0; item2.Text = "프로그램 설정"; item2.Click += delegate(object click, EventArgs eClick) { this.Close(); }; this.Close(); } catch (Exception ee) { } }
/// <summary> /// 设置托盘 /// </summary> void SetNotifyIcon() { //设置托盘的各个属性 var notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.BalloonTipText = @"分线服务端已开启"; notifyIcon.Text = @"分线服务端"; notifyIcon.Icon = new System.Drawing.Icon(System.Windows.Forms.Application.StartupPath + @"\AKRemind.ico"); notifyIcon.Visible = true; notifyIcon.ShowBalloonTip(2000); notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_MouseClick); //设置菜单项 System.Windows.Forms.MenuItem about = new System.Windows.Forms.MenuItem(@"打开"); about.Click += new EventHandler(notifyIcon_MouseClick); //退出菜单项 System.Windows.Forms.MenuItem exit = new System.Windows.Forms.MenuItem(@"退出"); exit.Click += new EventHandler(exit_Click); //关联托盘控件 System.Windows.Forms.MenuItem[] childen = new System.Windows.Forms.MenuItem[] { about, exit }; notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(childen); }
public MuPDFGui() { menu_item_file = new System.Windows.Forms.MenuItem("File", new System.Windows.Forms.MenuItem[] { new System.Windows.Forms.MenuItem("&Open...", new System.EventHandler(this.open)), new System.Windows.Forms.MenuItem("&Show html", new System.EventHandler(this.show_html)), new System.Windows.Forms.MenuItem("&Quit", new System.EventHandler(this.quit)) } ); menu = new System.Windows.Forms.MainMenu(new System.Windows.Forms.MenuItem [] { menu_item_file }); this.Menu = menu; Resize += handle_resize; KeyDown += handle_key_down; this.picture_box = new System.Windows.Forms.PictureBox(); this.picture_box.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.AutoScroll = true; Controls.Add(picture_box); this.open_file("zlib.3.pdf"); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { // // MainForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Text = "Liegenschaftsbewertung"; this.Name = "Liegenschaftsbewertung"; this.Height = 600; this.Width = 800; Hauptmenu = new System.Windows.Forms.MainMenu(); Datei = new System.Windows.Forms.MenuItem(); Datei.Text = "Datei"; Neu = new System.Windows.Forms.MenuItem(); Neu.Text = "Neu"; Datei.MenuItems.Add(Neu); Öffnen = new System.Windows.Forms.MenuItem(); Öffnen.Text = "Öffnen"; Datei.MenuItems.Add(Öffnen); Speichern = new System.Windows.Forms.MenuItem(); Speichern.Text = "Speichern"; Datei.MenuItems.Add(Speichern); Schliessen = new System.Windows.Forms.MenuItem(); Schliessen.Text = "Schliessen"; Datei.MenuItems.Add(Schliessen); Drucken = new System.Windows.Forms.MenuItem(); Drucken.Text = "Drucken"; Drucken.Click += new System.EventHandler(this.Drucken_Click); Datei.MenuItems.Add(Drucken); Beenden = new System.Windows.Forms.MenuItem(); Beenden.Text = "Beenden"; Beenden.Click += new System.EventHandler(this.Beenden_Click); Datei.MenuItems.Add(Beenden); Hauptmenu.MenuItems.Add(Datei); Bearbeiten = new System.Windows.Forms.MenuItem(); Bearbeiten.Text = "Bearbeiten"; Rückgängig = new System.Windows.Forms.MenuItem(); Rückgängig.Text = "Rückgängig"; Bearbeiten.MenuItems.Add(Rückgängig); Ausschneiden = new System.Windows.Forms.MenuItem(); Ausschneiden.Text = "Ausschneiden"; Bearbeiten.MenuItems.Add(Ausschneiden); Kopieren = new System.Windows.Forms.MenuItem(); Kopieren.Text = "Kopieren"; Bearbeiten.MenuItems.Add(Kopieren); Einfügen = new System.Windows.Forms.MenuItem(); Einfügen.Text = "Einfügen"; Bearbeiten.MenuItems.Add(Einfügen); Hauptmenu.MenuItems.Add(Bearbeiten); Hilfe = new System.Windows.Forms.MenuItem(); Hilfe.Text = "Hilfe"; Referenz = new System.Windows.Forms.MenuItem(); Referenz.Text = "Referenz"; Hilfe.MenuItems.Add(Referenz); Über = new System.Windows.Forms.MenuItem(); Über.Text = "Über"; Über.Click += new System.EventHandler(this.Über_Click); Hilfe.MenuItems.Add(Über); Hauptmenu.MenuItems.Add(Hilfe); this.Menu = Hauptmenu; Register = new System.Windows.Forms.TabControl(); Register.Width = this.Width - 100; Register.Height = this.Height - 100; Register.Top = 30; Register.Left = this.Width - Register.Width - 50; Register.Multiline = true; Register.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; RegisterKarte1 = new System.Windows.Forms.TabPage(); RegisterKarte1.Text = "Liegenschafts- und Auftragsdaten"; RegisterKarte2 = new System.Windows.Forms.TabPage(); RegisterKarte2.Text = "Liegenschaftsbeschrieb"; RegisterKarte3 = new System.Windows.Forms.TabPage(); RegisterKarte3.Text = "Spezifikation der Bauteile"; RegisterKarte4 = new System.Windows.Forms.TabPage(); RegisterKarte4.Text = "Bauneuwertberechnung"; RegisterKarte5 = new System.Windows.Forms.TabPage(); RegisterKarte5.Text = "Bauzeitwerberechnung"; RegisterKarte6 = new System.Windows.Forms.TabPage(); RegisterKarte6.Text = "Eigentumsanteilberechnung"; RegisterKarte7 = new System.Windows.Forms.TabPage(); RegisterKarte7.Text = "Landwertberechnung"; RegisterKarte8 = new System.Windows.Forms.TabPage(); RegisterKarte8.Text = "Ertragswertberechnung"; RegisterKarte9 = new System.Windows.Forms.TabPage(); RegisterKarte9.Text = "Real & Verkehrswertberechnung"; RegisterKarte10 = new System.Windows.Forms.TabPage(); RegisterKarte10.Text = "Schlussbemerkungen"; InitRegister.InitRegister1(RegisterKarte1); Register.Controls.Add(this.RegisterKarte1); Register.Controls.Add(this.RegisterKarte2); Register.Controls.Add(this.RegisterKarte3); Register.Controls.Add(this.RegisterKarte4); Register.Controls.Add(this.RegisterKarte5); Register.Controls.Add(this.RegisterKarte6); Register.Controls.Add(this.RegisterKarte7); Register.Controls.Add(this.RegisterKarte8); Register.Controls.Add(this.RegisterKarte9); Register.Controls.Add(this.RegisterKarte10); this.Controls.Add(Register); //------------------------------------------------------------------------------- //TabControl }
public Stacker() { vm = OB.Stacker; DataContext = vm; InitializeComponent(); // Style the LoliScript editor loliScriptEditor.ShowLineNumbers = true; loliScriptEditor.TextArea.Foreground = new SolidColorBrush(Colors.Gainsboro); loliScriptEditor.TextArea.TextView.LinkTextForegroundBrush = new SolidColorBrush(Colors.DodgerBlue); using (XmlReader reader = XmlReader.Create("LSHighlighting.xshd")) { loliScriptEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance); } // Load the Syntax Helper XML XmlDocument doc = new XmlDocument(); try { doc.Load("SyntaxHelper.xml"); var main = doc.DocumentElement.SelectSingleNode("/doc"); syntaxHelperItems = main.ChildNodes; // Only bind the keydown event if the XML was successfully loaded loliScriptEditor.KeyDown += loliScriptEditor_KeyDown; } catch { } // Make the Avalon Editor for Syntax Helper and style it toolTipEditor = new TextEditor(); toolTipEditor.TextArea.Foreground = Utils.GetBrush("ForegroundMain"); toolTipEditor.Background = new SolidColorBrush(Color.FromArgb(22, 22, 22, 50)); toolTipEditor.TextArea.TextView.LinkTextForegroundBrush = new SolidColorBrush(Colors.DodgerBlue); toolTipEditor.FontSize = 11; toolTipEditor.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; toolTipEditor.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; using (XmlReader reader = XmlReader.Create("LSHighlighting.xshd")) { toolTipEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance); } toolTip = new ToolTip { Placement = PlacementMode.Relative, PlacementTarget = loliScriptEditor }; toolTip.Content = toolTipEditor; loliScriptEditor.ToolTip = toolTip; // Load the script vm.LS = new LoliScript(OB.ConfigManager.CurrentConfig.Config.Script); loliScriptEditor.Text = vm.LS.Script; // If the user prefers Stack view, switch to it if (!OB.OBSettings.General.DisplayLoliScriptOnLoad) { stackButton_Click(this, null); } // Style the logRTB logRTB.Font = new System.Drawing.Font("Consolas", 10); logRTB.BackColor = System.Drawing.Color.FromArgb(22, 22, 22); // Hook the context menu to the logRTB System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(); System.Windows.Forms.MenuItem item = new System.Windows.Forms.MenuItem(); item.Text = "Clear"; item.Click += ClearDebuggerLog; menu.MenuItems.Add(item); logRTB.ContextMenu = menu; logRTB.MouseClick += DebuggerLogRightClick; foreach (string i in Enum.GetNames(typeof(ProxyType))) { if (i != "Chain") { proxyTypeCombobox.Items.Add(i); } } proxyTypeCombobox.SelectedIndex = 0; foreach (var t in OB.Settings.Environment.GetWordlistTypeNames()) { testDataTypeCombobox.Items.Add(t); } testDataTypeCombobox.SelectedIndex = 0; // Initialize debugger debugger.WorkerSupportsCancellation = true; debugger.Status = WorkerStatus.Idle; debugger.DoWork += new DoWorkEventHandler(debuggerCheck); debugger.RunWorkerCompleted += new RunWorkerCompletedEventHandler(debuggerCompleted); this.SaveConfig += OB.MainWindow.ConfigsPage.ConfigManagerPage.OnSaveConfig; }
public void set_notify_icon() { contextMenu = new System.Windows.Forms.ContextMenu(); components = new System.ComponentModel.Container(); int idx = 0; notifyIcon = new System.Windows.Forms.NotifyIcon(components); /// task....................................... System.Windows.Forms.MenuItem taskmenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { taskmenu }); taskmenu.Index = idx++; taskmenu.Text = "Tasks"; taskmenu.Click += new System.EventHandler(this.Notify_taskmenu_Click); /////////////............................................................. /// assign task....................................... if (bolayer.isadmin) { System.Windows.Forms.MenuItem assign = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { assign }); assign.Index = idx++; assign.Text = "Asign a task"; assign.Click += new System.EventHandler(this.Notify_assigntask_Click); } /////////////............................................................. if (bolayer.isadmin) { /// member....................................... System.Windows.Forms.MenuItem membermenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { membermenu }); membermenu.Index = idx++; membermenu.Text = "Members"; membermenu.Click += new System.EventHandler(this.Notify_membermenu_Click); /////////////............................................................. /// add member....................................... System.Windows.Forms.MenuItem addmembermenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { addmembermenu }); addmembermenu.Index = idx++; addmembermenu.Text = "Add Members"; addmembermenu.Click += new System.EventHandler(this.Notify_addmembermenu_Click); /////////////............................................................. } /// Profile....................................... System.Windows.Forms.MenuItem Profilemenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { Profilemenu }); Profilemenu.Index = idx++; Profilemenu.Text = "&Profile"; Profilemenu.Click += new System.EventHandler(this.Notify_Profile_Click); /////////////............................................................. /// Profile....................................... System.Windows.Forms.MenuItem notifymenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { notifymenu }); notifymenu.Index = idx++; notifymenu.Text = "&Notification"; notifymenu.Click += new System.EventHandler(this.Notify_notify_Click); /////////////............................................................. /// Exit menu....................................... /////////////............................................................. /// Exit menu....................................... System.Windows.Forms.MenuItem exitmenu = new System.Windows.Forms.MenuItem(); contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { exitmenu }); exitmenu.Index = idx++; exitmenu.Text = "&Exit"; exitmenu.Click += new System.EventHandler(this.Notify_exitmenu_Click); /////////////............................................................. Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/Icon.ico")).Stream; notifyIcon.Icon = new System.Drawing.Icon(iconStream); // contex to notify notifyIcon.ContextMenu = contextMenu; notifyIcon.Text = "Task"; notifyIcon.Visible = true; notifyIcon.DoubleClick += new System.EventHandler(this.notifyIcon_DoubleClick); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.HistoryContextMenu = new System.Windows.Forms.ContextMenu(); this.cCopyURLsMenuItem = new System.Windows.Forms.MenuItem(); this.cCopyItemsMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem25 = new System.Windows.Forms.MenuItem(); this.cOpenURLMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem26 = new System.Windows.Forms.MenuItem(); this.cRefreshMenuItem = new System.Windows.Forms.MenuItem(); this.tabControl2 = new System.Windows.Forms.TabControl(); this.IETab = new System.Windows.Forms.TabPage(); this.webBrowserDataListView5 = new CredentialManager_Client.WebBrowserDataListView(); this.ChromeTab = new System.Windows.Forms.TabPage(); this.webBrowserDataListView1 = new CredentialManager_Client.WebBrowserDataListView(); this.FireforxTab = new System.Windows.Forms.TabPage(); this.webBrowserDataListView2 = new CredentialManager_Client.WebBrowserDataListView(); this.OperaTab = new System.Windows.Forms.TabPage(); this.webBrowserDataListView3 = new CredentialManager_Client.WebBrowserDataListView(); this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.OpenURLMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem20 = new System.Windows.Forms.MenuItem(); this.ImportMenuItem = new System.Windows.Forms.MenuItem(); this.ExportMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.CopyURLsMenuItem = new System.Windows.Forms.MenuItem(); this.CopyItemsMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem10 = new System.Windows.Forms.MenuItem(); this.menuItem12 = new System.Windows.Forms.MenuItem(); this.menuItem13 = new System.Windows.Forms.MenuItem(); this.menuItem14 = new System.Windows.Forms.MenuItem(); this.menuItem11 = new System.Windows.Forms.MenuItem(); this.RefreshMenuItem = new System.Windows.Forms.MenuItem(); this.tabControl2.SuspendLayout(); this.IETab.SuspendLayout(); this.ChromeTab.SuspendLayout(); this.FireforxTab.SuspendLayout(); this.OperaTab.SuspendLayout(); this.SuspendLayout(); // // HistoryContextMenu // this.HistoryContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.cCopyURLsMenuItem, this.cCopyItemsMenuItem, this.menuItem25, this.cOpenURLMenuItem, this.menuItem26, this.cRefreshMenuItem}); // // cCopyURLsMenuItem // this.cCopyURLsMenuItem.Index = 0; this.cCopyURLsMenuItem.Text = "Copy URLs"; // // cCopyItemsMenuItem // this.cCopyItemsMenuItem.Index = 1; this.cCopyItemsMenuItem.Text = "Copy Selected Items"; // // menuItem25 // this.menuItem25.Index = 2; this.menuItem25.Text = "-"; // // cOpenURLMenuItem // this.cOpenURLMenuItem.Index = 3; this.cOpenURLMenuItem.Text = "Open URL"; // // menuItem26 // this.menuItem26.Index = 4; this.menuItem26.Text = "-"; // // cRefreshMenuItem // this.cRefreshMenuItem.Index = 5; this.cRefreshMenuItem.Text = "Refresh"; // // tabControl2 // this.tabControl2.Controls.Add(this.IETab); this.tabControl2.Controls.Add(this.ChromeTab); this.tabControl2.Controls.Add(this.FireforxTab); this.tabControl2.Controls.Add(this.OperaTab); this.tabControl2.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl2.Font = new System.Drawing.Font("Segoe UI", 9F); this.tabControl2.Location = new System.Drawing.Point(0, 0); this.tabControl2.Name = "tabControl2"; this.tabControl2.SelectedIndex = 0; this.tabControl2.Size = new System.Drawing.Size(524, 301); this.tabControl2.TabIndex = 6; // // IETab // this.IETab.Controls.Add(this.webBrowserDataListView5); this.IETab.Location = new System.Drawing.Point(4, 24); this.IETab.Name = "IETab"; this.IETab.Size = new System.Drawing.Size(516, 273); this.IETab.TabIndex = 0; this.IETab.Text = "Internet Explorer"; this.IETab.UseVisualStyleBackColor = true; // // webBrowserDataListView5 // this.webBrowserDataListView5.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowserDataListView5.Location = new System.Drawing.Point(0, 0); this.webBrowserDataListView5.Name = "webBrowserDataListView5"; this.webBrowserDataListView5.Size = new System.Drawing.Size(516, 273); this.webBrowserDataListView5.TabIndex = 0; // // ChromeTab // this.ChromeTab.Controls.Add(this.webBrowserDataListView1); this.ChromeTab.Location = new System.Drawing.Point(4, 24); this.ChromeTab.Name = "ChromeTab"; this.ChromeTab.Size = new System.Drawing.Size(516, 273); this.ChromeTab.TabIndex = 1; this.ChromeTab.Text = "Google Chrome"; this.ChromeTab.UseVisualStyleBackColor = true; // // webBrowserDataListView1 // this.webBrowserDataListView1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowserDataListView1.Location = new System.Drawing.Point(0, 0); this.webBrowserDataListView1.Name = "webBrowserDataListView1"; this.webBrowserDataListView1.Size = new System.Drawing.Size(516, 273); this.webBrowserDataListView1.TabIndex = 1; // // FireforxTab // this.FireforxTab.Controls.Add(this.webBrowserDataListView2); this.FireforxTab.Location = new System.Drawing.Point(4, 24); this.FireforxTab.Name = "FireforxTab"; this.FireforxTab.Size = new System.Drawing.Size(516, 273); this.FireforxTab.TabIndex = 2; this.FireforxTab.Text = "Morzilla Firefox"; this.FireforxTab.UseVisualStyleBackColor = true; // // webBrowserDataListView2 // this.webBrowserDataListView2.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowserDataListView2.Location = new System.Drawing.Point(0, 0); this.webBrowserDataListView2.Name = "webBrowserDataListView2"; this.webBrowserDataListView2.Size = new System.Drawing.Size(516, 273); this.webBrowserDataListView2.TabIndex = 1; // // OperaTab // this.OperaTab.Controls.Add(this.webBrowserDataListView3); this.OperaTab.Location = new System.Drawing.Point(4, 24); this.OperaTab.Name = "OperaTab"; this.OperaTab.Size = new System.Drawing.Size(516, 273); this.OperaTab.TabIndex = 3; this.OperaTab.Text = "Opera"; this.OperaTab.UseVisualStyleBackColor = true; // // webBrowserDataListView3 // this.webBrowserDataListView3.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowserDataListView3.Location = new System.Drawing.Point(0, 0); this.webBrowserDataListView3.Name = "webBrowserDataListView3"; this.webBrowserDataListView3.Size = new System.Drawing.Size(516, 273); this.webBrowserDataListView3.TabIndex = 1; // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem2, this.menuItem3}); // // menuItem1 // this.menuItem1.Index = 0; this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.OpenURLMenuItem, this.menuItem20, this.ImportMenuItem, this.ExportMenuItem}); this.menuItem1.Text = "File"; // // OpenURLMenuItem // this.OpenURLMenuItem.Index = 0; this.OpenURLMenuItem.Text = "Open URL"; // // menuItem20 // this.menuItem20.Index = 1; this.menuItem20.Text = "-"; // // ImportMenuItem // this.ImportMenuItem.Index = 2; this.ImportMenuItem.Text = "Import"; // // ExportMenuItem // this.ExportMenuItem.Index = 3; this.ExportMenuItem.Text = "Export"; // // menuItem2 // this.menuItem2.Index = 1; this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.CopyURLsMenuItem, this.CopyItemsMenuItem}); this.menuItem2.Text = "Edit"; // // CopyURLsMenuItem // this.CopyURLsMenuItem.Index = 0; this.CopyURLsMenuItem.Text = "Copy URL"; // // CopyItemsMenuItem // this.CopyItemsMenuItem.Index = 1; this.CopyItemsMenuItem.Text = "Copy Selected Item"; // // menuItem3 // this.menuItem3.Index = 2; this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem10, this.menuItem12, this.menuItem13, this.menuItem14, this.menuItem11, this.RefreshMenuItem}); this.menuItem3.Text = "View"; // // menuItem10 // this.menuItem10.Checked = true; this.menuItem10.Index = 0; this.menuItem10.RadioCheck = true; this.menuItem10.Text = "%username%"; // // menuItem12 // this.menuItem12.Index = 1; this.menuItem12.RadioCheck = true; this.menuItem12.Text = "%username%"; // // menuItem13 // this.menuItem13.Index = 2; this.menuItem13.RadioCheck = true; this.menuItem13.Text = "%username%"; // // menuItem14 // this.menuItem14.Index = 3; this.menuItem14.RadioCheck = true; this.menuItem14.Text = "%username%"; // // menuItem11 // this.menuItem11.Index = 4; this.menuItem11.Text = "-"; // // RefreshMenuItem // this.RefreshMenuItem.Index = 5; this.RefreshMenuItem.Text = "Refresh"; // // WebBrowserData // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(524, 301); this.Controls.Add(this.tabControl2); this.Font = new System.Drawing.Font("Segoe UI", 9F); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.Menu = this.mainMenu1; this.MinimizeBox = false; this.Name = "WebBrowserData"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "WebBrowser Data"; this.Load += new System.EventHandler(this.WebBrowserData_Load); this.tabControl2.ResumeLayout(false); this.IETab.ResumeLayout(false); this.ChromeTab.ResumeLayout(false); this.FireforxTab.ResumeLayout(false); this.OperaTab.ResumeLayout(false); this.ResumeLayout(false); }
private void InitializeTray() { menuExit = new System.Windows.Forms.MenuItem(Tool.GetStringResource("Exit"), TrayMenu_Click); menuEdgeHide = new System.Windows.Forms.MenuItem(Tool.GetStringResource("HideWhenCloseToEdge"), TrayMenu_Click) { Checked = Settings.Default.edgeHide }; menuShowTrayIcon = new System.Windows.Forms.MenuItem(Tool.GetStringResource("ShowTrayIcon"), TrayMenu_Click) { Checked = Settings.Default.ShowTrayIcon }; menuStartOnBoot = new System.Windows.Forms.MenuItem(Tool.GetStringResource("StartOnBoot"), TrayMenu_Click) { Checked = Settings.Default.startOnBoot }; System.Windows.Forms.MenuItem menuLanguage = new System.Windows.Forms.MenuItem(Tool.GetStringResource("Language")); String nowLanguageFile = Settings.Default.language; System.Windows.Forms.MenuItem menuDefault = new System.Windows.Forms.MenuItem(Tool.GetStringResource("UserDefault"), TrayMenu_Change_Language_Click) { Tag = "" }; menuLanguage.MenuItems.Add(menuDefault); List <OneLanguage> languages = Languages.GetLanguages(); foreach (OneLanguage i in languages) { System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem() { Text = i.ShowName, Checked = i.FileName == nowLanguageFile, Tag = i.FileName, }; menuItem.Click += TrayMenu_Change_Language_Click; menuLanguage.MenuItems.Add(menuItem); } if (nowLanguageFile == null || nowLanguageFile == "") { menuDefault.Checked = true; } menuTransparency = new System.Windows.Forms.MenuItem(Tool.GetStringResource("Transparency")); for (int i = 100; i >= 10; i -= 10) { System.Windows.Forms.MenuItem menuItem = new System.Windows.Forms.MenuItem() { Text = i + "%", Tag = i }; menuItem.Click += TrayMenu_Change_Transparency_Click; menuTransparency.MenuItems.Add(menuItem); } Callback_TransparencyDoChange(Settings.Default.Transparency); menuAutoUpdate = new System.Windows.Forms.MenuItem(Tool.GetStringResource("CheckForUpdatesAutomatically"), TrayMenu_Click) { Checked = Settings.Default.AutoUpdate }; menuCheckUpdate = new System.Windows.Forms.MenuItem(Tool.GetStringResource("CheckForUpdates"), TrayMenu_Click); System.Windows.Forms.MenuItem menuUpdate = new System.Windows.Forms.MenuItem(Tool.GetStringResource("Update")); menuUpdate.MenuItems.Add(menuAutoUpdate); menuUpdate.MenuItems.Add(menuCheckUpdate); menuAbout = new System.Windows.Forms.MenuItem(Tool.GetStringResource("AboutNetSpeedMonitor"), TrayMenu_Click); System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(new System.Windows.Forms.MenuItem[] { menuStartOnBoot, menuEdgeHide, menuShowTrayIcon, menuLanguage, menuTransparency, menuUpdate, menuAbout, menuExit }); notifyIcon = new System.Windows.Forms.NotifyIcon { Icon = new System.Drawing.Icon(GetResourceStream(new Uri("pack://application:,,,/icon.ico", UriKind.RelativeOrAbsolute)).Stream), ContextMenu = menu, Visible = Settings.Default.ShowTrayIcon }; }
private void Window_Loaded(object sender, RoutedEventArgs e) { //Load settings from XML LoadSettings(); string version = VersionChecker.Version; Telemetry.TrackEvent(TelemetryCategory.General, Telemetry.TelemetryEvent.AppLaunch, version); if (SettingsXml.Current.PreviousOS != version) { Telemetry.TrackEvent(TelemetryCategory.General, Telemetry.TelemetryEvent.AppUpgraded, version); SettingsXml.Current.PreviousOS = version; } //Init toast(color settings) InitToast(); //Init tray icon trayIcon = new System.Windows.Forms.NotifyIcon(); trayIcon.Icon = Toastify.Properties.Resources.spotifyicon; trayIcon.Text = "Toastify"; trayIcon.Visible = true; trayIcon.ContextMenu = new System.Windows.Forms.ContextMenu(); //Init tray icon menu System.Windows.Forms.MenuItem menuSettings = new System.Windows.Forms.MenuItem(); menuSettings.Text = "Settings"; menuSettings.Click += (s, ev) => { Settings.Launch(this); }; trayIcon.ContextMenu.MenuItems.Add(menuSettings); System.Windows.Forms.MenuItem menuAbout = new System.Windows.Forms.MenuItem(); menuAbout.Text = "About Toastify..."; menuAbout.Click += (s, ev) => { new About().ShowDialog(); }; trayIcon.ContextMenu.MenuItems.Add(menuAbout); trayIcon.ContextMenu.MenuItems.Add("-"); System.Windows.Forms.MenuItem menuExit = new System.Windows.Forms.MenuItem(); menuExit.Text = "Exit"; menuExit.Click += (s, ev) => { Application.Current.Shutdown(); }; //this.Close(); }; trayIcon.ContextMenu.MenuItems.Add(menuExit); trayIcon.MouseClick += (s, ev) => { if (ev.Button == System.Windows.Forms.MouseButtons.Left) { DisplayAction(SpotifyAction.ShowToast, null); } }; trayIcon.DoubleClick += (s, ev) => { Settings.Launch(this); }; //Init watch timer watchTimer = new Timer(1000); watchTimer.Elapsed += (s, ev) => { watchTimer.Stop(); CheckTitle(); watchTimer.Start(); }; this.Deactivated += Toast_Deactivated; //Remove from ALT+TAB WinHelper.AddToolWindowStyle(this); //Check if Spotify is running. AskUserToStartSpotify(); LoadPlugins(); //Let the plugins know we're started. foreach (var p in this.Plugins) { try { p.Started(); } catch (Exception) { //For now we swallow any plugin errors. } } if (!SettingsXml.Current.DisableToast) { watchTimer.Enabled = true; //Only need to be enabled if we are going to show the toast. } versionChecker = new VersionChecker(); versionChecker.CheckVersionComplete += new EventHandler <CheckVersionCompleteEventArgs>(versionChecker_CheckVersionComplete); versionChecker.BeginCheckVersion(); // TODO: right now this is pretty dumb - kick off update notifications every X hours, this might get annoying // and really we should just pop a notification once per version and probably immediately after a song toast var updateTimer = new System.Windows.Threading.DispatcherTimer(); updateTimer.Tick += (timerSender, timerE) => { versionChecker.BeginCheckVersion(); }; updateTimer.Interval = new TimeSpan(6, 0, 0); updateTimer.Start(); }
public NotesWindow() { InitializeComponent(); Data.load(out this.data); if (this.data.windowWidth > 0) { this.Width = this.data.windowWidth; } if (this.data.windowHeight > 0) { this.Height = this.data.windowHeight; } var left = this.data.windowLeft; if (left > 0) { if (left > SystemParameters.PrimaryScreenWidth) { left = SystemParameters.PrimaryScreenWidth - 100; } this.Left = left; } var top = this.data.windowTop; if (top > 0) { if (top > SystemParameters.PrimaryScreenHeight) { top = SystemParameters.PrimaryScreenHeight - 100; } this.Top = top; } if (this.data.isHidden == true) { this.hideWindow(); } if (this.data.alwaysOnTop == true) { this.setAlwaysOnTop(true); } this.loadNote(this.data.currentPosition); // keyboard shortcuts var newNote = new RoutedCommand(); newNote.InputGestures.Add(new KeyGesture(Key.N, ModifierKeys.Control)); CommandBindings.Add(new CommandBinding(newNote, newNoteListener)); var removeNote = new RoutedCommand(); removeNote.InputGestures.Add(new KeyGesture(Key.R, ModifierKeys.Control)); CommandBindings.Add(new CommandBinding(removeNote, removeNoteListener)); var previous = new RoutedCommand(); previous.InputGestures.Add(new KeyGesture(Key.Q, ModifierKeys.Control)); CommandBindings.Add(new CommandBinding(previous, previousNoteListener)); var next = new RoutedCommand(); next.InputGestures.Add(new KeyGesture(Key.W, ModifierKeys.Control)); CommandBindings.Add(new CommandBinding(next, nextNoteListener)); // 'ctrl + 1' loads first note, 'ctrl + 2' loads second note, etc (from 1 to 9) for (int a = 0; a < 9; a++) { int position = a; // get a new variable with the value we need, to be used by the lambda function below var load = new RoutedCommand(); load.InputGestures.Add(new KeyGesture(Key.D1 + a, ModifierKeys.Control)); CommandBindings.Add(new CommandBinding(load, (object sender, ExecutedRoutedEventArgs e) => this.loadNote(position))); } var hide = new RoutedCommand(); hide.InputGestures.Add(new KeyGesture(Key.Escape)); CommandBindings.Add(new CommandBinding(hide, (object sender, ExecutedRoutedEventArgs e) => { this.hideWindow(); })); // system tray icon var contextMenu = new System.Windows.Forms.ContextMenu(); var about = new System.Windows.Forms.MenuItem(); about.Text = "About"; about.Click += (object sender, EventArgs e) => { System.Diagnostics.Process.Start("https://bitbucket.org/drk4/notes_app"); }; var show = new System.Windows.Forms.MenuItem(); show.Text = "Show"; show.Click += (object sender, EventArgs e) => { this.showWindow(); }; var close = new System.Windows.Forms.MenuItem(); close.Text = "Close"; close.Click += this.closeWindowListener; contextMenu.MenuItems.Add(about); contextMenu.MenuItems.Add(show); contextMenu.MenuItems.Add(close); this.notifyIcon = new System.Windows.Forms.NotifyIcon(); this.notifyIcon.Text = "Notes App"; this.notifyIcon.Icon = new System.Drawing.Icon(@"assets/icon.ico"); this.notifyIcon.DoubleClick += this.notifyIconClick; this.notifyIcon.ContextMenu = contextMenu; this.notifyIcon.Visible = true; }
/** * public async Task EnumerateAllServicesFromAllHosts() * { * ILookup<string, string> domains = await ZeroconfResolver.BrowseDomainsAsync(); * var responses = await ZeroconfResolver.ResolveAsync(domains.Select(g => g.Key)); * foreach (var resp in responses) * { * Logger.Info("-------------------------------------------------------------------------"); * Logger.Info(resp.DisplayName); * Logger.Info(resp.Id); * Logger.Info(resp.IPAddress); * Logger.Info(resp.Services); * Logger.Info(resp.IPAddresses); * * Logger.Info("-------------------------------------------------------------------------"); * * } * } **/ public void Application_Startup(object sender, StartupEventArgs e) { // Task task = asyncStartup(); is_Connected = false; Logger.Info(string.Concat(Enumerable.Repeat(Environment.NewLine, 20))); Logger.Info("-------------------------------------------------------------------------"); Logger.Info("-------------------------------------------------------------------------"); Logger.InfoFormat("-------------------- Starting IndigoPlugin ------------------------------"); Logger.Info("-------------------------------------------------------------------------"); Logger.Info("-------------------------------------------------------------------------"); // Logger.Info(string.Concat(Enumerable.Repeat(Environment.NewLine, 5))); var SystemVersion = Environment.OSVersion.Version.Major; var is64bit = Environment.Is64BitOperatingSystem; Logger.InfoFormat(":: System Major Version:\t\t\t" + SystemVersion.ToString()); Logger.InfoFormat(":: System Version Name:\t\t\t" + Environment.OSVersion.VersionString.ToString()); Logger.InfoFormat(":: System OSVersion Platform:\t\t" + Environment.OSVersion.Platform.ToString()); Logger.InfoFormat(":: System OSVersion ServicePack:\t\t" + Environment.OSVersion.ServicePack.ToString()); Logger.InfoFormat(":: System OSVersion Build:\t\t" + Environment.OSVersion.Version.Build.ToString()); Logger.InfoFormat(":: System OSVersion Major:\t\t" + Environment.OSVersion.Version.Major.ToString()); Logger.InfoFormat(":: System OSVersion MajorRevision:\t" + Environment.OSVersion.Version.MajorRevision.ToString()); Logger.InfoFormat(":: System OSVersion Minor:\t\t" + Environment.OSVersion.Version.Minor.ToString()); Logger.InfoFormat(":: System OSVersion MinorRevision:\t" + Environment.OSVersion.Version.MinorRevision.ToString()); Logger.InfoFormat(":: System OSVersion Revision:\t\t" + Environment.OSVersion.Version.Revision.ToString()); string releaseId = ""; string productname = ""; try { releaseId = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString(); productname = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName", "").ToString(); } catch (Exception exc) { Logger.Error("Exception in Get System names from Registry" + exc); } Logger.InfoFormat(":: System OSVersion Release Id:\t\t" + Environment.OSVersion.Version.Revision.ToString()); windowsVersion = productname + " Version " + releaseId.ToString() + " Build " + Environment.OSVersion.Version.Build.ToString(); Logger.Info(":: System Windows Version:\t\t" + windowsVersion); // Logger.Info("-------------------------------------------------------------------------"); // Logger.Info("-------------------------------------------------------------------------"); this.Dispatcher.UnhandledException += OnDispatcherUnhandledException; string ipaddress = IndigoPlugin.Properties.Settings.Default.ipaddress; bool setupcomplete = IndigoPlugin.Properties.Settings.Default.setupcomplete; bool debuglogging = IndigoPlugin.Properties.Settings.Default.debuglogging; disableCommands = IndigoPlugin.Properties.Settings.Default.disabledcommands; // Set variables to nil in case in accessing (can't send html blanks) ForegroundApp = "unknown"; CPU = "unknown"; MemLoad = "unknown"; OpSystem = "unknown"; Hostname = "unknown"; MACaddress = "unknown"; localIPaddress = ""; currentVersion = "15"; updateNeeded = false; idleTime = 0; Logger.Info("-------------------------------------------------------------------------"); Logger.InfoFormat(":: Application Version:\t\t\t" + currentVersion.ToString()); Logger.Info("-------------------------------------------------------------------------"); // Logger.Info("-------------------------------------------------------------------------"); var app64bit = Environment.Is64BitProcess; Logger.Debug("-------------------- Application 64 bit: " + app64bit + " ---------------------------"); Logger.Debug("-------------------------------------------------------------------------"); Logger.InfoFormat(":: Windows 64bit Version:\t\t" + is64bit.ToString()); Logger.Info("-------------------------------------------------------------------------"); //# Okay Versions across two applications //# First Number 0 - ignore //# Second Number is the Mac Version -- increasing this without breaking PC app versions //# Third Number is the PC Version -- //# e.g 0.2.2 -- 2 is current mac version, 2 is current PC version //# if version goes to 0.2.4 -- PC version needs to be updated if less than 4 and will organise message //# if version is 0.4.2 -- PC version remains on 2 - so only Mac update needed/done. cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total"); ramCounter = new PerformanceCounter("Memory", "Available MBytes"); Hostname = System.Net.Dns.GetHostName(); if (IndigoPlugin.Properties.Settings.Default.UpgradeRequired) { Logger.Debug(":: New Version detected; Upgrading Settings."); IndigoPlugin.Properties.Settings.Default.Upgrade(); IndigoPlugin.Properties.Settings.Default.UpgradeRequired = false; IndigoPlugin.Properties.Settings.Default.Save(); } else { Logger.Debug(":: No Upgrade detected. Settings remaining"); } IndigoPlugin.Properties.Settings.Default.bit64 = app64bit; if (debuglogging) { ((log4net.Repository.Hierarchy.Hierarchy)LogManager.GetRepository()).Root.Level = log4net.Core.Level.Debug; ((log4net.Repository.Hierarchy.Hierarchy)LogManager.GetRepository()).RaiseConfigurationChanged(EventArgs.Empty); Logger.Info(":: Setting Debug Level Logging"); } else { ((log4net.Repository.Hierarchy.Hierarchy)LogManager.GetRepository()).Root.Level = log4net.Core.Level.Info; ((log4net.Repository.Hierarchy.Hierarchy)LogManager.GetRepository()).RaiseConfigurationChanged(EventArgs.Empty); Logger.Info(":: Setting Info Level Logging Only"); } string startupmessage = ""; if (ipaddress == "please enter" || setupcomplete == false) { // Means that Application is not set IP address not entered. // Need to have a bool for setup Logger.Info("Setup Not complete, opening window for setup"); startupmessage = "Please setup the Indigo Mac Server and Port. WinRemote Indigo Plugin must be running"; } else { startupmessage = "Attempting to connect..."; } System.Windows.Forms.NotifyIcon icon = new System.Windows.Forms.NotifyIcon(); Stream iconStream = Application.GetResourceStream(new Uri("pack://*****:*****@"indigo.ico"); nIcon.Icon = icon.Icon; nIcon.Visible = true; nIcon.Text = "Indigo Plugin Communicator. Startup"; if (setupcomplete == false) { nIcon.ShowBalloonTip(5000, "Indigo Plugin Communicator", startupmessage, System.Windows.Forms.ToolTipIcon.Info); } //nIcon.Click += nIcon_Click; nIcon.DoubleClick += nIcon_Click; this.contextMenu1 = new System.Windows.Forms.ContextMenu(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.contextMenu1.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem2, this.menuItem3 }); this.menuItem1.Index = 2; this.menuItem1.Text = "E&xit"; this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click); this.menuItem2.Index = 1; this.menuItem2.Text = "Show Window"; this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click); this.menuItem3.Index = 0; this.menuItem3.Text = "Hide Window"; this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); nIcon.ContextMenu = this.contextMenu1; // if already setup check connection and then reset setupcomplete as needed if (setupcomplete == true) { StartupConnect(); } MainWindow wnd = new IndigoPlugin.MainWindow(); // if not complete show window // might need to show then minimise? if (setupcomplete == false) { wnd.Show(); wnd.connectInfo.Text = "Failed to Connect. Please check settings and try again."; } //Setup Main Loop timer theMainLoop(); }
/// <summary> /// Erforderliche Methode für die Designerunterstützung. /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Windows.Forms.MenuItem menuItem1; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); this.SplitContainerPackets = new System.Windows.Forms.SplitContainer(); this.LstPackets = new MabiPale2.Shared.ListViewNF(); this.ColOp = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ColId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ColOpName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ColTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.TxtPacket = new System.Windows.Forms.TextBox(); this.ToolBar = new System.Windows.Forms.ToolStrip(); this.BtnOpen = new System.Windows.Forms.ToolStripButton(); this.BtnSave = new System.Windows.Forms.ToolStripButton(); this.BtnClear = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.BtnConnect = new System.Windows.Forms.ToolStripButton(); this.BtnDisconnect = new System.Windows.Forms.ToolStripButton(); this.BtnConnectTo = new System.Windows.Forms.ToolStripButton(); this.BtnSettings = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.StatusStrip = new System.Windows.Forms.StatusStrip(); this.LblPacketCount = new System.Windows.Forms.ToolStripStatusLabel(); this.LblCurrentFileName = new System.Windows.Forms.ToolStripStatusLabel(); this.LblPacketProvider = new System.Windows.Forms.ToolStripStatusLabel(); this.MainMenu = new System.Windows.Forms.MainMenu(this.components); this.MenuFile = new System.Windows.Forms.MenuItem(); this.BtnMenuOpen = new System.Windows.Forms.MenuItem(); this.BtnMenuSaveAs = new System.Windows.Forms.MenuItem(); this.MenuFileExitSpacer = new System.Windows.Forms.MenuItem(); this.BtnMenuExit = new System.Windows.Forms.MenuItem(); this.MenuEdit = new System.Windows.Forms.MenuItem(); this.BtnMenuEditFilter = new System.Windows.Forms.MenuItem(); this.BtnMenuEditFind = new System.Windows.Forms.MenuItem(); this.BtnMenuEditFindPrev = new System.Windows.Forms.MenuItem(); this.BtnMenuEditFindNext = new System.Windows.Forms.MenuItem(); this.MenuPlugins = new System.Windows.Forms.MenuItem(); this.MenuHelp = new System.Windows.Forms.MenuItem(); this.BtnMenuAbout = new System.Windows.Forms.MenuItem(); this.OpenLogDialog = new System.Windows.Forms.OpenFileDialog(); this.SaveLogDialog = new System.Windows.Forms.SaveFileDialog(); this.CtxPacketList = new System.Windows.Forms.ContextMenu(); this.BtnMenuPacketsCopyOp = new System.Windows.Forms.MenuItem(); this.BtnMenuPacketsCopyId = new System.Windows.Forms.MenuItem(); this.BtnMenuPacketsCopyHex = new System.Windows.Forms.MenuItem(); this.BtnMenuPacketsCopyAuraWrite = new System.Windows.Forms.MenuItem(); this.BtnMenuPacketsCopyAuraRead = new System.Windows.Forms.MenuItem(); this.BtnMenuPacketsFilter = new System.Windows.Forms.MenuItem(); menuItem1 = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.SplitContainerPackets)).BeginInit(); this.SplitContainerPackets.Panel1.SuspendLayout(); this.SplitContainerPackets.Panel2.SuspendLayout(); this.SplitContainerPackets.SuspendLayout(); this.ToolBar.SuspendLayout(); this.StatusStrip.SuspendLayout(); this.SuspendLayout(); // // menuItem1 // menuItem1.Index = 1; menuItem1.Text = "-"; // // SplitContainerPackets // this.SplitContainerPackets.Dock = System.Windows.Forms.DockStyle.Fill; this.SplitContainerPackets.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.SplitContainerPackets.IsSplitterFixed = true; this.SplitContainerPackets.Location = new System.Drawing.Point(0, 25); this.SplitContainerPackets.Name = "SplitContainerPackets"; // // SplitContainerPackets.Panel1 // this.SplitContainerPackets.Panel1.Controls.Add(this.LstPackets); // // SplitContainerPackets.Panel2 // this.SplitContainerPackets.Panel2.Controls.Add(this.TxtPacket); this.SplitContainerPackets.Size = new System.Drawing.Size(984, 492); this.SplitContainerPackets.SplitterDistance = 468; this.SplitContainerPackets.TabIndex = 0; // // LstPackets // this.LstPackets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.ColOp, this.ColId, this.ColOpName, this.ColTime }); this.LstPackets.Dock = System.Windows.Forms.DockStyle.Fill; this.LstPackets.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.LstPackets.FullRowSelect = true; this.LstPackets.GridLines = true; this.LstPackets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.LstPackets.HideSelection = false; this.LstPackets.Location = new System.Drawing.Point(0, 0); this.LstPackets.Name = "LstPackets"; this.LstPackets.Size = new System.Drawing.Size(468, 492); this.LstPackets.TabIndex = 1; this.LstPackets.UseCompatibleStateImageBehavior = false; this.LstPackets.View = System.Windows.Forms.View.Details; this.LstPackets.SelectedIndexChanged += new System.EventHandler(this.LstPackets_SelectedIndexChanged); this.LstPackets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.LstPackets_KeyUp); // // ColOp // this.ColOp.Text = "Op"; this.ColOp.Width = 78; // // ColId // this.ColId.Text = "Id"; this.ColId.Width = 125; // // ColOpName // this.ColOpName.Text = ""; this.ColOpName.Width = 135; // // ColTime // this.ColTime.Text = "Time"; this.ColTime.Width = 99; // // TxtPacket // this.TxtPacket.Dock = System.Windows.Forms.DockStyle.Fill; this.TxtPacket.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.TxtPacket.Location = new System.Drawing.Point(0, 0); this.TxtPacket.Multiline = true; this.TxtPacket.Name = "TxtPacket"; this.TxtPacket.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.TxtPacket.Size = new System.Drawing.Size(512, 492); this.TxtPacket.TabIndex = 0; this.TxtPacket.WordWrap = false; // // ToolBar // this.ToolBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.ToolBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.BtnOpen, this.BtnSave, this.BtnClear, this.toolStripSeparator1, this.BtnConnect, this.BtnDisconnect, this.BtnConnectTo, this.BtnSettings, this.toolStripSeparator2 }); this.ToolBar.Location = new System.Drawing.Point(0, 0); this.ToolBar.Name = "ToolBar"; this.ToolBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.ToolBar.Size = new System.Drawing.Size(984, 25); this.ToolBar.TabIndex = 1; this.ToolBar.Text = "toolStrip1"; // // BtnOpen // this.BtnOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); this.BtnOpen.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnOpen.Name = "BtnOpen"; this.BtnOpen.Size = new System.Drawing.Size(23, 22); this.BtnOpen.Text = "Open..."; this.BtnOpen.Click += new System.EventHandler(this.BtnOpen_Click); // // BtnSave // this.BtnSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnSave.Image = ((System.Drawing.Image)(resources.GetObject("BtnSave.Image"))); this.BtnSave.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnSave.Name = "BtnSave"; this.BtnSave.Size = new System.Drawing.Size(23, 22); this.BtnSave.Text = "Save as..."; this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click); // // BtnClear // this.BtnClear.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnClear.Image = ((System.Drawing.Image)(resources.GetObject("BtnClear.Image"))); this.BtnClear.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnClear.Name = "BtnClear"; this.BtnClear.Size = new System.Drawing.Size(23, 22); this.BtnClear.Text = "Clear"; this.BtnClear.Click += new System.EventHandler(this.BtnClear_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // BtnConnect // this.BtnConnect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnConnect.Image = ((System.Drawing.Image)(resources.GetObject("BtnConnect.Image"))); this.BtnConnect.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnConnect.Name = "BtnConnect"; this.BtnConnect.Size = new System.Drawing.Size(23, 22); this.BtnConnect.Text = "Connect"; this.BtnConnect.Click += new System.EventHandler(this.BtnConnect_Click); // // BtnDisconnect // this.BtnDisconnect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnDisconnect.Enabled = false; this.BtnDisconnect.Image = ((System.Drawing.Image)(resources.GetObject("BtnDisconnect.Image"))); this.BtnDisconnect.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnDisconnect.Name = "BtnDisconnect"; this.BtnDisconnect.Size = new System.Drawing.Size(23, 22); this.BtnDisconnect.Text = "Disconnect"; this.BtnDisconnect.Click += new System.EventHandler(this.BtnDisconnect_Click); // // BtnConnectTo // this.BtnConnectTo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnConnectTo.Image = ((System.Drawing.Image)(resources.GetObject("BtnConnectTo.Image"))); this.BtnConnectTo.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnConnectTo.Name = "BtnConnectTo"; this.BtnConnectTo.Size = new System.Drawing.Size(23, 22); this.BtnConnectTo.Text = "Connect to..."; this.BtnConnectTo.Click += new System.EventHandler(this.BtnConnectTo_Click); // // BtnSettings // this.BtnSettings.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.BtnSettings.Image = ((System.Drawing.Image)(resources.GetObject("BtnSettings.Image"))); this.BtnSettings.ImageTransparentColor = System.Drawing.Color.Magenta; this.BtnSettings.Name = "BtnSettings"; this.BtnSettings.Size = new System.Drawing.Size(23, 22); this.BtnSettings.Text = "Settings"; this.BtnSettings.Click += new System.EventHandler(this.BtnSettings_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); // // StatusStrip // this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.LblPacketCount, this.LblCurrentFileName, this.LblPacketProvider }); this.StatusStrip.Location = new System.Drawing.Point(0, 517); this.StatusStrip.Name = "StatusStrip"; this.StatusStrip.Size = new System.Drawing.Size(984, 24); this.StatusStrip.TabIndex = 2; this.StatusStrip.Text = "statusStrip1"; // // LblPacketCount // this.LblPacketCount.AutoSize = false; this.LblPacketCount.Name = "LblPacketCount"; this.LblPacketCount.Padding = new System.Windows.Forms.Padding(0, 0, 25, 0); this.LblPacketCount.Size = new System.Drawing.Size(79, 19); this.LblPacketCount.Text = "Packets: 0"; this.LblPacketCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // LblCurrentFileName // this.LblCurrentFileName.AutoSize = false; this.LblCurrentFileName.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); this.LblCurrentFileName.Name = "LblCurrentFileName"; this.LblCurrentFileName.Size = new System.Drawing.Size(390, 19); this.LblCurrentFileName.Text = "Current File"; this.LblCurrentFileName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // LblPacketProvider // this.LblPacketProvider.Name = "LblPacketProvider"; this.LblPacketProvider.Size = new System.Drawing.Size(89, 19); this.LblPacketProvider.Text = "Packet Provider"; // // MainMenu // this.MainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MenuFile, this.MenuEdit, this.MenuPlugins, this.MenuHelp }); // // MenuFile // this.MenuFile.Index = 0; this.MenuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.BtnMenuOpen, this.BtnMenuSaveAs, this.MenuFileExitSpacer, this.BtnMenuExit }); this.MenuFile.Text = "&File"; // // BtnMenuOpen // this.BtnMenuOpen.Index = 0; this.BtnMenuOpen.Text = "&Open..."; this.BtnMenuOpen.Click += new System.EventHandler(this.BtnOpen_Click); // // BtnMenuSaveAs // this.BtnMenuSaveAs.Index = 1; this.BtnMenuSaveAs.Text = "&Save as..."; this.BtnMenuSaveAs.Click += new System.EventHandler(this.BtnSave_Click); // // MenuFileExitSpacer // this.MenuFileExitSpacer.Index = 2; this.MenuFileExitSpacer.Text = "-"; // // BtnMenuExit // this.BtnMenuExit.Index = 3; this.BtnMenuExit.Text = "E&xit"; this.BtnMenuExit.Click += new System.EventHandler(this.BtnMenuExit_Click); // // MenuEdit // this.MenuEdit.Index = 1; this.MenuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.BtnMenuEditFilter, menuItem1, this.BtnMenuEditFind, this.BtnMenuEditFindPrev, this.BtnMenuEditFindNext }); this.MenuEdit.Text = "&Edit"; // // BtnMenuEditFilter // this.BtnMenuEditFilter.Index = 0; this.BtnMenuEditFilter.Text = "Apply filters to list"; this.BtnMenuEditFilter.Click += new System.EventHandler(this.BtnMenuEditFilter_Click); // // BtnMenuEditFind // this.BtnMenuEditFind.Index = 2; this.BtnMenuEditFind.Shortcut = System.Windows.Forms.Shortcut.CtrlF; this.BtnMenuEditFind.Text = "Find..."; this.BtnMenuEditFind.Click += new System.EventHandler(this.BtnMenuEditFind_Click); // // BtnMenuEditFindPrev // this.BtnMenuEditFindPrev.Index = 3; this.BtnMenuEditFindPrev.Shortcut = System.Windows.Forms.Shortcut.ShiftF3; this.BtnMenuEditFindPrev.Text = "Find Previous"; this.BtnMenuEditFindPrev.Click += new System.EventHandler(this.BtnMenuEditFindPrev_Click); // // BtnMenuEditFindNext // this.BtnMenuEditFindNext.Index = 4; this.BtnMenuEditFindNext.Shortcut = System.Windows.Forms.Shortcut.F3; this.BtnMenuEditFindNext.Text = "Find Next"; this.BtnMenuEditFindNext.Click += new System.EventHandler(this.BtnMenuEditFindNext_Click); // // MenuPlugins // this.MenuPlugins.Index = 2; this.MenuPlugins.Text = "&Plugins"; // // MenuHelp // this.MenuHelp.Index = 3; this.MenuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.BtnMenuAbout }); this.MenuHelp.Text = "?"; // // BtnMenuAbout // this.BtnMenuAbout.Index = 0; this.BtnMenuAbout.Text = "&About"; this.BtnMenuAbout.Click += new System.EventHandler(this.BtnMenuAbout_Click); // // OpenLogDialog // this.OpenLogDialog.Filter = "Text Files|*.txt|All Files|*.*"; // // SaveLogDialog // this.SaveLogDialog.DefaultExt = "txt"; this.SaveLogDialog.Filter = "Text Files|*.txt|All Files|*.*"; // // CtxPacketList // this.CtxPacketList.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.BtnMenuPacketsCopyOp, this.BtnMenuPacketsCopyId, this.BtnMenuPacketsCopyHex, this.BtnMenuPacketsCopyAuraWrite, this.BtnMenuPacketsCopyAuraRead, this.BtnMenuPacketsFilter }); this.CtxPacketList.Popup += new System.EventHandler(this.CtxPacketList_Popup); this.CtxPacketList.Collapse += new System.EventHandler(this.CtxPacketList_Collapse); // // BtnMenuPacketsCopyOp // this.BtnMenuPacketsCopyOp.Index = 0; this.BtnMenuPacketsCopyOp.Text = "Copy Op"; this.BtnMenuPacketsCopyOp.Click += new System.EventHandler(this.BtnMenuPacketsCopyOp_Click); // // BtnMenuPacketsCopyId // this.BtnMenuPacketsCopyId.Index = 1; this.BtnMenuPacketsCopyId.Text = "Copy Id"; this.BtnMenuPacketsCopyId.Click += new System.EventHandler(this.BtnMenuPacketsCopyId_Click); // // BtnMenuPacketsCopyHex // this.BtnMenuPacketsCopyHex.Index = 2; this.BtnMenuPacketsCopyHex.Text = "Copy packet (Hex)"; this.BtnMenuPacketsCopyHex.Click += new System.EventHandler(this.BtnMenuPacketsCopyHex_Click); // // BtnMenuPacketsCopyAuraWrite // this.BtnMenuPacketsCopyAuraWrite.Index = 3; this.BtnMenuPacketsCopyAuraWrite.Text = "Copy packet (Aura write)"; this.BtnMenuPacketsCopyAuraWrite.Click += new System.EventHandler(this.BtnMenuPacketsCopyAuraWrite_Click); // // BtnMenuPacketsCopyAuraRead // this.BtnMenuPacketsCopyAuraRead.Index = 4; this.BtnMenuPacketsCopyAuraRead.Text = "Copy packet (Aura read)"; this.BtnMenuPacketsCopyAuraRead.Click += new System.EventHandler(this.BtnMenuPacketsCopyAuraRead_Click); // // BtnMenuPacketsFilter // this.BtnMenuPacketsFilter.Index = 5; this.BtnMenuPacketsFilter.Text = "Add to filter"; this.BtnMenuPacketsFilter.Click += new System.EventHandler(this.BtnMenuPacketsFilter_Click); // // FrmMain // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(984, 541); this.Controls.Add(this.SplitContainerPackets); this.Controls.Add(this.ToolBar); this.Controls.Add(this.StatusStrip); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Menu = this.MainMenu; this.Name = "FrmMain"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "MabiPale2"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing); this.Load += new System.EventHandler(this.FrmMain_Load); this.Shown += new System.EventHandler(this.FrmMain_Shown); this.DragDrop += new System.Windows.Forms.DragEventHandler(this.FrmMain_DragDrop); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.FrmMain_DragEnter); this.SplitContainerPackets.Panel1.ResumeLayout(false); this.SplitContainerPackets.Panel2.ResumeLayout(false); this.SplitContainerPackets.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.SplitContainerPackets)).EndInit(); this.SplitContainerPackets.ResumeLayout(false); this.ToolBar.ResumeLayout(false); this.ToolBar.PerformLayout(); this.StatusStrip.ResumeLayout(false); this.StatusStrip.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
private void InitializeComponent() { this.dlgBrowseFolder = new System.Windows.Forms.FolderBrowserDialog(); this.tvDataFiles = new System.Windows.Forms.TreeView(); this.mnuTreeContext = new System.Windows.Forms.ContextMenu(); this.mnuExportAll = new System.Windows.Forms.MenuItem(); this.mnuExport = new System.Windows.Forms.MenuItem(); this.sbrStatus = new System.Windows.Forms.StatusBar(); this.picViewer = new System.Windows.Forms.PictureBox(); this.mnuPictureContext = new System.Windows.Forms.ContextMenu(); this.mnuNormalImage = new System.Windows.Forms.MenuItem(); this.mnuStretchImage = new System.Windows.Forms.MenuItem(); this.mnuTiledImage = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.picViewer)).BeginInit(); this.SuspendLayout(); // // dlgBrowseFolder // this.dlgBrowseFolder.Description = "Select the directory where the exported files should be stored:"; // // tvDataFiles // this.tvDataFiles.ContextMenu = this.mnuTreeContext; this.tvDataFiles.Dock = System.Windows.Forms.DockStyle.Left; this.tvDataFiles.HideSelection = false; this.tvDataFiles.Indent = 19; this.tvDataFiles.ItemHeight = 16; this.tvDataFiles.Location = new System.Drawing.Point(0, 0); this.tvDataFiles.Name = "tvDataFiles"; this.tvDataFiles.Size = new System.Drawing.Size(212, 374); this.tvDataFiles.TabIndex = 0; this.tvDataFiles.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvDataFiles_AfterSelect); // // mnuTreeContext // this.mnuTreeContext.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnuExportAll, this.mnuExport }); // // mnuExportAll // this.mnuExportAll.Enabled = false; this.mnuExportAll.Index = 0; this.mnuExportAll.Text = "&Export All..."; // // mnuExport // this.mnuExport.Enabled = false; this.mnuExport.Index = 1; this.mnuExport.Text = "&Export..."; // // sbrStatus // this.sbrStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.sbrStatus.Location = new System.Drawing.Point(0, 374); this.sbrStatus.Name = "sbrStatus"; this.sbrStatus.Size = new System.Drawing.Size(584, 20); this.sbrStatus.TabIndex = 1; // // picViewer // this.picViewer.ContextMenu = this.mnuPictureContext; this.picViewer.Dock = System.Windows.Forms.DockStyle.Fill; this.picViewer.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.picViewer.Location = new System.Drawing.Point(212, 0); this.picViewer.Name = "picViewer"; this.picViewer.Size = new System.Drawing.Size(372, 374); this.picViewer.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.picViewer.TabIndex = 2; this.picViewer.TabStop = false; // // mnuPictureContext // this.mnuPictureContext.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnuNormalImage, this.mnuStretchImage, this.mnuTiledImage }); // // mnuNormalImage // this.mnuNormalImage.Checked = true; this.mnuNormalImage.Index = 0; this.mnuNormalImage.RadioCheck = true; this.mnuNormalImage.Text = "&Normal"; this.mnuNormalImage.Click += new System.EventHandler(this.ImageOption_Click); // // mnuStretchImage // this.mnuStretchImage.Index = 1; this.mnuStretchImage.RadioCheck = true; this.mnuStretchImage.Text = "&Strech"; this.mnuStretchImage.Click += new System.EventHandler(this.ImageOption_Click); // // mnuTiledImage // this.mnuTiledImage.Enabled = false; this.mnuTiledImage.Index = 2; this.mnuTiledImage.RadioCheck = true; this.mnuTiledImage.Text = "&Tiled"; this.mnuTiledImage.Click += new System.EventHandler(this.ImageOption_Click); // // MainWindow // this.ClientSize = new System.Drawing.Size(584, 394); this.Controls.Add(this.picViewer); this.Controls.Add(this.tvDataFiles); this.Controls.Add(this.sbrStatus); this.Name = "MainWindow"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Tetra Viewer"; ((System.ComponentModel.ISupportInitialize)(this.picViewer)).EndInit(); this.ResumeLayout(false); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); this.dlgBrowseFolder = new System.Windows.Forms.FolderBrowserDialog(); this.tvDataFiles = new System.Windows.Forms.TreeView(); this.mnuTreeContext = new System.Windows.Forms.ContextMenu(); this.mnuExportAll = new System.Windows.Forms.MenuItem(); this.mnuExport = new System.Windows.Forms.MenuItem(); this.sbrStatus = new System.Windows.Forms.StatusBar(); this.picViewer = new System.Windows.Forms.PictureBox(); this.mnuPictureContext = new System.Windows.Forms.ContextMenu(); this.mnuNormalImage = new System.Windows.Forms.MenuItem(); this.mnuStretchImage = new System.Windows.Forms.MenuItem(); this.mnuTiledImage = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.picViewer)).BeginInit(); this.SuspendLayout(); // // dlgBrowseFolder // resources.ApplyResources(this.dlgBrowseFolder, "dlgBrowseFolder"); // // tvDataFiles // this.tvDataFiles.ContextMenu = this.mnuTreeContext; resources.ApplyResources(this.tvDataFiles, "tvDataFiles"); this.tvDataFiles.HideSelection = false; this.tvDataFiles.ItemHeight = 16; this.tvDataFiles.Name = "tvDataFiles"; this.tvDataFiles.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvDataFiles_AfterSelect); // // mnuTreeContext // this.mnuTreeContext.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnuExportAll, this.mnuExport }); // // mnuExportAll // resources.ApplyResources(this.mnuExportAll, "mnuExportAll"); this.mnuExportAll.Index = 0; // // mnuExport // resources.ApplyResources(this.mnuExport, "mnuExport"); this.mnuExport.Index = 1; // // sbrStatus // resources.ApplyResources(this.sbrStatus, "sbrStatus"); this.sbrStatus.Name = "sbrStatus"; // // picViewer // this.picViewer.ContextMenu = this.mnuPictureContext; resources.ApplyResources(this.picViewer, "picViewer"); this.picViewer.Name = "picViewer"; this.picViewer.TabStop = false; // // mnuPictureContext // this.mnuPictureContext.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnuNormalImage, this.mnuStretchImage, this.mnuTiledImage }); // // mnuNormalImage // this.mnuNormalImage.Checked = true; this.mnuNormalImage.Index = 0; this.mnuNormalImage.RadioCheck = true; resources.ApplyResources(this.mnuNormalImage, "mnuNormalImage"); this.mnuNormalImage.Click += new System.EventHandler(this.ImageOption_Click); // // mnuStretchImage // this.mnuStretchImage.Index = 1; this.mnuStretchImage.RadioCheck = true; resources.ApplyResources(this.mnuStretchImage, "mnuStretchImage"); this.mnuStretchImage.Click += new System.EventHandler(this.ImageOption_Click); // // mnuTiledImage // resources.ApplyResources(this.mnuTiledImage, "mnuTiledImage"); this.mnuTiledImage.Index = 2; this.mnuTiledImage.RadioCheck = true; this.mnuTiledImage.Click += new System.EventHandler(this.ImageOption_Click); // // MainWindow // resources.ApplyResources(this, "$this"); this.Controls.Add(this.picViewer); this.Controls.Add(this.tvDataFiles); this.Controls.Add(this.sbrStatus); this.Name = "MainWindow"; ((System.ComponentModel.ISupportInitialize)(this.picViewer)).EndInit(); this.ResumeLayout(false); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.Panel1 = new System.Windows.Forms.Panel(); this.MonitorGrid = new System.Windows.Forms.ListView(); this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.BtnDump = new System.Windows.Forms.Button(); this.Panel2 = new System.Windows.Forms.Panel(); this.Label1 = new System.Windows.Forms.Label(); this.SpeedButton1 = new System.Windows.Forms.Button(); this.LbMasCount = new System.Windows.Forms.Label(); this.BtnView = new System.Windows.Forms.Button(); this.BtnShowServerUsers = new System.Windows.Forms.Button(); this.SpeedButton2 = new System.Windows.Forms.Button(); this.CkLogin = new System.Windows.Forms.CheckBox(); this.CbViewLog = new System.Windows.Forms.CheckBox(); this.CheckBoxAttack = new System.Windows.Forms.CheckBox(); this.Memo1 = new System.Windows.Forms.TextBox(); this.MainMenu = new System.Windows.Forms.MainMenu(this.components); this.MENU_CONTROL = new System.Windows.Forms.MenuItem(); this.N1 = new System.Windows.Forms.MenuItem(); this.C1 = new System.Windows.Forms.MenuItem(); this.MENU_CONTROL_EXIT = new System.Windows.Forms.MenuItem(); this.MENU_VIEW = new System.Windows.Forms.MenuItem(); this.MENU_VIEW_SESSION = new System.Windows.Forms.MenuItem(); this.MENU_OPTION = new System.Windows.Forms.MenuItem(); this.MENU_OPTION_GENERAL = new System.Windows.Forms.MenuItem(); this.MENU_OPTION_ROUTE = new System.Windows.Forms.MenuItem(); this.MENU_TOOLS = new System.Windows.Forms.MenuItem(); this.MENU_HELP = new System.Windows.Forms.MenuItem(); this.MENU_HELP_ABOUT = new System.Windows.Forms.MenuItem(); this.Panel1.SuspendLayout(); this.Panel2.SuspendLayout(); this.SuspendLayout(); // // Panel1 // this.Panel1.BackColor = System.Drawing.Color.Teal; this.Panel1.Controls.Add(this.MonitorGrid); this.Panel1.Controls.Add(this.BtnDump); this.Panel1.Controls.Add(this.Panel2); this.Panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.Panel1.Location = new System.Drawing.Point(0, 101); this.Panel1.Name = "Panel1"; this.Panel1.Size = new System.Drawing.Size(473, 233); this.Panel1.TabIndex = 0; this.Panel1.Text = " "; // // MonitorGrid // this.MonitorGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.MonitorGrid.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, this.columnHeader3, this.columnHeader4, this.columnHeader5 }); this.MonitorGrid.FullRowSelect = true; this.MonitorGrid.Location = new System.Drawing.Point(2, 46); this.MonitorGrid.Name = "MonitorGrid"; this.MonitorGrid.Size = new System.Drawing.Size(464, 182); this.MonitorGrid.TabIndex = 2; this.MonitorGrid.UseCompatibleStateImageBehavior = false; this.MonitorGrid.View = System.Windows.Forms.View.Details; // // columnHeader1 // this.columnHeader1.Text = "序号"; this.columnHeader1.Width = 66; // // columnHeader2 // this.columnHeader2.Text = "服务器"; this.columnHeader2.Width = 106; // // columnHeader3 // this.columnHeader3.Text = "IP"; this.columnHeader3.Width = 112; // // columnHeader4 // this.columnHeader4.Text = "状态"; this.columnHeader4.Width = 83; // // columnHeader5 // this.columnHeader5.Text = "在线人数"; this.columnHeader5.Width = 88; // // BtnDump // this.BtnDump.BackColor = System.Drawing.SystemColors.ButtonFace; this.BtnDump.Location = new System.Drawing.Point(568, 2); this.BtnDump.Name = "BtnDump"; this.BtnDump.Size = new System.Drawing.Size(57, 17); this.BtnDump.TabIndex = 0; this.BtnDump.Text = "Dump"; this.BtnDump.UseVisualStyleBackColor = false; // // Panel2 // this.Panel2.BackColor = System.Drawing.Color.Teal; this.Panel2.Controls.Add(this.Label1); this.Panel2.Controls.Add(this.SpeedButton1); this.Panel2.Controls.Add(this.LbMasCount); this.Panel2.Controls.Add(this.BtnView); this.Panel2.Controls.Add(this.BtnShowServerUsers); this.Panel2.Controls.Add(this.SpeedButton2); this.Panel2.Controls.Add(this.CkLogin); this.Panel2.Controls.Add(this.CbViewLog); this.Panel2.Controls.Add(this.CheckBoxAttack); this.Panel2.Dock = System.Windows.Forms.DockStyle.Top; this.Panel2.Location = new System.Drawing.Point(0, 0); this.Panel2.Name = "Panel2"; this.Panel2.Size = new System.Drawing.Size(473, 45); this.Panel2.TabIndex = 1; this.Panel2.Text = " "; this.Panel2.DoubleClick += new System.EventHandler(this.Panel2DblClick); // // Label1 // this.Label1.Location = new System.Drawing.Point(8, 24); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(12, 12); this.Label1.TabIndex = 0; this.Label1.Text = "00"; // // SpeedButton1 // this.SpeedButton1.BackColor = System.Drawing.SystemColors.ButtonFace; this.SpeedButton1.Location = new System.Drawing.Point(242, 5); this.SpeedButton1.Name = "SpeedButton1"; this.SpeedButton1.Size = new System.Drawing.Size(65, 30); this.SpeedButton1.TabIndex = 1; this.SpeedButton1.Text = "帐号管理"; this.SpeedButton1.UseVisualStyleBackColor = false; this.SpeedButton1.Click += new System.EventHandler(this.SpeedButton1Click); // // LbMasCount // this.LbMasCount.Location = new System.Drawing.Point(170, 5); this.LbMasCount.Name = "LbMasCount"; this.LbMasCount.Size = new System.Drawing.Size(59, 12); this.LbMasCount.TabIndex = 2; this.LbMasCount.Text = "LbMasCount"; // // BtnView // this.BtnView.BackColor = System.Drawing.SystemColors.ButtonFace; this.BtnView.Location = new System.Drawing.Point(317, 5); this.BtnView.Name = "BtnView"; this.BtnView.Size = new System.Drawing.Size(67, 30); this.BtnView.TabIndex = 3; this.BtnView.Text = "充值记录"; this.BtnView.UseVisualStyleBackColor = false; this.BtnView.Click += new System.EventHandler(this.BtnView_Click); // // BtnShowServerUsers // this.BtnShowServerUsers.BackColor = System.Drawing.SystemColors.ButtonFace; this.BtnShowServerUsers.Location = new System.Drawing.Point(395, 5); this.BtnShowServerUsers.Name = "BtnShowServerUsers"; this.BtnShowServerUsers.Size = new System.Drawing.Size(71, 30); this.BtnShowServerUsers.TabIndex = 4; this.BtnShowServerUsers.Text = "人数限制"; this.BtnShowServerUsers.UseVisualStyleBackColor = false; this.BtnShowServerUsers.Click += new System.EventHandler(this.BtnShowServerUsersClick); // // SpeedButton2 // this.SpeedButton2.BackColor = System.Drawing.SystemColors.ButtonFace; this.SpeedButton2.Location = new System.Drawing.Point(61, 1); this.SpeedButton2.Name = "SpeedButton2"; this.SpeedButton2.Size = new System.Drawing.Size(23, 17); this.SpeedButton2.TabIndex = 5; this.SpeedButton2.Text = "#"; this.SpeedButton2.UseVisualStyleBackColor = false; this.SpeedButton2.Click += new System.EventHandler(this.SpeedButton2Click); // // CkLogin // this.CkLogin.Enabled = false; this.CkLogin.Location = new System.Drawing.Point(8, 1); this.CkLogin.Name = "CkLogin"; this.CkLogin.Size = new System.Drawing.Size(65, 17); this.CkLogin.TabIndex = 0; this.CkLogin.Text = "连接 (0)"; // // CbViewLog // this.CbViewLog.Location = new System.Drawing.Point(98, 3); this.CbViewLog.Name = "CbViewLog"; this.CbViewLog.Size = new System.Drawing.Size(73, 17); this.CbViewLog.TabIndex = 1; this.CbViewLog.Text = "显示信息"; this.CbViewLog.Click += new System.EventHandler(this.CbViewLogClick); // // CheckBoxAttack // this.CheckBoxAttack.Checked = true; this.CheckBoxAttack.CheckState = System.Windows.Forms.CheckState.Checked; this.CheckBoxAttack.Location = new System.Drawing.Point(98, 26); this.CheckBoxAttack.Name = "CheckBoxAttack"; this.CheckBoxAttack.Size = new System.Drawing.Size(97, 17); this.CheckBoxAttack.TabIndex = 2; this.CheckBoxAttack.Text = "防攻击保护"; // // Memo1 // this.Memo1.Dock = System.Windows.Forms.DockStyle.Top; this.Memo1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Memo1.Location = new System.Drawing.Point(0, 0); this.Memo1.Multiline = true; this.Memo1.Name = "Memo1"; this.Memo1.Size = new System.Drawing.Size(473, 101); this.Memo1.TabIndex = 1; this.Memo1.DoubleClick += new System.EventHandler(this.Memo1DblClick); // // MainMenu // this.MainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MENU_CONTROL, this.MENU_VIEW, this.MENU_OPTION, this.MENU_TOOLS, this.MENU_HELP }); // // MENU_CONTROL // this.MENU_CONTROL.Index = 0; this.MENU_CONTROL.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.N1, this.C1, this.MENU_CONTROL_EXIT }); this.MENU_CONTROL.Text = "控制(&C)"; // // N1 // this.N1.Index = 0; this.N1.Text = "重新加载路由列表(&R)"; this.N1.Click += new System.EventHandler(this.N1Click); // // C1 // this.C1.Index = 1; this.C1.Text = "重新加载配制(&C)"; this.C1.Click += new System.EventHandler(this.C1Click); // // MENU_CONTROL_EXIT // this.MENU_CONTROL_EXIT.Index = 2; this.MENU_CONTROL_EXIT.Text = "退出(&X)"; this.MENU_CONTROL_EXIT.Click += new System.EventHandler(this.MENU_CONTROL_EXITClick); // // MENU_VIEW // this.MENU_VIEW.Index = 1; this.MENU_VIEW.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MENU_VIEW_SESSION }); this.MENU_VIEW.Text = "查看(&V)"; // // MENU_VIEW_SESSION // this.MENU_VIEW_SESSION.Index = 0; this.MENU_VIEW_SESSION.Text = "全局会话(&G)"; this.MENU_VIEW_SESSION.Click += new System.EventHandler(this.MENU_VIEW_SESSIONClick); // // MENU_OPTION // this.MENU_OPTION.Index = 2; this.MENU_OPTION.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MENU_OPTION_GENERAL, this.MENU_OPTION_ROUTE }); this.MENU_OPTION.Text = "选项(&O)"; // // MENU_OPTION_GENERAL // this.MENU_OPTION_GENERAL.Index = 0; this.MENU_OPTION_GENERAL.Text = "基本设置(&G)"; this.MENU_OPTION_GENERAL.Click += new System.EventHandler(this.MENU_OPTION_GENERALClick); // // MENU_OPTION_ROUTE // this.MENU_OPTION_ROUTE.Index = 1; this.MENU_OPTION_ROUTE.Text = "网关设置(&R)"; this.MENU_OPTION_ROUTE.Click += new System.EventHandler(this.MENU_OPTION_ROUTEClick); // // MENU_TOOLS // this.MENU_TOOLS.Index = 3; this.MENU_TOOLS.Text = "工具(&T)"; // // MENU_HELP // this.MENU_HELP.Index = 4; this.MENU_HELP.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MENU_HELP_ABOUT }); this.MENU_HELP.Text = "帮助(&H)"; // // MENU_HELP_ABOUT // this.MENU_HELP_ABOUT.Index = 0; this.MENU_HELP_ABOUT.Text = "关于(&A)"; this.MENU_HELP_ABOUT.Click += new System.EventHandler(this.MENU_HELP_ABOUTClick); // // TFrmMain // this.AutoScroll = true; this.BackColor = System.Drawing.SystemColors.ButtonFace; this.ClientSize = new System.Drawing.Size(473, 334); this.Controls.Add(this.Panel1); this.Controls.Add(this.Memo1); this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Location = new System.Drawing.Point(847, 185); this.Menu = this.MainMenu; this.Name = "TFrmMain"; this.Text = "帐号登录服务器"; this.Closing += new System.ComponentModel.CancelEventHandler(this.FormCloseQuery); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TFrmMain_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TFrmMain_FormClosed); this.Load += new System.EventHandler(this.TFrmMain_Load); this.Panel1.ResumeLayout(false); this.Panel2.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }