示例#1
0
 void ConfigWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ConfigWindow == sender)
     {
         CompleteConfiguration(ConfigWindow.ResponseObject);
         ConfigWindow = null;
     }
 }
示例#2
0
 internal void ConfigureSignTarget(SignTargetUI targetUI)
 {
     if(ConfigWindow == null)
     {
         ConfigWindow = new SignTargetConfigure(this);
         ConfigWindow.FormClosing += ConfigWindow_FormClosing;
     }
     ConfigWindow.SetTarget(targetUI);
     ConfigWindow.Show();
 }
示例#3
0
 internal void ConfigureSignTarget(SignTargetUI targetUI)
 {
     if (ConfigWindow == null)
     {
         ConfigWindow              = new SignTargetConfigure(this);
         ConfigWindow.FormClosing += ConfigWindow_FormClosing;
     }
     ConfigWindow.SetTarget(targetUI);
     ConfigWindow.Show();
 }
示例#4
0
        public EditElement(SignTargetConfigure container, SignComponent c)
        {
            Parent          = container;
            Location        = c;
            ImageTile       = new PictureBox();
            ImageSection    = new Bitmap(Location.Width, Location.Height);
            ImageTile.Image = ImageSection;

            int scale = SignTargetConfigure.ScaleFactor;

            ImageTile.Width    = Location.Width * scale;
            ImageTile.Height   = Location.Height * scale;
            ImageTile.Location = new Point(Location.X * scale, Location.Y * scale);

            ImageTile.SizeMode = PictureBoxSizeMode.StretchImage;
            ImageTile.Cursor   = Cursors.SizeAll;

            ImageTile.MouseDown += ImageTile_MouseDown;
            ImageTile.MouseMove += ImageTile_MouseMove;
            ImageTile.MouseUp   += ImageTile_MouseUp;
        }
示例#5
0
 void ConfigWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     if(ConfigWindow == sender)
     {
         CompleteConfiguration(ConfigWindow.ResponseObject);
         ConfigWindow = null;
     }
 }
示例#6
0
        public EditElement(SignTargetConfigure container, SignComponent c)
        {
            Parent = container;
            Location = c;
            ImageTile = new PictureBox();
            ImageSection = new Bitmap(Location.Width, Location.Height);
            ImageTile.Image = ImageSection;

            int scale = SignTargetConfigure.ScaleFactor;

            ImageTile.Width = Location.Width * scale;
            ImageTile.Height = Location.Height * scale;
            ImageTile.Location = new Point(Location.X * scale, Location.Y * scale);

            ImageTile.SizeMode = PictureBoxSizeMode.StretchImage;
            ImageTile.Cursor = Cursors.SizeAll;

            ImageTile.MouseDown += ImageTile_MouseDown;
            ImageTile.MouseMove += ImageTile_MouseMove;
            ImageTile.MouseUp += ImageTile_MouseUp;
        }