public override void initlabels() { stateLT = new LabelAndText("状态:", "", Colors.White); valueLT = new LabelAndText("浓度:", "", Colors.White); valueLT.getUnitTextBlock().Text = " " + DeviceInUI.DataUnit; getInoPanel().Children.Add(stateLT); getInoPanel().Children.Add(valueLT); }
public override void initlabels() { cabStateLT = new LabelAndText("盖子状态:", "", Colors.White); rainyStateLT = new LabelAndText("下雨状态:", "", Colors.White); rainTimeLT = new LabelAndText("降雨时间(分钟):", "", Colors.White); getInoPanel().Children.Add(cabStateLT); getInoPanel().Children.Add(rainyStateLT); getInoPanel().Children.Add(rainTimeLT); }
public override void initlabels() { presureLT = new LabelAndText("压差:", "", "pa", Colors.White); realTrafficLT = new LabelAndText("瞬时流量:", "", "m^3/h", Colors.White); sampleVolumeLT = new LabelAndText("采样体积:", "", "m^3", Colors.White); keepTimeLT = new LabelAndText("采样时间:", "", "h", Colors.White); getInoPanel().Children.Add(presureLT); getInoPanel().Children.Add(realTrafficLT); getInoPanel().Children.Add(sampleVolumeLT); getInoPanel().Children.Add(keepTimeLT); }
private void init() { initChart(); both.IsChecked = true; Dictionary <string, Device> devices = GlobalMapForShow.globalMapForDevice; cabAlarm = new AlarmBuzzer(); //cabAlarm.startAlarm(); //for(int i=0;i<_cab.Devices.Count;i++) //{ // if (!_cab.Devices[i].Type.Equals("Pump")) // { // CheckBox c = new CheckBox(); // if (i == _cab.Devices.Count) // { // c.Name = "cb_all_select"; // c.Content = "全选"; // } // else // { // Device d = _cab.Devices[i]; // c.Name = "cb_" + _cab.Devices[i].DeviceId; // c.Content = "" + _cab.Devices[i].DeviceId; // c.Content =d.HandleTypeInSystem; // } // c.IsChecked = true; // c.Margin = new Thickness(2); ; // c.Foreground = new SolidColorBrush(Colors.White); // c.Checked += new RoutedEventHandler(c_Checked); // c.Unchecked += new RoutedEventHandler(c_Unchecked); // // curveChooser.Items.Add(c);//_cab.Devices[i].DeviceId+"" // } //} if (_cab != null) { cab_name.Text = _cab.Name; system_name.Text = MainWindow.getInstance().Buildings[int.Parse(_cab.BuildingId) - 1].Name; deviceCountLT = new LabelAndText("设备总数:", _cab.Devices.Count + "", ""); deviceCountLT.setForeGround(Colors.White); info_panel.Children.Add(deviceCountLT); stateLT = new LabelAndText("状态:", _cab.State.Equals("Nomal") ? "正常" : "异常", ""); stateLT.setForeGround(Colors.White); info_panel.Children.Add(stateLT); } initArtWork(); cabAlarm.Visibility = System.Windows.Visibility.Hidden; }
public override void initlabels() { stateLT = new LabelAndText("状态:", "", Colors.White); valueLT = new LabelAndText("浓度:", "", Colors.White); ////实时值绑定 //Binding valueBingding = new Binding(); //valueBingding.Source = DeviceInUI; //valueBingding.Path = new PropertyPath("Box"); //valueLT.getValueTextBlock().SetBinding(TextBlock.TextProperty, valueBingding); ////状态绑定 //Binding stateBinding = new Binding(); //stateBinding.Source = DeviceInUI; //stateBinding.Path = new PropertyPath("State"); //valueLT.getValueTextBlock().SetBinding(TextBlock.TextProperty, stateBinding); getInoPanel().Children.Add(stateLT); getInoPanel().Children.Add(valueLT); }