72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
namespace RyzStudio.Windows.Forms
|
|
{
|
|
public partial class TileGridPanel : RyzStudio.Windows.Forms.T1UserControl
|
|
{
|
|
public TileGridPanel() : base()
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.EnableMovable = true;
|
|
}
|
|
|
|
//protected override void OnDragOver(DragEventArgs e)
|
|
//{
|
|
// base.OnDragDrop(e);
|
|
|
|
// e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop)) ? DragDropEffects.Link : DragDropEffects.None;
|
|
//}
|
|
|
|
//protected override void OnMouseUp(MouseEventArgs e)
|
|
//{
|
|
// base.OnMouseUp(e);
|
|
|
|
// isDragging = false;
|
|
//}
|
|
|
|
//protected override void OnMouseDown(MouseEventArgs e)
|
|
//{
|
|
// base.OnMouseDown(e);
|
|
|
|
// //var parentLayout = this.TileGridLayout;
|
|
// //if (parentLayout == null)
|
|
// //{
|
|
// // return;
|
|
// //}
|
|
|
|
// this.BringToFront();
|
|
|
|
// if (((e.Button == MouseButtons.Left) && (Control.ModifierKeys == Keys.Control)) || (e.Button == MouseButtons.Right))
|
|
// {
|
|
// isDragging = true;
|
|
// startPosition = e.Location;
|
|
// }
|
|
//}
|
|
|
|
//protected override void OnMouseMove(MouseEventArgs e)
|
|
//{
|
|
// base.OnMouseMove(e);
|
|
|
|
// if (isDragging)
|
|
// {
|
|
// //var parentLayout = this.TileGridLayout;
|
|
// //if (parentLayout == null)
|
|
// //{
|
|
// // return;
|
|
// //}
|
|
|
|
// int x = (this.Location.X + (e.Location.X - startPosition.X));
|
|
// int y = (this.Location.Y + (e.Location.Y - startPosition.Y));
|
|
|
|
// //parentLayout.MoveTile(this, x, y);
|
|
|
|
// this.Location = new Point(x, y);
|
|
|
|
// }
|
|
//}
|
|
|
|
|
|
//public TileGridPanelLayout<Control> TileGridLayout { get => UIControl.GetParentsUntil<TileGridPanelLayout<Control>>(this); }
|
|
|
|
|
|
}
|
|
} |