Пример #1
0
        /// <summary>
        /// Initializes a new instance of the NameTagsViewModel class.
        /// </summary>
        public NameTagsViewModel(IKKFile dataService)
        {
            _dataService = dataService;

            ViewList = new CollectionViewSource();
            ViewList.Source = nameTagList;

            RefreshView();
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the NameTagsViewModel class.
        /// </summary>
        public ChapterNamesViewModel(IKKFile dataService)
        {
            _dataService = dataService;

            ViewList = new CollectionViewSource();
            ViewList.Source = chapterNameList;

            RefreshView();
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IKKFile dataService)
        {
            _dataService = dataService;
            WelcomeTitle = "One step at a time.";

            SaveCommand = new RelayCommand(Save);
            AddKKFileCommand = new RelayCommand(AddKKFile);
            GenerateKKCommand = new RelayCommand(GenerateKK);
            GenerateXLSCommand = new RelayCommand(GenerateXLS);
            CreateLabelAliasCommand = new RelayCommand(CreateLabelAlias);
            DestroyLabelAliasCommand = new RelayCommand(DestroyLabelAlias);
            _autoSaveTimer = new System.Threading.Timer(AutoSave, null, 300000, 300000);
        }
Пример #4
0
        public LineListViewModel(IKKFile dataService)
        {
            _dataService = dataService;

            ViewList = new CollectionViewSource();
            ViewList.Source = labelGroupList;

            NextPageCommand = new RelayCommand(NextPage, CanNextPage);
            PreviousPageCommand = new RelayCommand(PreviousPage, CanPreviousPage);
            JumpToPageCommand = new RelayCommand(JumpToPage, CanJumpToPage);
            CopyToClipboardCommand = new RelayCommand<string>(CopyToClipboard);

            RefreshView();
        }