Ejemplo n.º 1
0
        private void UpdataJob(string taskinformationpath, ref JobList jobInfo)
        {
            INIFiLE iNI = new INIFiLE(taskinformationpath);

            jobInfo.Information.testingTime    = DateTime.Now;
            jobInfo.Information.testingName    = iNI.ReadString("information", "试验名称", "");
            jobInfo.Information.tester         = iNI.ReadString("information", "试验人员", "");
            jobInfo.Information.testingAgency  = iNI.ReadString("information", "试验单位", "");
            jobInfo.Information.auditor        = iNI.ReadString("information", "审核人", "");
            jobInfo.Information.approver       = iNI.ReadString("information", "批准人", "");
            jobInfo.Information.principal      = iNI.ReadString("information", "负责人", "");
            jobInfo.Information.weather        = iNI.ReadString("information", "天气", "");
            jobInfo.Information.temperature    = iNI.ReadString("information", "温度", "");
            jobInfo.Information.humidity       = iNI.ReadString("information", "湿度", "");
            jobInfo.Information.oilTemperature = iNI.ReadInt("information", "变压器油温(整数)", 0);
        }
Ejemplo n.º 2
0
 private void UpanWindows_loaded(object sender, RoutedEventArgs e)
 {
     Drivenames = Environment.GetLogicalDrives();
     string[] testTime = new string[Tasknames.Length];
     for (int i = 0; i < Tasknames.Length; i++)
     {
         INIFiLE ini = new INIFiLE(Drivenames[Drivenames.Length - 1] + Tasknames[i] + "\\Information.ini");
         testTime[i] = "Name:   " + Tasknames[i] + "(" + ini.ReadString("information", "测试时间", "") + ")";
     }
     JobListBox.ItemsSource = testTime;
     try { JobListBox.SelectedItem = 0; } catch { }
 }