本文整理匯總了C#中MonoDevelop.Components.SearchEntry.Show方法的典型用法代碼示例。如果您正苦於以下問題:C# SearchEntry.Show方法的具體用法?C# SearchEntry.Show怎麽用?C# SearchEntry.Show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MonoDevelop.Components.SearchEntry
的用法示例。
在下文中一共展示了SearchEntry.Show方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LogWidget
public LogWidget (VersionControlDocumentInfo info)
{
this.Build ();
this.info = info;
if (info.Document != null)
this.preselectFile = info.Item.Path;
var separator = new HeaderBox ();
separator.SetMargins (1, 0, 0, 0);
separator.HeightRequest = 4;
separator.ShowAll ();
hpaned1 = hpaned1.ReplaceWithWidget (new HPanedThin (), true);
vpaned1 = vpaned1.ReplaceWithWidget (new VPanedThin () { HandleWidget = separator }, true);
revertButton = new DocumentToolButton ("vc-revert-command", GettextCatalog.GetString ("Revert changes from this revision"));
revertButton.GetNativeWidget<Gtk.Widget> ().Sensitive = false;
revertButton.Clicked += new EventHandler (RevertRevisionClicked);
revertToButton = new DocumentToolButton ("vc-revert-command", GettextCatalog.GetString ("Revert to this revision"));
revertToButton.GetNativeWidget<Gtk.Widget> ().Sensitive = false;
revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
refreshButton = new DocumentToolButton (Gtk.Stock.Refresh, GettextCatalog.GetString ("Refresh"));
refreshButton.Clicked += new EventHandler (RefreshClicked);
searchEntry = new SearchEntry ();
searchEntry.WidthRequest = 200;
searchEntry.ForceFilterButtonVisible = true;
searchEntry.EmptyMessage = GettextCatalog.GetString ("Search");
searchEntry.Changed += HandleSearchEntryFilterChanged;
searchEntry.Ready = true;
searchEntry.Show ();
messageRenderer.Ellipsize = Pango.EllipsizeMode.End;
TreeViewColumn colRevMessage = new TreeViewColumn ();
colRevMessage.Title = GettextCatalog.GetString ("Message");
var graphRenderer = new RevisionGraphCellRenderer ();
colRevMessage.PackStart (graphRenderer, false);
colRevMessage.SetCellDataFunc (graphRenderer, GraphFunc);
colRevMessage.PackStart (messageRenderer, true);
colRevMessage.SetCellDataFunc (messageRenderer, MessageFunc);
colRevMessage.Sizing = TreeViewColumnSizing.Autosize;
treeviewLog.AppendColumn (colRevMessage);
colRevMessage.MinWidth = 350;
colRevMessage.Resizable = true;
TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer);
colRevDate.SetCellDataFunc (textRenderer, DateFunc);
colRevDate.Resizable = true;
treeviewLog.AppendColumn (colRevDate);
TreeViewColumn colRevAuthor = new TreeViewColumn ();
colRevAuthor.Title = GettextCatalog.GetString ("Author");
colRevAuthor.PackStart (pixRenderer, false);
colRevAuthor.PackStart (textRenderer, true);
colRevAuthor.SetCellDataFunc (textRenderer, AuthorFunc);
colRevAuthor.SetCellDataFunc (pixRenderer, AuthorIconFunc);
colRevAuthor.Resizable = true;
treeviewLog.AppendColumn (colRevAuthor);
TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer);
colRevNum.SetCellDataFunc (textRenderer, RevisionFunc);
colRevNum.Resizable = true;
treeviewLog.AppendColumn (colRevNum);
treeviewLog.Model = logstore;
treeviewLog.Selection.Changed += TreeSelectionChanged;
treeviewFiles = new FileTreeView ();
treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated;
scrolledwindowFiles.Child = treeviewFiles;
scrolledwindowFiles.ShowAll ();
changedpathstore = new TreeStore (typeof(Xwt.Drawing.Image), typeof (string), // icon/file name
typeof(Xwt.Drawing.Image), typeof (string), // icon/operation
typeof (string), // path
typeof (string), // revision path (invisible)
typeof (string []) // diff
);
TreeViewColumn colChangedFile = new TreeViewColumn ();
var crp = new CellRendererImage ();
var crt = new CellRendererText ();
colChangedFile.Title = GettextCatalog.GetString ("File");
colChangedFile.PackStart (crp, false);
colChangedFile.PackStart (crt, true);
colChangedFile.AddAttribute (crp, "image", 2);
colChangedFile.AddAttribute (crt, "text", 3);
treeviewFiles.AppendColumn (colChangedFile);
TreeViewColumn colOperation = new TreeViewColumn ();
colOperation.Title = GettextCatalog.GetString ("Operation");
colOperation.PackStart (crp, false);
colOperation.PackStart (crt, true);
colOperation.AddAttribute (crp, "image", 0);
colOperation.AddAttribute (crt, "text", 1);
//.........這裏部分代碼省略.........
示例2: ShowFileMaskUI
void ShowFileMaskUI ()
{
if (labelFileMask != null)
return;
uint row;
if (checkbuttonRecursively != null)
row = TableGetRowForItem (tableFindAndReplace, checkbuttonRecursively) + 1;
else
row = TableGetRowForItem (tableFindAndReplace, labelScope) + 1;
labelFileMask = new Label {
LabelProp = GettextCatalog.GetString ("_File Mask:"),
UseUnderline = true,
Xalign = 0f
};
labelFileMask.Show ();
searchentryFileMask = new SearchEntry () {
ForceFilterButtonVisible = false,
IsCheckMenu = true,
ActiveFilterID = 0,
Visible = true,
Ready = true,
};
var checkMenuItem = searchentryFileMask.AddFilterOption (0, GettextCatalog.GetString ("Include binary files"));
checkMenuItem.DrawAsRadio = false;
checkMenuItem.Active = properties.Get ("IncludeBinaryFiles", false);
checkMenuItem.Toggled += delegate {
properties.Set ("IncludeBinaryFiles", checkMenuItem.Active);
};
var checkMenuItem1 = searchentryFileMask.AddFilterOption (1, GettextCatalog.GetString ("Include hidden files and directories"));
checkMenuItem1.DrawAsRadio = false;
checkMenuItem1.Active = properties.Get ("IncludeHiddenFiles", false);
checkMenuItem1.Toggled += delegate {
properties.Set ("IncludeHiddenFiles", checkMenuItem1.Active);
};
searchentryFileMask.Query = properties.Get ("MonoDevelop.FindReplaceDialogs.FileMask", "");
searchentryFileMask.Show ();
TableAddRow (tableFindAndReplace, row, labelFileMask, searchentryFileMask);
}
示例3: CombinedBox
public CombinedBox ()
{
filterEntry = new SearchEntry ();
filterEntry.WidthRequest = 180;
filterEntry.Ready = true;
filterEntry.ForceFilterButtonVisible = true;
filterEntry.Entry.CanFocus = true;
filterEntry.RoundedShape = true;
filterEntry.HasFrame = true;
filterEntry.Parent = this;
filterEntry.Show ();
SearchKeyShortcut = new KeyboardShortcut (
Gdk.Key.f, Platform.IsMac? Gdk.ModifierType.MetaMask : Gdk.ModifierType.ControlMask
);
}
示例4: Toolbox
public Toolbox (ToolboxService toolboxService, IPadWindow container)
{
this.toolboxService = toolboxService;
this.container = container;
#region Toolbar
DockItemToolbar toolbar = container.GetToolbar (PositionType.Top);
filterEntry = new SearchEntry();
filterEntry.Ready = true;
filterEntry.HasFrame = true;
filterEntry.WidthRequest = 150;
filterEntry.Changed += new EventHandler (filterTextChanged);
filterEntry.Show ();
toolbar.Add (filterEntry, true);
catToggleButton = new ToggleButton ();
catToggleButton.Image = new Image (Ide.Gui.Stock.GroupByCategory, IconSize.Menu);
catToggleButton.Toggled += new EventHandler (toggleCategorisation);
catToggleButton.TooltipText = GettextCatalog.GetString ("Show categories");
toolbar.Add (catToggleButton);
compactModeToggleButton = new ToggleButton ();
compactModeToggleButton.Image = new ImageView (ImageService.GetIcon ("md-compact-display", IconSize.Menu));
compactModeToggleButton.Toggled += new EventHandler (ToggleCompactMode);
compactModeToggleButton.TooltipText = GettextCatalog.GetString ("Use compact display");
toolbar.Add (compactModeToggleButton);
toolboxAddButton = new Button (new Gtk.Image (Ide.Gui.Stock.Add, IconSize.Menu));
toolbar.Add (toolboxAddButton);
toolboxAddButton.TooltipText = GettextCatalog.GetString ("Add toolbox items");
toolboxAddButton.Clicked += new EventHandler (toolboxAddButton_Clicked);
toolbar.ShowAll ();
#endregion
toolboxWidget = new ToolboxWidget ();
toolboxWidget.SelectedItemChanged += delegate {
selectedNode = this.toolboxWidget.SelectedItem != null ? this.toolboxWidget.SelectedItem.Tag as ItemToolboxNode : null;
toolboxService.SelectItem (selectedNode);
};
this.toolboxWidget.DragBegin += delegate(object sender, Gtk.DragBeginArgs e) {
if (this.toolboxWidget.SelectedItem != null) {
this.toolboxWidget.HideTooltipWindow ();
toolboxService.DragSelectedItem (this.toolboxWidget, e.Context);
}
};
this.toolboxWidget.ActivateSelectedItem += delegate {
toolboxService.UseSelectedItem ();
};
fontChanger = new MonoDevelop.Ide.Gui.PadFontChanger (toolboxWidget, toolboxWidget.SetCustomFont, toolboxWidget.QueueResize);
this.toolboxWidget.DoPopupMenu = ShowPopup;
scrolledWindow = new MonoDevelop.Components.CompactScrolledWindow ();
base.PackEnd (scrolledWindow, true, true, 0);
base.FocusChain = new Gtk.Widget [] { scrolledWindow };
//Initialise self
scrolledWindow.ShadowType = ShadowType.None;
scrolledWindow.VscrollbarPolicy = PolicyType.Automatic;
scrolledWindow.HscrollbarPolicy = PolicyType.Never;
scrolledWindow.WidthRequest = 150;
scrolledWindow.Add (this.toolboxWidget);
//update view when toolbox service updated
toolboxService.ToolboxContentsChanged += delegate { Refresh (); };
toolboxService.ToolboxConsumerChanged += delegate { Refresh (); };
Refresh ();
//set initial state
this.toolboxWidget.ShowCategories = catToggleButton.Active = true;
compactModeToggleButton.Active = MonoDevelop.Core.PropertyService.Get ("ToolboxIsInCompactMode", false);
this.toolboxWidget.IsListMode = !compactModeToggleButton.Active;
this.ShowAll ();
}
示例5: LogWidget
public LogWidget (VersionControlDocumentInfo info)
{
this.Build ();
this.info = info;
if (info.Document != null)
this.preselectFile = info.Document.FileName;
revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
revertButton.IsImportant = true;
// revertButton.Sensitive = false;
revertButton.Clicked += new EventHandler (RevertRevisionClicked);
CommandBar.Insert (revertButton, -1);
revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
revertToButton.IsImportant = true;
// revertToButton.Sensitive = false;
revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
CommandBar.Insert (revertToButton, -1);
Gtk.ToolItem item = new Gtk.ToolItem ();
Gtk.HBox a = new Gtk.HBox ();
item.Add (a);
searchEntry = new SearchEntry ();
searchEntry.WidthRequest = 200;
searchEntry.ForceFilterButtonVisible = true;
searchEntry.EmptyMessage = GettextCatalog.GetString ("Search");
searchEntry.Changed += HandleSearchEntryFilterChanged;
searchEntry.Ready = true;
searchEntry.Show ();
a.PackEnd (searchEntry, false, false, 0);
CommandBar.Insert (item, -1);
((Gtk.Toolbar.ToolbarChild)CommandBar[item]).Expand = true;
CommandBar.ShowAll ();
messageRenderer.Ellipsize = Pango.EllipsizeMode.End;
TreeViewColumn colRevMessage = new TreeViewColumn ();
colRevMessage.Title = GettextCatalog.GetString ("Message");
var graphRenderer = new RevisionGraphCellRenderer ();
colRevMessage.PackStart (graphRenderer, false);
colRevMessage.SetCellDataFunc (graphRenderer, GraphFunc);
colRevMessage.PackStart (messageRenderer, true);
colRevMessage.SetCellDataFunc (messageRenderer, MessageFunc);
colRevMessage.Sizing = TreeViewColumnSizing.Autosize;
treeviewLog.AppendColumn (colRevMessage);
colRevMessage.MinWidth = 350;
colRevMessage.Resizable = true;
TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer);
colRevDate.SetCellDataFunc (textRenderer, DateFunc);
colRevDate.Resizable = true;
treeviewLog.AppendColumn (colRevDate);
TreeViewColumn colRevAuthor = new TreeViewColumn ();
colRevAuthor.Title = GettextCatalog.GetString ("Author");
colRevAuthor.PackStart (pixRenderer, false);
colRevAuthor.PackStart (textRenderer, true);
colRevAuthor.SetCellDataFunc (textRenderer, AuthorFunc);
colRevAuthor.SetCellDataFunc (pixRenderer, AuthorIconFunc);
colRevAuthor.Resizable = true;
treeviewLog.AppendColumn (colRevAuthor);
TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer);
colRevNum.SetCellDataFunc (textRenderer, RevisionFunc);
colRevNum.Resizable = true;
treeviewLog.AppendColumn (colRevNum);
treeviewLog.Model = logstore;
treeviewLog.Selection.Changed += TreeSelectionChanged;
treeviewFiles = new FileTreeView ();
treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated;
scrolledwindowFiles.Child = treeviewFiles;
scrolledwindowFiles.ShowAll ();
changedpathstore = new TreeStore (typeof(Gdk.Pixbuf), typeof (string), // icon/file name
typeof(Gdk.Pixbuf), typeof (string), // icon/operation
typeof (string), // path
typeof (string), // revision path (invisible)
typeof (string[]) // diff
);
TreeViewColumn colChangedFile = new TreeViewColumn ();
var crp = new CellRendererPixbuf ();
var crt = new CellRendererText ();
colChangedFile.Title = GettextCatalog.GetString ("File");
colChangedFile.PackStart (crp, false);
colChangedFile.PackStart (crt, true);
colChangedFile.AddAttribute (crp, "pixbuf", 2);
colChangedFile.AddAttribute (crt, "text", 3);
treeviewFiles.AppendColumn (colChangedFile);
TreeViewColumn colOperation = new TreeViewColumn ();
colOperation.Title = GettextCatalog.GetString ("Operation");
colOperation.PackStart (crp, false);
colOperation.PackStart (crt, true);
colOperation.AddAttribute (crp, "pixbuf", 0);
//.........這裏部分代碼省略.........
示例6: CombinedBox
public CombinedBox ()
{
filterEntry = new SearchEntry ();
filterEntry.WidthRequest = 180;
filterEntry.Ready = true;
filterEntry.ForceFilterButtonVisible = true;
filterEntry.Entry.CanFocus = true;
filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)");
filterEntry.RoundedShape = true;
filterEntry.HasFrame = true;
filterEntry.Parent = this;
filterEntry.Show ();
}
示例7: InsertFilterEntry
void InsertFilterEntry ()
{
filterEntry = new SearchEntry ();
filterEntry.Entry.SetSizeRequest (200, filterEntry.Entry.SizeRequest ().Height);
filterEntry.Parent = mainBook;
filterEntry.Ready = true;
filterEntry.ForceFilterButtonVisible = true;
filterEntry.HasFocus = true;
filterEntry.Entry.CanFocus = true;
filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)");
filterEntry.KeyPressEvent += HandleFilterEntryKeyPressEvent;
filterEntry.Activated += HandleFilterEntryActivated;
this.Shown += delegate {
filterEntry.Entry.Show ();
filterEntry.Show ();
};
//hack to make sure the notebook tab row always has space for the filter entry
alignment1.SizeRequested += Alignment1SizeRequested;
mainBook.SizeAllocated += delegate {
RepositionFilter ();
};
filterEntry.Changed += delegate {
foreach (var p in panels)
p.SetFilter (filterEntry.Query);
};
RepositionFilter ();
}