예제 #1
0
 public void SetProject(SetProject newProject)
 {
     contentPath = Path.Combine("Content", newProject.Name);
     projectMetaDataFile = null;
     ProjectName = newProject.Name;
     ClearBufferedResources();
     RefreshMetaData();
     SendCheckProjectContent();
 }
예제 #2
0
		private void ChangeProject(SetProject project)
		{
			IsDeveloper = project.Permissions == ProjectPermissions.Full;
			if (project.Permissions == ProjectPermissions.None)
			{
				if (StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
					throw new NoAccessForProject(project.Name);
				MessageBox.Show("No access to project " + project.Name, "Fatal Error");
			}
			else
			{
				ProjectName = project.Name;
				Permissions = project.Permissions;
				editorContent.SetProject(project);
				isContentReady = false;
				if (ProjectChanged != null)
					ProjectChanged();
			}
		}
예제 #3
0
		private void VerifyProject(SetProject newProject)
		{
			IsContentReady = false;
			DeleteProjectVisibility = newProject.Permissions == ProjectPermissions.Full
				? Visibility.Visible : Visibility.Collapsed;
			RaisePropertyChanged("DeleteProjectVisibility");
			if (newProject.Permissions != ProjectPermissions.None)
				return;
			selectedProject = DefaultContentProjectName;
			Logout();
		}
 private void VerifyProject(SetProject newProject)
 {
     if (newProject.Permissions == ProjectPermissions.None)
         throw new NoPermissionToUseProject(newProject.Name);
     ProjectName = newProject.Name;
     ProjectMetaDataFile.Root.UpdateAttribute("Name", newProject.Name);
     SaveXmlFile();
 }