Пример #1
0
 void project_changed(object sender, urakawa.events.DataModelChangedEventArgs e)
 {
     if (Project != null && Project.Initialized)
     {
         Text = string.Format("Bobi{0}", Project.HasChanges ? "*" : "");
         this.file_SaveMenuItem.Enabled = Project.HasChanges;
         // Undo and redo displays the command that can be un/redone
         urakawa.undo.UndoRedoManager undo = Project.getPresentation(0).getUndoRedoManager();
         this.edit_UndoMenuItem.Enabled = undo.canUndo();
         this.edit_UndoMenuItem.Text    = string.Format("&Undo{0}",
                                                        this.edit_UndoMenuItem.Enabled ? " " + undo.getUndoShortDescription() : "");
         this.edit_RedoMenuItem.Enabled = Project.getPresentation(0).getUndoRedoManager().canRedo();
         this.edit_RedoMenuItem.Text    = string.Format("&Redo{0}",
                                                        this.edit_RedoMenuItem.Enabled ? " " + undo.getRedoShortDescription() : "");
         this.edit_SelectAllMenuItem.Enabled     = Project.NumberOfTracks > 0;
         this.edit_SelectNothingMenuItem.Enabled = this.projectView.Selection != null;
     }
 }