public ManageTemplateViewmodel(IShellService shellService, ITemplateManager templateMgr)
            : base(shellService)
        {
            _templateMgr = templateMgr;

            InitializeData();
        }
 public NewProjectViewmodel(IShellService shellService, IProjectManager projectManager, IRuleManager ruleManager)
     : base(shellService)
 {
     _projectManager = projectManager;
     _ruleManager = ruleManager;
     Init();
 }
예제 #3
0
        public FileController(IMessageService messageService, IFileDialogService fileDialogService, IShellService shellService,
            FileService fileService, ExportFactory<SaveChangesViewModel> saveChangesViewModelFactory)
        {
            this.messageService = messageService;
            this.fileDialogService = fileDialogService;
            this.shellService = shellService;
            this.fileService = fileService;
            this.saveChangesViewModelFactory = saveChangesViewModelFactory;
            this.documentTypes = new List<IDocumentType>();
            this.newCommand = new DelegateCommand(NewCommand);
            this.openCommand = new DelegateCommand(OpenCommand);
            this.closeCommand = new DelegateCommand(CloseCommand, CanCloseCommand);
            this.saveCommand = new DelegateCommand(SaveCommand, CanSaveCommand);
            this.saveAsCommand = new DelegateCommand(SaveAsCommand, CanSaveAsCommand);
            
            this.fileService.NewCommand = newCommand;
            this.fileService.OpenCommand = openCommand;
            this.fileService.CloseCommand = closeCommand;
            this.fileService.SaveCommand = saveCommand;
            this.fileService.SaveAsCommand = saveAsCommand;

            this.recentFileList = Settings.Default.RecentFileList ?? new RecentFileList();
            this.fileService.RecentFileList = recentFileList;

            PropertyChangedEventManager.AddHandler(fileService, FileServicePropertyChanged, "");
        }
예제 #4
0
        public OptionsViewModel(IShellService shellService)
            : base(shellService)
        {
            Settings = new ObservableCollection<Setting>();
            //Settings.Add(new Setting(
            //    "DefaultFontSize",
            //    "Default font size on GUI. ",
            //    "18"
            //    ));
            Settings.Add(new Setting(
                "InspectCodeExePath",
                "InspectCode Executable Path",
                string.Empty
                ));

            var cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            foreach (var i in ConfigurationManager.AppSettings.AllKeys)
            {
                var setting = Settings.FirstOrDefault(x => x.Key == i);

                if (setting != null && !string.IsNullOrWhiteSpace(cfg.AppSettings.Settings[i].Value))
                {
                    setting.Value = cfg.AppSettings.Settings[i].Value;
                }
            }
        }
예제 #5
0
 public ContentController(IShellService shellService, Func<HomeViewModel> homeViewModelFactory, Func<OctopusProjectViewModel> octopusProjectViewModelFactory, Func<OctopusLibraryVariableSetViewModel> octopusLibraryVariableSetViewModelFactory)
 {
     _shellService = shellService;
     _homeViewModelFactory = homeViewModelFactory;
     _octopusProjectViewModelFactory = octopusProjectViewModelFactory;
     _octopusLibraryVariableSetViewModelFactory = octopusLibraryVariableSetViewModelFactory;
 }
        public FileController(CompositionContainer container, IMessageService messageService, IFileDialogService fileDialogService,
            IShellService shellService, FileService fileService)
        {
            this.container = container;
            this.messageService = messageService;
            this.fileDialogService = fileDialogService;
            this.shellService = shellService;
            this.fileService = fileService;
            this.documentTypes = new List<IDocumentType>();

            this.newDocumentCommand = new DelegateCommand(NewDocumentCommand, CanNewDocumentCommand);
            this.closeDocumentCommand = new DelegateCommand(CloseDocumentCommand, CanCloseDocumentCommand);
            this.saveDocumentCommand = new DelegateCommand(SaveDocumentCommand, CanSaveDocumentCommand);
            this.saveAllDocumentCommand = new DelegateCommand(SaveAllDocumentCommand, CanSaveAllDocumentCommand);
            this.newSolutionCommand = new DelegateCommand(NewSolutionCommand);
            this.openSolutionCommand = new DelegateCommand(OpenSolutionCommand);
            this.closeSolutionCommand = new DelegateCommand(CloseSolutionCommand, CanCloseSolutionCommand);
            this.showSolutionCommand = new DelegateCommand(ShowSolutionCommand, CanShowSolutionCommand);

            this.fileService.NewDocumentCommand = this.newDocumentCommand;
            this.fileService.CloseDocumentCommand = this.closeDocumentCommand;
            this.fileService.SaveDocumentCommand = this.saveDocumentCommand;
            this.fileService.SaveAllDocumentCommand = this.saveAllDocumentCommand;
            this.fileService.NewSolutionCommand = this.newSolutionCommand;
            this.fileService.OpenSolutionCommand = this.openSolutionCommand;
            this.fileService.CloseSolutionCommand = this.closeSolutionCommand;
            this.fileService.ShowSolutionCommand = this.showSolutionCommand;

            this.recentSolutionList = Settings.Default.RecentSolutionList;
            if (this.recentSolutionList == null) { this.recentSolutionList = new RecentFileList(); }
            this.fileService.RecentSolutionList = recentSolutionList;

            AddWeakEventListener(fileService, FileServicePropertyChanged);
        }
 public ModuleController(CompositionContainer container, IShellService shellService, INavigationService navigationService)
 {
     this.container = container;
     this.shellService = shellService;
     this.navigationService = navigationService;
     this.root = new AddressBookRoot();
 }
