protected ButtonBase(Frc_ExtensionPackage package, bool buttonNeedsQuery, Guid commandSetGuid, int pkgCmdIdOfButton) { Output =OutputWriter.Instance; Package = package; OleMenuCommandService mcs = Package.PublicGetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (mcs != null) { CommandID commandId = new CommandID(commandSetGuid, pkgCmdIdOfButton); OleMenuItem = new OleMenuCommand(ButtonCallback, commandId); if (buttonNeedsQuery) { OleMenuItem.BeforeQueryStatus += QueryCallback; } mcs.AddCommand(OleMenuItem); } }
protected ButtonBase(Frc_ExtensionPackage package, bool buttonNeedsQuery, Guid commandSetGuid, int pkgCmdIdOfButton) { Output = OutputWriter.Instance; Package = package; var mcs = Package.PublicGetService <OleMenuCommandService, IMenuCommandService>(); if (mcs != null) { CommandID commandId = new CommandID(commandSetGuid, pkgCmdIdOfButton); OleMenuItem = new OleMenuCommand(ButtonCallback, commandId); if (buttonNeedsQuery) { OleMenuItem.BeforeQueryStatus += QueryCallback; } mcs.AddCommand(OleMenuItem); } }
public SetMainRobotButton(Frc_ExtensionPackage package) : base(package, true, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidSetRobotProject) { }
public InstallMonoButton(Frc_ExtensionPackage package, MonoFile monoFile) : base(package, false, GuidList.guidFRC_ExtensionCmdSet, (int) PkgCmdIDList.cmdidInstallMono) { m_monoFile = monoFile; }
public SettingsButton(Frc_ExtensionPackage package) : base(package, false, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidSettings) { }
public InstallMonoButton(Frc_ExtensionPackage package, MonoFile monoFile) : base(package, false, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidInstallMono) { m_monoFile = monoFile; }
public SaveMonoButton(Frc_ExtensionPackage package, MonoFile monoFile) : base(package, true, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidSaveMonoFile) { m_monoFile = monoFile; }
public DownloadMonoButton(Frc_ExtensionPackage package, MonoFile monoFile, InstallMonoButton installButton) : base(package, false, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidDownloadMono) { m_monoFile = monoFile; m_installButton = installButton; }
public DeployDebugButton(Frc_ExtensionPackage package, int pkgCmdIdOfButton, bool debug) : base(package, true, GuidList.guidFRC_ExtensionCmdSet, pkgCmdIdOfButton) { DebugButton = debug; DeployCommands.Add(OleMenuItem); }
public NetConsoleButton(Frc_ExtensionPackage package) : base(package, true, GuidList.guidFRC_ExtensionCmdSet, (int)PkgCmdIDList.cmdidNetconsole) { }
public SaveMonoButton(Frc_ExtensionPackage package, MonoFile monoFile) : base(package, true, GuidList.guidFRC_ExtensionCmdSet, (int) PkgCmdIDList.cmdidSaveMonoFile) { m_monoFile = monoFile; }