public Project(Solution sol, SolutionProject sp) { solutionProject = sp; solution = sol; cmdSave = new Crow.Command(new Action(() => Save())) { Caption = "Save", Icon = new SvgPicture("#Crow.Coding.icons.save.svg"), CanExecute = true }; cmdOpen = new Crow.Command(new Action(() => Load())) { Caption = "Open", Icon = new SvgPicture("#Crow.Coding.icons.open.svg"), CanExecute = false }; cmdCompile = new Crow.Command(new Action(() => Compile())) { Caption = "Compile", Icon = "#Crow.Coding.icons.compile.svg" }; cmdSetAsStartProj = new Crow.Command(new Action(() => setAsStartupProject())) { Caption = "Set as Startup Project" }; cmdNewFile = new Crow.Command(new Action(() => AddNewFile())) { Caption = "Add New File", Icon = new SvgPicture("#Crow.Coding.icons.blank-file.svg"), CanExecute = true }; Commands = new List <Crow.Command> (new Crow.Command[] { cmdOpen, cmdSave, cmdSetAsStartProj, cmdCompile, cmdNewFile }); Load(); }
void initCommands() { cmdSave = new Crow.Command(new Action(() => Save())) { Caption = "Save", Icon = new SvgPicture("#Crow.Coding.ui.icons.inbox.svg"), CanExecute = false }; cmdSaveAs = new Crow.Command(new Action(() => SaveAs())) { Caption = "Save As ..", Icon = new SvgPicture("#Crow.Coding.ui.icons.inbox.svg"), CanExecute = false }; cmdOpen = new Crow.Command(new Action(() => Open())) { Caption = "Open", Icon = new SvgPicture("#Crow.Coding.ui.icons.outbox.svg"), CanExecute = false }; cmdUndo = new Crow.Command(new Action(() => Undo(null))) { Caption = "Undo", Icon = new SvgPicture("#Crow.Coding.icons.undo.svg"), CanExecute = false }; cmdRedo = new Crow.Command(new Action(() => Redo(null))) { Caption = "Redo", Icon = new SvgPicture("#Crow.Coding.icons.redo.svg"), CanExecute = false }; Commands.Insert(0, cmdOpen); Commands.Insert(1, cmdSave); }
void initCommands() { cmdDelete = new Crow.Command(new Action(() => deleteObject(SelectedItem))) { Caption = "Delete", Icon = new SvgPicture("#Icons.save.svg"), CanExecute = true }; Commands = new List <Crow.Command> (new Crow.Command[] { cmdDelete }); }