예제 #8
0
 public EmailAccountsController(IShellService shellService, ExportFactory<EditEmailAccountController> editEmailAccountControllerFactory, 
     ExportFactory<EmailAccountsViewModel> emailAccountsViewModelFactory)
 {
     this.shellService = shellService;
     this.editEmailAccountControllerFactory = editEmailAccountControllerFactory;
     this.emailAccountsViewModelFactory = emailAccountsViewModelFactory;
     this.emailAccountsCommand = new DelegateCommand(ShowEmailAccounts);
 }
 protected override void OnInitialize()
 {
     base.OnInitialize();
     controller = Container.GetExportedValue<ModuleController>();
     shellService = Container.GetExportedValue<IShellService>();
     controller.Initialize();
     controller.Run();
 }
예제 #10
0
        public ModuleController( ShellViewModel shellViewModel , ShellService shellService, RuleController ruleController)
        {
            shellViewModel_ = shellViewModel;
            shellService_ = shellService;
            ruleController_ = ruleController;

            shellService_.ShellView = shellViewModel_.View;
        }
 public MusicPropertiesController(IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService, Lazy<MusicPropertiesViewModel> musicPropertiesViewModel)
 {
     this.shellService = shellService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.musicPropertiesViewModel = musicPropertiesViewModel;
     this.musicFilesToSaveAfterPlaying = new HashSet<MusicFile>();
 }
예제 #12
0
 public EmailFolderController(IShellService shellService, EmailLayoutViewModel emailLayoutViewModel, EmailListViewModel emailListViewModel, EmailViewModel emailViewModel)
 {
     this.shellService = shellService;
     this.emailLayoutViewModel = emailLayoutViewModel;
     this.emailListViewModel = emailListViewModel;
     this.emailViewModel = emailViewModel;
     this.deleteEmailCommand = new DelegateCommand(DeleteEmail, CanDeleteEmail);
 }
예제 #13
0
 public FormController(IShellService shellService, Func<FormViewViewModel> formViewModelFactory, OctoRepositoryFactory repositoryFactory, Func<FormEditViewModel> formEditViewModelFactory, SqlRepository sqlRepository)
 {
     _shellService = shellService;
     _formViewModelFactory = formViewModelFactory;
     _repositoryFactory = repositoryFactory;
     _formEditViewModelFactory = formEditViewModelFactory;
     _sqlRepository = sqlRepository;
 }
예제 #14
0
 public ContactController(IShellService shellService, ContactLayoutViewModel contactLayoutViewModel, ContactListViewModel contactListViewModel, ContactViewModel contactViewModel)
 {
     this.shellService = shellService;
     this.contactLayoutViewModel = contactLayoutViewModel;
     this.contactListViewModel = contactListViewModel;
     this.contactViewModel = contactViewModel;
     this.newContactCommand = new DelegateCommand(NewContact);
     this.deleteContactCommand = new DelegateCommand(DeleteContact, CanDeleteContact);
 }
