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


C# IPadWindow.GetToolbar方法代码示例

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


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

示例1: Button

		void IPadContent.Initialize (IPadWindow window)
		{
			this.window = window;
			window.Icon = icon;
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Right);

			buttonStop = new Button (new Gtk.Image ("gtk-stop", IconSize.Menu));
			buttonStop.Clicked += new EventHandler (OnButtonStopClick);
			buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
			toolbar.Add (buttonStop);

			buttonClear = new Button (new Gtk.Image ("gtk-clear", IconSize.Menu));
			buttonClear.Clicked += new EventHandler (OnButtonClearClick);
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear console");
			toolbar.Add (buttonClear);

			buttonPin = new ToggleButton ();
			buttonPin.Image = new Gtk.Image ((IconId)"md-pin-up", IconSize.Menu);
			buttonPin.Image.ShowAll ();
			buttonPin.Clicked += new EventHandler (OnButtonPinClick);
			buttonPin.TooltipText = GettextCatalog.GetString ("Pin output pad");
			toolbar.Add (buttonPin);
			toolbar.ShowAll ();
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:25,代码来源:DefaultMonitorPad.cs

示例2: Initialize

		public override void Initialize (IPadWindow container)
		{
			base.Initialize (container);
			toolbarProvider.Attach (container.GetToolbar (Gtk.PositionType.Top));
			grid.SetToolbarProvider (toolbarProvider);
			this.container = container;
		}
开发者ID:awatertree,项目名称:monodevelop,代码行数:7,代码来源:PropertyPad.cs

