private void FrmHome_Load(object sender, EventArgs e) { Loading ld = new Loading(); ld.Show(); ld.Activate(); DataTable languageTable = null; try { languageTable = servRef.GetLanguages(clientID, secret); } catch (Exception exe) { if (exe.ToString().Contains("Document Limit Reached")) { MessageBox.Show("Document Limit Reached. You must purchase a license to continue, please visit www.QuillDigital.co.uk", "Quill", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Close(); System.Windows.Forms.Application.Exit(); return; } } languages.Items.Add("NONE"); foreach (DataRow langRow in languageTable.Rows) { languages.Items.Add(langRow[0].ToString()); } languages.Text = "NONE"; string pages = servRef.GetPagesLeft(clientID, secret); label8.Text = "Pages left: " + pages; extractFields.Checked = true; savePath.Text = GetConfiguration.GetConfigurationValueSaveLocation(); if (string.IsNullOrEmpty(savePath.Text.Trim())) { string runDir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); if (!Directory.Exists(Path.Combine(runDir, "TEMPS"))) { Directory.CreateDirectory(Path.Combine(runDir, "TEMPS")); } savePath.Text = Path.Combine(runDir, "TEMPS"); GetConfiguration.ConfigurationValueSaveLocation(Path.Combine(runDir, "TEMPS")); } else { savePath.Text = GetConfiguration.GetConfigurationValueSaveLocation(); } Globals.ocrType = GetConfiguration.GetConfigurationValueOCR(); Globals.meta = GetConfiguration.GetConfigurationValueMeta(); Globals.dpi = GetConfiguration.GetConfigurationValueDPI(); string refreshDate = servRef.GetRefreshDate(clientID, secret); label5.Text = refreshDate; ld.Close(); }
private void button13_Click(object sender, EventArgs e) { FrmReport report = new FrmReport(GetConfiguration.GetConfigurationValueSaveLocation()); report.ShowDialog(); }