Exemple #1
0
		private void OpenNewProjectForm()
		{
			var newProject = new NewProjectForm();
			newProject.ShowDialog();

			if (newProject.CreatedProject != null)
				_openedProject = newProject.CreatedProject;

			projectExplorerPanel1.ProjectExplorer.OpenProject(_openedProject);
		}
Exemple #2
0
		private void OpenProject(string filename)
		{
			if (string.IsNullOrEmpty(filename))
				return;

			CancelEventArgs cancelEvent = new CancelEventArgs {Cancel = false};
			AskForSave(cancelEvent);

			if (cancelEvent.Cancel)
				return;

			_openedProject = new RealProject("");

			if(_openedProject.Load(filename))
				projectExplorerPanel1.ProjectExplorer.OpenProject(_openedProject);
		}
Exemple #3
0
		private bool CreateProject(string directory, string name)
		{
			if (!Directory.Exists(directory))
			{
				var dialogResult = MessageBox.Show("Directory : '"+directory+"' doesn't exist. Do you want to create it ?", "Directory doesn't exist", MessageBoxButtons.YesNo);

				if(dialogResult == DialogResult.Yes)
				{
					Directory.CreateDirectory(directory);
				}
				else if(dialogResult == DialogResult.No)
				{
					return false;
				}
			}

			CreatedProject = new RealProject(name);
			CreatedProject.SaveAs(Path.Combine(directory, name, name + ".realproj"));

			return true;
		}
Exemple #4
0
		public void OpenProject(RealProject project)
		{
			_openedProject = project;
			if(_openedProject != null)
				RefreshFolder();
		}