本文整理汇总了C#中MonoDevelop.Components.Commands.ActionCommand类的典型用法代码示例。如果您正苦于以下问题:C# ActionCommand类的具体用法?C# ActionCommand怎么用?C# ActionCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionCommand类属于MonoDevelop.Components.Commands命名空间,在下文中一共展示了ActionCommand类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MenuButtonEntry
public MenuButtonEntry (Gtk.Entry entry, Gtk.Button button)
{
if (entry == null) entry = new Gtk.Entry ();
if (button == null) button = new Gtk.Button (new Gtk.Arrow (Gtk.ArrowType.Right, Gtk.ShadowType.Out));
this.entry = entry;
this.button = button;
manager = new CommandManager ();
manager.RegisterGlobalHandler (this);
if (entry.Parent == null)
PackStart (entry, true, true, 0);
if (button.Parent == null)
PackStart (button, false, false, 2);
ActionCommand cmd = new ActionCommand ("InsertOption", "InsertOption", null);
cmd.CommandArray = true;
manager.RegisterCommand (cmd);
entrySet = new CommandEntrySet ();
entrySet.AddItem ("InsertOption");
button.Clicked += ShowQuickInsertMenu;
button.StateChanged += ButtonStateChanged;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:25,代码来源:MenuButtonEntry.cs
示例2: CommandManager
public CommandManager (Gtk.Window root)
{
rootWidget = root;
bindings = new KeyBindingManager ();
ActionCommand c = new ActionCommand (CommandSystemCommands.ToolbarList, "Toolbar List", null, null, ActionType.Check);
c.CommandArray = true;
RegisterCommand (c);
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:8,代码来源:CommandManager.cs
示例3: MDMenuItem
public MDMenuItem (CommandManager manager, CommandEntry ce, ActionCommand command)
{
this.ce = ce;
this.manager = manager;
isArrayItem = command.CommandArray;
Target = this;
Action = ActionSel;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:MDMenuItem.cs
示例4: MDMenuItem
public MDMenuItem (CommandManager manager, CommandEntry ce, ActionCommand command, CommandSource commandSource, object initialCommandTarget)
{
this.ce = ce;
this.manager = manager;
this.initialCommandTarget = initialCommandTarget;
this.commandSource = commandSource;
isArrayItem = command.CommandArray;
Target = this;
Action = ActionSel;
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:12,代码来源:MDMenuItem.cs
示例5: RegisterCommands
static void RegisterCommands ()
{
if (tools == null)
return;
for (int i = 0; i < tools.Count; i++) {
var tool = tools [i];
ActionCommand cmd = new ActionCommand ("MonoDevelop.CustomCommands.Command" + i, tool.MenuCommand, null);
cmd.DefaultHandler = new RunCustomToolHandler (tool);
cmd.Category = GettextCatalog.GetString ("Tools (Custom)");
cmd.Description = GettextCatalog.GetString ("Start tool {0}", string.Join (string.Empty, tool.MenuCommand.Split ('&')));
cmd.AccelKey = tool.AccelKey;
IdeApp.CommandService.RegisterCommand (cmd);
}
}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:14,代码来源:ExternalToolService.cs
示例6: DefaultUpdateCommandInfo
void DefaultUpdateCommandInfo (ActionCommand cmd, CommandInfo info)
{
if (cmd.DefaultHandler == null) {
if (cmd.DefaultHandlerType == null) {
info.Enabled = false;
if (!cmd.DisabledVisible)
info.Visible = false;
return;
}
cmd.DefaultHandler = (CommandHandler) Activator.CreateInstance (cmd.DefaultHandlerType);
}
if (cmd.CommandArray) {
info.ArrayInfo = new CommandArrayInfo (info);
cmd.DefaultHandler.InternalUpdate (info.ArrayInfo);
}
else
cmd.DefaultHandler.InternalUpdate (info);
}
开发者ID:aBothe,项目名称:monodevelop,代码行数:18,代码来源:CommandManager.cs
示例7: DefaultDispatchCommand
bool DefaultDispatchCommand (ActionCommand cmd, CommandInfo info, object dataItem, object target, CommandSource source)
{
DefaultUpdateCommandInfo (cmd, info);
if (cmd.CommandArray) {
//if (info.ArrayInfo.FindCommandInfo (dataItem) == null)
// return false;
}
else if (!info.Enabled || !info.Visible)
return false;
if (cmd.DefaultHandler == null) {
if (cmd.DefaultHandlerType == null)
return false;
cmd.DefaultHandler = (CommandHandler) Activator.CreateInstance (cmd.DefaultHandlerType);
}
OnCommandActivating (cmd.Id, info, dataItem, target, source);
cmd.DefaultHandler.InternalRun (dataItem);
OnCommandActivated (cmd.Id, info, dataItem, target, source);
return true;
}
开发者ID:aBothe,项目名称:monodevelop,代码行数:21,代码来源:CommandManager.cs
示例8: Initialize
public void Initialize (IPadWindow window)
{
// Toolbar and menu definitions
ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Properties"), Gtk.Stock.Properties);
menuSet = new CommandEntrySet ();
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
menuSet.AddItem (EditCommands.DeleteKey);
menuSet.AddSeparator ();
menuSet.Add (propertiesCmd);
CommandEntrySet toolbarSet = new CommandEntrySet ();
toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
toolbarSet.AddItem (EditCommands.Delete);
toolbarSet.AddSeparator ();
toolbarSet.Add (propertiesCmd);
// The breakpoint list
store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));
tree = new PadTreeView ();
tree.Model = store;
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.DoPopupMenu = ShowPopup;
tree.KeyPressEvent += OnKeyPressEvent;
treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
TreeViewColumn col = new TreeViewColumn ();
CellRenderer crp = new CellRendererIcon ();
col.PackStart (crp, false);
col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
tree.AppendColumn (col);
Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
toggleRender.Toggled += new ToggledHandler (ItemToggled);
col = new TreeViewColumn ();
col.PackStart (toggleRender, false);
col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
tree.AppendColumn (col);
TreeViewColumn FrameCol = new TreeViewColumn ();
CellRenderer crt = tree.TextRenderer;
FrameCol.Title = GettextCatalog.GetString ("Name");
FrameCol.PackStart (crt, true);
FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
col.Resizable = true;
sw = new Gtk.ScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (tree);
control = sw;
control.ShowAll ();
bps = DebuggingService.Breakpoints;
UpdateDisplay ();
breakpointUpdatedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointUpdated);
breakpointRemovedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointRemoved);
breakpointAddedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointAdded);
breakpointChangedHandler = DispatchService.GuiDispatch<EventHandler> (OnBreakpointChanged);
DebuggingService.Breakpoints.BreakpointAdded += breakpointAddedHandler;
DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler;
DebuggingService.PausedEvent += OnDebuggerStatusCheck;
DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
tree.RowActivated += OnRowActivated;
//.........这里部分代码省略.........
开发者ID:IBBoard,项目名称:monodevelop,代码行数:101,代码来源:BreakpointPad.cs
示例9: StackTracePad
public StackTracePad ()
{
this.ShadowType = ShadowType.None;
ActionCommand evalCmd = new ActionCommand ("StackTracePad.EvaluateMethodParams", GettextCatalog.GetString ("Evaluate Method Parameters"));
ActionCommand gotoCmd = new ActionCommand ("StackTracePad.ActivateFrame", GettextCatalog.GetString ("Activate Stack Frame"));
menuSet = new CommandEntrySet ();
menuSet.Add (evalCmd);
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (EditCommands.SelectAll);
menuSet.AddItem (EditCommands.Copy);
store = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Pango.Style), typeof (object), typeof (bool));
tree = new PadTreeView (store);
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.Selection.Mode = SelectionMode.Multiple;
tree.EnableSearch = true;
tree.SearchColumn = 1;
tree.ButtonPressEvent += HandleButtonPressEvent;
tree.DoPopupMenu = ShowPopup;
TreeViewColumn col = new TreeViewColumn ();
CellRenderer crp = new CellRendererIcon ();
col.PackStart (crp, false);
col.AddAttribute (crp, "stock_id", 0);
tree.AppendColumn (col);
TreeViewColumn FrameCol = new TreeViewColumn ();
FrameCol.Title = GettextCatalog.GetString ("Name");
refresh = new CellRendererIcon ();
refresh.Pixbuf = ImageService.GetPixbuf (Gtk.Stock.Refresh).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
FrameCol.PackStart (refresh, false);
FrameCol.AddAttribute (refresh, "visible", 8);
FrameCol.PackStart (tree.TextRenderer, true);
FrameCol.AddAttribute (tree.TextRenderer, "text", 1);
FrameCol.AddAttribute (tree.TextRenderer, "foreground", 5);
FrameCol.AddAttribute (tree.TextRenderer, "style", 6);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("File");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 2);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Language");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 3);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Address");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 4);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
Add (tree);
ShowAll ();
current_backtrace = DebuggingService.CurrentCallStack;
UpdateDisplay ();
DebuggingService.CallStackChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnClassStackChanged));
DebuggingService.CurrentFrameChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnFrameChanged));
tree.RowActivated += OnRowActivated;
}
开发者ID:kenkendk,项目名称:monodevelop,代码行数:76,代码来源:StackTracePad.cs
示例10: Initialize
protected override void Initialize (IPadWindow window)
{
Id = "MonoDevelop.Debugger.BreakpointPad";
// Toolbar and menu definitions
ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Edit Breakpoint…"), Stock.Properties);
menuSet = new CommandEntrySet ();
menuSet.Add (propertiesCmd);
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
menuSet.AddSeparator ();
menuSet.AddItem (EditCommands.DeleteKey);
menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
CommandEntrySet toolbarSet = new CommandEntrySet ();
toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
toolbarSet.AddItem (EditCommands.Delete);
toolbarSet.AddSeparator ();
toolbarSet.Add (propertiesCmd);
toolbarSet.AddSeparator ();
toolbarSet.Add (new CommandEntry (DebugCommands.NewFunctionBreakpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
toolbarSet.Add (new CommandEntry (DebugCommands.NewCatchpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
// The breakpoint list
store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));
SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Icon", "store__Selected","store_FileName",
"store_Breakpoint", "store_Condition", "store_TraceExp", "store_HitCount", "store_LastTrace");
TypeDescriptor.AddAttributes (store, modelAttr);
tree = new PadTreeView ();
tree.Model = store;
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.DoPopupMenu = ShowPopup;
tree.KeyPressEvent += OnKeyPressEvent;
tree.Selection.Mode = SelectionMode.Multiple;
treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
TreeViewColumn col = new TreeViewColumn ();
CellRenderer crp = new CellRendererImage ();
col.PackStart (crp, false);
col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
tree.AppendColumn (col);
Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
toggleRender.Toggled += new ToggledHandler (ItemToggled);
col = new TreeViewColumn ();
col.PackStart (toggleRender, false);
col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
tree.AppendColumn (col);
TreeViewColumn FrameCol = new TreeViewColumn ();
CellRenderer crt = tree.TextRenderer;
FrameCol.Title = GettextCatalog.GetString ("Name");
FrameCol.PackStart (crt, true);
FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
col.Resizable = true;
col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
col.Resizable = true;
sw = new Gtk.ScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (tree);
control = sw;
control.ShowAll ();
breakpoints = DebuggingService.Breakpoints;
UpdateDisplay ();
breakpoints.BreakpointAdded += OnBreakpointAdded;
breakpoints.BreakpointRemoved += OnBreakpointRemoved;
breakpoints.Changed += OnBreakpointChanged;
breakpoints.BreakpointUpdated += OnBreakpointUpdated;
DebuggingService.PausedEvent += OnDebuggerStatusCheck;
DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
//.........这里部分代码省略.........
开发者ID:kdubau,项目名称:monodevelop,代码行数:101,代码来源:BreakpointPad.cs
示例11: CreateInstance
public override object CreateInstance ()
{
ActionType ct = ActionType.Normal;
bool isArray = false;
bool custom = false;
bool isAction = false;
foreach (string p in type.Split ('|')) {
switch (p) {
case "check":
ct = ActionType.Check;
if (isAction)
throw new InvalidOperationException ("Action type specified twice.");
isAction = true;
break;
case "radio":
ct = ActionType.Radio;
if (isAction)
throw new InvalidOperationException ("Action type specified twice.");
isAction = true;
break;
case "normal":
ct = ActionType.Normal;
if (isAction)
throw new InvalidOperationException ("Action type specified twice.");
isAction = true;
break;
case "custom":
if (widget == null)
throw new InvalidOperationException ("Widget type not specified in custom command.");
custom = true;
break;
case "array":
isArray = true;
break;
default:
throw new InvalidOperationException ("Unknown command type: " + p);
}
}
if (isAction && custom)
throw new InvalidOperationException ("Invalid command type combination: " + type);
Command cmd;
if (custom) {
if (isArray)
throw new InvalidOperationException ("Array custom commands are not allowed.");
CustomCommand ccmd = new CustomCommand ();
ccmd.Text = label;
ccmd.WidgetType = Addin.GetType (widget);
if (ccmd.WidgetType == null)
throw new InvalidOperationException ("Could not find command type '" + widget + "'.");
cmd = ccmd;
} else {
if (widget != null)
throw new InvalidOperationException ("Widget type can only be specified for custom commands.");
ActionCommand acmd = new ActionCommand ();
acmd.ActionType = ct;
acmd.CommandArray = isArray;
if (defaultHandler != null)
acmd.SetDefaultHandlerTypeInfo (Addin, defaultHandler);
cmd = acmd;
}
cmd.Id = ParseCommandId (this);
cmd.Text = StringParserService.Parse (BrandingService.BrandApplicationName (label));
if ((_description != null) && (_description.Length > 0)){
cmd.Description = BrandingService.BrandApplicationName (_description);
}
cmd.Description = cmd.Description;
if (icon != null)
cmd.Icon = GetStockId (Addin, icon);
var keyBinding = Platform.IsMac ? macShortcut : shortcut;
if (Platform.IsWindows && !string.IsNullOrEmpty (winShortcut))
keyBinding = winShortcut;
cmd.AccelKey = KeyBindingManager.CanonicalizeBinding (keyBinding);
cmd.DisabledVisible = disabledVisible;
// Assign the category of the command
CommandCategoryCodon cat = Parent as CommandCategoryCodon;
if (cat != null)
cmd.Category = cat.Name;
return cmd;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:98,代码来源:CommandCodon.cs
示例12: InitPopupMenu
private void InitPopupMenu()
{
ActionCommand gotoCmd = new ActionCommand (PadCommands.GoToBookmark, GettextCatalog.GetString ("Go to bookmark"));
menuSet = new CommandEntrySet ();
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (EditCommands.Delete);
menuSet.AddSeparator ();
menuSet.AddItem (BookmarkCommands.ClearAllBookmarks);
}
开发者ID:Indomitable,项目名称:monodevelop-bookmarks,代码行数:11,代码来源:BookmarksPad.cs
示例13: StackTracePad
public StackTracePad ()
{
this.ShadowType = ShadowType.None;
ActionCommand gotoCmd = new ActionCommand ("StackTracePad.ActivateFrame", GettextCatalog.GetString ("Activate Stack Frame"));
menuSet = new CommandEntrySet ();
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (EditCommands.SelectAll);
menuSet.AddItem (EditCommands.Copy);
store = new ListStore (typeof(string), typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof (Pango.Style));
tree = new MonoDevelop.Ide.Gui.Components.PadTreeView (store);
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.Selection.Mode = SelectionMode.Multiple;
tree.DoPopupMenu = ShowPopup;
TreeViewColumn col = new TreeViewColumn ();
CellRenderer crp = new CellRendererIcon ();
col.PackStart (crp, false);
col.AddAttribute (crp, "stock_id", 0);
tree.AppendColumn (col);
TreeViewColumn FrameCol = new TreeViewColumn ();
FrameCol.Title = GettextCatalog.GetString ("Name");
FrameCol.PackStart (tree.TextRenderer, true);
FrameCol.AddAttribute (tree.TextRenderer, "text", 1);
FrameCol.AddAttribute (tree.TextRenderer, "foreground", 5);
FrameCol.AddAttribute (tree.TextRenderer, "style", 6);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("File");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 2);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Language");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 3);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Address");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", 4);
col.AddAttribute (tree.TextRenderer, "foreground", 5);
tree.AppendColumn (col);
Add (tree);
ShowAll ();
current_backtrace = DebuggingService.CurrentCallStack;
UpdateDisplay ();
DebuggingService.CallStackChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnClassStackChanged));
DebuggingService.CurrentFrameChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnFrameChanged));
tree.RowActivated += OnRowActivated;
}
开发者ID:nieve,项目名称:monodevelop,代码行数:67,代码来源:StackTracePad.cs
示例14: CommandManager
public CommandManager (Gtk.Window root)
{
rootWidget = root;
bindings = new KeyBindingManager ();
ActionCommand c = new ActionCommand (CommandSystemCommands.ToolbarList, "Toolbar List", null, null, ActionType.Check);
c.CommandArray = true;
RegisterCommand (c);
#if MAC
AppKit.NSEvent.AddLocalMonitorForEventsMatchingMask (AppKit.NSEventMask.KeyDown, OnNSEventKeyPress);
#endif
}
开发者ID:lkalif,项目名称:monodevelop,代码行数:12,代码来源:CommandManager.cs
示例15: StackTracePad
public StackTracePad ()
{
this.ShadowType = ShadowType.None;
var evalCmd = new ActionCommand ("StackTracePad.EvaluateMethodParams", GettextCatalog.GetString ("Evaluate Method Parameters"));
var gotoCmd = new ActionCommand ("StackTracePad.ActivateFrame", GettextCatalog.GetString ("Activate Stack Frame"));
menuSet = new CommandEntrySet ();
menuSet.Add (evalCmd);
menuSet.Add (gotoCmd);
menuSet.AddSeparator ();
menuSet.AddItem (EditCommands.SelectAll);
menuSet.AddItem (EditCommands.Copy);
store = new ListStore (typeof (bool), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Pango.Style), typeof (object), typeof (int), typeof (bool));
tree = new PadTreeView (store);
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.Selection.Mode = SelectionMode.Multiple;
tree.SearchEqualFunc = Search;
tree.EnableSearch = true;
tree.SearchColumn = 1;
tree.ButtonPressEvent += HandleButtonPressEvent;
tree.DoPopupMenu = ShowPopup;
var col = new TreeViewColumn ();
var crp = new CellRendererImage ();
col.PackStart (crp, false);
crp.Image = pointerImage;
col.AddAttribute (crp, "visible", IconColumn);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Name");
refresh = new CellRendererImage ();
refresh.Image = ImageService.GetIcon (Gtk.Stock.Refresh).WithSize (12, 12);
col.PackStart (refresh, false);
col.AddAttribute (refresh, "visible", CanRefreshColumn);
col.PackStart (tree.TextRenderer, true);
col.AddAttribute (tree.TextRenderer, "text", MethodColumn);
col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
col.AddAttribute (tree.TextRenderer, "style", StyleColumn);
col.Resizable = true;
col.Alignment = 0.0f;
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("File");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", FileColumn);
col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Language");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", LangColumn);
col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Address");
col.PackStart (tree.TextRenderer, false);
col.AddAttribute (tree.TextRenderer, "text", AddrColumn);
col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
Add (tree);
ShowAll ();
UpdateDisplay ();
DebuggingService.CallStackChanged += OnClassStackChanged;
DebuggingService.CurrentFrameChanged += OnFrameChanged;
DebuggingService.StoppedEvent += OnDebuggingServiceStopped;
tree.RowActivated += OnRowActivated;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:78,代码来源:StackTracePad.cs
示例16: RuntimeModel
public RuntimeModel (MainToolbarController controller, ActionCommand command) : this (controller)
{
Command = command.Id;
}
开发者ID:nsaydin,项目名称:monodevelop,代码行数:4,代码来源:MainToolbarController.cs
示例17: RegisterPad
void RegisterPad(PadCodon content)
{
if (content.HasId) {
string lab = content.Label.Length > 0 ? GettextCatalog.GetString (content.Label) : "";
ActionCommand cmd = new ActionCommand ("Pad|" + content.PadId, lab, null);
cmd.DefaultHandler = new PadActivationHandler (this, content);
cmd.Category = GettextCatalog.GetString ("View");
cmd.Description = GettextCatalog.GetString ("Show {0}", cmd.Text);
IdeApp.CommandService.RegisterCommand (cmd);
}
padContentCollection.Add (content);
}
开发者ID:brantwedel,项目名称:monodevelop,代码行数:12,代码来源:DefaultWorkbench.cs
示例18: BugsViewWidget
public BugsViewWidget(BugzillaServer server)
{
this.Build ();
this.server = server;
bugsStore = new TreeStore (
typeof (BugInfo),
typeof(string), // Group
typeof(int), // Id
typeof(int), // Local priority
typeof(string), // Status
typeof(string), // Severity
typeof(string), // Target Milestone
typeof(int), // Age
typeof(string), // Assignee
typeof(string), // ColOS
typeof(string), // Component
typeof(string), // Summary
typeof(int), // Weight
typeof(Gdk.Color), // Back color
typeof(Gdk.Color), // Font color
typeof(string) // Summary
);
bugsList.Model = bugsStore;
/* CellRendererSpin spin = new CellRendererSpin ();
spin.Digits = 1;
*/
CellRendererText spin = new CellRendererText ();
spin.Editable = true;
spin.Edited += HandleSpinEdited;
groupColumns = new TreeViewColumn [Enum.GetValues (typeof(GroupCommand)).Length - 1];
groupColumn = bugsList.AppendColumn ("Category", new CellRendererText (), "text", ColGroup);
bugsList.AppendColumn ("Id", new CellRendererText (), "text", ColId);
bugsList.AppendColumn ("Prio", spin, "text", ColPriority);
groupColumns [(int)GroupCommand.GroupByStatus] = bugsList.AppendColumn ("Status", new CellRendererText (), "text", ColStatus);
groupColumns [(int)GroupCommand.GroupBySeverity] = bugsList.AppendColumn ("Severity", new CellRendererText (), "text", ColSeverity);
groupColumns [(int)GroupCommand.GroupByMilestone] = bugsList.AppendColumn ("Milestone", new CellRendererText (), "text", ColTargetMilestone);
bugsList.AppendColumn ("Age", new CellRendererText (), "text", ColAge);
groupColumns [(int)GroupCommand.GroupByOwner] = bugsList.AppendColumn ("Assigned", new CellRendererText (), "text", ColAssignee);
bugsList.AppendColumn ("OS", new CellRendererText (), "text", ColOS);
groupColumns [(int)GroupCommand.GroupByComponent] = bugsList.AppendColumn ("Component", new CellRendererText (), "text", ColComponent);
groupColumns [(int)GroupCommand.GroupByTag] = bugsList.AppendColumn ("Tags", new CellRendererText (), "text", ColTags);
CellRendererText ct = new CellRendererText ();
bugsList.AppendColumn ("Summary", ct, "text", ColSummary);
int n = 1;
foreach (TreeViewColumn col in bugsList.Columns) {
col.SortColumnId = n++;
col.Clickable = true;
col.Resizable = true;
col.Reorderable = true;
CellRendererText crt = (CellRendererText) col.CellRenderers[0];
col.AddAttribute (crt, "weight", ColWeight);
col.AddAttribute (crt, "background-gdk", ColBackColor);
col.AddAttribute (crt, "foreground-gdk", ColFontColor);
}
bugsList.DragBegin += HandleBugsListDragBegin;
bugsList.DragDataReceived += HandleBugsListDragDataReceived;
bugsList.DragEnd += HandleBugsListDragEnd;
bugsList.DragMotion += HandleBugsListDragMotion;
bugsList.Selection.Mode = SelectionMode.Multiple;
bugsList.Selection.Changed += HandleBugsListSelectionChanged;
Gtk.TargetEntry[] targets = new Gtk.TargetEntry [] { new TargetEntry ("bug", TargetFlags.Widget, 0) };
// bugsList.EnableModelDragSource (Gdk.ModifierType.None, targets, Gdk.DragAction.Move);
Gtk.Drag.SourceSet (bugsList, Gdk.ModifierType.Button1Mask, targets, Gdk.DragAction.Move);
bugsList.EnableModelDragDest (targets, Gdk.DragAction.Move);
ActionCommand setPrioHigh = new ActionCommand (LocalCommands.SetPriorityHigh, GettextCatalog.GetString ("Set High Priority (Bottom)"));
ActionCommand setPrioMed = new ActionCommand (LocalCommands.SetPriorityMed, GettextCatalog.GetString ("Set Medium Priority (Bottom)"));
ActionCommand setPrioLow = new ActionCommand (LocalCommands.SetPriorityLow, GettextCatalog.GetString ("Set Low Priority (Bottom)"));
ActionCommand setPrioHighTop = new ActionCommand (LocalCommands.SetPriorityHighTop, GettextCatalog.GetString ("Set High Priority (Top)"));
ActionCommand setPrioMedTop = new ActionCommand (LocalCommands.SetPriorityMedTop, GettextCatalog.GetString ("Set Medium Priority (Top)"));
ActionCommand setPrioLowTop = new ActionCommand (LocalCommands.SetPriorityLowTop, GettextCatalog.GetString ("Set Low Priority (Top)"));
ActionCommand toggleRead = new ActionCommand (LocalCommands.ToggleNewMarker, GettextCatalog.GetString ("Mark as Changed"));
ActionCommand openInBrowser = new ActionCommand (LocalCommands.OpenInBrowser, GettextCatalog.GetString ("Open in Browser"));
ActionCommand refreshBugInfo = new ActionCommand (LocalCommands.RefreshFromSever, GettextCatalog.GetString ("Refresh From Server"));
ActionCommand setTagCommand = new ActionCommand (LocalCommands.TagsList, GettextCatalog.GetString ("Set tag"));
ActionCommand clearTagsCommand = new ActionCommand (LocalCommands.ClearTags, GettextCatalog.GetString ("Clear Tags"));
ActionCommand editTagsCommand = new ActionCommand (LocalCommands.EditTags, GettextCatalog.GetString ("Edit Tags"));
setTagCommand.CommandArray = true;
setTagCommand.ActionType = ActionType.Check;
menuSet = new CommandEntrySet ();
menuSet.Add (openInBrowser);
menuSet.AddSeparator ();
menuSet.Add (setPrioHighTop);
menuSet.Add (setPrioHigh);
menuSet.Add (setPrioMedTop);
menuSet.Add (setPrioMed);
menuSet.Add (setPrioLowTop);
menuSet.Add (setPrioLow);
menuSet.AddSeparator ();
//.........这里部分代码省略.........
开发者ID:slluis,项目名称:bugziller,代码行数:101,代码来源:BugsViewWidget.cs
注:本文中的MonoDevelop.Components.Commands.ActionCommand类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论