예제 #1
0
        private void LoadFileToBD_OnClick(object sender, RoutedEventArgs e)
        {
            string typeCompiler = (string)CompilName.SelectedItem;
            string lang         = "";

            if (CsharpLanguage.IsChecked == true)
            {
                lang = (string)CsharpLanguage.Content;
            }
            else if (CppLanguage.IsChecked == true)
            {
                lang = (string)CppLanguage.Content;
            }
            else if (JavaLanguage.IsChecked == true)
            {
                lang = (string)JavaLanguage.Content;
            }
            LoadWindow load = new LoadWindow(_dataBase, NameAuthor.Text, Description.Text, typeCompiler, _path, _search);

            load.ShowDialog();
            if (_search && _dataBase.IsNotEnpty())
            {
                _swichToResutl(_dataBase, false);
            }
            else
            {
                CsharpLanguage.IsChecked = true;
                NameAuthor.Text          = "Имя и Фамилия";
                Description.Text         = "Краткое описание";
            }
        }
예제 #2
0
        private void LoadFileToBD_OnClick(object sender, RoutedEventArgs e)
        {
            string typeCompiler = (string)CompilName.SelectedItem;
            string lang         = "";

            if (CsharpLanguage.IsChecked == true)
            {
                lang = (string)CsharpLanguage.Content;
            }
            else if (CppLanguage.IsChecked == true)
            {
                lang = (string)CppLanguage.Content;
            }
            else if (JavaLanguage.IsChecked == true)
            {
                lang = (string)JavaLanguage.Content;
            }
            LoadWindow load = new LoadWindow(NameAuthor.Text, Description.Text, typeCompiler, _search, GetCode(), FileName, ref _resultCompare, CompareMy.IsChecked ?? true);

            load.ShowDialog();
            if (_search && !(CompareMy.IsChecked ?? true))
            {
                _swichToResutl(_resultCompare);
            }
            else if (_search && (CompareMy.IsChecked ?? true))
            {
                LoadAlgorithmReflection myAlgorithmReflection = new LoadAlgorithmReflection(_resultCompare);
                myAlgorithmReflection.LocalCompareRun();
                _swichToResutl(_resultCompare);
            }
            else
            {
                CsharpLanguage.IsChecked = true;
                NameAuthor.Text          = "Имя и Фамилия";
                Description.Text         = "Краткое описание";
            }
        }