Esempio n. 1
0
 /*******************************************************************************
 * FUNCTION:        Vps_pcMesageProcess
 * DESCRIPTION:     串口设置界面数据加载
 * INPUT:           none
 * OUTPUT:          none
 * RETURN:          true(成功)/false(失败)
 * OTHERS:          none
 *******************************************************************************/
 void PortConfigFileUpdata(object sender, EventArgs e)
 {
     if (sender == comboBoxPort)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "com", comboBoxPort.Text);
     }
     else if (sender == comboBaudRate)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "baud", comboBaudRate.Text);
     }
     else if (sender == comboBoxDataBits)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "Bits", comboBoxDataBits.Text);
     }
     else if (sender == comboBoxParity)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "Parity", comboBoxParity.Text);
     }
     else if (sender == comboBoxStopBits)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "StopBits", comboBoxStopBits.Text);
     }
     else if (sender == textBoxTimeout)
     {
         INIOperationClass.INIWriteValue(iniFilePath, "Config", "Timeout", textBoxTimeout.Text);
     }
     //else if (sender == textBox_IpAddr)
     //{
     //    INIOperationClass.INIWriteValue(iniFilePath, "Config", "IpAddr", textBox_IpAddr.Text);
     //}
     Interlocked.Exchange(ref CommSerialPort.isChange, 1);
 }
Esempio n. 2
0
 // Token: 0x060002F6 RID: 758 RVA: 0x0001EC60 File Offset: 0x0001CE60
 private void saveFileWithDialog(string dir)
 {
     this.saveFileDialog1.Filter           = "数据库备份文件(*.db)|*.db";
     this.saveFileDialog1.FilterIndex      = 1;
     this.saveFileDialog1.RestoreDirectory = true;
     if (dir != null && dir != "" && File.Exists(dir))
     {
         string initialDirectory = dir.Substring(dir.LastIndexOf("\\"));
         this.saveFileDialog1.InitialDirectory = initialDirectory;
     }
     if (this.saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         string text = this.saveFileDialog1.FileName.ToString();
         INIOperationClass.INIWriteValue(".\\wm.ini", "DBBackup", "path", text);
         this.filePathTB.Text = text;
         this.saveFile(text, true);
     }
 }
Esempio n. 3
0
        // Token: 0x060002F8 RID: 760 RVA: 0x0001ED9C File Offset: 0x0001CF9C
        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton radioButton = (RadioButton)sender;

            if (radioButton.Checked)
            {
                if (radioButton == this.radioButton1)
                {
                    INIOperationClass.INIWriteValue(".\\wm.ini", "DBBackup", "backupType", "0");
                    return;
                }
                if (radioButton == this.radioButton2)
                {
                    INIOperationClass.INIWriteValue(".\\wm.ini", "DBBackup", "backupType", "1");
                    return;
                }
                INIOperationClass.INIWriteValue(".\\wm.ini", "DBBackup", "backupType", "2");
            }
        }
Esempio n. 4
0
        // Token: 0x060001F9 RID: 505 RVA: 0x0000AB00 File Offset: 0x00008D00
        private void saveFile()
        {
            string text = INIOperationClass.INIGetStringValue(".\\wm.ini", "DBBackup", "path", "");

            if (text == "")
            {
                SaveFileDialog saveFileDialog = new SaveFileDialog();
                saveFileDialog.Filter           = "数据库备份文件(*.db)|*.db";
                saveFileDialog.FilterIndex      = 1;
                saveFileDialog.RestoreDirectory = true;
                if (saveFileDialog.ShowDialog() == DialogResult.OK)
                {
                    string text2 = saveFileDialog.FileName.ToString();
                    INIOperationClass.INIWriteValue(".\\wm.ini", "DBBackup", "path", text2);
                    this.saveFile(text2, true);
                    return;
                }
            }
            else
            {
                this.saveFile(text, true);
            }
        }