/// <summary> /// 发送开关按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click(object sender, RoutedEventArgs e) { IList <TraceSetTreeModel> selectList = GetCheckedItems(); List <string> lstrSelectName = new List <string>(); string strTest = string.Empty; byte[] arrySwitch = new byte[256]; for (int i = 0; i < 256; i++) { arrySwitch[i] = 0; } for (int i = 0; i < selectList.Count; i++) { //lstrSelectName.Add(selectList[i].Name); int nID = GetIDByName(selectList[i].Name); arrySwitch[nID] = 1; strTest += nID.ToString() + ": " + arrySwitch[nID].ToString() + "\n"; } PublishHelper.PublishMsg("/AtpBack/TraceConfig/StartTrace", arrySwitch); ParseMessageWindow Pw = new ParseMessageWindow(); Pw.Show(); }
private void OpenClick(object sender, RoutedEventArgs e) { ParseMessageWindow Pw = new ParseMessageWindow(); Pw.Show(); }