コード例 #1
0
        protected override void Execute()
        {
            var timedTextBox        = new ViewModels.TimedTextBox();
            var mainWindowViewModel = new MainWindowViewModel(new TemplateLoader(), new TMLoader(), DialogCoordinator.Instance, timedTextBox);

            var mainWindow = new MainWindow
            {
                DataContext = mainWindowViewModel
            };

            System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(mainWindow);
            mainWindow.Show();
        }
コード例 #2
0
        public MainWindowViewModel(TemplateLoader templateLoader, TMLoader tmLoader,
                                   IMessageService messageService, TimedTextBox timedTextBoxViewModel)
        {
            _templateLoader       = templateLoader;
            _tmLoader             = tmLoader;
            _messageService       = messageService;
            TimedTextBoxViewModel = timedTextBoxViewModel;

            _tmPath = _templateLoader.GetTmFolderPath();

            _variablesChecked         = true;
            _abbreviationsChecked     = true;
            _ordinalFollowersChecked  = true;
            _segmentationRulesChecked = true;
            _selectAllChecked         = true;
            _progressVisibility       = "Collapsed";

            _tmCollection = new ObservableCollection <TranslationMemory>();
        }
コード例 #3
0
        public MainWindowViewModel(TemplateLoader templateLoader, TMLoader tmLoader,
                                   IDialogCoordinator dialogCoordinator, TimedTextBox timedTextBoxViewModel)
        {
            _templateLoader       = templateLoader;
            _tmLoader             = tmLoader;
            _dialogCoordinator    = dialogCoordinator;
            TimedTextBoxViewModel = timedTextBoxViewModel;

            _tmPath = _templateLoader.GetTmFolderPath();

            _variablesChecked         = true;
            _abbreviationsChecked     = true;
            _ordinalFollowersChecked  = true;
            _segmentationRulesChecked = true;
            _selectAllChecked         = true;
            _progressVisibility       = "Hidden";

            _tmCollection = new ObservableCollection <TranslationMemory>();
        }
コード例 #4
0
        public MainWindowViewModel(ILanguageResourcesAdapter languageResourcesAdapter, IResourceManager resourceManager, TmLoader tmLoader,
                                   IMessageService messageService, TimedTextBox timedTextBoxViewModel, FilePathDialogService filePathDialogService)
        {
            _languageResourcesAdapter = languageResourcesAdapter;
            _resourceManager          = resourceManager;

            Settings = new Settings();
            Settings.PropertyChanged += Settings_PropertyChanged;

            _tmLoader              = tmLoader;
            _messageService        = messageService;
            _filePathDialogService = filePathDialogService;
            TimedTextBoxViewModel  = timedTextBoxViewModel;

            ResourceTemplatePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
                                                Versions.StudioDocumentsFolderName);

            _tmPath         = ResourceTemplatePath;
            _excelSheetPath = ResourceTemplatePath;

            _progressVisibility = "Collapsed";

            _tmCollection = new ObservableCollection <TranslationMemory>();
        }