Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public static void Main()
 {
     AppModel.App app = new AppModel.App();
     app.InitializeComponent();
     app.Run();
 }