コード例 #1
0
ファイル: Main.cs プロジェクト: frugalware/frugal-tweak
        // Create the popup menu, on right click.
        static void OnTrayIconPopup(object o, EventArgs args)
        {
            Menu popupMenu = new Menu();
                ImageMenuItem menuItemcc = new ImageMenuItem ("Start Control Center");
                Gtk.Image ccimg = new Gtk.Image(Stock.Execute, IconSize.Menu);
                menuItemcc.Image = ccimg;
                popupMenu.Add(menuItemcc);

                ImageMenuItem menuItemccRoot = new ImageMenuItem ("Start Control Center as root");
                Gtk.Image ccimgRoot = new Gtk.Image(Stock.Execute, IconSize.Menu);
                menuItemccRoot.Image = ccimgRoot;
                popupMenu.Add(menuItemccRoot);

                ImageMenuItem menuItemForum = new ImageMenuItem ("Frugalware Forums");
                Gtk.Image Forumimg = new Gtk.Image(Stock.Help, IconSize.Menu);
                menuItemForum.Image = Forumimg;
                popupMenu.Add(menuItemForum);

                ImageMenuItem menuItemWiki = new ImageMenuItem ("Frugalware Wiki");
                Gtk.Image Wikiimg = new Gtk.Image(Stock.Help, IconSize.Menu);
                menuItemWiki.Image = Wikiimg;
                popupMenu.Add(menuItemWiki);

                ImageMenuItem menuItemQuit = new ImageMenuItem ("Quit");
                Gtk.Image appimg = new Gtk.Image(Stock.Quit, IconSize.Menu);
                menuItemQuit.Image = appimg;
                popupMenu.Add(menuItemQuit);

                menuItemForum.Activated += delegate {
                                                    WebkitBrowser browser = new WebkitBrowser("http://forums.frugalware.org");
                                                    browser.Show();
                                                    };
                menuItemWiki.Activated += delegate {
                                                    WebkitBrowser browser = new WebkitBrowser("http://wiki.frugalware.org");
                                                    browser.Show();
                                                    };
                menuItemcc.Activated += delegate {
                                                    if(Fen==null)
                                                    {
                                                        Fen = new Fen_Menu();
                                                        Fen.Show();
                                                    }
                                                    else
                                                    {
                                                        Fen.Destroy();
                                                        Fen.Dispose();
                                                        Fen=null;
                                                    }
                                            };

                menuItemccRoot.Activated += delegate { Outils.Excecute("sucontrolcenter","",false); };

                // Quit the application when quit has been clicked.
                menuItemQuit.Activated += delegate { Application.Quit(); };
                popupMenu.ShowAll();
                popupMenu.Popup();
        }
コード例 #2
0
 protected virtual void OnBTNWikiClicked(object sender, System.EventArgs e)
 {
     WebkitBrowser browser = new WebkitBrowser("http://wiki.frugalware.org");
     browser.Show();
 }
コード例 #3
0
 protected virtual void OnBTNFrenchClicked(object sender, System.EventArgs e)
 {
     WebkitBrowser browser = new WebkitBrowser("http://www.frugalware.fr");
     browser.Show();
 }
コード例 #4
0
 protected virtual void OnBTNPastbinClicked(object sender, System.EventArgs e)
 {
     WebkitBrowser browser = new WebkitBrowser("http://www.frugalware.org/paste/");
     browser.Show();
 }
コード例 #5
0
 protected virtual void OnBTNDanishClicked(object sender, System.EventArgs e)
 {
     WebkitBrowser browser = new WebkitBrowser("http://frugalware.dk/");
     browser.Show();
 }