예제 #15
0
 public ModuleController(CompositionContainer container, IShellService shellService, IEntityService entityService, Lazy<ReportViewModel> reportViewModel)
 {
     this.container = container;
     this.shellService = shellService;
     this.entityService = entityService;
     this.reportViewModel = reportViewModel;
     this.createBookListReportCommand = new DelegateCommand(CreateBookListReport);
     this.createBorrowedBooksReportCommand = new DelegateCommand(CreateBorrowedBooksReport);
 }
예제 #16
0
 public EntityController(EntityService entityService, IMessageService messageService, IShellService shellService, 
     Lazy<ShellViewModel> shellViewModel)
 {
     this.entityService = entityService;
     this.messageService = messageService;
     this.shellService = shellService;
     this.shellViewModel = shellViewModel;
     this.saveCommand = new DelegateCommand(() => Save(), CanSave);
 }
예제 #17
0
 public NewEmailController(IMessageService messageService, IShellService shellService, IAddressBookService addressBookService, NewEmailViewModel newEmailViewModel)
 {
     this.messageService = messageService;
     this.shellService = shellService;
     this.addressBookService = addressBookService;
     this.NewEmailViewModel = newEmailViewModel;
     this.selectContactCommand = new DelegateCommand(SelectContact);
     this.sendCommand = new DelegateCommand(SendEmail);
 }
        //IRegionManager -> Singleton
        public ShellViewModel(  IShellService service)
        {            
            _service = service;

            OpenShellCommand = new DelegateCommand<string>(OpenShell);
            NavigateCommand = new DelegateCommand<object>(Navigate);
            GlobalCommands.NavigateCommand.RegisterCommand(NavigateCommand);

            AboutCommand = new DelegateCommand<object>(OpenAboutDialog);
        }
예제 #19
0
 public ModuleController(IShellService shellService, IDocumentService documentService, INavigationService navigationService,
     ExportFactory<ContactController> contactControllerFactory, ExportFactory<SelectContactController> selectContactControllerFactory)
 {
     this.shellService = shellService;
     this.documentService = documentService;
     this.navigationService = navigationService;
     this.contactControllerFactory = contactControllerFactory;
     this.selectContactControllerFactory = selectContactControllerFactory;
     this.serializer = new Lazy<DataContractSerializer>(CreateDataContractSerializer);
 }
 public RichTextDocumentController(CompositionContainer container, IFileService fileService, IShellService shellService,
     MainViewModel mainViewModel)
     : base(fileService)
 {
     this.container = container;
     this.fileService = fileService;
     this.shellService = shellService;
     this.mainViewModel = mainViewModel;
     this.richTextViewModels = new Dictionary<RichTextDocument, RichTextViewModel>();
     AddWeakEventListener(mainViewModel, MainViewModelPropertyChanged);
 }
예제 #21
0
 public BookController(CompositionContainer container, IShellService shellService, IEntityService entityService,
     BookViewModel bookViewModel)
 {
     this.container = container;
     this.shellService = shellService;
     this.entityService = entityService;
     this.bookViewModel = bookViewModel;
     this.addNewCommand = new DelegateCommand(AddNewBook, CanAddNewBook);
     this.removeCommand = new DelegateCommand(RemoveBook, CanRemoveBook);
     this.lendToCommand = new DelegateCommand(p => LendTo((Book)p));
 }
예제 #22
0
 public ModuleController(IShellService shellService, IEntityService entityService, Lazy<ReportViewModel> reportViewModel,
     ExportFactory<IBookListReport> bookListReportFactory, ExportFactory<IBorrowedBooksReport> borrowedBooksReportFactory)
 {
     this.shellService = shellService;
     this.entityService = entityService;
     this.reportViewModel = reportViewModel;
     this.bookListReportFactory = bookListReportFactory;
     this.borrowedBooksReportFactory = borrowedBooksReportFactory;
     this.createBookListReportCommand = new DelegateCommand(CreateBookListReport);
     this.createBorrowedBooksReportCommand = new DelegateCommand(CreateBorrowedBooksReport);
 }
