/// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { string str = string.Empty; str += this.GetType().Name + ", "; str += "Name: " + (LogFile != null ? LogFile.Name : "UnKnown") + ", "; str += "Event: " + ChangingType.ToString() + "."; return(str); }
/// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { string str = string.Empty; str += this.GetType().Name + ", "; str += (LogFiles != null ? "IsLoaded:" + LogFiles.IsLoaded.ToString() : "UnKnown") + ", "; str += (LogFiles != null ? "Loaded Count:" + LogFiles.Count.ToString() : "UnKnown") + ", "; str += "Event: " + ChangingType.ToString() + "."; return(str); }
public void SerializesAndDeserializesCompletelyDifferentType() { var changingType = new ChangingType(); for (int i = 0; i < 10; i++) { changingType.CustomizedCollection.Add(i); } var clone = SerializationTestHelper.SerializeAndDeserialize(changingType, SerializationFactory.GetXmlSerializer()); Assert.AreEqual(10, clone.CustomizedCollection.Count); for (int i = 0; i < 10; i++) { Assert.AreEqual(i, clone.CustomizedCollection[i]); } }
public void SerializesAndDeserializesCompletelyDifferentType() { var changingType = new ChangingType(); for (int i = 0; i < 10; i++) { changingType.CustomizedCollection.Add(i); } var clone = SerializationTestHelper.SerializeAndDeserialize(changingType, SerializationFactory.GetXmlSerializer()); Assert.AreEqual(10, clone.CustomizedCollection.Count); for (int i = 0; i < 10; i++) { Assert.AreEqual(i, clone.CustomizedCollection[i]); } }
public static void ChangingListener(ChangingType change) { switch (change) { case ChangingType.Add: Console.WriteLine("Added Element"); break; case ChangingType.Delete: Console.WriteLine("Deleted Element"); break; case ChangingType.Set: Console.WriteLine("Setted Element"); break; case ChangingType.Insert: Console.WriteLine("Inserted Element"); break; } }
private void CaptureForm_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { int[,] anchor = this.GetDraggableAnchorPostion(); if (!this.isRectExist) { this.isDrawingRect = true; this.isRectExist = true; this.rectPos = e.Location; } else if (this.IsPointInRectangle(e.Location, anchor[0, 0] - 2, anchor[0, 1] - 2, 4, 5)) { this.ct = ChangingType.Both; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X + this.currRect.Width, this.currRect.Y + this.currRect.Height); } else if (this.IsPointInRectangle(e.Location, anchor[2, 0] - 2, anchor[2, 1] - 2, 4, 5)) { this.ct = ChangingType.Both; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X, this.currRect.Y + this.currRect.Height); } else if (this.IsPointInRectangle(e.Location, anchor[5, 0] - 2, anchor[5, 1] - 2, 4, 5)) { this.ct = ChangingType.Both; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X + this.currRect.Width, this.currRect.Y); } else if (this.IsPointInRectangle(e.Location, anchor[7, 0] - 2, anchor[7, 1] - 2, 4, 5)) { this.ct = ChangingType.Both; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X, this.currRect.Y); } else if (this.IsPointInRectangle(e.Location, anchor[1, 0] - 2, anchor[1, 1] - 2, 4, 5)) { this.ct = ChangingType.Height; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X, this.currRect.Y + this.currRect.Height); } else if (this.IsPointInRectangle(e.Location, anchor[3, 0] - 2, anchor[3, 1] - 2, 4, 5)) { this.ct = ChangingType.Width; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X + this.currRect.Width, this.currRect.Y); } else if (this.IsPointInRectangle(e.Location, anchor[4, 0] - 2, anchor[4, 1] - 2, 4, 5)) { this.ct = ChangingType.Width; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X, this.currRect.Y); } else if (this.IsPointInRectangle(e.Location, anchor[6, 0] - 2, anchor[6, 1] - 2, 4, 5)) { this.ct = ChangingType.Height; this.isChangingRect = true; this.rectPos = new Point(this.currRect.X, this.currRect.Y); } else if (this.IsPointInRectangle(e.Location, this.currRect)) { this.isMovingRect = true; this.distance = ((Size)e.Location) - ((Size)this.currRect.Location); } } }