Esempio n. 1
0
        public ShellViewModel(IPresentationService presentationService,
                              IShellSettingsService shellSettingsService,
                              IEventAggregator eventAggregator,
                              IMenuViewModel menu,
                              ISettingsViewModel settings,
                              ICodeGenSettingsService codeGenSettingsService,
                              ICodeGenSettings codeGenSettings,
                              IMessageService messageService,
                              IMappingViewModel mapping,
                              ISchemaService schemaService,
                              ICustomSchemaSqlViewModel customSchemaSqlViewModel,
                              ITemplateWriterService templateWriterService)
        {
            this._shellSettingsService   = shellSettingsService;
            this._codeGenSettingsService = codeGenSettingsService;
            this._codeGenSettings        = codeGenSettings;
            this._messageService         = messageService;
            this._templateWriterService  = templateWriterService;
            this.Menu                     = menu;
            this.Settings                 = settings;
            this.Mapping                  = mapping;
            this._schemaService           = schemaService;
            this.CustomSchemaSqlViewModel = customSchemaSqlViewModel;
            this.WindowClosing            = new Command <CancelEventArgs>(OnWindowClosing);
            this.WindowDrop               = new Command <DragEventArgs>(OnWindowDrop);

            this.DisplayText = "IQToolkit CodeGen";
            this.SetWindowPosition(presentationService);

            eventAggregator.GetEvent <LoadSchemaEvent>().Subscribe(this.LoadSchemaEventHandler);
            eventAggregator.GetEvent <GenerateFilesEvent>().Subscribe(_ => this.GenerateFilesEventHandler());
            eventAggregator.GetEvent <CustomSchemaSqlViewVisibilityChangedEvent>().Subscribe(this.CustomSchemaSqlViewVisibilityChangedEvent);
        }
Esempio n. 2
0
 public ShellPositionService(IPresentationService presentationService,
                             IShellSettingsService shellSettingsService)
 {
     _presentationService  = ArgumentUtility.CheckNotNull("presentationService", presentationService);
     _shellSettingsService = ArgumentUtility.CheckNotNull("shellSettingsService", shellSettingsService);
 }