示例3: Initialize

		public override void Initialize (IPadWindow window)
		{
			base.Initialize(window);

			// Call ctors
			inputEditor = new TextEditor() { Name = "input", Events = Gdk.EventMask.AllEventsMask, HeightRequest = 80 };
			editor = new TextEditor() { Name = "output", Events = Gdk.EventMask.AllEventsMask };
			vpaned = new Gtk.VPaned();
			var scr1 = new Gtk.ScrolledWindow();
			var scr2 = new Gtk.ScrolledWindow();

			// Init layout
			scr1.ShadowType = Gtk.ShadowType.In;
			scr1.Child = inputEditor;
			vpaned.Add1(scr1);
			scr1.ShowAll();
			inputEditor.ShowAll();

			scr2.ShadowType = Gtk.ShadowType.In;
			scr2.Child = editor;
			vpaned.Add2(scr2);
			scr2.ShowAll();
			editor.ShowAll();

			vpaned.ShowAll();

			// Init editors
			var o = editor.Options;
			inputEditor.Options = o;
			o.ShowLineNumberMargin = false;
			o.ShowFoldMargin = false;
			o.ShowIconMargin = false;

			editor.Document.ReadOnly = true;
			inputEditor.Text = PropertyService.Get(lastInputStringPropId, string.Empty);
			editor.Text = string.Empty;
			editor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			inputEditor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			editor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
			inputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;

			// Init toolbar
			var tb = window.GetToolbar(Gtk.PositionType.Top);

			executeButton = new Gtk.Button();
			executeButton.Image = new Gtk.Image(Gtk.Stock.Execute, Gtk.IconSize.Menu);
			executeButton.TooltipText = "Evaluates the expression typed in the upper input editor.";
			executeButton.Clicked += Execute;
			tb.Add(executeButton);

			abortButton = new Gtk.Button();
			abortButton.Sensitive = false;
			abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
			abortButton.TooltipText = "Stops the evaluation.";
			abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
			tb.Add(abortButton);

			tb.ShowAll();
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:59,代码来源:ExpressionEvaluationWidget.cs

示例4: Initialize

		protected override void Initialize (IPadWindow container)
		{
			base.Initialize (container);
			toolbarProvider.Attach (container.GetToolbar (DockPositionType.Top));
			grid.SetToolbarProvider (toolbarProvider);
			this.container = container;
			DesignerSupport.Service.SetPad (this);
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:8,代码来源:PropertyPad.cs

示例5: CreateToolbar

		void CreateToolbar (IPadWindow window)
		{
			toolbarWidget = new PackageConsoleToolbarWidget ();
			toolbarWidget.ClearButtonClicked += ClearButtonClicked;
			DockItemToolbar toolbar = window.GetToolbar (Gtk.PositionType.Top);
			toolbar.Add (toolbarWidget, false);
			toolbar.ShowAll ();
		}
开发者ID:modulexcite,项目名称:monodevelop-nuget-extensions,代码行数:8,代码来源:PackageConsolePad.cs

示例6: Initialize

		protected override void Initialize (IPadWindow window)
		{
			base.Initialize (window);
			IdeApp.Workbench.ActiveDocumentChanged += DocumentChangedHandler;
			CurrentDoc = IdeApp.Workbench.ActiveDocument;
			toolbar = window.GetToolbar (DockPositionType.Top);
			toolbar.Visible = false;
			Update ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:9,代码来源:DocumentOutlinePad.cs

示例7: Initialize

        public void Initialize(IPadWindow window)
        {
            var toolBar = window.GetToolbar(Gtk.PositionType.Top);
            CommandToolButton button = new CommandToolButton(TFSCommands.ConnectToServer, IdeApp.CommandService) { StockId = Gtk.Stock.Add };
            toolBar.Add(button);
            _treeView.Columns.Add(new ListViewColumn(string.Empty, new TextCellView(_name)));
            _treeView.DataSource = _treeStore;
            _content.PackStart(_treeView, true, true);
            UpdateData();

            onServersChanged = DispatchService.GuiDispatch<System.Action>(UpdateData);
            TFSVersionControlService.Instance.OnServersChange += onServersChanged;

            _treeView.RowActivated += OnRowClicked;
        }
开发者ID:Indomitable,项目名称:monodevelop-tfs-addin,代码行数:15,代码来源:TeamExplorerPad.cs

示例8: ClassBrowserPadWidget

		public ClassBrowserPadWidget (ExtensibleTreeView treeView, IPadWindow window)
		{
			this.treeView = treeView;
			
			DockItemToolbar searchBox = window.GetToolbar (PositionType.Top);
			
			searchEntry = new Entry ();
			searchBox.Add (searchEntry, true);
			buttonSearch = new Button (new Gtk.Image (Gtk.Stock.Find, IconSize.Menu));
			buttonSearch.Relief = ReliefStyle.None;
			buttonCancelSearch = new Button (new Gtk.Image (Gtk.Stock.Stop, IconSize.Menu));
			buttonCancelSearch.Relief = ReliefStyle.None;
			searchBox.Add (buttonSearch);
			searchBox.Add (buttonCancelSearch);
			searchBox.ShowAll ();
			
			notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			this.PackEnd (notebook, true, true, 0);
			
			notebook.AppendPage (treeView, null);
			ScrolledWindow scrolledWindow = new ScrolledWindow ();
			scrolledWindow.Add (searchResultsTreeView);
			notebook.AppendPage (scrolledWindow, null);
			
			list = new ListStore (new Type[] {
				typeof (Pixbuf),
				typeof (string),
				typeof (IType)
			});
			model = new TreeModelSort (list);
			searchResultsTreeView.Model = model;
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererPixbuf (), "pixbuf", 0);
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererText (), "text", 1);
			searchResultsTreeView.HeadersVisible = false;
			searchResultsTreeView.RowActivated += SearchRowActivated;
			IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
			IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;
					
			this.searchEntry.Changed += SearchEntryChanged;
			this.buttonCancelSearch.Clicked += CancelSearchClicked;
			this.searchEntry.Activated += SearchClicked;
			this.searchEntry.KeyPressEvent += SearchEntryKeyPressEvent;
			this.buttonSearch.Clicked += SearchClicked;
			
			this.ShowAll ();
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:48,代码来源:ClassBrowserPadWidget.cs

示例9: Initialize

		public void Initialize (IPadWindow container)
		{
			view = new ConsoleView ();
			view.ConsoleInput += OnViewConsoleInput;
			Pango.FontDescription font = Pango.FontDescription.FromString (DesktopService.DefaultMonospaceFont);
			font.Size = (font.Size * 8) / 10;
			view.SetFont (font);
			view.ShadowType = Gtk.ShadowType.None;
			view.ShowAll ();
			
			DockItemToolbar toolbar = container.GetToolbar (Gtk.PositionType.Right);
			DockToolButton buttonClear = new DockToolButton ("gtk-clear");
			buttonClear.Clicked += ButtonClearClicked;
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear");
			toolbar.Add (buttonClear);
			toolbar.ShowAll ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:17,代码来源:ImmediatePad.cs

示例10: Initialize

		public override void Initialize(IPadWindow pad)
		{
			base.Initialize(pad);

			// Init editor
			outputEditor = new TextEditor();
			outputEditor.Events = Gdk.EventMask.AllEventsMask;
			outputEditor.Name = "outputEditor";
			outputEditor.TabsToSpaces = false;
			
			scrolledWindow = new Gtk.ScrolledWindow();
			scrolledWindow.Child = outputEditor;
			scrolledWindow.ShadowType = Gtk.ShadowType.In;
			scrolledWindow.ShowAll();
			outputEditor.ShowAll();

			var o = outputEditor.Options;
			outputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
			o.ShowLineNumberMargin = false;
			o.ShowFoldMargin = false;
			o.ShowIconMargin = false;
			outputEditor.Document.ReadOnly = true;


			// Init toolbar
			var tb = pad.GetToolbar(Gtk.PositionType.Top);

			var ch = new Gtk.ToggleButton();
			ch.Image = new Gtk.Image(Gtk.Stock.Refresh, Gtk.IconSize.Menu);
			ch.Active = EnableCaretTracking;
			ch.TooltipText = "Toggle automatic update after the caret has been moved.";
			ch.Toggled += (object s, EventArgs ea) => EnableCaretTracking = ch.Active;
			tb.Add(ch);

			abortButton = new Gtk.Button();
			abortButton.Sensitive = false;
			abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
			abortButton.TooltipText = "Stops the evaluation.";
			abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
			tb.Add(abortButton);

			tb.ShowAll();
			Instance = this;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:44,代码来源:MixinInsightPad.cs

示例11: MonoDroidDeviceLog

		public MonoDroidDeviceLog (IPadWindow container)
		{
			Stetic.BinContainer.Attach (this);
			DockItemToolbar toolbar = container.GetToolbar (PositionType.Top);
			
			var chooseDeviceButton = new Button () {
				Label = GettextCatalog.GetString ("Choose Device"),
			};
			deviceLabel = new Label () {
				Xalign = 0,
			};
			SetDeviceLabel ();
			var reconnectButton = new Button () {
				Label = GettextCatalog.GetString ("Reconnect"),
			};
			
			toolbar.Add (deviceLabel);
			toolbar.Add (chooseDeviceButton);
			toolbar.Add (reconnectButton);
			
			reconnectButton.Clicked += delegate {
				Disconnect ();
				if (Device != null)
					Connect ();
				else
					SetDeviceLabel ();
			};
			chooseDeviceButton.Clicked += delegate {
				Device = MonoDroidUtility.ChooseDevice (null);
			};
			
			log = new LogView ();
			this.Add (log);
			
			toolbar.ShowAll ();
			ShowAll ();
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:37,代码来源:MonoDroidDeviceConsole.cs

示例12: Initialize

		protected override void Initialize (IPadWindow window)
		{
			window.Icon = icon;
			
			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Right);

			buttonStop = new Button (new ImageView (Stock.Stop, IconSize.Menu));
			buttonStop.Clicked += new EventHandler (OnButtonStopClick);
			buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
			toolbar.Add (buttonStop);

			buttonClear = new Button (new ImageView (Stock.Broom, IconSize.Menu));
			buttonClear.Clicked += new EventHandler (OnButtonClearClick);
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear console");
			toolbar.Add (buttonClear);

			buttonPin = new ToggleButton ();
			buttonPin.Image = new ImageView (Stock.PinUp, IconSize.Menu);
			buttonPin.Image.ShowAll ();
			buttonPin.Clicked += new EventHandler (OnButtonPinClick);
			buttonPin.TooltipText = GettextCatalog.GetString ("Pin output pad");
			toolbar.Add (buttonPin);
			toolbar.ShowAll ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:24,代码来源:DefaultMonitorPad.cs

示例13: ToggleButton

		void IPadContent.Initialize (IPadWindow window)
		{
			this.window = window;
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			
			buttonSuccess = new ToggleButton ();
			buttonSuccess.Label = GettextCatalog.GetString ("Successful Tests");
			buttonSuccess.Active = false;
			buttonSuccess.Image = new ImageView (TestStatusIcon.Success);
			buttonSuccess.Image.Show ();
			buttonSuccess.Toggled += new EventHandler (OnShowSuccessfulToggled);
			buttonSuccess.TooltipText = GettextCatalog.GetString ("Show Successful Tests");
			toolbar.Add (buttonSuccess);

			buttonInconclusive = new ToggleButton ();
			buttonInconclusive.Label = GettextCatalog.GetString ("Inconclusive Tests");
			buttonInconclusive.Active = true;
			buttonInconclusive.Image = new ImageView (TestStatusIcon.Inconclusive);
			buttonInconclusive.Image.Show ();
			buttonInconclusive.Toggled += new EventHandler (OnShowInconclusiveToggled);
			buttonInconclusive.TooltipText = GettextCatalog.GetString ("Show Inconclusive Tests");
			toolbar.Add (buttonInconclusive);
			
			buttonFailures = new ToggleButton ();
			buttonFailures.Label = GettextCatalog.GetString ("Failed Tests");
			buttonFailures.Active = true;
			buttonFailures.Image = new ImageView (TestStatusIcon.Failure);
			buttonFailures.Image.Show ();
			buttonFailures.Toggled += new EventHandler (OnShowFailuresToggled);
			buttonFailures.TooltipText = GettextCatalog.GetString ("Show Failed Tests");
			toolbar.Add (buttonFailures);

			buttonIgnored = new ToggleButton ();
			buttonIgnored.Label = GettextCatalog.GetString ("Ignored Tests");
			buttonIgnored.Active = true;
			buttonIgnored.Image = new ImageView (TestStatusIcon.NotRun);
			buttonIgnored.Image.Show ();
			buttonIgnored.Toggled += new EventHandler (OnShowIgnoredToggled);
			buttonIgnored.TooltipText = GettextCatalog.GetString ("Show Ignored Tests");
			toolbar.Add (buttonIgnored);
			
			buttonOutput = new ToggleButton ();
			buttonOutput.Label = GettextCatalog.GetString ("Output");
			buttonOutput.Active = false;
			buttonOutput.Image = ImageService.GetImage (MonoDevelop.Ide.Gui.Stock.OutputIcon, IconSize.Menu);
			buttonOutput.Image.Show ();
			buttonOutput.Toggled += new EventHandler (OnShowOutputToggled);
			buttonOutput.TooltipText = GettextCatalog.GetString ("Show Output");
			toolbar.Add (buttonOutput);
			
			toolbar.Add (new SeparatorToolItem ());
			
			buttonRun = new Button ();
			buttonRun.Label = GettextCatalog.GetString ("Rerun Tests");
			buttonRun.Image = new Gtk.Image (Gtk.Stock.Execute, IconSize.Menu);
			buttonRun.Image.Show ();
			buttonRun.Sensitive = false;
			toolbar.Add (buttonRun);
			
			buttonStop = new Button (new Gtk.Image (Ide.Gui.Stock.Stop, Gtk.IconSize.Menu));
			toolbar.Add (buttonStop);
			toolbar.ShowAll ();
			
			buttonStop.Clicked += new EventHandler (OnStopClicked);
			buttonRun.Clicked += new EventHandler (OnRunClicked);
			
			// Run panel
			
			DockItemToolbar runPanel = window.GetToolbar (PositionType.Bottom);
			
			infoSep = new VSeparator ();
			
			resultLabel.UseMarkup = true;
			infoCurrent.Ellipsize = Pango.EllipsizeMode.Start;
			infoCurrent.WidthRequest = 0;
			runPanel.Add (resultLabel);
			runPanel.Add (progressBar);
			runPanel.Add (infoCurrent, true, 10);	
			
			labels = new HBox (false, 10);
			
			infoLabel.UseMarkup = true;

			labels.PackStart (infoLabel, true, false, 0);

			runPanel.Add (new Gtk.Label (), true);
			runPanel.Add (labels);
			runPanel.Add (infoSep, false, 10);
			
			progressBar.HeightRequest = infoLabel.SizeRequest ().Height;
			runPanel.ShowAll ();
			resultSummary = new UnitTestResult ();
			UpdateCounters ();
		}
开发者ID:brantwedel,项目名称:monodevelop,代码行数:95,代码来源:TestResultsPad.cs

示例14: ToggleButton

		void IPadContent.Initialize (IPadWindow window)
		{
			window.Title = GettextCatalog.GetString ("Errors");

			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			
			errorBtn = new ToggleButton ();
			errorBtn.Active = (bool)PropertyService.Get (showErrorsPropertyName, true);
			errorBtn.Image = new Gtk.Image (Stock.Error, Gtk.IconSize.Menu);
			errorBtn.Image.Show ();
			errorBtn.Toggled += new EventHandler (FilterChanged);
			errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors");
			UpdateErrorsNum();
			toolbar.Add (errorBtn);
			
			warnBtn = new ToggleButton ();
			warnBtn.Active = (bool)PropertyService.Get (showWarningsPropertyName, true);
			warnBtn.Image = new Gtk.Image (Stock.Warning, Gtk.IconSize.Menu);
			warnBtn.Image.Show ();
			warnBtn.Toggled += new EventHandler (FilterChanged);
			warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings");
			UpdateWarningsNum();
			toolbar.Add (warnBtn);
			
			msgBtn = new ToggleButton ();
			msgBtn.Active = (bool)PropertyService.Get (showMessagesPropertyName, true);
			msgBtn.Image = new Gtk.Image (Gtk.Stock.DialogInfo, Gtk.IconSize.Menu);
			msgBtn.Image.Show ();
			msgBtn.Toggled += new EventHandler (FilterChanged);
			msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages");
			UpdateMessagesNum();
			toolbar.Add (msgBtn);
			
			toolbar.Add (new SeparatorToolItem ());
			
			logBtn = new ToggleButton ();
			logBtn.Label = GettextCatalog.GetString ("Build Output");
			logBtn.Image = ImageService.GetImage ("md-message-log", Gtk.IconSize.Menu);
			logBtn.Image.Show ();
			logBtn.TooltipText = GettextCatalog.GetString ("Show build output");
			logBtn.Toggled += HandleLogBtnToggled;
			toolbar.Add (logBtn);
			
			toolbar.ShowAll ();
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:45,代码来源:ErrorListPad.cs

示例15: Initialize

		protected override void Initialize (IPadWindow window)
		{
			window.Title = GettextCatalog.GetString ("Errors");

			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Top);
			
			errorBtn = new ToggleButton { Name = "toggleErrors" };
			errorBtn.Active = ShowErrors;
			errorBtn.Image = new Gtk.Image (Stock.Error, Gtk.IconSize.Menu);
			errorBtn.Image.Show ();
			errorBtn.Toggled += new EventHandler (FilterChanged);
			errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors");
			UpdateErrorsNum();
			toolbar.Add (errorBtn);
			
			warnBtn = new ToggleButton  { Name = "toggleWarnings" };
			warnBtn.Active = ShowWarnings;
			warnBtn.Image = new Gtk.Image (Stock.Warning, Gtk.IconSize.Menu);
			warnBtn.Image.Show ();
			warnBtn.Toggled += new EventHandler (FilterChanged);
			warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings");
			UpdateWarningsNum();
			toolbar.Add (warnBtn);

			msgBtn = new ToggleButton  { Name = "toggleMessages" };
			msgBtn.Active = ShowMessages;
			msgBtn.Image = new Gtk.Image (Stock.Information, Gtk.IconSize.Menu);
			msgBtn.Image.Show ();
			msgBtn.Toggled += new EventHandler (FilterChanged);
			msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages");
			UpdateMessagesNum();
			toolbar.Add (msgBtn);
			
			toolbar.Add (new SeparatorToolItem ());
			
			logBtn = new ToggleButton { Name = "toggleBuildOutput" };
			logBtn.Label = GettextCatalog.GetString ("Build Output");
			logBtn.Image = ImageService.GetImage ("md-message-log", Gtk.IconSize.Menu);
			logBtn.Image.Show ();
			logBtn.TooltipText = GettextCatalog.GetString ("Show build output");
			logBtn.Toggled += HandleLogBtnToggled;
			toolbar.Add (logBtn);

			//Dummy widget to take all space between "Build Output" button and SearchEntry
			toolbar.Add (new HBox (), true);

			searchEntry = new SearchEntry ();
			searchEntry.Entry.Changed += searchPatternChanged;
			searchEntry.WidthRequest = 200;
			searchEntry.Visible = true;
			toolbar.Add (searchEntry);

			toolbar.ShowAll ();

			UpdatePadIcon ();
		}
开发者ID:ArsenShnurkov,项目名称:monodevelop,代码行数:56,代码来源:ErrorListPad.cs


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