public ViewModelBase() { LoadFileCommand = new LoadFileCommand(this); RenameCommand = new RenameCommand(this); UndoCommand = new UndoCommand(this); CopyToClipboardCommand = new CopyToClipboardCommand(this); FileList = new ObservableCollection <File>(); }
public SubtitleViewModel() { SubtitleModel = new SubtitleModel(); ApplyCommand = new ApplyCommand(this); LoadFileCommand = new LoadFileCommand(this); SaveFileCommand = new SaveFileCommand(this); FileDropCommand = new RelayCommand <DragEventArgs>(LoadDropedFile); }
/// <summary> /// Checks if every command is executable. /// </summary> private void CheckCommands() { SelectRootPathFolderCommand.RaiseCanExecuteChanged(); LoadFileCommand.RaiseCanExecuteChanged(); AddPenaltyCommand.RaiseCanExecuteChanged(); RemovePenaltyCommand.RaiseCanExecuteChanged(); ActivateCroissantCommand.RaiseCanExecuteChanged(); SelectLineCommand.RaiseCanExecuteChanged(); EmailCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); }
public PriceCalculationsViewModel(IUnityContainer container) : base(container) { Load(); this.SelectedLookupChanged += lookup => { EditCalculationCommand.RaiseCanExecuteChanged(); RemoveCalculationCommand.RaiseCanExecuteChanged(); LoadFileCommand.RaiseCanExecuteChanged(); }; NewCalculationCommand = new NewCalculationCommand(this.RegionManager); EditCalculationCommand = new EditCalculationCommand(this, this.RegionManager); RemoveCalculationCommand = new RemoveCalculationCommand(this, this.Container); LoadFileCommand = new LoadFileCommand(this, this.Container); ReloadCommand = new DelegateLogCommand(Load); }
public void SetStateMachine(string parentModelFile, qf4net.ILQHsm hsm) { lastDirectory = System.IO.Path.GetDirectoryName (parentModelFile); string fileName = FindFile (hsm.ModelInformation.FileName); LoadFileCommand command = new LoadFileCommand (fileName, this); command.Execute (); QHsmExecutionControllerView view = new QHsmExecutionControllerView (); string typeName = string.Format ("{0}.{1}, TestGeneratedStateMachines", _Model.Header.NameSpace, _Model.Header.Name); view.Controller = new QHsmExecutionController (_Model); view.Controller.Refresh += new EventHandler(RefreshView); view.SetMachine (hsm); StateDiagramView dv = this.Parent as StateDiagramView; dv.SetExecutionWindow (view); view.Show (); }
public void LoadFileDirect(string fileName) { LoadFileCommand command = new LoadFileCommand (fileName, this); command.Execute (); }
private void LoadFile(string fileName) { LoadFileCommand command = new LoadFileCommand (fileName, Context); command.Execute (); }
public GlobalViewModel() { LoadFileCommand = new LoadFileCommand(this); SaveFileCommand = new SaveFileCommand(); }