コード例 #1
0
        public MainForm()
        {
            InitializeComponent();

            ENErrorCode VLoadCode = VAppSettings.FLoad();

            if (VLoadCode != ENErrorCode.EC_OK)
            {
                SCGlobal.FShowMessage("Что-то пошло не так...", "Код - " + VLoadCode.ToString());

                Application.Exit();
            }

            VScriptsController.FLoadScripts();

            VWebSites = VScriptsController.FGetScriptNames();

            foreach (String Script in VScriptsController.FGetScripts())
            {
                List <Tuple <String, String> > VScriptCategories = new List <Tuple <String, String> >();

                foreach (Tuple <String, String> ScriptCategory in VScriptsController.FGetScriptCategories(Script))
                {
                    VScriptCategories.Add(ScriptCategory);
                }

                VCategories.Add(new Tuple <String, List <Tuple <String, String> > >(Script, VScriptCategories));
            }

            FSetupForm();

            FFIllSettingsControls();
        }
コード例 #2
0
        private void FFillSettingsControls()
        {
            TargetWebSiteComboBox.Items.AddRange(VScriptsController.FGetOnlyScriptNames().ToArray());

            TargetWebSiteComboBox.SelectedIndex = 0;

            PagesParseTypeComboBox.Items.AddRange(VAppSettings.FGetProperty_PagesParseTypes().ToArray());

            if (PagesParseTypeComboBox.Items.Count == 0)
            {
                SCGlobal.FShowMessage("Что-то пошло не так...", "Код - " + ENErrorCode.EC_HAS_BEEN_INCORRECT_FEELING);

                Application.Exit();
            }

            PagesParseTypeComboBox.SelectedIndex = 0;

            VParsePagesMasks = VAppSettings.FGetProperty_PagesParseMasks();

            ContentExportTypeComboBox.Items.AddRange(VAppSettings.FGetProperty_ExportContentFormats().ToArray());

            ContentExportTypeComboBox.SelectedIndex = 0;

            DocumentationBrowser.Navigate("about:blank");

            if (DocumentationBrowser.Document != null)
            {
                DocumentationBrowser.Document.Write(String.Empty);
            }

            DocumentationBrowser.DocumentText = VDocumentationResources.GetString("Page_Blank");
        }
コード例 #3
0
        private void FFIllSettingsControls()
        {
            TargetWebSiteComboBox.Items.AddRange(VScriptsController.FGetOnlyScriptNames().ToArray());

            TargetWebSiteComboBox.SelectedIndex = 0;

            foreach (Tuple <String, String> WebSiteCategories in VCategories[0].Item2)
            {
                TargetCategoryComboBox.Items.Add(WebSiteCategories.Item1);
            }

            TargetCategoryComboBox.SelectedIndex = 0;

            PagesParseTypeComboBox.Items.AddRange(VAppSettings.FGetProperty_PagesParseTypes().ToArray());

            if (PagesParseTypeComboBox.Items.Count == 0)
            {
                SCGlobal.FShowMessage("Что-то пошло не так...", "Код - " + ENErrorCode.EC_HAS_BEEN_INCORRECT_FEELING);

                Application.Exit();
            }

            PagesParseTypeComboBox.SelectedIndex = 0;
        }