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


C# Button.ShowAll方法代码示例

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


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

示例1: tacticalProxy

	public tacticalProxy (): base (Gtk.WindowType.Toplevel)
	{
		_reqam = new server_plugin_manager("proxy-request");
		_resam = new server_plugin_manager("proxy-response");
		_cam = new server_plugin_manager("proxy-protocol");
		_p = new http_proxy (8080,_reqam, _resam, _cam);
		_ss.AddSettings (_p.Settings);
		_ss.AddSettings (_cam.Settings);
		_ss.AddSettings (_reqam.Settings);
		_ss.AddSettings (_resam.Settings);
		_p.UriStarted += new http_proxy.ObjDelagate (onUriStarted);
		_p.UriComplete += onUriCompleted;
		this.WidthRequest = 800;
		this.HeightRequest = 600;

		Build ();

		#region Build Toolbar

		toggle_listening = toolbar.create_togglebutton_stock_image("gtk-media-play","Toggle Listening");
		toggle_listening.ShowAll();
		toggle_listening.Toggled += OnMediaPlayAction2Activated;
		toolbar3.add_tool(toggle_listening);

		ToggleButton toggle_record = toolbar.create_togglebutton_stock_image("gtk-media-record","Toggle Capture");
		toggle_record.ShowAll();
		toggle_record.Toggled += OnMediaRecordActionActivated;
		toolbar3.add_tool(toggle_record);

		toolbar3.add_tool(new VSeparator());

		toolbar3.add_tool(new Label("Filters:"));
		_fc = new filter_combo(_fs);
		_fc.Sensitive = false;
		_fc.Changed += filter_changed;
		toolbar3.add_tool(_fc);

		new_filter = toolbar.create_button_stock_image("gtk-add", "Add Filter");
		new_filter.Sensitive = false;
		new_filter.ShowAll();
		new_filter.Clicked += OnFindActionActivated;
		toolbar3.add_tool(new_filter);

		remove_filter = toolbar.create_button_stock_image("gtk-delete","Remove Filter");
		remove_filter.Sensitive = false;
		remove_filter.ShowAll();
		remove_filter.Clicked += delegate(object sender, EventArgs e) {
			_fs.remove_filter(_fc.ActiveText);
		};

		toolbar3.add_tool(remove_filter);

		toolbar3.add_tool(new VSeparator());

		scroll_lock = toolbar.create_togglebutton_stock_image("gtk-goto-bottom", "Scroll Lock");
		scroll_lock.ShowAll();
		scroll_lock.Toggled += delegate(object sender, EventArgs e) {
			proxy_transaction_nodeview1.scroll_lock = scroll_lock.Active;
		};
		scroll_lock.Active = true;
		toolbar3.add_tool(scroll_lock);

		#endregion

		proxy_transaction_nodeview1.add_actions(_reqam.get_actions());
		proxy_transaction_nodeview1.context_changed += delegate(object sender, EventArgs e) {
			scroll_lock.Active = false;
		};
	}
开发者ID:Meticulus,项目名称:tactical,代码行数:69,代码来源:tacticalProxy.cs

示例2: CreateCharacterButton

    protected Widget CreateCharacterButton(ECM.Character character)
    {
        HBox box = new HBox();

        Frame frm = new Frame();
        frm.Shadow = ShadowType.EtchedOut;
        frm.BorderWidth = 3;

        Image img = new Image();
        img.WidthRequest = 64;
        img.HeightRequest = 64;

        if (character.Portrait != null)
            img.Pixbuf = ECM.API.ImageApi.StreamToPixbuf(character.Portrait).ScaleSimple(64, 64, Gdk.InterpType.Bilinear);
        else
            img.Pixbuf = ECM.API.ImageApi.StreamToPixbuf(ECM.Core.NoPortraitJPG).ScaleSimple(64, 64, Gdk.InterpType.Bilinear);

        frm.Add(img);

        box.PackStart(frm, false, false, 3);

        Label text = new Label();
        text.UseMarkup = true;
        text.Markup = string.Format("<span size=\"larger\" weight=\"bold\">{0}</span>\n<span size=\"small\">{1}\n{2:0,0.00} ISK\nLocation: {3}</span>",
                            character.Name, character.Background, character.AccountBalance, character.LastKnownLocation);
        text.Xalign = 0;
        text.Yalign = 0;

        box.PackStart(text, true, true, 0);
        Button btn = new Button(box);

        btn.Name = string.Format("btn{0}", character.ID);
        btn.Clicked += delegate(object sender, EventArgs e)
        {
            ECM.Core.CurrentCharacter = character;
        };

        btn.ShowAll();
        return btn;
    }
开发者ID:SilkyPantsDan,项目名称:ECM,代码行数:40,代码来源:MainWindow.Overview.cs


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