public TranslationItemViewModel(PointerText pointerText, ILineLengthService lineLengthService, IDialogService dialogService) { PointerText = pointerText; LineLengthService = lineLengthService; DialogService = dialogService; CalculateInitialLineLengths(); }
public MainWindowViewModel(IOService ioService, ILineLengthService lineLengthService) { Title = "Pokémon translation editor"; _ioService = ioService; _lineLengthService = lineLengthService; Filter = new FilterViewModel(); Filter.FilterChanged += Filter_FilterChanged; TranslationLines = new ObservableCollection <TranslationItemViewModel>(); TranslationLinesView = CollectionViewSource.GetDefaultView(TranslationLines); TranslationLinesView.Filter = (e => Filter.MatchesFilter(e as TranslationItemViewModel)); SelectedTranslationLines = new ObservableCollection <TranslationItemViewModel>(); autoSaveTimer = new Timer(); autoSaveTimer.Interval = 1 * 60 * 1000; autoSaveTimer.AutoReset = true; autoSaveTimer.Elapsed += AutoSaveTimer_Elapsed; statusClearTimer = new Timer(); statusClearTimer.Interval = 10 * 1000; statusClearTimer.AutoReset = false; statusClearTimer.Elapsed += StatusClearTimer_Elapsed; }
public LineLengthController(ILineLengthService lineLengthService) { _lineLengthService = lineLengthService; }