예제 #23
0
 public ModuleController(CompositionContainer container, IShellService shellService, INavigationService navigationService,
     EmailAccountsController emailAccountsController)
 {
     this.container = container;
     this.shellService = shellService;
     this.navigationService = navigationService;
     this.emailAccountsController = emailAccountsController;
     this.newEmailCommand = new DelegateCommand(NewEmail);
     this.root = new EmailClientRoot();
     this.itemCountSychronizers = new List<ItemCountSynchronizer>();
 }
 public SolutionDocumentController(CompositionContainer container, IFileService fileService, IShellService shellService,
     MainViewModel mainViewModel)
     : base(fileService)
 {
     this.container = container;
     this.fileService = fileService;
     this.shellService = shellService;
     this.mainViewModel = mainViewModel;
     this.solutionViewModel = null;
     AddWeakEventListener(mainViewModel, MainViewModelPropertyChanged);
 }
        public ManageRuleViewmodel(IShellService shellService, IRuleManager ruleManager)
            : base(shellService)
        {
            _ruleManager = ruleManager;

            Rules = new ObservableCollection<Rule>();

            foreach (var i in _ruleManager.DefaultRuleSet)
            {
                Rules.Add(i);
            }
        }
예제 #26
0
 public BookController(IShellService shellService, IEntityService entityService,
     BookListViewModel bookListViewModel, BookViewModel bookViewModel, ExportFactory<LendToViewModel> lendToViewModelFactory)
 {
     this.shellService = shellService;
     this.entityService = entityService;
     this.bookListViewModel = bookListViewModel;
     this.bookViewModel = bookViewModel;
     this.lendToViewModelFactory = lendToViewModelFactory;
     this.addNewCommand = new DelegateCommand(AddNewBook, CanAddNewBook);
     this.removeCommand = new DelegateCommand(RemoveBook, CanRemoveBook);
     this.lendToCommand = new DelegateCommand(p => LendTo((Book)p));
 }
        public SolutionCheckerViewmodel(IShellService shellService, IProjectManager projectManager, IRuleRunner ruleRunner)
            : base(shellService)
        {
            _projectManager = projectManager;
            _ruleRunner = ruleRunner;

            _projectManager.Load(OnLoaded);

            _ruleRunner.LoadRunLog(OnLogLoaded);

            _ruleRunner.RunLogAdded += _ruleRunner_RunLogAdded;
        }
예제 #28
0
 public PersonController(CompositionContainer container, IMessageService messageService, IShellService shellService,
     IEntityService entityService, IEmailService emailService, PersonViewModel personViewModel)
 {
     this.container = container;
     this.messageService = messageService;
     this.shellService = shellService;
     this.entityService = entityService;
     this.emailService = emailService;
     this.personViewModel = personViewModel;
     this.addNewCommand = new DelegateCommand(AddNewPerson, CanAddPerson);
     this.removeCommand = new DelegateCommand(RemovePerson, CanRemovePerson);
     this.createNewEmailCommand = new DelegateCommand(CreateNewEmail);
 }
예제 #29
0
 public ModuleController(IShellService shellService, IDocumentService documentService, INavigationService navigationService,
     EmailAccountsController emailAccountsController, ExportFactory<EmailFolderController> emailFolderControllerFactory,
     ExportFactory<NewEmailController> newEmailControllerFactory)
 {
     this.shellService = shellService;
     this.documentService = documentService;
     this.navigationService = navigationService;
     this.emailAccountsController = emailAccountsController;
     this.emailFolderControllerFactory = emailFolderControllerFactory;
     this.newEmailControllerFactory = newEmailControllerFactory;
     this.newEmailCommand = new DelegateCommand(NewEmail);
     this.itemCountSychronizers = new List<ItemCountSynchronizer>();
     this.serializer = new Lazy<DataContractSerializer>(CreateDataContractSerializer);
 }
        public PrintController(CompositionContainer container, IShellService shellService, ShellViewModel shellViewModel, 
            MainViewModel mainViewModel, IFileService fileService, IPrintDialogService printDialogService)
        {
            this.container = container;
            this.shellService = shellService;
            this.shellViewModel = shellViewModel;
            this.mainViewModel = mainViewModel;
            this.fileService = fileService;
            this.printDialogService = printDialogService;
            this.printPreviewCommand = new DelegateCommand(ShowPrintPreview, CanPrintDocument);
            this.printCommand = new DelegateCommand(PrintDocument, CanPrintDocument);
            this.closePrintPreviewCommand = new DelegateCommand(ClosePrintPreview);

            AddWeakEventListener(fileService, FileServicePropertyChanged);
        }
