public MainWindowViewModel(
            [NotNull] IStatusViewModel statusViewModel,
            [NotNull] IProjectCollectionViewModel projectCollectionViewModel,
            [NotNull] IConfigurationService configurationService,
            [NotNull] IModelEditor showInDialog)
        {
            Guard.NotNull(configurationService, nameof(configurationService));
            Guard.NotNull(showInDialog, nameof(showInDialog));
            Guard.NotNull(projectCollectionViewModel, nameof(projectCollectionViewModel));
            Guard.NotNull(statusViewModel, nameof(statusViewModel));

            ProjectCollection = projectCollectionViewModel;
            StatusViewModel   = statusViewModel;

            WorkingDirectory = string.Empty;
            Logger.Info("ctor");

            OpenSettings = new OpenSettingsCommand(showInDialog, configurationService, WorkingDirectory);
            Initialize   = new CapturingExceptionAsyncCommand(async() =>
            {
                await Task.WhenAll(
                    ProjectCollection.Initialize.ExecuteAsync(null),
                    StatusViewModel.Initialize.ExecuteAsync(null))
                .ConfigureAwait(false);
            });
        }
 public EditPropertyWindow(IModelEditor modelEdit) : this()
 {
     DataContext = modelEdit;
     _modelEdit  = modelEdit;
     _modelEdit.OnUnsavedChangesClose += OnViewModelUnsavedChangesCloseAttempt;
     _modelEdit.OnModelEditClosed     += OnViewModelEditorClosed;
 }
Exemple #3
0
        public void Handle(object sender, enumEventType eventType, object eventArg, EventHandleStatus status)
        {
            if (_modelEditor == null)
            {
                _modelEditor = sender  as IModelEditor;
            }
            switch (eventType)
            {
            case enumEventType.MouseWheel:
                MouseWheel(eventArg as MouseEventArgs, status);
                break;

            case enumEventType.MouseDown:
                MouseDown(eventArg as MouseEventArgs, status);
                break;

            case enumEventType.MouseMove:
                MouseMove(eventArg as MouseEventArgs, status);
                break;

            case enumEventType.MouseUp:
                MouseUp(eventArg as MouseEventArgs, status);
                break;
            }
        }
        public void Execute(ActionExecutionContext context)
        {
            IModelEditor vm = (IModelEditor)_shell.ActiveItem;

            _setRenderSetting(vm);

            if (Completed != null)
            {
                Completed(this, null);
            }
        }
Exemple #5
0
 public BindingEnvironment(IModelEditor modelEditor)
 {
     _modelEditor = modelEditor;
 }
Exemple #6
0
 public HookModelEditor(IModelEditor modelEditor, IApplication application, ToolStripItem control, ICommandHelper commandHelper)
     : base(application, control, commandHelper)
 {
     _modelEditor = modelEditor;
 }
Exemple #7
0
 public ApplicationModelEditor(IModelEditor modelEditor, string tempDir)
     : base(tempDir)
 {
     _modelEditor = modelEditor;
 }
Exemple #8
0
 private void CreateModelEditor()
 {
     _modelEditor = new ModelEditor(ucModelEditorView1);
 }
Exemple #9
0
 void frmModelEditor_Disposed(object sender, EventArgs e)
 {
     _modelEditor.Dispose();
     _modelEditor = null;
 }
Exemple #10
0
 public RenderArg(IModelEditor modelEditor)
 {
     _modelEditor = modelEditor;
 }