private void btnOK_Click(object sender, RoutedEventArgs e) { if (radProgram.IsChecked == true) { ID.Type = ProgramList.Types.Program; ContentControl path = (cmbPath.SelectedItem as ContentControl); ID.Path = path != null ? (path.Tag as string) : cmbPath.Text; ID.Name = ""; } else if (radService.IsChecked == true) { ID.Type = ProgramList.Types.Service; ContentControl path = (cmbPath.SelectedItem as ContentControl); ID.Path = path != null ? (path.Tag as string) : cmbPath.Text; ServiceModel.Service name = (cmbService.SelectedItem as ServiceModel.Service); ID.Name = name != null ? name.Value : cmbService.Text; } else if (radProgram.IsChecked == true) { ID.Type = ProgramList.Types.Program; ContentControl path = (cmbPath.SelectedItem as ContentControl); ID.Path = path != null ? (path.Tag as string) : cmbPath.Text; AppModel.App name = (cmbApp.SelectedItem as AppModel.App); ID.Name = name != null ? name.Value : cmbApp.Text; } this.DialogResult = true; }
public static void Main() { AppModel.App app = new AppModel.App(); app.InitializeComponent(); app.Run(); }