public void Execute(object parameter)
 {
     var window = new AddProjectWindow();
     _viewModel.AddProjectViewModel=new AddProjectViewModel(_viewModel);
     window.DataContext = _viewModel.AddProjectViewModel;
     window.InitializeComponent();
     window.ShowDialog();
 }
        private void Add_Project_Button_Click(object sender, RoutedEventArgs e)
        {
            AddProjectWindow addProject = new AddProjectWindow();

            if (addProject.ShowDialog() == true)
            {
                if (ServerConnector.PlaceProject(addProject.ProjectName))
                {
                    refreshProjectsComboBox();
                }
                else
                {
                    string           messageBoxText = "The entered project name has alredy exist! Please, enter another project name.";
                    string           caption        = "Wrong project name";
                    MessageBoxButton button         = MessageBoxButton.OK;
                    MessageBoxImage  icon           = MessageBoxImage.Warning;
                    MessageBox.Show(this, messageBoxText, caption, button, icon);
                }
            }
        }
Beispiel #3
0
        private void btn_addProject_Click(object sender, RoutedEventArgs e)
        {
            AddProjectWindow addProjectWindow = new AddProjectWindow(db);

            addProjectWindow.ShowDialog();
        }