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


C# VBox.Hide方法代码示例

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


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

示例1: Initialize


//.........这里部分代码省略.........
			sw.Add (detailsTree);
			tf.Add (sw);
			tf.ShowAll ();
			
			TestSummaryPage = infoBook.AddPage (GettextCatalog.GetString ("Summary"), tf);
			
			// Info - Regressions list
			
			tf = new Frame ();
			sw = new ScrolledWindow ();
			tf.Add (sw);
			regressionTree = new TreeView ();
			regressionTree.HeadersVisible = false;
			regressionTree.RulesHint = true;
			regressionStore = new ListStore (typeof(object), typeof(string), typeof (Pixbuf));
			
			CellRendererText trtest2 = new CellRendererText ();
			var pr = new CellRendererPixbuf ();
			
			TreeViewColumn col = new TreeViewColumn ();
			col.PackStart (pr, false);
			col.AddAttribute (pr, "pixbuf", 2);
			col.PackStart (trtest2, false);
			col.AddAttribute (trtest2, "markup", 1);
			regressionTree.AppendColumn (col);
			regressionTree.Model = regressionStore;
			sw.Add (regressionTree);
			tf.ShowAll ();
			
			TestRegressionsPage = infoBook.AddPage (GettextCatalog.GetString ("Regressions"), tf);
			
			// Info - Failed tests list
			
			tf = new Frame ();
			sw = new ScrolledWindow ();
			tf.Add (sw);
			failedTree = new TreeView ();
			failedTree.HeadersVisible = false;
			failedTree.RulesHint = true;
			failedStore = new ListStore (typeof(object), typeof(string), typeof (Pixbuf));
			
			trtest2 = new CellRendererText ();
			pr = new CellRendererPixbuf ();
			
			col = new TreeViewColumn ();
			col.PackStart (pr, false);
			col.AddAttribute (pr, "pixbuf", 2);
			col.PackStart (trtest2, false);
			col.AddAttribute (trtest2, "markup", 1);
			failedTree.AppendColumn (col);
			failedTree.Model = failedStore;
			sw.Add (failedTree);
			tf.ShowAll ();
			
			TestFailuresPage = infoBook.AddPage (GettextCatalog.GetString ("Failed tests"), tf);
			
			// Info - results
			
			tf = new Frame ();
			sw = new ScrolledWindow ();
			tf.Add (sw);
			resultView = new TextView ();
			resultView.Editable = false;
			sw.Add (resultView);
			tf.ShowAll ();
			TestResultPage = infoBook.AddPage (GettextCatalog.GetString ("Result"), tf);
			
			// Info - Output
			
			tf = new Frame ();
			sw = new ScrolledWindow ();
			tf.Add (sw);
			outputView = new TextView ();
			outputView.Editable = false;
			sw.Add (outputView);
			tf.ShowAll ();
			TestOutputPage = infoBook.AddPage (GettextCatalog.GetString ("Output"), tf);
			
			panedDetails.Pack2 (infoBook, true, true);
			detailsPad.PackStart (panedDetails, true, true, 0);
			paned.Pack2 (detailsPad, true, true);
			
			paned.ShowAll ();
			
			infoBook.HidePage (TestResultPage);
			infoBook.HidePage (TestOutputPage);
			infoBook.HidePage (TestSummaryPage);
			infoBook.HidePage (TestRegressionsPage);
			infoBook.HidePage (TestFailuresPage);
			
			detailsPad.Sensitive = false;
			detailsPad.Hide ();
			
			detailsTree.RowActivated += new Gtk.RowActivatedHandler (OnTestActivated);
			regressionTree.RowActivated += new Gtk.RowActivatedHandler (OnRegressionTestActivated);
			failedTree.RowActivated += new Gtk.RowActivatedHandler (OnFailedTestActivated);
			
			foreach (UnitTest t in testService.RootTests)
				TreeView.AddChild (t);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:101,代码来源:TestPad.cs

示例2: MakeTemplateBar

		private Gtk.Box MakeTemplateBar ()
		{
			// TODO: Move these to static area
			Tag template_tag = TagManager.GetOrCreateSystemTag (TagManager.TemplateNoteSystemTag);
			Tag template_save_size_tag = TagManager.GetOrCreateSystemTag (TagManager.TemplateNoteSaveSizeSystemTag);
			Tag template_save_selection_tag = TagManager.GetOrCreateSystemTag (TagManager.TemplateNoteSaveSelectionSystemTag);
			Tag template_save_title_tag = TagManager.GetOrCreateSystemTag (TagManager.TemplateNoteSaveTitleSystemTag);

			var bar = new Gtk.VBox ();

			var infoLabel  = new Gtk.Label (Catalog.GetString ("This note is a template note. It determines " +
			                                                   "the default content of regular notes, and will " +
			                                                   "not show up in the note menu or search window."));
			infoLabel.Wrap = true;

			var untemplateButton = new Gtk.Button ();
			untemplateButton.Label = Catalog.GetString ("Convert to regular note");
			untemplateButton.Clicked += (o, e) => {
				note.RemoveTag (template_tag);
			};

			var saveSizeCheckbutton = new Gtk.CheckButton (Catalog.GetString ("Save Si_ze"));
			saveSizeCheckbutton.Active = note.ContainsTag (template_save_size_tag);
			saveSizeCheckbutton.Toggled += (o, e) => {
				if (saveSizeCheckbutton.Active)
					note.AddTag (template_save_size_tag);
				else
					note.RemoveTag (template_save_size_tag);
			};

			var saveSelectionCheckbutton = new Gtk.CheckButton (Catalog.GetString ("Save Se_lection"));
			saveSelectionCheckbutton.Active = note.ContainsTag (template_save_selection_tag);
			saveSelectionCheckbutton.Toggled += (o, e) => {
				if (saveSelectionCheckbutton.Active)
					note.AddTag (template_save_selection_tag);
				else
					note.RemoveTag (template_save_selection_tag);
			};
			
			var saveTitleCheckbutton = new Gtk.CheckButton (Catalog.GetString ("Save _Title"));
			saveTitleCheckbutton.Active = note.ContainsTag (template_save_title_tag);
			saveTitleCheckbutton.Toggled += (o, e) => {
				if (saveTitleCheckbutton.Active)
					note.AddTag (template_save_title_tag);
				else
					note.RemoveTag (template_save_title_tag);
			};

			bar.PackStart (infoLabel, true, true, 0);
			bar.PackStart (untemplateButton, true, true, 0);
			bar.PackStart (saveSizeCheckbutton, true, true, 0);
			bar.PackStart (saveSelectionCheckbutton, true, true, 0);
			bar.PackStart (saveTitleCheckbutton, true, true, 0);

			if (note.ContainsTag (template_tag))
				bar.ShowAll ();

			note.TagAdded += delegate (Note taggedNote, Tag tag) {
				if (taggedNote == note && tag == template_tag)
					bar.ShowAll ();
			};

			note.TagRemoved += delegate (Note taggedNote, string tag) {
				if (taggedNote == note && tag == template_tag.NormalizedName)
					bar.Hide ();
			};

			return bar;
		}
开发者ID:MatteoNardi,项目名称:Tomboy,代码行数:69,代码来源:NoteWindow.cs


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