Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        public AwkEverywhereMainForm(
            Dictionary <Type, IFrontEndConfig> oConfigs,
            Dictionary <Type, IFrontEnd> oFrontEnds
            )
        {
            moConfigs   = oConfigs;
            moFrontEnds = oFrontEnds;

            moDiffFrontEnd = new DiffFrontEnd();

            moHotKey = new HotKey(this);
            moHotKey.RegisterHotKey(Keys.K, HotKey.HotKeyModifiers.Control | HotKey.HotKeyModifiers.Shift);

            moHotKey.HotKeyPress += new HotKey.HotKeyHandler(moHotKey_HotKeyPress);

            InitializeComponent();

            TB_Data.AllowDrop  = true;
            TB_Data.DragDrop  += new DragEventHandler(TB_ScriptAwkDragDrop);
            TB_Data.DragEnter += new DragEventHandler(TB_ScriptAwkDragEnter);
        }
Esempio n. 3
0
 public DiffForm(DiffFrontEnd frontEnd)
 {
     InitializeComponent();
     this.moFrontEnd = frontEnd;
 }