/// <summary> /// 窗体载入后加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Loaded(object sender, RoutedEventArgs e) { serialControlCenter = new SerialControlCenter(); UpdatePortShow(serialControlCenter.SerialPort); // serialControlCenter.RtuFrameArrived += serialControlCenter_RtuFrameArrived; NetInit(); ControlProcessConfig(); TelesignalisationLoad_Click(null, null); TelemeteringLoad_Click(null, null); ProtectSetPointLoad_Click(null, null); SystemCalibrationLoad_Click(null, null); SystemParameterLoad_Click(null, null); TelecontrolLoad_Click(null, null); EventlogLoad_Click(null, null); loopCallTimer = new Timer(10000); loopCallTimer.Elapsed += loopCallTimer_Elapsed; loopCallTimer.AutoReset = true; timeClock = new Timer(1000); timeClock.Elapsed += timeClock_Elapsed; timeClock.Start(); clockElement = new ClockElement(DateTime.Now); checkTimeSyn.IsChecked = true; TelecontrolInit(); updateAccountShow(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //状态信息栏 systemState = new SystemStateMessage(); systemStateGroup.DataContext = systemState; InitDownMcuComb(); //下位机选择 //用于DSP通讯 serialControlCenter = new SerialControlCenter(downComputeAddress); UpdatePortShow(serialControlCenter.SerialPort); serialControlCenter.RtuFrameArrived += serialControlCenter_RtuFrameArrived; //用于永磁通讯 yongciSerialControlCenter = new SerialControlCenter(yongcidownComputeAddress); UpdatePortShowB(yongciSerialControlCenter.SerialPort); yongciSerialControlCenter.RtuFrameArrived += yongciSerialControlCenter_RtuFrameArrived; InitLedSelected(); //永磁 LED下拉选择 InitYongciControlComb(); //永磁下位机 initYongciOperateSeleted(); //开关操作下拉菜单 }