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


C# Notebook.Hide方法代码示例

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


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

示例1: SqlQueryView

		public SqlQueryView ()
		{
			stoppedQueries = new List<object> ();
			MonoDevelop.SourceEditor.Extension.TemplateExtensionNodeLoader.Init ();
			this.UntitledName = string.Concat (AddinCatalog.GetString ("Untitled Sql Script"), ".sql");
			
			vbox = new VBox (false, 6);
			vbox.BorderWidth = 6;
			
			Toolbar toolbar = new Toolbar ();
			toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
			
			buttonExecute = new ToolButton (ImageService.GetImage ("md-db-execute", IconSize.SmallToolbar),
			                                AddinCatalog.GetString ("_Execute"));
			buttonExecute.Label = AddinCatalog.GetString ("Execute");
			buttonExecute.Sensitive = false;
			buttonExecute.TooltipMarkup = AddinCatalog.GetString ("Execute Query");
			buttonExecute.IsImportant = true;
			buttonExecute.Clicked += new EventHandler (ExecuteClicked);

			buttonStop = new ToolButton ("gtk-stop");
			buttonStop.TooltipText = AddinCatalog.GetString ("Stop Query Execution");
			buttonStop.Sensitive = false;
			buttonStop.Clicked += new EventHandler (StopClicked);
			
			buttonClear = new ToolButton (ImageService.GetImage ("gtk-clear", IconSize.Button), 
			                              AddinCatalog.GetString ("Clear Results"));
			buttonClear.TooltipText = AddinCatalog.GetString ("Clear Results");
			buttonClear.Clicked += new EventHandler (ClearClicked);
			
			comboConnections = new DatabaseConnectionContextComboBox ();
			selectedConnection = comboConnections.DatabaseConnection;
			comboConnections.Changed += new EventHandler (ConnectionChanged);
			ToolItem comboItem = new ToolItem ();
			comboItem.Child = comboConnections;
			
			toolbar.Add (buttonExecute);
			toolbar.Add (buttonStop);
			toolbar.Add (buttonClear);
			toolbar.Add (new SeparatorToolItem ());
			toolbar.Add (comboItem);
			
			pane = new VPaned ();

			// Sql History Window
			ScrolledWindow windowHistory = new ScrolledWindow ();
			history = new SqlEditorWidget ();
			history.Editable = false;
			windowHistory.AddWithViewport (history);
			
			// Status of the Last Query
			ScrolledWindow windowStatus = new ScrolledWindow ();
			status = new TextView ();
			windowStatus.Add (status);
			
			notebook = new Notebook ();
			notebook.AppendPage (windowStatus, new Label (AddinCatalog.GetString ("Status")));
			notebook.AppendPage (windowHistory, new Label (AddinCatalog.GetString ("Query History")));
			
			pane.Pack2 (notebook, true, true);
			vbox.PackStart (toolbar, false, true, 0);
			vbox.PackStart (pane, true, true, 0);
			this.Document.TextReplaced += SqlChanged;
			vbox.ShowAll ();
			Document.DocumentUpdated += delegate (object sender, EventArgs args) {
				// Default mime type or a provider defined.
				if (selectedConnection == null)
					Document.MimeType = "text/x-sql";
				else 
					Document.MimeType = GetMimeType ();
				
			};
			notebook.Hide ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:74,代码来源:SqlQueryView.cs

示例2: SqlQueryView

		public SqlQueryView ()
		{
			stoppedQueries = new List<object> ();
			
			vbox = new VBox (false, 6);
			vbox.BorderWidth = 6;

			sqlEditor = new SqlEditorWidget ();
			sqlEditor.TextChanged += new EventHandler (SqlChanged);
			
			Toolbar toolbar = new Toolbar ();
			toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
			
			buttonExecute = new ToolButton (
				Services.Resources.GetImage ("md-db-execute", IconSize.SmallToolbar),
				GettextCatalog.GetString ("Execute")
			);
			buttonStop = new ToolButton ("gtk-stop");
			buttonClear = new ToolButton (Services.Resources.GetImage ("gtk-clear", IconSize.Button), GettextCatalog.GetString ("Clear Results"));
			buttonStop.Sensitive = false;
			buttonExecute.Sensitive = false;
			
			buttonExecute.Clicked += new EventHandler (ExecuteClicked);
			buttonStop.Clicked += new EventHandler (StopClicked);
			buttonClear.Clicked += new EventHandler (ClearClicked);
			
			comboConnections = new DatabaseConnectionContextComboBox ();
			selectedConnection = comboConnections.DatabaseConnection;
			comboConnections.Changed += new EventHandler (ConnectionChanged);

			buttonExecute.IsImportant = true;
			
			ToolItem comboItem = new ToolItem ();
			comboItem.Child = comboConnections;
			
			toolbar.Add (buttonExecute);
			toolbar.Add (buttonStop);
			toolbar.Add (buttonClear);
			toolbar.Add (new SeparatorToolItem ());
			toolbar.Add (comboItem);
			
			pane = new VPaned ();

			ScrolledWindow windowStatus = new ScrolledWindow ();
			status = new TextView ();
			windowStatus.Add (status);
			
			notebook = new Notebook ();
			notebook.AppendPage (windowStatus, new Label (GettextCatalog.GetString ("Status")));
			
			pane.Pack1 (sqlEditor, true, true);
			pane.Pack2 (notebook, true, true);
			
			vbox.PackStart (toolbar, false, true, 0);
			vbox.PackStart (pane, true, true, 0);
			
			vbox.ShowAll ();
			notebook.Hide ();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:59,代码来源:SqlQueryView.cs


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