private void LoopCount_Changed(object sender, EventArsgLoopCount args) { // 0 、序号 // 1 、回路名称 // 2 、参考电流 // 3、 亮灯率 // 4、 功率因数 // 5、 互感器比 // 6、 回路上限 // 7 、回路下限 // 8、 线路状态 // 9 、昨日数据 // 10、状态 // 11、电压 // 12、电流 // 13、功率 // 14、手动选测自动显示数据 // 15、显示回路数据电压电流等单位 // 16、历史数据查询显示高级选项 var tmp = args.IsShowPro; while (tmp.Count < 21) { tmp.Add(false); } cx0.IsVisible = tmp[0]; cx1.IsVisible = tmp[1]; cx2.IsVisible = tmp[2]; cx3.IsVisible = tmp[3]; cx4.IsVisible = tmp[4]; cx5.IsVisible = tmp[5]; cx6.IsVisible = tmp[6]; cx7.IsVisible = tmp[7]; cx08.IsVisible = tmp[8]; cx12.IsVisible = tmp[9] && tmp[12]; cx13.IsVisible = tmp[9] && tmp[13]; cx17.IsVisible = tmp[18]; cx18.IsVisible = Cr.CoreOne.Services.OptionXmlSvr.GetOptionBool(2801, 5) == true; cx19.IsVisible = tmp[20]; }
void value_LoopCountChanged(object sender, EventArsgLoopCount e) { // 0 、序号 // 1 、回路名称 // 2 、参考电流 // 3、 亮灯率 // 4、 功率因数 // 5、 互感器比 // 6、 回路上限 // 7 、回路下限 // 8、 线路状态 // 9 、昨日数据 // 10、状态 // 11、电压 // 12、电流 // 13、功率 // 14、手动选测自动显示数据 // 15、显示回路数据电压电流等单位 // 16、历史数据查询显示高级选项 var tmp = e.IsShowPro; while (tmp.Count < 19) { tmp.Add(false); } xh0.IsVisible = tmp[0]; xh1.IsVisible = tmp[1]; xh2.IsVisible = tmp[2]; xh3.IsVisible = tmp[3]; xh4.IsVisible = tmp[4]; xh5.IsVisible = tmp[5]; xh6.IsVisible = tmp[6]; xh7.IsVisible = tmp[7]; xh8.IsVisible = tmp[8]; xh17.IsVisible = tmp[18]; xh10.IsVisible = tmp[9] != false && tmp[10]; xh11.IsVisible = tmp[9] != false && tmp[11]; xh12.IsVisible = tmp[9] != false && tmp[12]; xh13.IsVisible = tmp[9] != false && tmp[13]; xh18.IsVisible = Cr.CoreOne.Services.OptionXmlSvr.GetOptionBool(2801, 5) == true; xh19.IsVisible = tmp[20]; //rrrr.Visibility = Visibility.Collapsed; //rrbb.Visibility = Visibility.Collapsed; //rrcc.Visibility = Visibility.Collapsed; //gggg.Visibility = tmp[9] ? Visibility.Visible : Visibility.Collapsed; isShowHis = tmp[9]; if (tmp[9]) { if (Wlst.Cr.CoreOne.Services.OptionXmlSvr.GetOptionBool(2801, 7, true)) { tm.Visibility = Visibility.Collapsed; tm1.Visibility = Visibility.Visible; } else { tm.Visibility = Visibility.Visible; tm1.Visibility = Visibility.Collapsed; } rrrr.Visibility = Visibility.Visible; } else { tm.Visibility = Visibility.Collapsed; tm1.Visibility = Visibility.Collapsed; rrrr.Visibility = Visibility.Collapsed; } _loopcount = e.LoopCount; foreach (var f in lp1234lploopinfo.Items) { GridViewRowItem row = lp1234lploopinfo.ItemContainerGenerator.ContainerFromItem(f) as GridViewRowItem; if (row != null) { if (row.DataContext is LoopInfoLeft) { var sp = row.DataContext as LoopInfoLeft; if (sp.Indexr <= e.LoopCount) { var cc = (Color)ColorConverter.ConvertFromString(sp.Backgroundx); row.Background = new SolidColorBrush(cc); // row.Height = _rouheight; } //else //{ // row.Height = 0; //} // ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Colors.Gray); } } } if (sc != null) { sc.ScrollToTop(); } lp1234lploopinfo.SelectedItem = null; }