Пример #1
0
        private void openProjectButton_Click(object sender, RoutedEventArgs e)
        {
            ProjectOpenWindow _p = new ProjectOpenWindow();

            _p.ShowDialog();

            _currentProject = EyeProject.Load(_p.ChosenPath);

            _scriptEditor = new ScriptEditorWindow();
            _scriptEditor.SetProject(_currentProject);
            _scriptEditor.Show();
        }
Пример #2
0
        private void newProjectButton_Click(object sender, RoutedEventArgs e)
        {
            ProjectCreationWindow _p = new ProjectCreationWindow();

            _p.ShowDialog();

            _currentProject = EyeProject.New(_p.SelectedName, _p.SelectedProjectType);


            _scriptEditor = new ScriptEditorWindow();
            _scriptEditor.SetProject(_currentProject);
            _scriptEditor.Show();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string _name = projectNameTextBox.Text;

            if (EyeProject.Exists(_name))
            {
                MessageBox.Show($"A project wiht the selected name already exists");

                return;
            }
            else if (_name == String.Empty || projectTypeBox.SelectedIndex == -1)
            {
                MessageBox.Show("Please enter a name and type for the project");

                return;
            }

            SelectedName = _name;

            this.Close();
        }
Пример #4
0
        public void SetProject(EyeProject _proj)
        {
            CurrentProject = _proj;

            _vm = new TabControlViewModel();


            foreach (var v in _proj.Files)
            {
                _vm.Tabs.Add(new FileTabItem()
                {
                    FileName = v.Name + v.Extension,
                    Content  = v.Content
                });
            }

            DataContext = _vm;
            projectTreeView.ItemsSource = new ObservableCollection <EyeProject> {
                _proj
            };
        }