本文整理汇总了C#中IMainForm.CreateDockingPanel方法的典型用法代码示例。如果您正苦于以下问题:C# IMainForm.CreateDockingPanel方法的具体用法?C# IMainForm.CreateDockingPanel怎么用?C# IMainForm.CreateDockingPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMainForm
的用法示例。
在下文中一共展示了IMainForm.CreateDockingPanel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SafeInit
private void SafeInit()
{
this.mainForm = this.pluginHost.MainForm;
this.pluginUI = new PluginUI();
System.Drawing.Image image = this.mainForm.GetSystemImage(46);
/**
* Create panel
*/
this.pluginUI.Tag = "ActionScript";
this.pluginUI.Text = "ActionScript";
this.pluginPanel = mainForm.CreateDockingPanel(this.pluginUI, this.pluginGuid, image, DockState.DockRight);
/**
* Default shortcuts
*/
if (!MainForm.MainSettings.HasKey(SETTING_SHORTCUT_CHECK))
MainForm.MainSettings.AddValue(SETTING_SHORTCUT_CHECK, "F7");
if (!MainForm.MainSettings.HasKey(SETTING_SHORTCUT_BUILD))
MainForm.MainSettings.AddValue(SETTING_SHORTCUT_BUILD, "CtrlF8");
if (!MainForm.MainSettings.HasKey(SETTING_SHORTCUT_GOTO))
MainForm.MainSettings.AddValue(SETTING_SHORTCUT_GOTO, "F4");
if (!MainForm.MainSettings.HasKey(SETTING_SHORTCUT_BACK))
MainForm.MainSettings.AddValue(SETTING_SHORTCUT_BACK, "ShiftF4");
if (!MainForm.MainSettings.HasKey(SETTING_SHORTCUT_CLEARCACHE))
MainForm.MainSettings.AddValue(SETTING_SHORTCUT_CLEARCACHE, "CtrlF7");
/**
* Create menu items
*/
menuItems = new ArrayList();
CommandBarItem item;
CommandBarMenu menu = mainForm.GetCBMenu("ViewMenu");
menu.Items.AddButton(image, "&ActionScript Panel", new EventHandler(this.OpenPanel));
Keys k;
// tools items
menu = this.mainForm.GetCBMenu("FlashToolsMenu");
if (menu != null)
{
menu.Items.AddSeparator();
// clear class cache
k = MainForm.MainSettings.GetShortcut(SETTING_SHORTCUT_CLEARCACHE);
if (k != Keys.None) this.mainForm.IgnoredKeys.Add(k);
else ErrorHandler.ShowInfo("Settings Error: Invalid Shortcut ("+MainForm.MainSettings.GetValue(SETTING_SHORTCUT_CLEARCACHE)+")");
menu.Items.AddButton("&Clear Class Cache", new EventHandler(this.ClearClassCache), k);
// convert to intrinsic
item = menu.Items.AddButton("Convert To &Intrinsic", new EventHandler(this.MakeIntrinsic));
menuItems.Add(item);
// check actionscript
image = this.pluginUI.treeIcons.Images[11];
k = MainForm.MainSettings.GetShortcut(SETTING_SHORTCUT_CHECK);
if (k != Keys.None) this.mainForm.IgnoredKeys.Add(k);
else ErrorHandler.ShowInfo("Settings Error: Invalid Shortcut ("+MainForm.MainSettings.GetValue(SETTING_SHORTCUT_CHECK)+")");
item = menu.Items.AddButton(image, "Check &ActionScript", new EventHandler(this.CheckActionScript), k);
menuItems.Add(item);
// quick MTASC build
image = this.pluginUI.treeIcons.Images[10];
k = MainForm.MainSettings.GetShortcut(SETTING_SHORTCUT_BUILD);
if (k != Keys.None) this.mainForm.IgnoredKeys.Add(k);
else ErrorHandler.ShowInfo("Settings Error: Invalid Shortcut ("+MainForm.MainSettings.GetValue(SETTING_SHORTCUT_BUILD)+")");
item = menu.Items.AddButton(image, "&Quick Build", new EventHandler(this.QuickBuild), k);
menuItems.Add(item);
}
else ErrorHandler.ShowInfo("MainMenu Error: no 'FlashToolsMenu' group found");
// toolbar items
CommandBar toolbar = MainForm.GetCBToolbar();
if (toolbar != null)
{
toolbar.Items.AddSeparator();
// check
image = this.pluginUI.treeIcons.Images[11];
item = toolbar.Items.AddButton(image, "Check ActionScript", new EventHandler(this.CheckActionScript));
menuItems.Add(item);
// build
image = this.pluginUI.treeIcons.Images[10];
item = toolbar.Items.AddButton(image, "Quick Build", new EventHandler(this.QuickBuild));
menuItems.Add(item);
}
// search items
menu = this.mainForm.GetCBMenu("SearchMenu");
if (menu != null)
{
menu.Items.AddSeparator();
// goto back from declaration
image = this.mainForm.GetSystemImage(18);
k = MainForm.MainSettings.GetShortcut(SETTING_SHORTCUT_BACK);
if (k != Keys.None) this.mainForm.IgnoredKeys.Add(k);
else ErrorHandler.ShowInfo("Settings Error: Invalid Shortcut ("+MainForm.MainSettings.GetValue(SETTING_SHORTCUT_BACK)+")");
item = menu.Items.AddButton(image, "&Back From Declaration", new EventHandler(this.BackDeclaration), k);
menuItems.Add(item);
// goto declaration
image = this.mainForm.GetSystemImage(17);
//.........这里部分代码省略.........
示例2: Initialize
/**
* Initializes the plugin
*/
public void Initialize()
{
this.mainForm = this.pluginHost.MainForm;
this.pluginUI = new PluginUI(this);
System.Drawing.Image image = mainForm.GetSystemImage(22);
/**
* Create panel
*/
this.pluginUI.Tag = "Output";
this.pluginUI.Text = "Output";
this.pluginPanel = mainForm.CreateDockingPanel(this.pluginUI, this.pluginGuid, image, DockState.DockBottomAutoHide);
/**
* Create menu item
*/
CommandBarMenu ViewMenu = mainForm.GetCBMenu("ViewMenu");
ViewMenu.Items.AddButton(image, "&Output Panel", new EventHandler(this.OpenPanel));
}