Ejemplo n.º 1
0
 public SetFixedTestParams(TProjectBasicInfo projectInfo, bool IsEdit, DeviceConfig config)
 {
     InitializeComponent();
     this.StartPosition = FormStartPosition.CenterParent;
     this.projectInfo   = projectInfo;
     this.IsEditView    = IsEdit;
     this.devConfig     = config;
 }
 private void Init()
 {
     if (this.title != "")
     {
         this.Text = title;
     }
     projectInfo                    = new TProjectBasicInfo();
     projectInfoManager             = new TProjectBasicInfoManager();
     lineStructLibraryDetailManager = new TCableTestLibraryManager();
     RadGridViewProperties.SetRadGridViewProperty(this.radGridView1, false, true, 5);
     QueryPlugLineStructInfo();
     UpdateProjectInfo();
 }
        public static TProjectBasicInfo QueryProjectInfo(string projectName)
        {
            TProjectBasicInfo projectInfo = new TProjectBasicInfo();

            if (projectName == "")
            {
                return(projectInfo);
            }
            TProjectBasicInfoManager infoManager = new TProjectBasicInfoManager();
            var dt = infoManager.GetDataSetByWhere($"where ProjectName='{projectName}'").Tables[0];

            if (dt.Rows.Count < 1)
            {
                return(projectInfo);
            }
            foreach (DataRow dr in dt.Rows)
            {
                projectInfo.ProjectName                  = projectName;
                projectInfo.TestCableName                = dr["TestCableName"].ToString();
                projectInfo.ConductTestThreshold         = double.Parse(dr["ConductTestThreshold"].ToString());
                projectInfo.ConductTestVoltage           = double.Parse(dr["ConductTestVoltage"].ToString());
                projectInfo.ConductTestCurrentElect      = double.Parse(dr["ConductTestCurrentElect"].ToString());
                projectInfo.ShortCircuitTestThreshold    = double.Parse(dr["ShortCircuitTestThreshold"].ToString());
                projectInfo.InsulateTestThreshold        = double.Parse(dr["InsulateTestThreshold"].ToString());
                projectInfo.InsulateTestVoltage          = double.Parse(dr["InsulateTestVoltage"].ToString());
                projectInfo.InsulateTestRaiseTime        = double.Parse(dr["InsulateTestRaiseTime"].ToString());
                projectInfo.InsulateTestHoldTime         = double.Parse(dr["InsulateTestHoldTime"].ToString());
                projectInfo.VoltageWithStandardThreshold = double.Parse(dr["VoltageWithStandardThreshold"].ToString());
                projectInfo.VoltageWithStandardHoldTime  = double.Parse(dr["VoltageWithStandardHoldTime"].ToString());
                projectInfo.VoltageWithStandardVoltage   = double.Parse(dr["VoltageWithStandardVoltage"].ToString());
                projectInfo.ResistanceCompensation       = double.Parse(dr["ResistanceCompensation"].ToString());
                projectInfo.InsulateVolCompensation      = double.Parse(dr["InsulateVolCompensation"].ToString());
                projectInfo.InsulateResCompensation      = double.Parse(dr["InsulateResCompensation"].ToString());
                projectInfo.Temperature                  = double.Parse(dr["Temperature"].ToString());
                if (projectInfo.Temperature == 0)
                {
                    projectInfo.Temperature = 25;
                }
                projectInfo.AmbientHumidity = double.Parse(dr["AmbientHumidity"].ToString());
                if (projectInfo.AmbientHumidity == 0)
                {
                    projectInfo.AmbientHumidity = 56;
                }
            }
            return(projectInfo);
        }
 public FrmEnvironmentParams(TProjectBasicInfo info, DeviceConfig config)
 {
     InitializeComponent();
     this.basicInfo = info;
     this.devConfig = config;
 }
Ejemplo n.º 5
0
 public ResistanceManage(TProjectBasicInfo basicInfo, DeviceConfig config)
 {
     InitializeComponent();
     this.devConfig        = config;
     this.projectBasicInfo = basicInfo;
 }
Ejemplo n.º 6
0
 public FrmCableTestInfo(TProjectBasicInfo binfo)
 {
     InitializeComponent();
     this.proInfo = binfo;
 }