#001 初版提交
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
using Telerik.WinControls.UI;
|
||||
using BaseFunction;
|
||||
|
||||
namespace NSAnalysis
|
||||
{
|
||||
public partial class FSoftwareSetup : Telerik.WinControls.UI.ShapedForm
|
||||
{
|
||||
#region RadButton鼠标事件
|
||||
|
||||
private void btn_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
RadButton btn = sender as RadButton;
|
||||
btn.BackColor = Color.FromArgb(0, 151, 186);
|
||||
}
|
||||
|
||||
private void btn_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
RadButton btn = sender as RadButton;
|
||||
btn.BackColor = Color.FromArgb(19, 46, 53);
|
||||
}
|
||||
|
||||
#endregion RadButton鼠标事件
|
||||
|
||||
private string strSection = "Chery";
|
||||
|
||||
private void LoadSoftwareSetup()
|
||||
{
|
||||
#region Load Software Setup
|
||||
|
||||
rtbIOTAddress.Text = ConfigDfn.strIOTAddress;
|
||||
rtbCarTypebyVIN.Text = ConfigDfn.strIOTCarTypeAddress;
|
||||
|
||||
//rtbVWUploadPath.Text = ConfigDfn.strUploadPath;
|
||||
//rtbUploadPath2.Text = ConfigDfn.strUploadPath2;
|
||||
|
||||
if (ConfigDfn.iStartIOTFlag == 1)
|
||||
{
|
||||
cbStartIOT.Checked = true;
|
||||
rtbIOTAddress.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbStartIOT.Checked = false;
|
||||
rtbIOTAddress.Enabled = false;
|
||||
}
|
||||
|
||||
if (ConfigDfn.iAnalysisCSVFlag == 1)
|
||||
{
|
||||
cbAnalysisCSV.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbAnalysisCSV.Checked = false;
|
||||
}
|
||||
|
||||
#endregion Load Software Setup
|
||||
}
|
||||
|
||||
public FSoftwareSetup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FSoftwareSetup_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadSoftwareSetup();
|
||||
}
|
||||
|
||||
private void rtbnSaveSetup_Click(object sender, EventArgs e)
|
||||
{
|
||||
//FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "tavascanUploadPath", rtbVWUploadPath.Text.Trim());
|
||||
//FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "blacklabelUploadPath", rtbUploadPath2.Text.Trim());
|
||||
//FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "Level2Times", rtbTolPercentage.Text.Trim());
|
||||
//FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "Level3Times", rtbLevel3.Text.Trim());
|
||||
|
||||
if (cbStartIOT.Checked)
|
||||
{
|
||||
FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "StartIOTFlag", 1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "StartIOTFlag", 0.ToString());
|
||||
}
|
||||
|
||||
if (cbAnalysisCSV.Checked)
|
||||
{
|
||||
FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "AnalysisCSVFlag", 1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
FileIni.WriteString(ConfigDfn.strConfigFile, strSection, "AnalysisCSVFlag", 0.ToString());
|
||||
}
|
||||
|
||||
MessageBox.Show("保存设置完成,请重启软件,参数即可生效! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void rbtnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void rbtnReportCSV2_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog mFolder = new FolderBrowserDialog();
|
||||
mFolder.Description = "请选择奇瑞报告存放的路径:";
|
||||
mFolder.ShowDialog();
|
||||
if (Directory.Exists(mFolder.SelectedPath))
|
||||
{
|
||||
rtbReportPath.Text = mFolder.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbStartIOT_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cbStartIOT.Checked)
|
||||
{
|
||||
rtbIOTAddress.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rtbIOTAddress.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user