|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace csharp_selection_tool
{
public partial class Form1 : Form
{
Selection selection = null;
public Form1()
{
InitializeComponent();
selection = new Selection(this);
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
selection.DrawSelection(e.Graphics);
pictureBox1.Refresh();
}
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
selection.mouseDown(e);
pictureBox1.Refresh();
}
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
selection.mouseUp(e);
pictureBox1.Refresh();
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
selection.mouseMoved(e);
pictureBox1.Refresh();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.