Example #1
0
		private void StartNewEditorIfEntityFound(Vector2D position)
		{
			foreach (
				Entity2D entity in entities.Where(entity => entity.RotatedDrawAreaContains(position)))
				if (EditorMode == EditorMode.Read)
					ActiveEditor = new EntityReader(entity);
				else
					// Can't test this with ncrunch as pausing time can mess up other tests at random
					ActiveEditor = new EntityWriter(entity); // ncrunch: no coverage
		}
Example #2
0
		public void SetUp()
		{
			ellipse = new Ellipse(Vector2D.Half, 0.2f, 0.1f, Color.Blue);
			ellipse.Add(new Name("name"));
			writer = new EntityWriter(ellipse);
			drawAreaBox = writer.scene.Controls[1] as TextBox;
			colorRSlider = writer.scene.Controls[3] as Slider;
			colorGSlider = writer.scene.Controls[5] as Slider;
			colorBSlider = writer.scene.Controls[7] as Slider;
			colorASlider = writer.scene.Controls[9] as Slider;
			nameBox = writer.scene.Controls[11] as TextBox;
			rotationBox = writer.scene.Controls[13] as TextBox;
			rotationCenterBox = writer.scene.Controls[15] as TextBox;
		}
Example #3
0
 private void StartNewEditorIfEntityFound(Vector2D position)
 {
     foreach (
         Entity2D entity in entities.Where(entity => entity.RotatedDrawAreaContains(position)))
     {
         if (EditorMode == EditorMode.Read)
         {
             ActiveEditor = new EntityReader(entity);
         }
         else
         {
             // Can't test this with ncrunch as pausing time can mess up other tests at random
             ActiveEditor = new EntityWriter(entity);                     // ncrunch: no coverage
         }
     }
 }