/// <summary> /// 编辑项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void click_Modify_Config(object sender, RoutedEventArgs e) { DC_DATA_CONFIG config = (DC_DATA_CONFIG)(sender as FrameworkElement).Tag; w_Config window = new w_Config(config); if (window.ShowDialog() != true) { Load(); } }
/// <summary> /// 添加项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void click_Add_Config(object sender, RoutedEventArgs e) { DC_DEVICE device = (DC_DEVICE)(sender as FrameworkElement).Tag; w_Config window = new w_Config(device); if (window.ShowDialog() == true) { device.Configs.Add(window.Config); } }