コード例 #1
0
        private void LoadDocuments(WordPracticeViewModel practiceViewModel)
        {
            int filePrefix = practiceViewModel.SelectedOption + 1;

            practiceViewModel.StartDocument  = (byte[])Resources.ResourceManager.GetObject($"_{filePrefix}");
            practiceViewModel.ResultDocument = (byte[])Resources.ResourceManager.GetObject($"_{filePrefix}_result");
        }
コード例 #2
0
        private WordPracticeViewModel CreateWordPracticeViewModel(bool withDocs = false)
        {
            var practiceViewModel = new WordPracticeViewModel
            {
                Name             = "Контрольная работа №1. Microsoft Word",
                DocumentPath     = "1\\info",
                RulesDescription = "Правила оформления докладов",
                Description      =
                    "В данной контрольной работе вам необходимо выполнить форматирование текста по правилам в документе Microsoft Word.",
                IsVisible       = true,
                CurrentTheoryId = -1
            };

            StaticTheoryBuilder.AddWordOptions(practiceViewModel);
            UpdateSelection(practiceViewModel);

            if (withDocs)
            {
                LoadDocuments(practiceViewModel);
            }

            return(practiceViewModel);
        }