private void Button_Click_1(object sender, RoutedEventArgs e) { try { ViewChanel v = new ViewChanel(12); v.token = token; AllCircuitsView allCircutsView = new AllCircuitsView(); v.ShowDialog(); } catch { MessageBox.Show("Error!"); return; } }
private void Row_DoubleClick(object sender, MouseButtonEventArgs e) { // DataGridRow row = sender as DataGridRow; int id = 0; try { string s = row.Item.ToString(); string[] lines = s.Split(new[] { "\n" }, StringSplitOptions.None); id = int.Parse(lines[1].Replace("Id:", "").Trim()); } catch { MessageBox.Show("Select valid Id row"); return; } // ViewChanel v = new ViewChanel(id); v.token = token; v.Button_Click(null, null); v.ShowDialog(); }