Inheritance: System.Waf.Applications.Controller
コード例 #1
0
        public ApplicationController(IEnvironmentService environmentService, IPresentationService presentationService, ShellService shellService,
            Lazy<FileController> fileController, Lazy<RichTextDocumentController> richTextDocumentController, Lazy<PrintController> printController,
            Lazy<ShellViewModel> shellViewModel, Lazy<MainViewModel> mainViewModel, Lazy<StartViewModel> startViewModel)
        {
            // Upgrade the settings from a previous version when the new version starts the first time.
            if (Settings.Default.IsUpgradeNeeded)
            {
                Settings.Default.Upgrade();
                Settings.Default.IsUpgradeNeeded = false;
            }

            // Initializing the cultures must be done first. Therefore, we inject the Controllers and ViewModels lazy.
            InitializeCultures();
            presentationService.InitializeCultures();

            this.environmentService = environmentService;
            this.fileController = fileController.Value;
            this.richTextDocumentController = richTextDocumentController.Value;
            this.printController = printController.Value;
            this.shellViewModel = shellViewModel.Value;
            this.mainViewModel = mainViewModel.Value;
            this.startViewModel = startViewModel.Value;

            shellService.ShellView = this.shellViewModel.View;
            this.shellViewModel.Closing += ShellViewModelClosing;
            this.exitCommand = new DelegateCommand(Close);
        }
コード例 #2
0
ファイル: TestClassBase.cs プロジェクト: bensenplus/breeze
 protected void ShutdownPrintController()
 {
     printController.Shutdown();
     printController = null;
 }
コード例 #3
0
ファイル: TestClassBase.cs プロジェクト: bensenplus/breeze
 internal PrintController InitializePrintController()
 {
     printController = container.GetExportedValue<PrintController>();
     printController.Initialize();
     return printController;
 }