Ejemplo n.º 1
0
        public OpenExistProjectPage()
        {
            InitializeComponent();
            SingleSpaceParams.KillSingle();

            if (chooseProjectTextBlock.IsEnabled == false)
            {
                chooseProjectTextBlock.Opacity = 0.1;
            }
        }
Ejemplo n.º 2
0
        public CreateProjectPage()
        {
            InitializeComponent();
            SingleSpaceParams.KillSingle();

            if (createCustomerTextBlock.IsEnabled == false)
            {
                createCustomerTextBlock.Opacity = 0.1;
            }

            if (chooseCustomerTextBlock.IsEnabled == false)
            {
                chooseCustomerTextBlock.Opacity = 0.1;
            }
        }
Ejemplo n.º 3
0
        private void OpenExistProjectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Project          project = _ProjectsFromDB.ElementAt(_SelectedItemInCombobox);
                SchemeOfBuilding scheme  = project.Scheme.First();
                if (SingleSpaceParams.getInstance() == null)
                {
                    SingleSpaceParams.getInstance(Convert.ToInt32(scheme.Width), Convert.ToInt32(scheme.Height));
                }
                else
                {
                    SingleSpaceParams.KillSingle();
                    SingleSpaceParams.getInstance(Convert.ToInt32(scheme.Width), Convert.ToInt32(scheme.Height));
                }

                MainWindowPage mainWindow = new MainWindowPage(_Context, project.ProjectId);
                mainWindow.Show();
            }
            catch
            {
                MessageBox.Show("Ошибка! Информация не была получена из базы данных!");
            }
        }