コード例 #1
0
 public void SetProject(SetProject newProject)
 {
     contentPath = Path.Combine("Content", newProject.Name);
     projectMetaDataFile = null;
     ProjectName = newProject.Name;
     ClearBufferedResources();
     RefreshMetaData();
     SendCheckProjectContent();
 }
コード例 #2
0
ファイル: OnlineService.cs プロジェクト: whztt07/DeltaEngine
		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();
		}
コード例 #4
0
 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();
 }