/// <summary> /// saves the changed settings /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CheckBox_CheckedChanged(object sender, EventArgs e) { try { if (m_GUIInterface.saveSetting(sender)) { if (sender.GetType() == typeof(CheckBox)) { if (((CheckBox)sender).Name.Equals("cbEDDNAutoListen") && cbEDDNAutoListen.Checked && (!cbEDDNAutoSend.Checked)) { if (MessageBox.Show(this, "The EDDN/EDDB lives from the data and it would be nice if you decide to feed the stream.\r\n" + "Shall I activate sending of EDDN data for you?\r\n\r\n" + "If you don't want to share market data you should at least allow sending journal/outfitting and shipyard data.\r\n" + "You can decide for each data type independently.", "EDDN Network", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) { cbEDDNAutoSend.Checked = true; if (!m_Communicator.SenderIsActivated) { m_Communicator.ActivateSender(); } } } else if (((CheckBox)sender).Name.Equals("cbEDDNAutoSend") && (!cbEDDNAutoSend.Checked)) { if (MessageBox.Show(this, "The EDDN/EDDB lives from the data and it would be nice if you decide to feed the stream.\r\n" + "Shall I activate sending of EDDN data for you?\r\n\r\n" + "If you don't want to share market data you should at least allow sending journal/outfitting and shipyard data.\r\n" + "You can decide for each data type independently.", "EDDN Network", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) { cbEDDNAutoSend.Checked = true; if (!m_Communicator.SenderIsActivated) { m_Communicator.ActivateSender(); } } } } } } catch (Exception ex) { CErr.processError(ex, "Error in ComboBox_CheckedChanged"); } }
/// <summary> /// saves the changed settings /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CheckBox_CheckedChanged(object sender, EventArgs e) { try { if (m_GUIInterface.saveSetting(sender)) { } } catch (Exception ex) { CErr.processError(ex, "Error in ComboBox_CheckedChanged"); } }
/// <summary> /// changes the data to selected "type" /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void rbType_CheckedChanged(object sender, EventArgs e) { try { if (m_GUIInterface.saveSetting(sender)) { LoadData(); FilterData(); } } catch (Exception ex) { CErr.processError(ex, "Error in rbType_CheckedChanged"); } }
/// <summary> /// selects another "traineddata" file for TesseractOCR /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdSelectTraineddataFile_Click(object sender, EventArgs e) { OpenFileDialog OCRFile = new OpenFileDialog(); OCRFile.Filter = "Tesseract-Files|*.traineddata|All Files|*.*"; OCRFile.FileName = Program.DBCon.getIniValue <String>(IBE.IBESettingsView.DB_GROUPNAME, "TraineddataFile"); OCRFile.InitialDirectory = Program.GetDataPath("tessdata"); OCRFile.Title = "select Tesseract Traineddata-File..."; if (OCRFile.ShowDialog(this) == DialogResult.OK) { txtOCRTraineddataFile.Text = System.IO.Path.GetFileNameWithoutExtension(OCRFile.FileName); m_GUIInterface.saveSetting(txtOCRTraineddataFile); } }