本文整理汇总了C#中Gtk.Widget.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Widget.Hide方法的具体用法?C# Widget.Hide怎么用?C# Widget.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Widget
的用法示例。
在下文中一共展示了Widget.Hide方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestResultsPad
public TestResultsPad ()
{
testService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
panel = new VBox ();
// Results notebook
book = new HPaned ();
panel.PackStart (book, true, true, 0);
panel.FocusChain = new Gtk.Widget [] { book };
// Failures tree
failuresTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView ();
failuresTreeView.HeadersVisible = false;
failuresStore = new TreeStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object), typeof(string), typeof(int));
var pr = new CellRendererImage ();
CellRendererText tr = new CellRendererText ();
TreeViewColumn col = new TreeViewColumn ();
col.PackStart (pr, false);
col.AddAttribute (pr, "image", 0);
col.PackStart (tr, false);
col.AddAttribute (tr, "markup", 1);
failuresTreeView.AppendColumn (col);
failuresTreeView.Model = failuresStore;
var sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (failuresTreeView);
book.Pack1 (sw, true, true);
outputView = new MonoDevelop.Ide.Gui.Components.LogView.LogTextView ();
outputView.Editable = false;
bold = new TextTag ("bold");
bold.Weight = Pango.Weight.Bold;
outputView.Buffer.TagTable.Add (bold);
sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (outputView);
book.Pack2 (sw, true, true);
outputViewScrolled = sw;
failuresTreeView.RowActivated += OnRowActivated;
failuresTreeView.Selection.Changed += OnRowSelected;
failuresTreeView.DoPopupMenu = delegate (EventButton evt) {
IdeApp.CommandService.ShowContextMenu (failuresTreeView, evt,
"/MonoDevelop/NUnit/ContextMenu/TestResultsPad");
};
Control.ShowAll ();
outputViewScrolled.Hide ();
}
示例2: TestResultsPad
//.........这里部分代码省略.........
buttonFailures.Active = true;
buttonFailures.IconWidget = new Gtk.Image (CircleImage.Failure);
buttonFailures.IsImportant = true;
buttonFailures.Toggled += new EventHandler (OnShowFailuresToggled);
buttonFailures.SetTooltip (tips, "Show Failed Tests", "Show Failed Tests");
toolbar.Insert (buttonFailures, -1);
buttonIgnored = new ToggleToolButton ();
buttonIgnored.Label = "Ignored Tests";
buttonIgnored.Active = true;
buttonIgnored.IconWidget = new Gtk.Image (CircleImage.NotRun);
buttonIgnored.Toggled += new EventHandler (OnShowIgnoredToggled);
buttonIgnored.IsImportant = true;
buttonIgnored.SetTooltip (tips, "Show Ignored Tests", "Show Ignored Tests");
toolbar.Insert (buttonIgnored, -1);
buttonOutput = new ToggleToolButton ();
buttonOutput.Label = "Output";
buttonOutput.Active = false;
buttonOutput.IconWidget = Runtime.Gui.Resources.GetImage (MonoDevelop.Gui.Stock.OutputIcon, IconSize.SmallToolbar);
buttonOutput.Toggled += new EventHandler (OnShowOutputToggled);
buttonOutput.IsImportant = true;
buttonOutput.SetTooltip (tips, "Show Output", "Show Output");
toolbar.Insert (buttonOutput, -1);
toolbar.Insert (new SeparatorToolItem (), -1);
buttonStop = new ToolButton ("gtk-stop");
toolbar.Insert (buttonStop, -1);
toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
toolbar.ShowArrow = false;
// Results notebook
book = new HPaned ();
panel.PackStart (book, true, true, 0);
// Failures tree
failuresTreeView = new TreeView ();
failuresTreeView.HeadersVisible = false;
failuresStore = new TreeStore (typeof(Pixbuf), typeof (string), typeof(object));
CellRendererPixbuf pr = new CellRendererPixbuf ();
CellRendererText tr = new CellRendererText ();
TreeViewColumn col = new TreeViewColumn ();
col.PackStart (pr, false);
col.AddAttribute (pr, "pixbuf", 0);
col.PackStart (tr, false);
col.AddAttribute (tr, "markup", 1);
failuresTreeView.AppendColumn (col);
failuresTreeView.Model = failuresStore;
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
sw.Add(failuresTreeView);
Frame frame = new Frame ();
frame.Add (sw);
book.Pack1 (frame, true, true);
outputView = new TextView();
outputView.Editable = false;
sw = new Gtk.ScrolledWindow ();
sw.Add(outputView);
frame = new Frame ();
frame.Add (sw);
book.Pack2 (frame, true, true);
outputViewScrolled = frame;
// Run panel
HBox runPanel = new HBox ();
runPanel.BorderWidth = 5;
infoSep = new VSeparator ();
resultLabel.UseMarkup = true;
runPanel.PackStart (resultLabel, false, false, 0);
runPanel.PackStart (progressBar, false, false, 0);
runPanel.PackStart (infoCurrent, true, true, 10);
labels = new HBox (false, 10);
infoFailed.UseMarkup = true;
infoIgnored.UseMarkup = true;
labels.PackStart (infoFailed, true, false, 0);
labels.PackStart (infoIgnored, true, false, 0);
runPanel.PackEnd (labels, false, false, 0);
runPanel.PackEnd (infoSep, false, false, 10);
panel.PackStart (runPanel, false, false, 0);
progressBar.HeightRequest = infoFailed.SizeRequest().Height;
buttonStop.Clicked += new EventHandler (OnStopClicked);
failuresTreeView.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (OnPopupMenu);
Control.ShowAll ();
outputViewScrolled.Hide ();
}
示例3: TestResultsPad
public TestResultsPad ()
{
UnitTestService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
IdeApp.Workspace.WorkspaceItemClosed += OnWorkspaceItemClosed;
panel = new VBox { Name = "testResultBox" };
// Results notebook
book = new HPaned ();
panel.PackStart (book, true, true, 0);
panel.FocusChain = new Gtk.Widget [] { book };
// Failures tree
failuresTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView { Name = "testResultsTree" };
failuresTreeView.HeadersVisible = false;
failuresStore = new TreeStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object), typeof(string), typeof(int), typeof(int));
SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Image", "store__Message","store__RootTest",
"store__FileName", "store__FileNumber", "store__ErrorOrStackTrace");
TypeDescriptor.AddAttributes (failuresStore, modelAttr);
var pr = new CellRendererImage ();
CellRendererText tr = new CellRendererText ();
TreeViewColumn col = new TreeViewColumn ();
col.PackStart (pr, false);
col.AddAttribute (pr, "image", 0);
col.PackStart (tr, false);
col.AddAttribute (tr, "markup", 1);
failuresTreeView.AppendColumn (col);
failuresTreeView.Model = failuresStore;
var sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (failuresTreeView);
book.Pack1 (sw, true, true);
outputView = new MonoDevelop.Ide.Gui.Components.LogView.LogTextView { Name = "testResultOutput" };
outputView.ModifyFont (FontService.MonospaceFont);
outputView.Editable = false;
bold = new TextTag ("bold");
bold.Weight = Pango.Weight.Bold;
outputView.Buffer.TagTable.Add (bold);
sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (outputView);
book.Pack2 (sw, true, true);
outputViewScrolled = sw;
failuresTreeView.RowActivated += OnRowActivated;
failuresTreeView.Selection.Changed += OnRowSelected;
failuresTreeView.DoPopupMenu = delegate (EventButton evt) {
IdeApp.CommandService.ShowContextMenu (failuresTreeView, evt,
"/MonoDevelop/UnitTesting/ContextMenu/TestResultsPad");
};
panel.ShowAll ();
outputViewScrolled.Hide ();
}
示例4: TestResultsPad
public TestResultsPad ()
{
testService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
panel = new VBox ();
// Results notebook
book = new HPaned ();
panel.PackStart (book, true, true, 0);
panel.FocusChain = new Gtk.Widget [] { book };
// Failures tree
failuresTreeView = new TreeView ();
failuresTreeView.HeadersVisible = false;
failuresStore = new TreeStore (typeof(Pixbuf), typeof (string), typeof(object), typeof(string));
var pr = new CellRendererPixbuf ();
CellRendererText tr = new CellRendererText ();
TreeViewColumn col = new TreeViewColumn ();
col.PackStart (pr, false);
col.AddAttribute (pr, "pixbuf", 0);
col.PackStart (tr, false);
col.AddAttribute (tr, "markup", 1);
failuresTreeView.AppendColumn (col);
failuresTreeView.Model = failuresStore;
var sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add(failuresTreeView);
book.Pack1 (sw, true, true);
outputView = new TextView();
outputView.Editable = false;
bold = new TextTag ("bold");
bold.Weight = Pango.Weight.Bold;
outputView.Buffer.TagTable.Add (bold);
sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add(outputView);
book.Pack2 (sw, true, true);
outputViewScrolled = sw;
failuresTreeView.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (OnPopupMenu);
failuresTreeView.RowActivated += OnRowActivated;
failuresTreeView.Selection.Changed += OnRowSelected;
Control.ShowAll ();
outputViewScrolled.Hide ();
}
示例5: StatusArea
public StatusArea()
{
theme = new StatusAreaTheme ();
renderArg = new RenderArg ();
mainContext = new MainStatusBarContextImpl (this);
activeContext = mainContext;
contexts.Add (mainContext);
VisibleWindow = false;
NoShowAll = true;
WidgetFlags |= Gtk.WidgetFlags.AppPaintable;
statusIconBox.BorderWidth = 0;
statusIconBox.Spacing = 3;
Action<bool> animateProgressBar =
showing => this.Animate ("ProgressBarFade",
val => renderArg.ProgressBarAlpha = val,
renderArg.ProgressBarAlpha,
showing ? 1.0f : 0.0f,
easing: Easing.CubicInOut);
ProgressBegin += delegate {
renderArg.ShowProgressBar = true;
// StartBuildAnimation ();
renderArg.ProgressBarFraction = 0;
QueueDraw ();
animateProgressBar (true);
};
ProgressEnd += delegate {
renderArg.ShowProgressBar = false;
// StopBuildAnimation ();
QueueDraw ();
animateProgressBar (false);
};
ProgressFraction += delegate(object sender, FractionEventArgs e) {
renderArg.ProgressBarFraction = (float)e.Work;
QueueDraw ();
};
contentBox.PackStart (messageBox, true, true, 0);
contentBox.PackEnd (statusIconBox, false, false, 0);
contentBox.PackEnd (statusIconSeparator = new StatusAreaSeparator (), false, false, 0);
contentBox.PackEnd (buildResultWidget = CreateBuildResultsWidget (Orientation.Horizontal), false, false, 0);
HasTooltip = true;
QueryTooltip += messageBoxToolTip;
mainAlign = new Alignment (0, 0.5f, 1, 0);
mainAlign.LeftPadding = 12;
mainAlign.RightPadding = 8;
mainAlign.Add (contentBox);
Add (mainAlign);
mainAlign.ShowAll ();
statusIconBox.Hide ();
statusIconSeparator.Hide ();
buildResultWidget.Hide ();
Show ();
this.ButtonPressEvent += delegate {
if (sourcePad != null)
sourcePad.BringToFront (true);
};
statusIconBox.Shown += delegate {
UpdateSeparators ();
};
statusIconBox.Hidden += delegate {
UpdateSeparators ();
};
messageQueue = new Queue<Message> ();
tracker = new MouseTracker(this);
tracker.MouseMoved += (sender, e) => QueueDraw ();
tracker.HoveredChanged += (sender, e) => {
this.Animate ("Hovered",
x => renderArg.HoverProgress = x,
renderArg.HoverProgress,
tracker.Hovered ? 1.0f : 0.0f,
easing: Easing.SinInOut);
};
IdeApp.FocusIn += delegate {
// If there was an error while the application didn't have the focus,
// trigger the error animation again when it gains the focus
if (errorAnimPending) {
errorAnimPending = false;
TriggerErrorAnimation ();
}
};
}