Esempio n. 1
0
        public CloseTabCommand(BrowserWindow browser)
        {
            MenuText = "&Close Tab";
            ToolBarText = "Close Tab";
            ToolTip = "Close the current tab";
            //Icon = Icon.FromResource("name.ico");
            Shortcut = Application.Instance.CommonModifier | Keys.W;

            this.Executed +=
                (Object sender, EventArgs e) =>
                {
                    browser.CloseCurrentTab();
                };
        }
Esempio n. 2
0
        public NewTabCommand(BrowserWindow browser, Uri url)
        {
            MenuText = "&New Tab";
            ToolBarText = "New Tab";
            ToolTip = "Open a new tab";
            //Icon = Icon.FromResource("name.ico");
            Shortcut = Application.Instance.CommonModifier | Keys.T;

            this.Executed +=
                (Object sender, EventArgs e) =>
                {
                    BrowserTab tab = browser.AddNewTab();
                    tab.Url = url;
                };
        }
Esempio n. 3
0
        public NewWindowCommand()
        {
            MenuText = "New Window";
            ToolBarText = "New Window";
            ToolTip = "Open a new window";
            //Icon = Icon.FromResource("name.ico");
            Shortcut = Application.Instance.CommonModifier | Keys.N;

            this.Executed +=
                (Object sender, EventArgs e) =>
                {
                    BrowserWindow form = new BrowserWindow();
                    form.Show();
                };
        }
Esempio n. 4
0
 static void Main()
 {
     using (Application application = new Application())
     {
         BrowserWindow form = new BrowserWindow();
         application.Run(form);
     }
 }