static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); fmMain = new FormMain(); Application.Run(fmMain); }
/// <summary> /// Creates a new Logic for the program. /// </summary> /// <param name="box">The drawing area.</param> /// <param name="fmMain">The main window.</param> /// <param name="logger">The ListView to display the vector coordinates.</param> public Logic(PictureBox box, FormMain fmMain, ListView logger) { gc = new GraphicCore(box); this.ShowCoordinates = true; this.UseCohenSutherlandAlgorithm = false; this.fmMain = fmMain; _trianglePointCount = 0; _linePointCount = 0; drawingMode = DrawingMode.Points; this.lvLogger = logger; box.MouseUp += new MouseEventHandler(box_MouseUp); box.MouseMove += new MouseEventHandler(box_MouseMove); box.SizeChanged += new EventHandler(box_SizeChanged); lvLogger.SelectedIndexChanged += new EventHandler(lvLogger_SelectedIndexChanged); lvLogger.Click += new EventHandler(lvLogger_Click); lvLogger.KeyUp += new KeyEventHandler(lvLogger_KeyUp); lvLogger.KeyDown += new KeyEventHandler(lvLogger_KeyDown); //1. corner: left top //2. corner right bottom ClippingWindow = new myRectangle(new Vector(box.Width / 4, 3 * box.Height / 4, false), new Vector(3 * (box.Width / 4), (box.Height / 4), false)); this.InitLists(); }