Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public ItemDlg(Item it, MainForm parent)
 {
     InitializeComponent();
     stateFrameImage1.Data = it;
     mItem = it;
     mParent = parent;
     updateItem();
 }
Ejemplo n.º 3
0
 public MDIMain(string filename, Persistence pers)
 {
     mPersistence = pers;
     mMainForm = new MainForm(pers);
     initialize();
     if (filename != null && filename.Length > 0)
         mMainForm.loadFile(filename);
 }
Ejemplo n.º 4
0
 public RoomCtrlDlg(Room room, AdvData data, MainForm mf)
 {
     InitializeComponent();
     mRoom = room;
     mData = data;
     mParent = mf;
     for (int i = 1; i <= 9; ++i)
     {
         zoomfactor.Items.Add(i);
     }
     for (int i = 0; i <= 10; ++i)
     {
         obj_state.Items.Add(i);
     }
     zoomfactor.SelectedItem = mRoom.Zoom;
     doublewalkmap.Checked = mRoom.DoubleWalkmap;
     roomwidth.Minimum = data.WindowXRes;
     roomwidth.Maximum = data.Settings.Resolution.x * 3;
     roomheight.Minimum = data.Settings.Resolution.y;
     roomheight.Maximum = data.Settings.Resolution.y * 2;
     roomwidth.Value = mRoom.Size.x < roomwidth.Minimum ? roomwidth.Minimum : mRoom.Size.x;
     roomheight.Value = mRoom.Size.y;
     light_color.BackColor = mRoom.Lighting;
     mDragOffset.x = -1;
     scroller.Paint += new PaintEventHandler(scroller_Paint);
     scroller.MouseDown += new MouseEventHandler(scroller_MouseDown);
     scroller.MouseMove += new MouseEventHandler(scroller_MouseMove);
     scroller.MouseUp += new MouseEventHandler(scroller_MouseUp);
     roomwidth.ValueChanged += new EventHandler(roomwidth_ValueChanged);
     roomheight.ValueChanged += new EventHandler(roomheight_ValueChanged);
     mFxShapes = new FxShapeTabCtrl(mRoom.FXShapes, this);
     mFxShapes.Visible = false;
     mFxShapes.Location = objectgroup.Location;
     this.Controls.Add(mFxShapes);
     mInvSpacing = new NumericUpDown();
     mInvSpacing.Visible = false;
     mInvSpacing.Location = objectgroup.Location;
     mInvSpacing.Value = room.InvSpacing;
     mInvSpacing.Minimum = 2;
     mInvSpacing.Maximum = 20;
     this.Controls.Add(mInvSpacing);
     mInvSpacing.ValueChanged += new EventHandler(mInvSpacing_ValueChanged);
 }
Ejemplo n.º 5
0
 public MDIMain(Persistence pers)
 {
     mPersistence = pers;
     mMainForm = new MainForm(pers);
     initialize();
 }