Beispiel #1
0
        public void Execute(object parameter)
        {
            string pathStr = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            pathStr = pathStr + @"\QBM\TestPaper" + _examinationPaperGenerateViewModel.SelectTestPaper.Id + ".doc";
            Task task = new Task(() => {
                WordUtility.PrintWord(pathStr);
            });

            task.Start();
            _examinationPaperGenerateViewModel.AwaitTime(2000);
        }
        public void Execute(object parameter)
        {
            if (_examinationPaperGenerateViewModel.SelectTestPaper == null)
            {
                return;
            }
            Task task = new Task(() =>
            {
                WordUtility.CreateTestPaperWord(_examinationPaperGenerateViewModel.SelectTestPaper);
            });

            task.Start();
            _examinationPaperGenerateViewModel.AwaitTime(3000);
        }