public RoomDlg(Room room, AdvData data, ViewMode mode, MainForm parent, Form mdiParent) { InitializeComponent(); mRoom = room; mData = data; mMode = mode; updateRoom(); this.ClientSize = new Size(data.WindowXRes, data.Settings.Resolution.y); this.Paint += new PaintEventHandler(RoomDlg_Paint); this.MouseDown += new MouseEventHandler(RoomDlg_MouseDown); this.MouseMove += new MouseEventHandler(RoomDlg_MouseMove); this.MouseUp += new MouseEventHandler(RoomDlg_MouseUp); this.DoubleClick += new EventHandler(RoomDlg_DoubleClick); this.KeyPress += new KeyPressEventHandler(RoomDlg_KeyPress); this.FormClosed += new FormClosedEventHandler(RoomDlg_FormClosed); this.DragOver += new DragEventHandler(RoomDlg_DragOver); this.DragDrop += new DragEventHandler(RoomDlg_DragDrop); mControl = new RoomCtrlDlg(room, data, parent); mControl.MdiParent = mdiParent; mControl.Location = new Point(Screen.GetWorkingArea(this).Width-mControl.Width, 0); mControl.StartPosition = FormStartPosition.Manual; mControl.Show(); mControl.RedrawRoom += new RoomCtrlDlg.RedrawEventHandler(mControl_RedrawRoom); mTimer = new Timer(); mTimer.Tick += new EventHandler(mTimer_Tick); mTimer.Interval = 50; mTimer.Start(); mOwner = parent; }
public FxShapeTabCtrl(System.Collections.ArrayList shapes, RoomCtrlDlg parent) { InitializeComponent(); this.fxShapeCtrl1.setParent(parent); this.fxShapeCtrl1.setShape((FxShape)shapes[0]); this.fxShapeCtrl2.setParent(parent); this.fxShapeCtrl2.setShape((FxShape)shapes[1]); this.fxShapeCtrl3.setParent(parent); this.fxShapeCtrl3.setShape((FxShape)shapes[2]); }
public void setParent(RoomCtrlDlg dlg) { mParent = dlg; }
void mControl_RedrawRoom(object sender, RoomCtrlDlg.RedrawEventArgs e) { this.Invalidate(); }