예제 #31
0
 public WebRequestFactory(IShellService shellService, ISharedCookieService cookieService, AppSettings settings)
 {
     this.shellService  = shellService;
     this.cookieService = cookieService;
     this.settings      = settings;
 }
예제 #32
0
 public NamedRibbonTabContexUI(string ribbonTabName, bool hideOtherTabsInSameGroup = true)
 {
     ShellService              = ServiceLocator.Default.ResolveType <IShellService>();
     _ribbonTabName            = ribbonTabName;
     _hideOtherTabsInSameGroup = hideOtherTabsInSameGroup;
 }
예제 #33
0
 public ImageResource(IShellService theSvc)
     : base(theSvc, "Images")
 {
 }
예제 #34
0
 public EmailService(IMessageService messageService, IShellService shellService)
 {
     this.messageService = messageService;
     this.shellService   = shellService;
 }
예제 #35
0
 public ApplicationUpdateService(IShellService shellService, IWebRequestFactory webRequestFactory)
 {
     this.shellService      = shellService;
     this.webRequestFactory = webRequestFactory;
 }
예제 #36
0
 public DetailsController(IShellService shellService, ISelectionService selectionService, IManagerService managerService)
 {
     _shellService     = shellService;
     _selectionService = selectionService;
     _blogsToSave      = new HashSet <IBlog>();
 }
예제 #37
0
 public RichTextViewModel(IRichTextView view, IShellService shellService) : base(view, shellService)
 {
     this.shellService = shellService;
 }
예제 #38
0
 public EntityController(EntityService entityService, IMessageService messageService, IShellService shellService,
                         Lazy <ShellViewModel> shellViewModel)
 {
     this.entityService  = entityService;
     this.messageService = messageService;
     this.shellService   = shellService;
     this.shellViewModel = shellViewModel;
     this.saveCommand    = new DelegateCommand(() => Save(), CanSave);
 }
예제 #39
0
 public LogService( IShellService shellService, IWebRequestFactory webRequestFactory)
 {
     _shellService = shellService;
     _webRequestFactory = webRequestFactory;
 }
예제 #40
0
 public DocResource(IShellService theSvc)
     : base(theSvc, "Documents")
 {
 }
예제 #41
0
 public LoginService(IShellService shellService, IWebRequestFactory webRequestFactory, ISharedCookieService cookieService)
 {
     this.shellService      = shellService;
     this.webRequestFactory = webRequestFactory;
     this.cookieService     = cookieService;
 }
예제 #42
0
        public CreateViewModel(IDialog dialog, IGitService git, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _git       = git;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            GitIgnores = new Dictionary <string, string>();
            Licenses   = new Dictionary <string, string>();
            Namespaces = new    Dictionary <string, string>();
            _path      = storage.GetBaseRepositoryDirectory();

            LoadResources();

            _newCommand    = new DelegateCommand(OnSave, CanSave);
            _browseCommand = new DelegateCommand(OnBrowse);
        }
예제 #43
0
 public MockZoomViewModel(IView view, IShellService shellService) : base(view, shellService)
 {
 }
 public ConfirmTumblrPrivacyConsent(IShellService shellService, ISharedCookieService cookieService, IWebRequestFactory webRequestFactory)
 {
     this.webRequestFactory = webRequestFactory;
     this.cookieService     = cookieService;
     this.shellService      = shellService;
 }
예제 #45
0
 public ShellViewModel(IShellView view, IShellService shellService)
     : base(view)
 {
     ShellService = shellService;
     view.Closed += ViewClosed;
 }
예제 #46
0
 public ApplicationUpdateService(IShellService shellService)
 {
     this.shellService = shellService;
 }
예제 #47
0
 public IssuesNavigationItem(IGitService git, IShellService shell, IStorage storage, ITeamExplorerServices tes, IWebService ws)
     : base(Octicon.issue_opened, git, shell, storage, tes, ws)
 {
     _tes = tes;
     Text = Strings.Items_Issues;
 }
