public NotificationIcon() { notifyIcon = new NotifyIcon(); notificationMenu = new ContextMenu(InitializeMenu()); notifyIcon.DoubleClick += IconDoubleClick; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon)); notifyIcon.Icon = (Icon)resources.GetObject("$this.Icon"); notifyIcon.ContextMenu = notificationMenu; Dictionary<Type, IFrontEndConfig> oConfigs = new Dictionary<Type, IFrontEndConfig>(); IFrontEndConfig oAwkConfig = AwkConfig.GetInstance(); IFrontEndConfig oShConfig = ShConfig.GetInstance(); IFrontEndConfig oDiffConfig = DiffConfig.GetInstance(); oConfigs.Add(typeof(AwkScriptXml),oAwkConfig); oConfigs.Add(typeof(ShScriptXml),oShConfig); oConfigs.Add(typeof(DiffScript), oDiffConfig); IFrontEnd oAwkFrontEnd = new AwkFrontEnd(oAwkConfig); IFrontEnd oShFrontEnd = new ShFrontEnd(oShConfig); IFrontEnd oDiffFrontEnd = new DiffFrontEnd(); Dictionary<Type, IFrontEnd> oFrontEnds = new Dictionary<Type, IFrontEnd>(); oFrontEnds.Add(typeof(AwkScriptXml), oAwkFrontEnd); oFrontEnds.Add(typeof(ShScriptXml), oShFrontEnd); oFrontEnds.Add(typeof(DiffScript), oDiffFrontEnd); moMain = new AwkEverywhere.Forms.AwkEverywhereMainForm(oConfigs, oFrontEnds); moMain.CopyFromNpp += new EventHandler(oMain_CopyFromNpp); moMain.CopyToNpp += new EventHandler(oMain_CopyToNpp); }
public NotificationIcon() { notifyIcon = new NotifyIcon(); notificationMenu = new ContextMenu(InitializeMenu()); notifyIcon.DoubleClick += IconDoubleClick; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon)); notifyIcon.Icon = (Icon)resources.GetObject("$this.Icon"); notifyIcon.ContextMenu = notificationMenu; Dictionary <Type, IFrontEndConfig> oConfigs = new Dictionary <Type, IFrontEndConfig>(); IFrontEndConfig oAwkConfig = AwkConfig.GetInstance(); IFrontEndConfig oDiffConfig = DiffConfig.GetInstance(); oConfigs.Add(typeof(AwkScriptXml), oAwkConfig); oConfigs.Add(typeof(DiffScript), oDiffConfig); IFrontEnd oAwkFrontEnd = new AwkFrontEnd(oAwkConfig); IFrontEnd oDiffFrontEnd = new DiffFrontEnd(); Dictionary <Type, IFrontEnd> oFrontEnds = new Dictionary <Type, IFrontEnd>(); oFrontEnds.Add(typeof(AwkScriptXml), oAwkFrontEnd); oFrontEnds.Add(typeof(DiffScript), oDiffFrontEnd); moMain = new AwkEverywhere.Forms.AwkEverywhereMainForm(oConfigs, oFrontEnds); moMain.CopyFromNpp += new EventHandler(oMain_CopyFromNpp); moMain.CopyToNpp += new EventHandler(oMain_CopyToNpp); SystemEvents.SessionEnding += SystemEvents_SessionEnding; }