FormMain mainForm; //Mainform um auf Log-TAB und Statusleiste zugreifen zu können /// <summary> /// Initialisierung der Klasse /// </summary> /// <param name="mainForm">MainForm</param> public Configuration(FormMain mainForm) { InitializeComponent(); //com Ports zuweisen zu pull-down string[] aviableComPorts = ComPorts.readPorts(); foreach (string aviableComPort in aviableComPorts) { comPortComboBox.Items.Add(aviableComPort); } this.mainForm = mainForm; //in lokale Variable speichern // Alle werte aus den Settings den Steuerelementen zuweisen comPortComboBox.Text = Properties.Settings.Default.comPort; //ComPort loglevelComboBox.SelectedIndex = Properties.Settings.Default.logLevel; //LogLevel 1..Debug splashCheckBox.Checked = Properties.Settings.Default.spash; //soll Splash angezeigt werden timeOutMaskedTextBox.Text = Properties.Settings.Default.time.ToString(); //Timeout bei PIC read writeSleepMaskedTextBox.Text = Properties.Settings.Default.writeSleep.ToString(); //waren auf PIC Antwort beim Brennen //***** TONY readSleepMaskedText.Text = Properties.Settings.Default.iReadSleep.ToString(); //delay between each read askBurnPicCheckBox.Checked = Properties.Settings.Default.askBurnPic; //Sicherheitsabfrage beim Brennen bitsSComboBox.Text = Properties.Settings.Default.baudRate.ToString(); //bits per second paritaetComboBox.Text = Properties.Settings.Default.parity; // parität stopBitsComboBox.Text = Properties.Settings.Default.stopBits; // stopbits flussComboBox.Text = Properties.Settings.Default.handshake; //flusssteuerung languageComboBox.Text = Properties.Settings.Default.language; //sprachsteuerung versionComboBox.Text = Properties.Settings.Default.version; //PIC Version autoDisCheckBox.Checked = Properties.Settings.Default.focus; //auto disconnect bei Focusverlust }
public FormMain(string args) { // sprache übersteuern // wenn auto dann bestriebssystem einstellungen switch (Properties.Settings.Default.language) { case "english": Thread.CurrentThread.CurrentUICulture = new CultureInfo("en"); break; case "german": Thread.CurrentThread.CurrentUICulture = new CultureInfo("de"); break; case "french": Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr"); break; } InitializeComponent(); //com Ports zuweisen zu pull-down string [] aviableComPorts = ComPorts.readPorts(); foreach (string aviableComPort in aviableComPorts) { comPortToolStripComboBox.Items.Add(aviableComPort); } // sprachtexte laden help = new ResourceManager("UAVP.UAVPSet.Resources.hilfe", this.GetType().Assembly); labels = new ResourceManager("UAVP.UAVPSet.Resources.language", this.GetType().Assembly); errorLabels = new ResourceManager("UAVP.UAVPSet.Resources.error", this.GetType().Assembly); //Applikationspfad pfad = Application.StartupPath; // Comport aus Settings einstellen comPortToolStripComboBox.Text = Properties.Settings.Default.comPort; // version einstellen if (Properties.Settings.Default.version == "") { Version versionDialog = new Version(); versionDialog.ShowDialog(); } versionToolStripComboBox.Text = Properties.Settings.Default.version; // Logdatei neu erstellen Log.newLog(this); //Layout aus Einstellungen laden this.Height = Properties.Settings.Default.mainFormHeight; this.Width = Properties.Settings.Default.mainFormWidth; splitContainer1.SplitterDistance = Properties.Settings.Default.listViewWidth; LoadSettings(args); ChangeVersion(); Log.write(this, "Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(), 1); }
public FormMain() { // sprache übersteuern // wenn auto dann bestriebssystem einstellungen switch (Properties.Settings.Default.language) { case "english": Thread.CurrentThread.CurrentUICulture = new CultureInfo("EN"); break; case "german": Thread.CurrentThread.CurrentUICulture = new CultureInfo("DE"); break; } InitializeComponent(); //com Ports zuweisen zu pull-down string [] aviableComPorts = ComPorts.readPorts(); foreach (string aviableComPort in aviableComPorts) { comPortToolStripComboBox.Items.Add(aviableComPort); } // sprachtexte laden help = new ResourceManager("UAVP.UAVPSet.Resources.hilfe", this.GetType().Assembly); labels = new ResourceManager("UAVP.UAVPSet.Resources.language", this.GetType().Assembly); errorLabels = new ResourceManager("UAVP.UAVPSet.Resources.error", this.GetType().Assembly); //Applikationspfad pfad = Application.StartupPath; // Comport aus Settings einstellen comPortToolStripComboBox.Text = Properties.Settings.Default.comPort; // Logdatei neu erstellen Log.newLog(this); //Layout aus Einstellungen laden this.Height = Properties.Settings.Default.mainFormHeight; this.Width = Properties.Settings.Default.mainFormWidth; splitContainer1.SplitterDistance = Properties.Settings.Default.listViewWidth; }