예제 #48
0
        public FileController(IMessageService messageService, IFileDialogService fileDialogService, IShellService shellService,
                              FileService fileService, ExportFactory <SaveChangesViewModel> saveChangesViewModelFactory)
        {
            this.messageService              = messageService;
            this.fileDialogService           = fileDialogService;
            this.shellService                = shellService;
            this.fileService                 = fileService;
            this.saveChangesViewModelFactory = saveChangesViewModelFactory;
            documentTypes = new List <IDocumentType>();
            newCommand    = new DelegateCommand(NewCommand);
            openCommand   = new DelegateCommand(OpenCommand);
            closeCommand  = new DelegateCommand(CloseCommand, CanCloseCommand);
            saveCommand   = new DelegateCommand(SaveCommand, CanSaveCommand);
            saveAsCommand = new DelegateCommand(SaveAsCommand, CanSaveAsCommand);

            this.fileService.NewCommand    = newCommand;
            this.fileService.OpenCommand   = openCommand;
            this.fileService.CloseCommand  = closeCommand;
            this.fileService.SaveCommand   = saveCommand;
            this.fileService.SaveAsCommand = saveAsCommand;

            recentFileList = Settings.Default.RecentFileList ?? new RecentFileList();
            this.fileService.RecentFileList = recentFileList;

            PropertyChangedEventManager.AddHandler(fileService, FileServicePropertyChanged, "");
        }
 public SnippetsNavigationItem(IGitService git, IShellService shell, IStorage storage, ITeamExplorerServices tes, IWebService ws)
     : base(Octicon.book, git, shell, storage, tes, ws)
 {
     _tes = tes;
     Text = Strings.Items_Snippets;
 }
예제 #50
0
        public ShellViewModel(IShellView view, IMessageService messageService, IPresentationService presentationService, IShellService shellService,
                              IFileService fileService, ISettingsService settingsService) : base(view)
        {
            this.messageService = messageService;
            ShellService        = shellService;
            FileService         = fileService;
            EnglishCommand      = new DelegateCommand(() => SelectLanguage(new CultureInfo("en-US")));
            GermanCommand       = new DelegateCommand(() => SelectLanguage(new CultureInfo("de-DE")));
            AboutCommand        = new DelegateCommand(ShowAboutMessage);
            settings            = settingsService.Get <AppSettings>();
            view.Closing       += ViewClosing;
            view.Closed        += ViewClosed;

            // Restore the window size when the values are valid.
            if (settings.Left >= 0 && settings.Top >= 0 && settings.Width > 0 && settings.Height > 0 &&
                settings.Left + settings.Width <= presentationService.VirtualScreenWidth &&
                settings.Top + settings.Height <= presentationService.VirtualScreenHeight)
            {
                ViewCore.Left   = settings.Left;
                ViewCore.Top    = settings.Top;
                ViewCore.Height = settings.Height;
                ViewCore.Width  = settings.Width;
            }
            ViewCore.IsMaximized = settings.IsMaximized;
        }
        public FileController(IMessageService messageService, IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService,
                              IClipboardService clipboardService, FileService fileService, ExportFactory <SaveChangesViewModel> saveChangesViewModelFactory)
        {
            this.messageService              = messageService;
            this.fileDialogService           = fileDialogService;
            this.shellService                = shellService;
            this.environmentService          = environmentService;
            this.clipboardService            = clipboardService;
            this.fileService                 = fileService;
            this.saveChangesViewModelFactory = saveChangesViewModelFactory;
            closeCommand    = new DelegateCommand(CloseFile, CanCloseFile);
            closeAllCommand = new DelegateCommand(CloseAll, CanCloseAll);
            saveCommand     = new DelegateCommand(SaveFile, CanSaveFile);
            saveAsCommand   = new DelegateCommand(SaveAsFile, CanSaveAsFile);

            this.fileService.NewCSharpCommand                   = new DelegateCommand(NewCSharpFile);
            this.fileService.NewVisualBasicCommand              = new DelegateCommand(NewVisualBasicFile);
            this.fileService.NewCSharpFromClipboardCommand      = new DelegateCommand(NewCSharpFromClipboard, CanNewFromClipboard);
            this.fileService.NewVisualBasicFromClipboardCommand = new DelegateCommand(NewVisualBasicFromClipboard, CanNewFromClipboard);
            this.fileService.OpenCommand     = new DelegateCommand(OpenFile);
            this.fileService.CloseCommand    = closeCommand;
            this.fileService.CloseAllCommand = closeAllCommand;
            this.fileService.SaveCommand     = saveCommand;
            this.fileService.SaveAsCommand   = saveAsCommand;

            cSharpFileType        = new FileType(Resources.CSharpFile, ".cs");
            visualBasicFileType   = new FileType(Resources.VisualBasicFile, ".vb");
            allFilesType          = new FileType(Resources.CodeFile, ".cs;*.vb");
            observedDocumentFiles = new List <DocumentFile>();
            PropertyChangedEventManager.AddHandler(fileService, FileServicePropertyChanged, "");
            shellService.Closing += ShellServiceClosing;
        }
