Esempio n. 1
0
 private void EditAppButton_Click(object sender, RoutedEventArgs e)
 {
     if (lstAvailableApplication.SelectedItem != null)
     {
         ApplicationDialog applicationDialog = new ApplicationDialog(lstAvailableApplication.SelectedItem as IApplication);
         applicationDialog.ShowDialog();
     }
 }
Esempio n. 2
0
        private void btnAddIgnoredApp_Click(object sender, RoutedEventArgs e)
        {
            this.lstIgnoredApplications.SelectedIndex = -1;

            ApplicationDialog applicationDialog = new ApplicationDialog(false);

            applicationDialog.ShowDialog();
        }
Esempio n. 3
0
        private void EditApplication()
        {
            var userapp = lstAvailableApplication.SelectedItem as UserApp;

            if (userapp != null)
            {
                ApplicationDialog applicationDialog = new ApplicationDialog(userapp);
                applicationDialog.ShowDialog();
            }
        }
Esempio n. 4
0
        private void btnEditIgnoredApp_Click(object sender, RoutedEventArgs e)
        {
            IgnoredApplication ia = this.lstIgnoredApplications.SelectedItem as IgnoredApplication;

            if (ia == null)
            {
                return;
            }

            ApplicationDialog applicationDialog = new ApplicationDialog(ia);

            applicationDialog.ShowDialog();
        }
Esempio n. 5
0
        private void EditIgnoredApp()
        {
            var ia = this.lstIgnoredApplications.SelectedItem as IgnoredApp;

            if (ia == null)
            {
                return;
            }

            ApplicationDialog applicationDialog = new ApplicationDialog(ia);

            applicationDialog.ShowDialog();
        }
Esempio n. 6
0
        private void AddApplicationCommand()
        {
            var applicationViewModel = new MyApplicationViewModel();

            var applicationDialog = new ApplicationDialog(applicationViewModel)
            {
                Owner = OptionsView.CurrentInstance,
                WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            if (applicationDialog.ShowDialog() == true)
            {
                Applications.Add(applicationViewModel);
            }
        }
Esempio n. 7
0
        private void ButtonEdit_Click(object sender, RoutedEventArgs e)
        {
            CIMOBProject.Models.Application applicationEdit = applicationGrd.SelectedItem as CIMOBProject.Models.Application;
            if (applicationEdit == null)
            {
                return;
            }
            ApplicationDialog applicationDialog = new ApplicationDialog(new CIMOBProject.Models.Application(applicationEdit))
            {
                Title = "Editar Estado Candidatura"
            };

            if (applicationDialog.ShowDialog() == true)
            {
                DbContextHelper.EditApplication(_db, applicationDialog.Application);
                //Refresh needed to update virtual properties.
                applicationGrd.Items.Refresh();
            }
        }
Esempio n. 8
0
        private void EditApplicationCommand()
        {
            var applicationViewModel = new MyApplicationViewModel
            {
                ApplicationName = SelectedApplicationViewModel.ApplicationName,
                Path            = SelectedApplicationViewModel.Path,
                RunAsLocalAdmin = SelectedApplicationViewModel.RunAsLocalAdmin
            };

            var applicationDialog = new ApplicationDialog(applicationViewModel)
            {
                Owner = OptionsView.CurrentInstance,
                WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            if (applicationDialog.ShowDialog() == true)
            {
                SelectedApplicationViewModel.Path            = applicationViewModel.Path;
                SelectedApplicationViewModel.RunAsLocalAdmin = applicationViewModel.RunAsLocalAdmin;
            }
        }
Esempio n. 9
0
        private void NewApplicationButton_OnClick(object sender, RoutedEventArgs e)
        {
            ApplicationDialog applicationDialog = new ApplicationDialog(true);

            applicationDialog.ShowDialog();
        }