コード例 #1
0
 public void ToStringReturnsJustTheName()
 {
     var project1 = new ProjectNameAndFontWeight("GhostWars", FontWeights.Normal);
     var project2 = new ProjectNameAndFontWeight("EmptyApp", FontWeights.Bold);
     Assert.AreEqual("GhostWars", project1.ToString());
     Assert.AreEqual("EmptyApp", project2.ToString());
 }
コード例 #2
0
 public void DefaultContentProjectIsGhostWars()
 {
     var expected = new ProjectNameAndFontWeight("GhostWars", FontWeights.Normal);
     Assert.AreEqual(expected.Name, ProjectNameAndFontWeight.DefaultName);
     Assert.AreEqual(expected, new ProjectNameAndFontWeight());
     var different = new ProjectNameAndFontWeight("EmptyApp", FontWeights.Bold);
     Assert.AreNotEqual(expected, different);
     Assert.IsFalse(different.IsDefault());
     different.ResetToDefault();
     Assert.AreEqual(expected, different);
     Assert.IsTrue(different.IsDefault());
 }
コード例 #3
0
ファイル: EditorViewModel.cs プロジェクト: remy22/DeltaEngine
 private void SetCurrentProject(string project)
 {
     SelectedProject = new ProjectNameAndFontWeight(project, FontWeights.Normal);
 }
コード例 #4
0
ファイル: EditorViewModel.cs プロジェクト: remy22/DeltaEngine
 private void RefreshSelectedProject()
 {
     foreach (ProjectNameAndFontWeight project in AvailableProjects)
         if (project.Name == service.ProjectName)
         {
             SelectedProject = project;
             return;
         }
     SelectedProject = new ProjectNameAndFontWeight(service.ProjectName, FontWeights.Normal);
 }