private void btnEditKeyFile_Click(object sender, RoutedEventArgs e) { var selectedKeyFile = lstKeys.Items.OfType <File>().Where(k => k.IsSelected).FirstOrDefault(); if (selectedKeyFile != null) { EditKeyFileWindow ekf = new EditKeyFileWindow(Main, tools, this, selectedKeyFile.FileName); ekf.ShowDialog(); } }
private void btnNewKeyFile_Click(object sender, RoutedEventArgs e) { EditKeyFileWindow ekf = new EditKeyFileWindow(Main, tools, this); ekf.ShowDialog(); }