예제 #52
0
        public JobEditorViewModel(IShellService shellService, IJobService jobService, IForcesService forcesService, Job job)
        {
            this.shellService  = shellService;
            this.jobService    = jobService;
            this.forcesService = forcesService;
            this.Job           = job ?? new Job();
            this.BeginJobEdit(this.Job);
            this.isSaveRequested = false;

            this.forcesList = new ObservableCollection <Force>();
            this.ForcesView = new ListCollectionView(this.forcesList);

            // Set up messenger completion values
            this.jobService.GetAllJobs().Select(j => j.Messenger).Distinct().ToList()
            .ForEach(messenger => this.MessengerValues.Add(messenger));

            this.AddMessengerValueIfNotExists("Leitstelle");

            // Configure shell
            this.ShellViewState            = ShellViewState.Embedded;
            this.undockingCommandBarButton = new ShellCommandBarButton
            {
                ImageUri = new Uri("pack://application:,,/Resources/Images/ShellIcons/open_in_shell.scale-150.png"),
                Label    = "Abdocken",
                Command  = new RelayCommand(() =>
                {
                    this.View.DataContext = new JobEditorViewModel(this.shellService, this.jobService, this.forcesService);
                    var newView           = new JobEditorView {
                        DataContext = this
                    };
                    this.shellService.ShowInNewTab("Neuer Auftrag", newView, this, true);
                }),
                Width      = 284,
                Visibility = this.Job.IsNew ? Visibility.Visible : Visibility.Collapsed
            };

            this.showInTabCommandBarButton = new ShellCommandBarButton
            {
                ImageUri = new Uri("pack://application:,,/Resources/Images/ShellIcons/open_in_shell.scale-150.png"),
                Label    = "Im Hauptfenster andocken",
                Command  = new RelayCommand(() =>
                {
                    this.shellService.ShowWindowInNewTab(this.window);
                    this.window = null;
                }),
                Visibility = Visibility.Collapsed
            };

            this.showInWindowCommandBarButton = new ShellCommandBarButton
            {
                ImageUri = new Uri("pack://application:,,/Resources/Images/ShellIcons/open_in_window.scale-150.png"),
                Label    = "In Fenster öffnen",
                Command  = new RelayCommand(() =>
                {
                    var shellViewModel = SimpleIoc.Default.GetInstance <ShellViewModel>();
                    var shellTab       = shellViewModel.ShellTabs.Single(tab => Equals(tab.View, this.View));
                    this.window        = this.shellService.ShowTabInNewWindow(shellTab);
                }),
                Visibility = this.Job.IsNew ? Visibility.Collapsed : Visibility.Visible
            };

            this.saveAndCloseCommandBarButton = new ShellCommandBarButton
            {
                ImageUri   = new Uri("pack://application:,,/Resources/Images/ShellIcons/save_green.scale-150.png"),
                Label      = "Speichern und schließen",
                Command    = this.SaveJobCommand,
                Visibility = this.Job.IsNew ? Visibility.Collapsed : Visibility.Visible
            };

            this.saveAndNextCommandBarButton = new ShellCommandBarButton
            {
                ImageUri   = new Uri("pack://application:,,/Resources/Images/ShellIcons/save_green.scale-150.png"),
                Label      = "Speichern und neuen Auftrag anlegen",
                Command    = this.SaveJobCommand,
                Visibility = this.Job.IsNew ? Visibility.Visible : Visibility.Collapsed
            };

            this.cancelCommandBarButton = new ShellCommandBarButton
            {
                ImageUri =
                    new Uri("pack://application:,,/Resources/Images/ShellIcons/delete_sign_red.scale-150.png"),
                Label      = "Abbrechen",
                Command    = this.CancelJobEditCommand,
                Visibility = this.Job.IsNew ? Visibility.Visible : Visibility.Collapsed
            };

            this.cancelAndCloseCommandBarButton = new ShellCommandBarButton
            {
                ImageUri =
                    new Uri("pack://application:,,/Resources/Images/ShellIcons/delete_sign_red.scale-150.png"),
                Label      = "Abbrechen und schließen",
                Command    = this.CancelJobEditCommand,
                Visibility = this.Job.IsNew ? Visibility.Collapsed : Visibility.Visible
            };

            this.CommandBarItems = new ObservableCollection <ShellCommandBarItem>
            {
                this.undockingCommandBarButton,
                this.showInTabCommandBarButton,
                this.showInWindowCommandBarButton,
                new ShellCommandBarSeparator(),
                this.saveAndCloseCommandBarButton,
                this.saveAndNextCommandBarButton,
                this.cancelAndCloseCommandBarButton,
                this.cancelCommandBarButton
            };
        }
