예제 #1
0
 public void ClearArray()
 {
     try
     {
         if (ValidateData.ArrayIsNullOrZero(TheConvertingStation))
         {
             TheConvertingStation.Clear();
         }
         if (ValidateData.ArrayIsNullOrZero(TheGeneratrix))
         {
             TheGeneratrix.Clear();
         }
         if (ValidateData.ArrayIsNullOrZero(TheCircuit))
         {
             TheCircuit.Clear();
         }
         if (ValidateData.ArrayIsNullOrZero(TheDetection))
         {
             TheDetection.Clear();
         }
         if (ValidateData.ArrayIsNullOrZero(TheDeviceDataSetting))
         {
             TheDeviceDataSetting.Clear();
         }
         if (ValidateData.ArrayIsNullOrZero(TheTimeSetting))
         {
             TheTimeSetting.Clear();
         }
     }
     catch (Exception msg)
     {
         Log.LogWrite(msg);
     }
 }
 //绑定变检测点
 public void bindDetection(List <Detection> theDetectionArray)
 {
     if (ValidateData.ArrayIsNullOrZero <Detection>(theDetectionArray))
     {
         DetectionView.DataSource = theDetectionArray;
     }
 }
 //绑定设备
 public void bindDeviceDataSetting(List <DeviceDataSetting> theDetectionArray)
 {
     if (ValidateData.ArrayIsNullOrZero <DeviceDataSetting>(theDetectionArray))
     {
         DeviceDataView.DataSource = theDetectionArray;
     }
 }
 //绑定变线路
 public void bindCircuit(List <Circuit> theCircuitArray)
 {
     if (ValidateData.ArrayIsNullOrZero <Circuit>(theCircuitArray))
     {
         CircuitView.DataSource = theCircuitArray;
     }
 }
 //绑定母线
 public void bindGeneratrix(List <Generatrix> theGeneratrixArray)
 {
     if (ValidateData.ArrayIsNullOrZero <Generatrix>(theGeneratrixArray))
     {
         GeneratrixView.DataSource = theGeneratrixArray;
     }
 }
 //绑定变电站
 public void bindConvertingStation(List <ConvertingStation> theConvertingStationArray)
 {
     if (ValidateData.ArrayIsNullOrZero <ConvertingStation>(theConvertingStationArray))
     {
         ConvertingStationView.DataSource = theConvertingStationArray;
     }
 }
예제 #7
0
 private void MsgCircuit_Load(object sender, EventArgs e)
 {
     if (ValidateData.ArrayIsNullOrZero <Generatrix>(this.theSettingGrop.TheGeneratrix))
     {
         this.comboBox1.DataSource    = theSettingGrop.TheGeneratrix;
         this.comboBox1.DisplayMember = "GeneratrixName";
         this.comboBox1.ValueMember   = "GeneratrixID";
     }
     if (theCircuit != null)
     {
         SetContent();
     }
 }
예제 #8
0
 private void MsgGeneratrix_Load(object sender, EventArgs e)
 {
     if (ValidateData.ArrayIsNullOrZero <ConvertingStation>(this.theSettingGrop.TheConvertingStation))
     {
         this.comboBox1.DataSource    = this.theSettingGrop.TheConvertingStation;
         this.comboBox1.DisplayMember = "stationName";
         this.comboBox1.ValueMember   = "stationID";
     }
     if (theMsgGeneratrix != null)
     {
         SetContent();
     }
 }
 private void RouteMap_Load(object sender, EventArgs e)
 {
     this.Icon = Resources.lineError;
     //绑定线路
     if (ValidateData.ArrayIsNullOrZero <Circuit>(theSettingGrop.TheCircuit))
     {
         this.comboBox1.DataSource    = theSettingGrop.TheCircuit;
         this.comboBox1.DisplayMember = "CircuitName";
         this.comboBox1.ValueMember   = "CircuitID";
         //..10
         timer1.Start();
         timer2.Start();
     }
     this.Paint += RouteMap_Paint;
 }
 private void MsgDetection_Load(object sender, EventArgs e)
 {
     HidelLable();
     if (ValidateData.ArrayIsNullOrZero <Circuit>(this.theSettingGrop.TheCircuit))
     {
         this.comboBox1.DataSource    = this.theSettingGrop.TheCircuit;
         this.comboBox1.DisplayMember = "CircuitName";
         this.comboBox1.ValueMember   = "CircuitID";
         List <Detection> addDetection = new List <Detection>();
         addDetection.Add(new Detection()
         {
             DetectionID = "0", DetectionName = "无"
         });
         addDetection.AddRange(this.theSettingGrop.TheDetection);
         this.comboBox2.DataSource    = addDetection;
         this.comboBox2.DisplayMember = "DetectionName";
         this.comboBox2.ValueMember   = "DetectionID";
     }
     if (theDetection != null)
     {
         SetControlsValue();
     }
 }