当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.MenuItem.Show方法代码示例

本文整理汇总了C#中Gtk.MenuItem.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.MenuItem.Show方法的具体用法?C# Gtk.MenuItem.Show怎么用?C# Gtk.MenuItem.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.MenuItem的用法示例。


在下文中一共展示了Gtk.MenuItem.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GameDBPlugin

            public GameDBPlugin()
                : base("gamedb",
						     Catalog.
						     GetString
						     ("Games Database Plugin"),
						     Catalog.
						     GetString
						     ("Game database"))
            {
                saveItem = new MenuItem (Catalog.
                             GetString
                             ("Add Games to _Database"));
                saveItem.Activated += on_add_to_db_activate;
                saveItem.Show ();

                /*
                   openDbItem = new MenuItem (Catalog.
                   GetString
                   ("Games _Database"));

                   openDbItem.Activated +=
                   on_open_games_db_activate;
                   openDbItem.Show ();
                 */
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:25,代码来源:GameDbPlugin.cs

示例2: Hook_Initialise

 public override void Hook_Initialise(Forms.Main main)
 {
     menu = new Gtk.MenuItem("Display ignored text");
     collector = new Graphics.Window();
     collector.CreateChat(null, false, false, false);
     menu.Activated += new EventHandler(Display);
     collector.WindowName = "Ignored";
     main.ToolsMenu.Append(menu);
     menu.Show();
 }
开发者ID:JGunning,项目名称:OpenAIM,代码行数:10,代码来源:Class.cs

示例3: OnNoteOpened

        public override void OnNoteOpened()
        {
            // Add the menu item when the window is created.
            menu_item = new Gtk.MenuItem (
                Catalog.GetString ("Note Statistics"));

            menu_item.Activated += OnMenuItemActivated;

            menu_item.Show ();
            AddPluginMenuItem (menu_item);
        }
开发者ID:eeejay,项目名称:tomboy-notestats,代码行数:11,代码来源:NoteStatisticsAddin.cs

示例4: OnNoteOpened

 public override void OnNoteOpened()
 {
     if (this.Note.Title.StartsWith("GTD")) {
         item = new Gtk.MenuItem("Update Tasks");
         item.Activated += OnMenuItemActivated;
         item.AddAccelerator ("activate", Window.AccelGroup,
             (uint) Gdk.Key.d, Gdk.ModifierType.ControlMask,
             Gtk.AccelFlags.Visible);
         item.Show ();
         AddPluginMenuItem (item);
     }
 }
开发者ID:aleneum,项目名称:tomboy-addin-task,代码行数:12,代码来源:TomboyTaskNoteAddin.cs

示例5: Hook_Initialise

 public override void Hook_Initialise(Forms.Main main)
 {
     _m = main;
     item = new Gtk.MenuItem("#pidgeon");
     item.Activated += new EventHandler(pidgeonToolStripMenuItem_Click);
     separator = new Gtk.SeparatorMenuItem();
     main.HelpMenu.Append(separator);
     main.HelpMenu.Append(item);
     separator.Show();
     item.Show();
     Core.DebugLog("Registered #pidgeon in menu");
 }
开发者ID:JGunning,项目名称:OpenAIM,代码行数:12,代码来源:Channel.cs

示例6: Create

        public static void Create(Tag [] tags, Gtk.Menu menu)
        {
            var findWithString = Catalog.GetPluralString ("Find _With", "Find _With", tags.Length);
            var item = new Gtk.MenuItem (String.Format (findWithString, tags.Length));

            Gtk.Menu submenu = GetSubmenu (tags);
            if (submenu == null)
                item.Sensitive = false;
            else
                item.Submenu = submenu;

            menu.Append (item);
            item.Show ();
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:14,代码来源:TermMenuItem.cs

示例7: Hook_BeforeTextMenu

 public override void Hook_BeforeTextMenu(Extension.ScrollbackArgs Args)
 {
     text = Args.scrollback.SelectedText;
     Gtk.SeparatorMenuItem xx = new Gtk.SeparatorMenuItem();
     xx.Show();
     Args.menu.Add(xx);
     Gtk.MenuItem wiki = new Gtk.MenuItem("Search using wiki");
     wiki.Activated += new EventHandler(SearchWiki);
     wiki.Show();
     Args.menu.Add(wiki);
     Gtk.MenuItem goog = new Gtk.MenuItem("Search using google");
     goog.Show();
     goog.Activated += new EventHandler(SearchGoogle);
     Args.menu.Add(goog);
 }
开发者ID:JGunning,项目名称:OpenAIM,代码行数:15,代码来源:Search.cs

示例8: OnNoteOpened

		public override void OnNoteOpened ()
		{
			// Add the menu item when the window is created
			item = new Gtk.MenuItem (
				Catalog.GetString ("Insert Timestamp"));
			item.Activated += OnMenuItemActivated;
			item.AddAccelerator ("activate", Window.AccelGroup,
				(uint) Gdk.Key.d, Gdk.ModifierType.ControlMask,
				Gtk.AccelFlags.Visible);
			item.Show ();
			AddPluginMenuItem (item);

			// Get the format from GConf and subscribe to changes
			date_format = (string) Preferences.Get (
				Preferences.INSERT_TIMESTAMP_FORMAT);
			Preferences.SettingChanged += OnFormatSettingChanged;
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:17,代码来源:InsertTimestampNoteAddin.cs

示例9: OnPopulatePopup

		void OnPopulatePopup (object sender, Gtk.PopulatePopupArgs args)
		{
			Gtk.TextIter click_iter = Buffer.GetIterAtMark (click_mark);
			TaskTag task_tag = (TaskTag)
			                   Buffer.GetDynamicTag ("task", click_iter);
			if (task_tag == null)
				return;

			Gtk.MenuItem item;

			item = new Gtk.SeparatorMenuItem ();
			item.Show ();
			args.Menu.Prepend (item);

			item = new Gtk.MenuItem (Catalog.GetString ("Open To Do List"));
			item.Activated += OnOpenTaskListWindow;
			item.Show ();
			args.Menu.Prepend (item);

			item = new TaskMenuItem (task_tag.Uri, Catalog.GetString ("To Do Options"));
			item.Activated += OnOpenTaskOptions;
			item.ShowAll ();
			args.Menu.Prepend (item);

			item = new TaskMenuItem (
			        task_tag.Uri,
			        task_tag.CompletionDate == DateTime.MinValue ?
			        Catalog.GetString ("Mark Complete") :
			        Catalog.GetString ("Mark Undone"));
			item.Activated += OnToggleCompletionStatus;
			item.ShowAll ();
			args.Menu.Prepend (item);
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:33,代码来源:TasksNoteAddin.cs

示例10: AddAccelerator

		public void AddAccelerator (EventHandler handler,
					    uint key,
					    Gdk.ModifierType modifiers,
					    Gtk.AccelFlags flags)
		{
			Gtk.MenuItem foo = new Gtk.MenuItem ();
			foo.Activated += handler;
			foo.AddAccelerator ("activate",
					    accel_group,
					    key, 
					    modifiers,
					    flags);
			foo.Show ();

			fake_menu.Append (foo);
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:16,代码来源:GtkUtils.cs

示例11: OnPopulatePopup

		void OnPopulatePopup (object sender, Gtk.PopulatePopupArgs args)
		{
			Gtk.TextIter click_iter = Buffer.GetIterAtMark (click_mark);
			NoteTag url_tag = Note.TagTable.UrlTag;
			if (click_iter.HasTag (url_tag) || click_iter.EndsTag (url_tag)) {
				Gtk.MenuItem item;

				item = new Gtk.SeparatorMenuItem ();
				item.Show ();
				args.Menu.Prepend (item);

				item = new Gtk.MenuItem (Catalog.GetString ("_Copy Link Address"));
				item.Activated += CopyLinkActivate;
				item.Show ();
				args.Menu.Prepend (item);

				item = new Gtk.MenuItem (Catalog.GetString ("_Open Link"));
				item.Activated += OpenLinkActivate;
				item.Show ();
				args.Menu.Prepend (item);
			}
		}
开发者ID:MatteoNardi,项目名称:Tomboy,代码行数:22,代码来源:Watchers.cs

示例12: OnShown

        protected override void OnShown()
        {
            Trace.Call();

            if (!IsPopulated) {
                IsPopulated = true;

                Gtk.MenuItem item;
                item = new Gtk.MenuItem(_("Ping"));
                item.Activated += OnPingItemActivated;
                item.Show();
                Append(item);

                item = new Gtk.MenuItem(_("Version"));
                item.Activated += OnVersionItemActivated;
                item.Show();
                Append(item);

                item = new Gtk.MenuItem(_("Time"));
                item.Activated += OnTimeItemActivated;
                item.Show();
                Append(item);

                item = new Gtk.MenuItem(_("Finger"));
                item.Activated += OnFingerItemActivated;
                item.Show();
                Append(item);

                item = new Gtk.MenuItem(_("Userinfo"));
                item.Activated += OnUserinfoItemActivated;
                item.Show();
                Append(item);
            }

            base.OnShown();
        }
开发者ID:pacificIT,项目名称:smuxi,代码行数:36,代码来源:CtcpMenu.cs

示例13: Initialize

        public override void Initialize()
        {
            item = new Gtk.MenuItem (Catalog.GetString ("Post note to your blog"));
            item.Activated += OnMenuItemActivated;
            item.Show ();
            AddPluginMenuItem (item);

            AuthenticationManager.Register (new GoogleClient ());
        }
开发者ID:ozamosi,项目名称:tomboy-blogposter,代码行数:9,代码来源:Blogposter.cs

示例14: Initialize

        public void Initialize(IPadWindow window)
        {
            //
            // Handle normal input
            //
            view.ConsoleInput += HandleConsoleInput;

            //
            // Setup Ctrl + / as the interrupt handler
            //
            view.Child.KeyPressEvent += (o, args) => {
                if ((args.Event.State & ModifierType.ControlMask) == ModifierType.ControlMask &&
                    args.Event.Key == Key.slash) {
                    if (session != null) session.Interrupt ();
                }
            };

            //
            // Watch the active doc
            //
            IdeApp.Workbench.ActiveDocumentChanged += HandleActiveDocumentChanged;

            //
            //
            //
            UpdateFont ();
            UpdateColors ();
            view.ShadowType = Gtk.ShadowType.None;
            view.ShowAll ();

            //
            // Add a Restart item to the pop up menu
            //
            var v = view.Child as Gtk.TextView;
            if (v != null) {
                v.PopulatePopup += (o, args) => {
                    var item = new Gtk.MenuItem(GettextCatalog.GetString("Reset"));
                    item.Activated += (sender, e) => RestartCsi ();
                    item.Show ();
                    args.Menu.Add (item);
                };
            }

            //
            // Create the toolbar
            //
        }
开发者ID:jorik041,项目名称:CSharpInteractive,代码行数:47,代码来源:CSharpInteractivePad.cs

示例15: CreateMenu

        private void CreateMenu(object o, Gtk.PopulatePopupArgs e)
        {
            CreatingMenu = true;
            Hooks._Scrollback.BeforeMenu(owner, this, e.Menu);
            Gtk.SeparatorMenuItem separator1 = new Gtk.SeparatorMenuItem();
            separator1.Show();
            e.Menu.Append(separator1);
            e.Menu.Append(new Gtk.SeparatorMenuItem());

            listAllChannelsToolStripMenuItem.Visible = (owner != null && owner._Network != null);

            // channels
            if (joinToolStripMenuItem.Visible)
            {
                Gtk.MenuItem join = new Gtk.MenuItem(joinToolStripMenuItem.Text);
                join.Show();
                join.Activated += new EventHandler(joinToolStripMenuItem_Click);
                e.Menu.Append(join);
                Gtk.SeparatorMenuItem separator6 = new Gtk.SeparatorMenuItem();
                separator6.Show();
                e.Menu.Append(separator6);
            }

            if (openLinkInBrowserToolStripMenuItem.Visible)
            {
                Gtk.MenuItem copylink = new Gtk.MenuItem(copyLinkToClipboardToolStripMenuItem.Text);
                copylink.Show();
                copylink.Activated += new EventHandler(copyLinkToClipboardToolStripMenuItem_Click);
                e.Menu.Append(copylink);
            }

            if (openLinkInBrowserToolStripMenuItem.Visible)
            {
                Gtk.MenuItem open = new Gtk.MenuItem(openLinkInBrowserToolStripMenuItem.Text);
                open.Show();
                open.Activated += new EventHandler(openLinkInBrowserToolStripMenuItem_Click);
                e.Menu.Append(open);
                Gtk.SeparatorMenuItem separator8 = new Gtk.SeparatorMenuItem();
                separator8.Show();
                e.Menu.Append(separator8);
            }

            // whois items
            if (whoisToolStripMenuItem.Visible)
            {
                Gtk.MenuItem whois = new Gtk.MenuItem(whoisToolStripMenuItem.Text);
                whois.Show();
                whois.Activated += new EventHandler(whoisToolStripMenuItem_Click);
                e.Menu.Append(whois);

                Gtk.MenuItem whowas = new Gtk.MenuItem(whowasToolStripMenuItem.Text);
                whowas.Show();
                whowas.Activated += new EventHandler(whowasToolStripMenuItem_Click);
                e.Menu.Append(whowas);

                if (kickToolStripMenuItem.Visible)
                {
                    Gtk.MenuItem ku = new Gtk.MenuItem(kickToolStripMenuItem.Text);
                    ku.Show();
                    ku.Activated += new EventHandler(kickToolStripMenuItem_Click);
                    e.Menu.Append(ku);
                }

                Gtk.SeparatorMenuItem separator3 = new Gtk.SeparatorMenuItem();
                separator3.Show();
                e.Menu.Append(separator3);
            }

            if (mode1b2ToolStripMenuItem.Visible)
            {
                Gtk.MenuItem mode1 = new Gtk.MenuItem(mode1b2ToolStripMenuItem.Text);
                mode1.Show();
                mode1.Activated += new EventHandler(mode1b2ToolStripMenuItem_Click);
                e.Menu.Append(mode1);

                Gtk.MenuItem mode2 = new Gtk.MenuItem(mode1e2ToolStripMenuItem.Text);
                mode2.Show();
                mode2.Activated += new EventHandler(mode1e2ToolStripMenuItem_Click);
                e.Menu.Append(mode2);

                Gtk.MenuItem mode3 = new Gtk.MenuItem(mode1I2ToolStripMenuItem.Text);
                mode3.Show();
                mode3.Activated += new EventHandler(mode1I2ToolStripMenuItem_Click);
                e.Menu.Append(mode3);

                Gtk.MenuItem mode4 = new Gtk.MenuItem(mode1q2ToolStripMenuItem.Text);
                mode4.Show();
                mode4.Activated += new EventHandler(mode1q2ToolStripMenuItem_Click);
                e.Menu.Append(mode4);

                Gtk.SeparatorMenuItem separator4 = new Gtk.SeparatorMenuItem();
                separator4.Show();
                e.Menu.Append(separator4);
            }

            Gtk.MenuItem clean = new Gtk.MenuItem("Clean");
            clean.Show();
            e.Menu.Append(clean);
            clean.Activated += new EventHandler(mrhToolStripMenuItem_Click);
            Gtk.CheckMenuItem scroll = new Gtk.CheckMenuItem(scrollToolStripMenuItem.Text);
//.........这里部分代码省略.........
开发者ID:JGunning,项目名称:OpenAIM,代码行数:101,代码来源:Menu.cs


注:本文中的Gtk.MenuItem.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。