예제 #53
0
 public VideoResource(IShellService theSvc)
     : base(theSvc, "Videos")
 {
 }
예제 #54
0
 public JobEditorViewModel(IShellService shellService, IJobService jobService, IForcesService forcesService)
     : this(shellService, jobService, forcesService, new Job())
 {
 }
예제 #55
0
        public AngleMonitoringController(AngleMonitoringViewModel monitoringViewModel, IShellService shellService, ISettingsService settingsService, IGeneralService generalService,
                                         IDataService dataService)
        {
            this.monitoringViewModel = monitoringViewModel;
            this.shellService        = shellService;
            this.settingsService     = settingsService;
            this.generalService      = generalService;

            attUpdating = false;

            buffersFull = false;

            rollMeasBuffer = new List <LogPoint>();
            rollRefBuffer  = new List <LogPoint>();

            pitchMeasBuffer = new List <LogPoint>();
            pitchRefBuffer  = new List <LogPoint>();

            yawMeasBuffer = new List <LogPoint>();
            yawRefBuffer  = new List <LogPoint>();

            isVisible = true;

            this.dataService             = dataService;
            dataService.DataUpdateEvent += DataUpdateEventHandler;
        }
예제 #56
0
 public PrintPreviewViewModel(IPrintPreviewView view, IShellService shellService)
     : base(view, shellService)
 {
 }
예제 #57
0
 public RibbonRemoteCommandUIBuilder()
 {
     ShellService = ServiceLocator.Default.ResolveType <IShellService>();
     ShellService.Ribbon.RibbonTabAdded += Ribbon_RibbonTabAdded;
 }
예제 #58
0
 public TumblrDownloader(IShellService shellService, IManagerService managerService, CancellationToken ct, PauseToken pt,
                         IProgress <DownloadProgress> progress, IPostQueue <TumblrPost> postQueue, FileDownloader fileDownloader,
                         ICrawlerService crawlerService, IBlog blog, IFiles files)
     : base(shellService, managerService, ct, pt, progress, postQueue, fileDownloader, crawlerService, blog, files)
 {
 }
예제 #59
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     shellService  = Get <IShellService>();
     zoomViewModel = new MockZoomViewModel(new MockView(), shellService);
 }
예제 #60
0
        public LoginViewModel(IDialog dialog, IPasswordMediator mediator, IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            _dialog    = dialog;
            _messenger = messenger;
            _shell     = shell;
            _storage   = storage;
            _web       = web;

            _mediator   = mediator;
            ApiVersions = new Dictionary <string, string>();
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.AutoDiscovery), Strings.AutoDiscovery);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V4_Oauth), Strings.GitLabApiV4Oauth2);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3_Oauth), Strings.GitLabApiV3Oauth2);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V4), Strings.GitLabApiV4);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3), Strings.GitLabApiV3);
            ApiVersions.Add(Enum.GetName(typeof(ApiVersion), ApiVersion.V3_1), Strings.GitLabApiV31);
            SelectedApiVersion     = Enum.GetName(typeof(ApiVersion), ApiVersion.AutoDiscovery);
            _loginCommand          = new DelegateCommand(OnLogin);
            _forgetPasswordCommand = new DelegateCommand(OnForgetPassword);
            _activeAccountCommand  = new DelegateCommand(OnActiveAccount);
            _signupCommand         = new DelegateCommand(OnSignup);
        }