コード例 #1
0
 public RecentRecipesCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "Recent Recipes", RequestedMenuPosition, true) {
    _onRecipeLoaded = OnRecipeLoaded;
    _onRecipeSaved = OnRecipeSaved;
    _recentRecipies = new RecentRecipies(commandTarget);
    _recentRecipies.AddRecipe(RecipeFactory.Current.PathName);
    RecipeFactory.Loaded += _onRecipeLoaded;
    RecipeFactory.Current.Saved += _onRecipeSaved;
 }
コード例 #2
0
      public RecentAssembliesCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
         : base(commandTarget, csUnitCtrl, "&Assembly", "Recent Assemblies", DesiredMenuPosition) {
         _onRecipeLoaded = OnRecipeLoaded;
         _onRecipeClosing = OnRecipeClosing;
         _onAssemblyAdded = OnAssemblyAdded;

         _recentAssemblies = new RecentAssemblies();

         RecipeFactory.Loaded += _onRecipeLoaded;
         RecipeFactory.Closing += _onRecipeClosing;
         RecipeFactory.Current.AssemblyAdded += _onAssemblyAdded;
      }
コード例 #3
0
 /// <summary>
 /// Instantiates the command.
 /// </summary>
 /// <param name="commandTarget">The form to act upon.</param>
 /// <param name="csUnitCtrl">The control on which to operate</param>
 public RecipeSaveAsCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "Save Recipe &As...", DesiredMenuPosition) {
 }
コード例 #4
0
 public ViewToolBarCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&View", "&Tool Bar", _menuPosition) {
    ConfigCurrentUser config = new ConfigCurrentUser();
    CommandTarget.ToolBarVisible = config.ToolBarVisible;
    Checked = config.ToolBarVisible;
 }
コード例 #5
0
 public AssemblyAddCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Assembly", "&Add...", DesiredMenuPosition, true) {
 }
コード例 #6
0
 public RecipeOpenCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "&Open Recipe...", RequestedMenuPosition) {
 }
コード例 #7
0
 public SaveResultsAsXmlCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "Save Result As &XML...", _menuPosition, true) {
    _results = new DefaultXmlWriter(RecipeFactory.Current, string.Empty);
    RecipeFactory.Loaded += RecipeFactory_Loaded;
    Enabled = false;
 }
コード例 #8
0
ファイル: AboutCommand.cs プロジェクト: ManfredLange/csUnit
 public AboutCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Help", "&About...", _menuPosition, true) {
 }
コード例 #9
0
 public RecipeNewCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "&New Recipe", _menuPosition) {
 }
コード例 #10
0
 public AssemblyReloadCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Assembly", "R&eload", MenuPosition) {
    Enabled = false;
    CsUnitControl.SelectedItems.CollectionChanged += OnSelectedItemsChanged;
 }
コード例 #11
0
 public FileExitCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&File", "E&xit", _menuPosition, true) {
 }
コード例 #12
0
 public CheckForUpdatesCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Help", "Chec&k for Updates", _menuPosition, true) {
 }
コード例 #13
0
 public AssemblyRemoveCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Assembly", "&Remove", MenuPosition, true) {
    Enabled = false;
    CsUnitControl.SelectedItems.CollectionChanged += SelectedItemsCollectionChanged;
 }
コード例 #14
0
 public ViewOptionsCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&View", "&Options...", _menuPosition, true) {
 }
コード例 #15
0
 public GotoOnlineDocumentationCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Help", "Online &Documentation", _menuPosition) {
 }
コード例 #16
0
 public ReportBugCommand(ICommandTarget commandTarget, CsUnitControl csUnitCtrl)
    : base(commandTarget, csUnitCtrl, "&Help", "Report a Bug", _menuPosition) {
 }