Beispiel #1
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Beispiel #2
0
        private void Init(IColorPreset colorPreset)
        {
            button = CreateChild <BoxButton>("button");
            {
                button.Anchor = AnchorType.Fill;
                button.Offset = new Offset(16f, 8f, 16f, 8f);
                button.Color  = colorPreset.Passive;

                button.OnTriggered += () => actionEntry?.Invoke();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Processes a button fixing its default index if appliable
        /// </summary>
        /// <param name="button"></param>
        public void DoButton(BoxButton button)
        {
            if (button.Def != null && button.Def.MultiDef != null && button.ButtonID >= 0)
            {
                // Issue 10 - Update the code to Net Framework 3.5 - http://code.google.com/p/pandorasbox3/issues/detail?id=10 - Smjert
                int i;
                m_Table.TryGetValue(button.ButtonID, out i);

                button.Def.MultiDef.DefaultIndex = i;

                // Issue 10 - End
            }
        }
Beispiel #4
0
        private void Init(IColorPreset colorPreset)
        {
            loginButton = CreateChild <BoxButton>("login", 4);
            {
                loginButton.Anchor = AnchorType.TopStretch;
                loginButton.Pivot  = PivotType.Top;
                loginButton.SetOffsetHorizontal(48f);
                loginButton.Y         = -16;
                loginButton.Height    = 36f;
                loginButton.Color     = colorPreset.Positive;
                loginButton.LabelText = "OAuth log in";

                loginButton.OnTriggered += DoLogin;
            }
        }
        private void Init(IColorPreset colorPreset, IScreenNavigator screenNavigator)
        {
            detailButton = CreateChild <BoxButton>("detail", 0);
            {
                detailButton.Anchor    = AnchorType.MiddleStretch;
                detailButton.RawWidth  = -96f;
                detailButton.Y         = 50f;
                detailButton.Height    = 36f;
                detailButton.LabelText = "Detail";
                detailButton.Color     = colorPreset.Positive;

                detailButton.OnTriggered += Model.ShowUserDetail;
            }
            visitButton = CreateChild <BoxButton>("visit", 1);
            {
                visitButton.Anchor    = AnchorType.MiddleStretch;
                visitButton.RawWidth  = -96f;
                visitButton.Y         = 10f;
                visitButton.Height    = 36f;
                visitButton.LabelText = "Visit";
                visitButton.Color     = colorPreset.Warning;

                visitButton.OnTriggered += Model.VisitUserPage;
            }
            logoutButton = CreateChild <BoxButton>("logout", 2);
            {
                logoutButton.Anchor    = AnchorType.MiddleStretch;
                logoutButton.RawWidth  = -96f;
                logoutButton.Y         = -30f;
                logoutButton.Height    = 36f;
                logoutButton.LabelText = "Log out";
                logoutButton.Color     = colorPreset.Negative;

                logoutButton.OnTriggered += Model.LogoutUser;
            }
            accountLabel = CreateChild <Label>("account", 3);
            {
                accountLabel.Anchor   = AnchorType.MiddleStretch;
                accountLabel.RawWidth = 0f;
                accountLabel.Y        = -81f;
                accountLabel.Height   = 30;
                accountLabel.WrapText = true;
                accountLabel.FontSize = 16;
            }

            OnEnableInited();
        }
Beispiel #6
0
        private void Init(IColorPreset colorPreset)
        {
            username = CreateChild <LoginInput>("username", 1);
            {
                username.Anchor = AnchorType.TopStretch;
                username.Pivot  = PivotType.Top;
                username.SetOffsetHorizontal(32);
                username.Y           = -16f;
                username.Height      = 36f;
                username.Placeholder = "username";
            }
            password = CreateChild <LoginInput>("password", 2);
            {
                password.Anchor = AnchorType.TopStretch;
                password.Pivot  = PivotType.Top;
                password.SetOffsetHorizontal(32f);
                password.Y           = -60f;
                password.Height      = 36f;
                password.InputType   = InputField.InputType.Password;
                password.Placeholder = "password";
            }
            remember = CreateChild <LabelledToggle>("remember", 3);
            {
                remember.Anchor    = AnchorType.Top;
                remember.Pivot     = PivotType.Top;
                remember.Position  = new Vector3(0f, -104f);
                remember.Size      = new Vector2(170f, 24f);
                remember.LabelText = "Remember me";
            }
            loginButton = CreateChild <BoxButton>("login", 4);
            {
                loginButton.Anchor = AnchorType.TopStretch;
                loginButton.Pivot  = PivotType.Top;
                loginButton.SetOffsetHorizontal(48f);
                loginButton.Y         = -148f;
                loginButton.Height    = 36f;
                loginButton.Color     = colorPreset.Positive;
                loginButton.LabelText = "Log in";

                loginButton.OnTriggered += DoLogin;
            }

            OnEnableInited();
        }
Beispiel #7
0
        /// <summary>
        ///     Restores the default value to a BoxButton
        /// </summary>
        /// <param name="button">The BoxButton that should be restored</param>
        public void ResetDefault(BoxButton button)
        {
            var filename = GetFile(button.ButtonID);

            if (File.Exists(filename))
            {
                try
                {
                    File.Delete(filename);
                }
                catch (Exception err)
                {
                    Pandora.Log.WriteError(err, string.Format("Cannot delete file {0}", filename));
                    return;
                }
            }

            button.Def = this[button];
        }
Beispiel #8
0
        /// <summary>
        ///     Required method for Designer support - do not modify
        ///     the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            var resources = new System.Resources.ResourceManager(typeof(Doors));

            this.WestCCW    = new System.Windows.Forms.Label();
            this.EastCW     = new System.Windows.Forms.Label();
            this.WestCW     = new System.Windows.Forms.Label();
            this.EastCCW    = new System.Windows.Forms.Label();
            this.NorthCW    = new System.Windows.Forms.Label();
            this.SouthCCW   = new System.Windows.Forms.Label();
            this.NorthCCW   = new System.Windows.Forms.Label();
            this.SouthCW    = new System.Windows.Forms.Label();
            this.lnkDoor    = new System.Windows.Forms.LinkLabel();
            this.bLock      = new System.Windows.Forms.Button();
            this.bUnlock    = new System.Windows.Forms.Button();
            this.boxButton1 = new TheBox.Buttons.BoxButton();
            this.boxButton2 = new TheBox.Buttons.BoxButton();
            this.SuspendLayout();
            //
            // WestCCW
            //
            this.WestCCW.BackColor   = System.Drawing.Color.White;
            this.WestCCW.Image       = ((System.Drawing.Image)(resources.GetObject("WestCCW.Image")));
            this.WestCCW.Location    = new System.Drawing.Point(72, 0);
            this.WestCCW.Name        = "WestCCW";
            this.WestCCW.Size        = new System.Drawing.Size(68, 68);
            this.WestCCW.TabIndex    = 0;
            this.WestCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.WestCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.WestCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.WestCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // EastCW
            //
            this.EastCW.BackColor   = System.Drawing.Color.White;
            this.EastCW.Image       = ((System.Drawing.Image)(resources.GetObject("EastCW.Image")));
            this.EastCW.Location    = new System.Drawing.Point(124, 72);
            this.EastCW.Name        = "EastCW";
            this.EastCW.Size        = new System.Drawing.Size(68, 68);
            this.EastCW.TabIndex    = 1;
            this.EastCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.EastCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.EastCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.EastCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // WestCW
            //
            this.WestCW.BackColor   = System.Drawing.Color.White;
            this.WestCW.Image       = ((System.Drawing.Image)(resources.GetObject("WestCW.Image")));
            this.WestCW.Location    = new System.Drawing.Point(0, 0);
            this.WestCW.Name        = "WestCW";
            this.WestCW.Size        = new System.Drawing.Size(68, 68);
            this.WestCW.TabIndex    = 2;
            this.WestCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.WestCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.WestCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.WestCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // EastCCW
            //
            this.EastCCW.BackColor   = System.Drawing.Color.White;
            this.EastCCW.Image       = ((System.Drawing.Image)(resources.GetObject("EastCCW.Image")));
            this.EastCCW.Location    = new System.Drawing.Point(52, 72);
            this.EastCCW.Name        = "EastCCW";
            this.EastCCW.Size        = new System.Drawing.Size(68, 68);
            this.EastCCW.TabIndex    = 3;
            this.EastCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.EastCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.EastCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.EastCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // NorthCW
            //
            this.NorthCW.BackColor   = System.Drawing.Color.White;
            this.NorthCW.Image       = ((System.Drawing.Image)(resources.GetObject("NorthCW.Image")));
            this.NorthCW.Location    = new System.Drawing.Point(356, 0);
            this.NorthCW.Name        = "NorthCW";
            this.NorthCW.Size        = new System.Drawing.Size(68, 68);
            this.NorthCW.TabIndex    = 4;
            this.NorthCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.NorthCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.NorthCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.NorthCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // SouthCCW
            //
            this.SouthCCW.BackColor   = System.Drawing.Color.White;
            this.SouthCCW.Image       = ((System.Drawing.Image)(resources.GetObject("SouthCCW.Image")));
            this.SouthCCW.Location    = new System.Drawing.Point(304, 72);
            this.SouthCCW.Name        = "SouthCCW";
            this.SouthCCW.Size        = new System.Drawing.Size(68, 68);
            this.SouthCCW.TabIndex    = 5;
            this.SouthCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.SouthCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.SouthCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.SouthCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // NorthCCW
            //
            this.NorthCCW.BackColor   = System.Drawing.Color.White;
            this.NorthCCW.Image       = ((System.Drawing.Image)(resources.GetObject("NorthCCW.Image")));
            this.NorthCCW.Location    = new System.Drawing.Point(428, 0);
            this.NorthCCW.Name        = "NorthCCW";
            this.NorthCCW.Size        = new System.Drawing.Size(68, 68);
            this.NorthCCW.TabIndex    = 6;
            this.NorthCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.NorthCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.NorthCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.NorthCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // SouthCW
            //
            this.SouthCW.BackColor   = System.Drawing.Color.White;
            this.SouthCW.Image       = ((System.Drawing.Image)(resources.GetObject("SouthCW.Image")));
            this.SouthCW.Location    = new System.Drawing.Point(376, 72);
            this.SouthCW.Name        = "SouthCW";
            this.SouthCW.Size        = new System.Drawing.Size(68, 68);
            this.SouthCW.TabIndex    = 7;
            this.SouthCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
            this.SouthCW.MouseEnter += new System.EventHandler(this.LabelEnter);
            this.SouthCW.MouseLeave += new System.EventHandler(this.LabelLeave);
            this.SouthCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
            //
            // lnkDoor
            //
            this.lnkDoor.Location   = new System.Drawing.Point(180, 4);
            this.lnkDoor.Name       = "lnkDoor";
            this.lnkDoor.Size       = new System.Drawing.Size(136, 32);
            this.lnkDoor.TabIndex   = 8;
            this.lnkDoor.TabStop    = true;
            this.lnkDoor.Text       = "Doors.Select";
            this.lnkDoor.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
            this.lnkDoor.Paint     += new System.Windows.Forms.PaintEventHandler(this.lnkDoor_Paint);
            this.lnkDoor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lnkDoor_MouseDown);
            //
            // bLock
            //
            this.bLock.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bLock.Location  = new System.Drawing.Point(148, 44);
            this.bLock.Name      = "bLock";
            this.bLock.Size      = new System.Drawing.Size(96, 23);
            this.bLock.TabIndex  = 9;
            this.bLock.Text      = "Doors.Lock";
            this.bLock.Click    += new System.EventHandler(this.bLock_Click);
            //
            // bUnlock
            //
            this.bUnlock.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bUnlock.Location  = new System.Drawing.Point(252, 44);
            this.bUnlock.Name      = "bUnlock";
            this.bUnlock.Size      = new System.Drawing.Size(96, 23);
            this.bUnlock.TabIndex  = 10;
            this.bUnlock.Text      = "Doors.Unlock";
            this.bUnlock.Click    += new System.EventHandler(this.bUnlock_Click);
            //
            // boxButton1
            //
            this.boxButton1.AllowEdit = true;
            this.boxButton1.ButtonID  = 76;
            this.boxButton1.Def       = null;
            this.boxButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton1.IsActive  = true;
            this.boxButton1.Location  = new System.Drawing.Point(204, 80);
            this.boxButton1.Name      = "boxButton1";
            this.boxButton1.Size      = new System.Drawing.Size(88, 23);
            this.boxButton1.TabIndex  = 11;
            this.boxButton1.Text      = "boxButton1";
            //
            // boxButton2
            //
            this.boxButton2.AllowEdit = true;
            this.boxButton2.ButtonID  = 77;
            this.boxButton2.Def       = null;
            this.boxButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton2.IsActive  = true;
            this.boxButton2.Location  = new System.Drawing.Point(204, 112);
            this.boxButton2.Name      = "boxButton2";
            this.boxButton2.Size      = new System.Drawing.Size(88, 23);
            this.boxButton2.TabIndex  = 12;
            this.boxButton2.Text      = "boxButton2";
            //
            // Doors
            //
            this.Controls.Add(this.boxButton2);
            this.Controls.Add(this.boxButton1);
            this.Controls.Add(this.bUnlock);
            this.Controls.Add(this.bLock);
            this.Controls.Add(this.lnkDoor);
            this.Controls.Add(this.SouthCW);
            this.Controls.Add(this.NorthCCW);
            this.Controls.Add(this.SouthCCW);
            this.Controls.Add(this.NorthCW);
            this.Controls.Add(this.EastCCW);
            this.Controls.Add(this.WestCW);
            this.Controls.Add(this.EastCW);
            this.Controls.Add(this.WestCCW);
            this.Name  = "Doors";
            this.Size  = new System.Drawing.Size(496, 142);
            this.Load += new System.EventHandler(this.Doors_Load);
            this.ResumeLayout(false);
        }
Beispiel #9
0
 /// <summary>
 ///     Required method for Designer support - do not modify
 ///     the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Doors));
     this.WestCCW    = new System.Windows.Forms.Label();
     this.EastCW     = new System.Windows.Forms.Label();
     this.WestCW     = new System.Windows.Forms.Label();
     this.EastCCW    = new System.Windows.Forms.Label();
     this.NorthCW    = new System.Windows.Forms.Label();
     this.SouthCCW   = new System.Windows.Forms.Label();
     this.NorthCCW   = new System.Windows.Forms.Label();
     this.SouthCW    = new System.Windows.Forms.Label();
     this.lnkDoor    = new System.Windows.Forms.LinkLabel();
     this.bLock      = new System.Windows.Forms.Button();
     this.bUnlock    = new System.Windows.Forms.Button();
     this.boxButton1 = new TheBox.Buttons.BoxButton();
     this.boxButton2 = new TheBox.Buttons.BoxButton();
     this.SuspendLayout();
     //
     // WestCCW
     //
     this.WestCCW.BackColor   = System.Drawing.Color.White;
     this.WestCCW.Image       = ((System.Drawing.Image)(resources.GetObject("WestCCW.Image")));
     this.WestCCW.Location    = new System.Drawing.Point(143, 38);
     this.WestCCW.Name        = "WestCCW";
     this.WestCCW.Size        = new System.Drawing.Size(68, 68);
     this.WestCCW.TabIndex    = 0;
     this.WestCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.WestCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.WestCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.WestCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // EastCW
     //
     this.EastCW.BackColor   = System.Drawing.Color.White;
     this.EastCW.Image       = ((System.Drawing.Image)(resources.GetObject("EastCW.Image")));
     this.EastCW.Location    = new System.Drawing.Point(195, 110);
     this.EastCW.Name        = "EastCW";
     this.EastCW.Size        = new System.Drawing.Size(68, 68);
     this.EastCW.TabIndex    = 1;
     this.EastCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.EastCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.EastCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.EastCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // WestCW
     //
     this.WestCW.BackColor   = System.Drawing.Color.White;
     this.WestCW.Image       = ((System.Drawing.Image)(resources.GetObject("WestCW.Image")));
     this.WestCW.Location    = new System.Drawing.Point(71, 38);
     this.WestCW.Name        = "WestCW";
     this.WestCW.Size        = new System.Drawing.Size(68, 68);
     this.WestCW.TabIndex    = 2;
     this.WestCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.WestCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.WestCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.WestCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // EastCCW
     //
     this.EastCCW.BackColor   = System.Drawing.Color.White;
     this.EastCCW.Image       = ((System.Drawing.Image)(resources.GetObject("EastCCW.Image")));
     this.EastCCW.Location    = new System.Drawing.Point(123, 110);
     this.EastCCW.Name        = "EastCCW";
     this.EastCCW.Size        = new System.Drawing.Size(68, 68);
     this.EastCCW.TabIndex    = 3;
     this.EastCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.EastCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.EastCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.EastCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // NorthCW
     //
     this.NorthCW.BackColor   = System.Drawing.Color.White;
     this.NorthCW.Image       = ((System.Drawing.Image)(resources.GetObject("NorthCW.Image")));
     this.NorthCW.Location    = new System.Drawing.Point(427, 38);
     this.NorthCW.Name        = "NorthCW";
     this.NorthCW.Size        = new System.Drawing.Size(68, 68);
     this.NorthCW.TabIndex    = 4;
     this.NorthCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.NorthCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.NorthCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.NorthCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // SouthCCW
     //
     this.SouthCCW.BackColor   = System.Drawing.Color.White;
     this.SouthCCW.Image       = ((System.Drawing.Image)(resources.GetObject("SouthCCW.Image")));
     this.SouthCCW.Location    = new System.Drawing.Point(375, 110);
     this.SouthCCW.Name        = "SouthCCW";
     this.SouthCCW.Size        = new System.Drawing.Size(68, 68);
     this.SouthCCW.TabIndex    = 5;
     this.SouthCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.SouthCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.SouthCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.SouthCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // NorthCCW
     //
     this.NorthCCW.BackColor   = System.Drawing.Color.White;
     this.NorthCCW.Image       = ((System.Drawing.Image)(resources.GetObject("NorthCCW.Image")));
     this.NorthCCW.Location    = new System.Drawing.Point(499, 38);
     this.NorthCCW.Name        = "NorthCCW";
     this.NorthCCW.Size        = new System.Drawing.Size(68, 68);
     this.NorthCCW.TabIndex    = 6;
     this.NorthCCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.NorthCCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.NorthCCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.NorthCCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // SouthCW
     //
     this.SouthCW.BackColor   = System.Drawing.Color.White;
     this.SouthCW.Image       = ((System.Drawing.Image)(resources.GetObject("SouthCW.Image")));
     this.SouthCW.Location    = new System.Drawing.Point(447, 110);
     this.SouthCW.Name        = "SouthCW";
     this.SouthCW.Size        = new System.Drawing.Size(68, 68);
     this.SouthCW.TabIndex    = 7;
     this.SouthCW.Paint      += new System.Windows.Forms.PaintEventHandler(this.LabelPaint);
     this.SouthCW.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.WestCCW_MouseDown);
     this.SouthCW.MouseEnter += new System.EventHandler(this.LabelEnter);
     this.SouthCW.MouseLeave += new System.EventHandler(this.LabelLeave);
     //
     // lnkDoor
     //
     this.lnkDoor.Location   = new System.Drawing.Point(251, 42);
     this.lnkDoor.Name       = "lnkDoor";
     this.lnkDoor.Size       = new System.Drawing.Size(136, 32);
     this.lnkDoor.TabIndex   = 8;
     this.lnkDoor.TabStop    = true;
     this.lnkDoor.Text       = "Doors.Select";
     this.lnkDoor.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     this.lnkDoor.Paint     += new System.Windows.Forms.PaintEventHandler(this.lnkDoor_Paint);
     this.lnkDoor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lnkDoor_MouseDown);
     //
     // bLock
     //
     this.bLock.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bLock.Location  = new System.Drawing.Point(219, 82);
     this.bLock.Name      = "bLock";
     this.bLock.Size      = new System.Drawing.Size(96, 23);
     this.bLock.TabIndex  = 9;
     this.bLock.Text      = "Doors.Lock";
     this.bLock.Click    += new System.EventHandler(this.bLock_Click);
     //
     // bUnlock
     //
     this.bUnlock.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bUnlock.Location  = new System.Drawing.Point(323, 82);
     this.bUnlock.Name      = "bUnlock";
     this.bUnlock.Size      = new System.Drawing.Size(96, 23);
     this.bUnlock.TabIndex  = 10;
     this.bUnlock.Text      = "Doors.Unlock";
     this.bUnlock.Click    += new System.EventHandler(this.bUnlock_Click);
     //
     // boxButton1
     //
     this.boxButton1.AllowEdit = true;
     this.boxButton1.ButtonID  = 76;
     this.boxButton1.Def       = null;
     this.boxButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton1.IsActive  = true;
     this.boxButton1.Location  = new System.Drawing.Point(275, 118);
     this.boxButton1.Name      = "boxButton1";
     this.boxButton1.Size      = new System.Drawing.Size(88, 23);
     this.boxButton1.TabIndex  = 11;
     this.boxButton1.Text      = "boxButton1";
     //
     // boxButton2
     //
     this.boxButton2.AllowEdit = true;
     this.boxButton2.ButtonID  = 77;
     this.boxButton2.Def       = null;
     this.boxButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton2.IsActive  = true;
     this.boxButton2.Location  = new System.Drawing.Point(275, 150);
     this.boxButton2.Name      = "boxButton2";
     this.boxButton2.Size      = new System.Drawing.Size(88, 23);
     this.boxButton2.TabIndex  = 12;
     this.boxButton2.Text      = "boxButton2";
     //
     // Doors
     //
     this.Controls.Add(this.boxButton2);
     this.Controls.Add(this.boxButton1);
     this.Controls.Add(this.bUnlock);
     this.Controls.Add(this.bLock);
     this.Controls.Add(this.lnkDoor);
     this.Controls.Add(this.SouthCW);
     this.Controls.Add(this.NorthCCW);
     this.Controls.Add(this.SouthCCW);
     this.Controls.Add(this.NorthCW);
     this.Controls.Add(this.EastCCW);
     this.Controls.Add(this.WestCW);
     this.Controls.Add(this.EastCW);
     this.Controls.Add(this.WestCCW);
     this.Font  = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name  = "Doors";
     this.Size  = new System.Drawing.Size(640, 224);
     this.Load += new System.EventHandler(this.Doors_Load);
     this.ResumeLayout(false);
 }
Beispiel #10
0
        /// <summary>
        ///     Gets the ButtonDef object given the button's ID
        /// </summary>
        public ButtonDef this[BoxButton button]
        {
            get
            {
                var filename = GetFile(button.ButtonID);

                if (File.Exists(filename))
                {
                    // There's a custom def

                    try
                    {
                        var def = Load(filename);
                        button.Def = def;
                        return(def);
                    }
                    catch (Exception err)
                    {
                        Pandora.Log.WriteError(
                            err,
                            string.Format("Custom file for button {0} was corrupted. It has been renamed to {0}.old.xml", filename));

                        try
                        {
                            File.Move(filename, string.Format("{0}.old.xml", filename));
                        }
                        catch
                        {
                            Pandora.Log.WriteError(null, "Cannot rename file");
                        }
                    }
                }
                // Get default

                var resource = string.Format("DefaultButtons.{0}.xml", button.ButtonID);

                try
                {
                    var stream = DefaultAssembly.GetManifestResourceStream(resource);

                    if (stream != null)
                    {
                        var serializer = new XmlSerializer(typeof(ButtonDef));
                        button.Def = serializer.Deserialize(stream) as ButtonDef;
                        stream.Close();

                        return(button.Def);
                    }
                }
                catch (Exception err)
                {
                    Pandora.Log.WriteError(err, "Error when loading defaults for button {0}", button.ButtonID);
                }

                button.Def = null;
                return(null);
            }
            set
            {
                var filename = GetFile(button.ButtonID);

                try
                {
                    Save(filename, value);
                    button.Def = value;
                }
                catch (Exception err)
                {
                    Pandora.Log.WriteError(
                        err,
                        string.Format("Error occurred when setting the def object for button #{0}", button.ButtonID));
                    button.Def = null;
                }
            }
        }
Beispiel #11
0
 /// <summary>
 ///     Sets the button in a blank state
 /// </summary>
 /// <param name="button">The BoxButton object to set</param>
 public void ClearButton(BoxButton button)
 {
     this[button] = new ButtonDef();
 }
Beispiel #12
0
 /// <summary>
 ///     Required method for Designer support - do not modify
 ///     the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Deco));
     this.panel        = new System.Windows.Forms.Panel();
     this.tDeco        = new System.Windows.Forms.TreeView();
     this.cmItem       = new System.Windows.Forms.ContextMenu();
     this.menuItem1    = new System.Windows.Forms.MenuItem();
     this.splitter     = new System.Windows.Forms.Splitter();
     this.tCat         = new System.Windows.Forms.TreeView();
     this.bAdd         = new System.Windows.Forms.Button();
     this.numTile      = new System.Windows.Forms.NumericUpDown();
     this.bTile        = new System.Windows.Forms.Button();
     this.chkHued      = new System.Windows.Forms.CheckBox();
     this.chkStatic    = new System.Windows.Forms.CheckBox();
     this.lnkFind      = new System.Windows.Forms.LinkLabel();
     this.numNudge     = new System.Windows.Forms.NumericUpDown();
     this.groupBox1    = new System.Windows.Forms.GroupBox();
     this.bNudgeUp     = new System.Windows.Forms.Button();
     this.bNudgeDown   = new System.Windows.Forms.Button();
     this.cmCustom     = new System.Windows.Forms.ContextMenu();
     this.cmCustomCat  = new System.Windows.Forms.MenuItem();
     this.cmCustomItem = new System.Windows.Forms.MenuItem();
     this.cmCustomDel  = new System.Windows.Forms.MenuItem();
     this.chkRnd       = new System.Windows.Forms.CheckBox();
     this.nRnd         = new System.Windows.Forms.NumericUpDown();
     this.boxButton4   = new TheBox.Buttons.BoxButton();
     this.boxButton3   = new TheBox.Buttons.BoxButton();
     this.decoMover1   = new TheBox.Controls.DecoMover();
     this.panel.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.numTile)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.numNudge)).BeginInit();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.nRnd)).BeginInit();
     this.SuspendLayout();
     //
     // panel
     //
     this.panel.Controls.Add(this.tDeco);
     this.panel.Controls.Add(this.splitter);
     this.panel.Controls.Add(this.tCat);
     this.panel.Location = new System.Drawing.Point(0, 0);
     this.panel.Name     = "panel";
     this.panel.Size     = new System.Drawing.Size(350, 221);
     this.panel.TabIndex = 0;
     //
     // tDeco
     //
     this.tDeco.ContextMenu   = this.cmItem;
     this.tDeco.Dock          = System.Windows.Forms.DockStyle.Fill;
     this.tDeco.HideSelection = false;
     this.tDeco.Location      = new System.Drawing.Point(182, 0);
     this.tDeco.Name          = "tDeco";
     this.tDeco.ShowLines     = false;
     this.tDeco.ShowPlusMinus = false;
     this.tDeco.ShowRootLines = false;
     this.tDeco.Size          = new System.Drawing.Size(168, 221);
     this.tDeco.TabIndex      = 2;
     this.tDeco.AfterSelect  += new System.Windows.Forms.TreeViewEventHandler(this.tDeco_AfterSelect);
     this.tDeco.DoubleClick  += new System.EventHandler(this.tDeco_DoubleClick);
     this.tDeco.KeyDown      += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     this.tDeco.MouseDown    += new System.Windows.Forms.MouseEventHandler(this.tDeco_MouseDown);
     this.tDeco.MouseMove    += new System.Windows.Forms.MouseEventHandler(this.tDeco_MouseMove);
     //
     // cmItem
     //
     this.cmItem.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem1
     });
     this.cmItem.Popup += new System.EventHandler(this.cmItem_Popup);
     //
     // menuItem1
     //
     this.menuItem1.Index  = 0;
     this.menuItem1.Text   = "Items.ItemID";
     this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
     //
     // splitter
     //
     this.splitter.Location       = new System.Drawing.Point(179, 0);
     this.splitter.Name           = "splitter";
     this.splitter.Size           = new System.Drawing.Size(3, 221);
     this.splitter.TabIndex       = 1;
     this.splitter.TabStop        = false;
     this.splitter.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitter_SplitterMoved);
     //
     // tCat
     //
     this.tCat.Dock            = System.Windows.Forms.DockStyle.Left;
     this.tCat.HideSelection   = false;
     this.tCat.Location        = new System.Drawing.Point(0, 0);
     this.tCat.Name            = "tCat";
     this.tCat.Size            = new System.Drawing.Size(179, 221);
     this.tCat.TabIndex        = 0;
     this.tCat.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.tCat_AfterLabelEdit);
     this.tCat.AfterSelect    += new System.Windows.Forms.TreeViewEventHandler(this.tCat_AfterSelect);
     this.tCat.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     this.tCat.MouseDown      += new System.Windows.Forms.MouseEventHandler(this.tCat_MouseDown);
     //
     // bAdd
     //
     this.bAdd.Enabled   = false;
     this.bAdd.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bAdd.Location  = new System.Drawing.Point(356, 0);
     this.bAdd.Name      = "bAdd";
     this.bAdd.Size      = new System.Drawing.Size(92, 33);
     this.bAdd.TabIndex  = 1;
     this.bAdd.Text      = "Common.Add";
     this.bAdd.Click    += new System.EventHandler(this.bAdd_Click);
     //
     // numTile
     //
     this.numTile.Location = new System.Drawing.Point(552, 7);
     this.numTile.Maximum  = new decimal(new int[] {
         127,
         0,
         0,
         0
     });
     this.numTile.Minimum = new decimal(new int[] {
         128,
         0,
         0,
         -2147483648
     });
     this.numTile.Name          = "numTile";
     this.numTile.Size          = new System.Drawing.Size(62, 23);
     this.numTile.TabIndex      = 2;
     this.numTile.ValueChanged += new System.EventHandler(this.numTile_ValueChanged);
     this.numTile.KeyDown      += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     //
     // bTile
     //
     this.bTile.Enabled   = false;
     this.bTile.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bTile.Location  = new System.Drawing.Point(454, 0);
     this.bTile.Name      = "bTile";
     this.bTile.Size      = new System.Drawing.Size(92, 33);
     this.bTile.TabIndex  = 3;
     this.bTile.Text      = "Deco.Tile";
     this.bTile.Click    += new System.EventHandler(this.bTile_Click);
     //
     // chkHued
     //
     this.chkHued.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.chkHued.Location        = new System.Drawing.Point(550, 38);
     this.chkHued.Name            = "chkHued";
     this.chkHued.Size            = new System.Drawing.Size(84, 20);
     this.chkHued.TabIndex        = 4;
     this.chkHued.Text            = "Deco.Hued";
     this.chkHued.CheckedChanged += new System.EventHandler(this.chkHued_CheckedChanged);
     this.chkHued.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     //
     // chkStatic
     //
     this.chkStatic.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.chkStatic.Location        = new System.Drawing.Point(456, 38);
     this.chkStatic.Name            = "chkStatic";
     this.chkStatic.Size            = new System.Drawing.Size(88, 20);
     this.chkStatic.TabIndex        = 5;
     this.chkStatic.Text            = "Deco.Static";
     this.chkStatic.CheckedChanged += new System.EventHandler(this.chkStatic_CheckedChanged);
     this.chkStatic.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     //
     // lnkFind
     //
     this.lnkFind.Location     = new System.Drawing.Point(377, 40);
     this.lnkFind.Name         = "lnkFind";
     this.lnkFind.Size         = new System.Drawing.Size(52, 16);
     this.lnkFind.TabIndex     = 7;
     this.lnkFind.TabStop      = true;
     this.lnkFind.Text         = "Common.Find";
     this.lnkFind.TextAlign    = System.Drawing.ContentAlignment.TopCenter;
     this.lnkFind.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkFind_LinkClicked);
     //
     // numNudge
     //
     this.numNudge.Location = new System.Drawing.Point(24, 16);
     this.numNudge.Maximum  = new decimal(new int[] {
         127,
         0,
         0,
         0
     });
     this.numNudge.Minimum = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.numNudge.Name     = "numNudge";
     this.numNudge.Size     = new System.Drawing.Size(48, 23);
     this.numNudge.TabIndex = 11;
     this.numNudge.Value    = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.numNudge.ValueChanged += new System.EventHandler(this.numNudge_ValueChanged);
     this.numNudge.KeyDown      += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     //
     // groupBox1
     //
     this.groupBox1.BackColor = System.Drawing.SystemColors.Control;
     this.groupBox1.Controls.Add(this.bNudgeUp);
     this.groupBox1.Controls.Add(this.bNudgeDown);
     this.groupBox1.Controls.Add(this.numNudge);
     this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.groupBox1.Location  = new System.Drawing.Point(538, 159);
     this.groupBox1.Name      = "groupBox1";
     this.groupBox1.Size      = new System.Drawing.Size(96, 40);
     this.groupBox1.TabIndex  = 16;
     this.groupBox1.TabStop   = false;
     this.groupBox1.Text      = "Nudge";
     //
     // bNudgeUp
     //
     this.bNudgeUp.FlatStyle  = System.Windows.Forms.FlatStyle.Popup;
     this.bNudgeUp.Image      = ((System.Drawing.Image)(resources.GetObject("bNudgeUp.Image")));
     this.bNudgeUp.Location   = new System.Drawing.Point(76, 16);
     this.bNudgeUp.Name       = "bNudgeUp";
     this.bNudgeUp.Size       = new System.Drawing.Size(16, 20);
     this.bNudgeUp.TabIndex   = 13;
     this.bNudgeUp.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bNudgeUp_MouseDown);
     //
     // bNudgeDown
     //
     this.bNudgeDown.FlatStyle  = System.Windows.Forms.FlatStyle.Popup;
     this.bNudgeDown.Image      = ((System.Drawing.Image)(resources.GetObject("bNudgeDown.Image")));
     this.bNudgeDown.Location   = new System.Drawing.Point(4, 16);
     this.bNudgeDown.Name       = "bNudgeDown";
     this.bNudgeDown.Size       = new System.Drawing.Size(16, 20);
     this.bNudgeDown.TabIndex   = 12;
     this.bNudgeDown.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bNudgeDown_MouseDown);
     //
     // cmCustom
     //
     this.cmCustom.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.cmCustomCat,
         this.cmCustomItem,
         this.cmCustomDel
     });
     this.cmCustom.Popup += new System.EventHandler(this.cmCustom_Popup);
     //
     // cmCustomCat
     //
     this.cmCustomCat.Index  = 0;
     this.cmCustomCat.Text   = "Deco.cmCat";
     this.cmCustomCat.Click += new System.EventHandler(this.cmCustomCat_Click);
     //
     // cmCustomItem
     //
     this.cmCustomItem.Index  = 1;
     this.cmCustomItem.Text   = "Deco.cmItem";
     this.cmCustomItem.Click += new System.EventHandler(this.cmCustomItem_Click);
     //
     // cmCustomDel
     //
     this.cmCustomDel.Index  = 2;
     this.cmCustomDel.Text   = "Deco.cmDelete";
     this.cmCustomDel.Click += new System.EventHandler(this.cmCustomDel_Click);
     //
     // chkRnd
     //
     this.chkRnd.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.chkRnd.Location        = new System.Drawing.Point(358, 70);
     this.chkRnd.Name            = "chkRnd";
     this.chkRnd.Size            = new System.Drawing.Size(73, 20);
     this.chkRnd.TabIndex        = 17;
     this.chkRnd.Text            = "Random";
     this.chkRnd.CheckedChanged += new System.EventHandler(this.chkRnd_CheckedChanged);
     //
     // nRnd
     //
     this.nRnd.Location = new System.Drawing.Point(426, 70);
     this.nRnd.Maximum  = new decimal(new int[] {
         15000,
         0,
         0,
         0
     });
     this.nRnd.Minimum = new decimal(new int[] {
         15000,
         0,
         0,
         -2147483648
     });
     this.nRnd.Name          = "nRnd";
     this.nRnd.Size          = new System.Drawing.Size(48, 23);
     this.nRnd.TabIndex      = 18;
     this.nRnd.ValueChanged += new System.EventHandler(this.nRnd_ValueChanged);
     //
     // boxButton4
     //
     this.boxButton4.AllowEdit = true;
     this.boxButton4.ButtonID  = 46;
     this.boxButton4.Def       = null;
     this.boxButton4.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton4.IsActive  = true;
     this.boxButton4.Location  = new System.Drawing.Point(454, 103);
     this.boxButton4.Name      = "boxButton4";
     this.boxButton4.Size      = new System.Drawing.Size(92, 33);
     this.boxButton4.TabIndex  = 15;
     this.boxButton4.Text      = "boxButton4";
     //
     // boxButton3
     //
     this.boxButton3.AllowEdit = true;
     this.boxButton3.ButtonID  = 45;
     this.boxButton3.Def       = null;
     this.boxButton3.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton3.IsActive  = true;
     this.boxButton3.Location  = new System.Drawing.Point(356, 103);
     this.boxButton3.Name      = "boxButton3";
     this.boxButton3.Size      = new System.Drawing.Size(92, 33);
     this.boxButton3.TabIndex  = 14;
     this.boxButton3.Text      = "boxButton3";
     //
     // decoMover1
     //
     this.decoMover1.BackColor = System.Drawing.SystemColors.Control;
     this.decoMover1.EventMode = false;
     this.decoMover1.Location  = new System.Drawing.Point(356, 142);
     this.decoMover1.Name      = "decoMover1";
     this.decoMover1.Size      = new System.Drawing.Size(137, 79);
     this.decoMover1.TabIndex  = 6;
     this.decoMover1.KeyDown  += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     //
     // Deco
     //
     this.Controls.Add(this.nRnd);
     this.Controls.Add(this.chkRnd);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.boxButton4);
     this.Controls.Add(this.boxButton3);
     this.Controls.Add(this.lnkFind);
     this.Controls.Add(this.decoMover1);
     this.Controls.Add(this.chkStatic);
     this.Controls.Add(this.chkHued);
     this.Controls.Add(this.bTile);
     this.Controls.Add(this.numTile);
     this.Controls.Add(this.bAdd);
     this.Controls.Add(this.panel);
     this.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name     = "Deco";
     this.Size     = new System.Drawing.Size(640, 224);
     this.Load    += new System.EventHandler(this.Deco_Load);
     this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
     this.panel.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.numTile)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.numNudge)).EndInit();
     this.groupBox1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.nRnd)).EndInit();
     this.ResumeLayout(false);
 }
Beispiel #13
0
    // Use spawn points to fill generated rooms
    private void ClutterRoom()
    {
        // Get all spawn points
        enemySpawns     = FindObjectsOfType <EnemySpawn>();
        activatorSpawns = FindObjectsOfType <ActivatorSpawn>();

        // Loop through all enemy spawn points
        for (int index = 0; index < enemySpawns.Length; index++)
        {
            // They each have a 50% chance of spawning an enemy - unless first room [canSpawnEnemies] or spawn is already in use
            if (Random.value > 0.5f &&
                canSpawnEnemies &&
                !enemySpawns[index].IsInUse)
            {
                Instantiate(turret, enemySpawns[index].transform.position, enemySpawns[index].transform.rotation);

                // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                enemySpawns[index].IsInUse = true;
                Destroy(enemySpawns[index].gameObject);
            }
            else
            {
                // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                enemySpawns[index].IsInUse = true;
                Destroy(enemySpawns[index].gameObject);
            }
        }

        // If the current room hasDoors, spawn switches to control them
        if (hasDoors)
        {
            List <Switch> switches = new List <Switch>();
            // Determine if using a boxSwitch (0% - 50%) or a stand switch (50% - 100%)
            bool whichSwich = Random.value > 0.5f;

            // True = stand button, false = box button & box
            if (whichSwich)
            {
                // Loop through all spawn points
                for (int index = 0; index < activatorSpawns.Length; index++)
                {
                    // 20% chance of each spawn being used, if not already in use
                    if (Random.value > 0.8f &&
                        !activatorSpawns[index].IsInUse)
                    {
                        Switch s = Instantiate(
                            standButton,
                            activatorSpawns[index].transform.position - new Vector3(0.0f, (activatorSpawns[index].transform.localScale.y / 2.0f), 0.0f),
                            activatorSpawns[index].transform.rotation
                            );

                        // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                        activatorSpawns[index].IsInUse = true;

                        // Spawn timer and connect to stand button
                        Quaternion q = activatorSpawns[index].transform.rotation;
                        q.y -= 180.0f;
                        GameObject timer = Instantiate(
                            standTimer,
                            activatorSpawns[index].transform.position + new Vector3(0.0f, (activatorSpawns[index].transform.localScale.y / 2.0f), 0.0f),
                            q
                            );
                        StandButton sb = s.GetComponent <StandButton>();
                        sb.OpenTime   = Random.Range(8.0f, 15.0f);
                        sb.TimerPanel = timer;

                        // Add to spawned switches for this room
                        switches.Add(s);
                    }
                    else
                    {
                        // Add a stand switch if none was added in previous loop
                        if (switches.Count == 0 &&
                            index == activatorSpawns.Length - 1 &&
                            !activatorSpawns[index].IsInUse)
                        {
                            Switch s = Instantiate(
                                standButton,
                                activatorSpawns[index].transform.position - new Vector3(0.0f, (activatorSpawns[index].transform.localScale.y / 2.0f), 0.0f),
                                activatorSpawns[index].transform.rotation
                                );

                            // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                            activatorSpawns[index].IsInUse = true;

                            // Spawn timer and connect to stand button
                            Quaternion q = activatorSpawns[index].transform.rotation;
                            q.y -= 180.0f;
                            GameObject  timer = Instantiate(standTimer, activatorSpawns[index].transform.position + new Vector3(0.0f, (activatorSpawns[index].transform.localScale.y / 2.0f), 0.0f), q);
                            StandButton sb    = s.GetComponent <StandButton>();
                            sb.OpenTime   = Random.Range(8.0f, 15.0f);
                            sb.TimerPanel = timer;

                            // Add to spawned switches for this room
                            switches.Add(s);
                        }
                        // For all un-used spawns
                        else
                        {
                            // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                            activatorSpawns[index].IsInUse = true;
                        }
                    }
                    // Mark for destruction
                    Destroy(activatorSpawns[index].gameObject);
                }
            }
            // Box button
            else
            {
                if (!activatorSpawns[0].IsInUse)
                {
                    Switch b = Instantiate(
                        boxButton,
                        activatorSpawns[0].transform.position - new Vector3(0.0f, (activatorSpawns[0].transform.localScale.y / 2.2f), 0.0f),
                        activatorSpawns[0].transform.rotation
                        );

                    // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                    activatorSpawns[0].IsInUse = true;

                    // Spawn the indicator and connect to the button
                    GameObject indicator = Instantiate(boxIndicator, activatorSpawns[0].transform.position + new Vector3(0.0f, (activatorSpawns[0].transform.localScale.y / 2.0f), 0.0f), activatorSpawns[0].transform.rotation);
                    BoxButton  bb        = b.GetComponent <BoxButton>();
                    bb.Indicator = indicator;

                    // Add to spawned switches for this room
                    switches.Add(b);
                }

                // Just spawn the triggerbox
                if (!activatorSpawns[1].IsInUse)
                {
                    Instantiate(triggerBox, activatorSpawns[1].transform.position, activatorSpawns[1].transform.rotation);

                    // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                    activatorSpawns[1].IsInUse = true;
                }

                // Mark all spawn points for deletion
                for (int index = 0; index < activatorSpawns.Length; index++)
                {
                    // IsInUse prevents multiple spawn at one point. Destroy() happens a frame to late to be of use here
                    activatorSpawns[index].IsInUse = true;
                    Destroy(activatorSpawns[index].gameObject);
                }
            }

            // Loop through every door currently created
            foreach (Door door in currentDoors)
            {
                // Determine which group this switch is in (whole of one group necessary to open door)
                // Decided based on whether this door has previously been connected to switches
                // Allows front-and-back of door switches that work independently
                int group = 1;
                if (door.Switches.Count > 0)
                {
                    group = 2;
                }

                // If the switch is close enough to the door, connect it
                // A little buggy, sometimes connects to a door in a different room through a wall and can be game breaking
                // But is surprisingly uncommon
                foreach (Switch switcho in switches)
                {
                    if (Vector3.Distance(door.transform.position, switcho.transform.position) <= 19.0f)
                    {
                        DoorSwitch doorSwitch;
                        doorSwitch.doorOverride = false;
                        doorSwitch.theSwitch    = switcho;
                        doorSwitch.group        = group;
                        door.Switches.Add(doorSwitch);
                    }
                }
            }
        }

        // Clear spawn points
        enemySpawns     = new EnemySpawn[0];
        activatorSpawns = new ActivatorSpawn[0];
    }
Beispiel #14
0
 /// <summary>
 ///     Required method for Designer support - do not modify
 ///     the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.boxButton1      = new TheBox.Buttons.BoxButton();
     this.boxButton2      = new TheBox.Buttons.BoxButton();
     this.boxButton3      = new TheBox.Buttons.BoxButton();
     this.boxButton4      = new TheBox.Buttons.BoxButton();
     this.boxButton5      = new TheBox.Buttons.BoxButton();
     this.boxButton6      = new TheBox.Buttons.BoxButton();
     this.boxButton7      = new TheBox.Buttons.BoxButton();
     this.boxButton8      = new TheBox.Buttons.BoxButton();
     this.boxButton9      = new TheBox.Buttons.BoxButton();
     this.groupBox1       = new System.Windows.Forms.GroupBox();
     this.groupBox2       = new System.Windows.Forms.GroupBox();
     this.groupBox3       = new System.Windows.Forms.GroupBox();
     this.boxButton10     = new TheBox.Buttons.BoxButton();
     this.cmbFind         = new System.Windows.Forms.ComboBox();
     this.bFind           = new System.Windows.Forms.Button();
     this.boxButton11     = new TheBox.Buttons.BoxButton();
     this.groupBox4       = new System.Windows.Forms.GroupBox();
     this.bRun            = new System.Windows.Forms.Button();
     this.bFindServerProc = new System.Windows.Forms.Button();
     this.bStop           = new System.Windows.Forms.Button();
     this.bShowConsole    = new System.Windows.Forms.Button();
     this.bHideConsole    = new System.Windows.Forms.Button();
     this.bFindServer     = new System.Windows.Forms.Button();
     this.labServer       = new System.Windows.Forms.Label();
     this.OpenFile        = new System.Windows.Forms.OpenFileDialog();
     this.bGetServ        = new System.Windows.Forms.Button();
     this.bStartServer    = new System.Windows.Forms.Button();
     this.cmbArgs         = new System.Windows.Forms.ComboBox();
     this.label1          = new System.Windows.Forms.Label();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.groupBox3.SuspendLayout();
     this.groupBox4.SuspendLayout();
     this.SuspendLayout();
     //
     // boxButton1
     //
     this.boxButton1.AllowEdit = true;
     this.boxButton1.ButtonID  = 55;
     this.boxButton1.Def       = null;
     this.boxButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton1.IsActive  = true;
     this.boxButton1.Location  = new System.Drawing.Point(8, 16);
     this.boxButton1.Name      = "boxButton1";
     this.boxButton1.TabIndex  = 0;
     this.boxButton1.Text      = "Profile";
     //
     // boxButton2
     //
     this.boxButton2.AllowEdit = true;
     this.boxButton2.ButtonID  = 56;
     this.boxButton2.Def       = null;
     this.boxButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton2.IsActive  = true;
     this.boxButton2.Location  = new System.Drawing.Point(8, 44);
     this.boxButton2.Name      = "boxButton2";
     this.boxButton2.TabIndex  = 1;
     this.boxButton2.Text      = "Generate";
     //
     // boxButton3
     //
     this.boxButton3.AllowEdit = true;
     this.boxButton3.ButtonID  = 57;
     this.boxButton3.Def       = null;
     this.boxButton3.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton3.IsActive  = true;
     this.boxButton3.Location  = new System.Drawing.Point(8, 40);
     this.boxButton3.Name      = "boxButton3";
     this.boxButton3.TabIndex  = 2;
     this.boxButton3.Text      = "Save";
     //
     // boxButton4
     //
     this.boxButton4.AllowEdit = true;
     this.boxButton4.ButtonID  = 58;
     this.boxButton4.Def       = null;
     this.boxButton4.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton4.IsActive  = true;
     this.boxButton4.Location  = new System.Drawing.Point(8, 64);
     this.boxButton4.Name      = "boxButton4";
     this.boxButton4.TabIndex  = 3;
     this.boxButton4.Text      = "Ban";
     //
     // boxButton5
     //
     this.boxButton5.AllowEdit = true;
     this.boxButton5.ButtonID  = 59;
     this.boxButton5.Def       = null;
     this.boxButton5.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton5.IsActive  = true;
     this.boxButton5.Location  = new System.Drawing.Point(8, 16);
     this.boxButton5.Name      = "boxButton5";
     this.boxButton5.TabIndex  = 4;
     this.boxButton5.Text      = "Admin";
     //
     // boxButton6
     //
     this.boxButton6.AllowEdit = true;
     this.boxButton6.ButtonID  = 64;
     this.boxButton6.Def       = null;
     this.boxButton6.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton6.IsActive  = true;
     this.boxButton6.Location  = new System.Drawing.Point(8, 112);
     this.boxButton6.Name      = "boxButton6";
     this.boxButton6.TabIndex  = 4;
     this.boxButton6.Text      = "Guards";
     //
     // boxButton7
     //
     this.boxButton7.AllowEdit = true;
     this.boxButton7.ButtonID  = 65;
     this.boxButton7.Def       = null;
     this.boxButton7.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton7.IsActive  = true;
     this.boxButton7.Location  = new System.Drawing.Point(8, 44);
     this.boxButton7.Name      = "boxButton7";
     this.boxButton7.TabIndex  = 3;
     this.boxButton7.Text      = "Unfreeze";
     //
     // boxButton8
     //
     this.boxButton8.AllowEdit = true;
     this.boxButton8.ButtonID  = 66;
     this.boxButton8.Def       = null;
     this.boxButton8.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton8.IsActive  = true;
     this.boxButton8.Location  = new System.Drawing.Point(8, 16);
     this.boxButton8.Name      = "boxButton8";
     this.boxButton8.TabIndex  = 2;
     this.boxButton8.Text      = "Freeze";
     //
     // boxButton9
     //
     this.boxButton9.AllowEdit = true;
     this.boxButton9.ButtonID  = 67;
     this.boxButton9.Def       = null;
     this.boxButton9.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton9.IsActive  = true;
     this.boxButton9.Location  = new System.Drawing.Point(8, 88);
     this.boxButton9.Name      = "boxButton9";
     this.boxButton9.TabIndex  = 1;
     this.boxButton9.Text      = "Firewall";
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.boxButton5);
     this.groupBox1.Controls.Add(this.boxButton3);
     this.groupBox1.Controls.Add(this.boxButton4);
     this.groupBox1.Controls.Add(this.boxButton9);
     this.groupBox1.Controls.Add(this.boxButton6);
     this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.groupBox1.Location  = new System.Drawing.Point(4, 0);
     this.groupBox1.Name      = "groupBox1";
     this.groupBox1.Size      = new System.Drawing.Size(92, 140);
     this.groupBox1.TabIndex  = 0;
     this.groupBox1.TabStop   = false;
     this.groupBox1.Text      = "Admin.Control";
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.boxButton1);
     this.groupBox2.Controls.Add(this.boxButton2);
     this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.groupBox2.Location  = new System.Drawing.Point(196, 0);
     this.groupBox2.Name      = "groupBox2";
     this.groupBox2.Size      = new System.Drawing.Size(92, 72);
     this.groupBox2.TabIndex  = 4;
     this.groupBox2.TabStop   = false;
     this.groupBox2.Text      = "Admin.World";
     //
     // groupBox3
     //
     this.groupBox3.Controls.Add(this.boxButton8);
     this.groupBox3.Controls.Add(this.boxButton7);
     this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.groupBox3.Location  = new System.Drawing.Point(100, 0);
     this.groupBox3.Name      = "groupBox3";
     this.groupBox3.Size      = new System.Drawing.Size(92, 72);
     this.groupBox3.TabIndex  = 5;
     this.groupBox3.TabStop   = false;
     this.groupBox3.Text      = "Admin.Statics";
     //
     // boxButton10
     //
     this.boxButton10.AllowEdit = true;
     this.boxButton10.ButtonID  = 68;
     this.boxButton10.Def       = null;
     this.boxButton10.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton10.IsActive  = true;
     this.boxButton10.Location  = new System.Drawing.Point(108, 80);
     this.boxButton10.Name      = "boxButton10";
     this.boxButton10.TabIndex  = 6;
     this.boxButton10.Text      = "Misc";
     //
     // cmbFind
     //
     this.cmbFind.Location = new System.Drawing.Point(108, 112);
     this.cmbFind.Name     = "cmbFind";
     this.cmbFind.Size     = new System.Drawing.Size(116, 21);
     this.cmbFind.TabIndex = 7;
     //
     // bFind
     //
     this.bFind.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bFind.Location  = new System.Drawing.Point(228, 108);
     this.bFind.Name      = "bFind";
     this.bFind.Size      = new System.Drawing.Size(52, 28);
     this.bFind.TabIndex  = 8;
     this.bFind.Text      = "Common.Find";
     this.bFind.Click    += new System.EventHandler(this.bFind_Click);
     //
     // boxButton11
     //
     this.boxButton11.AllowEdit = true;
     this.boxButton11.ButtonID  = 69;
     this.boxButton11.Def       = null;
     this.boxButton11.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.boxButton11.IsActive  = true;
     this.boxButton11.Location  = new System.Drawing.Point(204, 80);
     this.boxButton11.Name      = "boxButton11";
     this.boxButton11.TabIndex  = 9;
     this.boxButton11.Text      = "Custom";
     //
     // groupBox4
     //
     this.groupBox4.Controls.Add(this.label1);
     this.groupBox4.Controls.Add(this.cmbArgs);
     this.groupBox4.Controls.Add(this.bStartServer);
     this.groupBox4.Controls.Add(this.bGetServ);
     this.groupBox4.Controls.Add(this.bStop);
     this.groupBox4.Controls.Add(this.bShowConsole);
     this.groupBox4.Controls.Add(this.bHideConsole);
     this.groupBox4.Controls.Add(this.bFindServer);
     this.groupBox4.Controls.Add(this.labServer);
     this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.groupBox4.Location  = new System.Drawing.Point(292, 0);
     this.groupBox4.Name      = "groupBox4";
     this.groupBox4.Size      = new System.Drawing.Size(200, 140);
     this.groupBox4.TabIndex  = 10;
     this.groupBox4.TabStop   = false;
     this.groupBox4.Text      = "Admin.Process";
     //
     // bRun
     //
     this.bRun.Location = new System.Drawing.Point(0, 0);
     this.bRun.Name     = "bRun";
     this.bRun.TabIndex = 0;
     //
     // bFindServerProc
     //
     this.bFindServerProc.Location = new System.Drawing.Point(0, 0);
     this.bFindServerProc.Name     = "bFindServerProc";
     this.bFindServerProc.TabIndex = 0;
     //
     // bStop
     //
     this.bStop.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bStop.Location  = new System.Drawing.Point(4, 84);
     this.bStop.Name      = "bStop";
     this.bStop.Size      = new System.Drawing.Size(92, 23);
     this.bStop.TabIndex  = 4;
     this.bStop.Text      = "Common.Stop";
     this.bStop.Click    += new System.EventHandler(this.bStop_Click);
     //
     // bShowConsole
     //
     this.bShowConsole.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bShowConsole.Location  = new System.Drawing.Point(104, 112);
     this.bShowConsole.Name      = "bShowConsole";
     this.bShowConsole.Size      = new System.Drawing.Size(92, 23);
     this.bShowConsole.TabIndex  = 3;
     this.bShowConsole.Text      = "Admin.Show";
     this.bShowConsole.Click    += new System.EventHandler(this.bShowConsole_Click);
     //
     // bHideConsole
     //
     this.bHideConsole.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bHideConsole.Location  = new System.Drawing.Point(4, 112);
     this.bHideConsole.Name      = "bHideConsole";
     this.bHideConsole.Size      = new System.Drawing.Size(92, 23);
     this.bHideConsole.TabIndex  = 2;
     this.bHideConsole.Text      = "Admin.Hide";
     this.bHideConsole.Click    += new System.EventHandler(this.bHideConsole_Click);
     //
     // bFindServer
     //
     this.bFindServer.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bFindServer.Location  = new System.Drawing.Point(148, 16);
     this.bFindServer.Name      = "bFindServer";
     this.bFindServer.Size      = new System.Drawing.Size(48, 23);
     this.bFindServer.TabIndex  = 1;
     this.bFindServer.Text      = "Common.File";
     this.bFindServer.Click    += new System.EventHandler(this.bFindServer_Click);
     //
     // labServer
     //
     this.labServer.Location  = new System.Drawing.Point(4, 16);
     this.labServer.Name      = "labServer";
     this.labServer.Size      = new System.Drawing.Size(136, 23);
     this.labServer.TabIndex  = 0;
     this.labServer.Text      = "Admin.ProcessNotFound";
     this.labServer.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     this.labServer.Paint    += new System.Windows.Forms.PaintEventHandler(this.labServer_Paint);
     //
     // bGetServ
     //
     this.bGetServ.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bGetServ.Location  = new System.Drawing.Point(104, 84);
     this.bGetServ.Name      = "bGetServ";
     this.bGetServ.Size      = new System.Drawing.Size(92, 23);
     this.bGetServ.TabIndex  = 5;
     this.bGetServ.Text      = "Common.Find";
     this.bGetServ.Click    += new System.EventHandler(this.bGetServ_Click);
     //
     // bStartServer
     //
     this.bStartServer.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.bStartServer.Location  = new System.Drawing.Point(148, 44);
     this.bStartServer.Name      = "bStartServer";
     this.bStartServer.Size      = new System.Drawing.Size(48, 32);
     this.bStartServer.TabIndex  = 6;
     this.bStartServer.Text      = "Common.Run";
     this.bStartServer.Click    += new System.EventHandler(this.bStartServer_Click);
     //
     // cmbArgs
     //
     this.cmbArgs.Location = new System.Drawing.Point(4, 56);
     this.cmbArgs.Name     = "cmbArgs";
     this.cmbArgs.Size     = new System.Drawing.Size(136, 21);
     this.cmbArgs.TabIndex = 7;
     this.cmbArgs.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cmbArgs_KeyDown);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(4, 40);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(136, 16);
     this.label1.TabIndex = 8;
     this.label1.Text     = "Admin.CmdArgs";
     //
     // Admin
     //
     this.Controls.Add(this.groupBox4);
     this.Controls.Add(this.boxButton11);
     this.Controls.Add(this.bFind);
     this.Controls.Add(this.cmbFind);
     this.Controls.Add(this.boxButton10);
     this.Controls.Add(this.groupBox3);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Name  = "Admin";
     this.Size  = new System.Drawing.Size(496, 142);
     this.Load += new System.EventHandler(this.Admin_Load);
     this.groupBox1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.groupBox3.ResumeLayout(false);
     this.groupBox4.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Beispiel #15
0
        /// <summary>
        ///     Required method for Designer support - do not modify
        ///     the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            var resources = new System.Resources.ResourceManager(typeof(Items));

            this.panelTrees      = new System.Windows.Forms.Panel();
            this.tItems          = new System.Windows.Forms.TreeView();
            this.cmItems         = new System.Windows.Forms.ContextMenu();
            this.cmAddItem       = new System.Windows.Forms.MenuItem();
            this.cmEditItem      = new System.Windows.Forms.MenuItem();
            this.cmDeleteItem    = new System.Windows.Forms.MenuItem();
            this.menuItem10      = new System.Windows.Forms.MenuItem();
            this.cmSetItemID     = new System.Windows.Forms.MenuItem();
            this.cmToSpawn       = new System.Windows.Forms.MenuItem();
            this.splitter        = new System.Windows.Forms.Splitter();
            this.tCat            = new System.Windows.Forms.TreeView();
            this.cmCat           = new System.Windows.Forms.ContextMenu();
            this.cmAddMainCat    = new System.Windows.Forms.MenuItem();
            this.cmAddSub        = new System.Windows.Forms.MenuItem();
            this.menuItem8       = new System.Windows.Forms.MenuItem();
            this.cmCatRename     = new System.Windows.Forms.MenuItem();
            this.cmCatDelete     = new System.Windows.Forms.MenuItem();
            this.Ctors           = new TheBox.Controls.Params.ConstructorsViewer();
            this.bAdd            = new System.Windows.Forms.Button();
            this.bToPack         = new System.Windows.Forms.Button();
            this.chkCustomParams = new System.Windows.Forms.CheckBox();
            this.cmbCustomParams = new System.Windows.Forms.ComboBox();
            this.boxButton1      = new TheBox.Buttons.BoxButton();
            this.bDown           = new System.Windows.Forms.Button();
            this.numNudge        = new System.Windows.Forms.NumericUpDown();
            this.bUp             = new System.Windows.Forms.Button();
            this.bConfigSpawn    = new System.Windows.Forms.Button();
            this.bTile           = new System.Windows.Forms.Button();
            this.nTile           = new System.Windows.Forms.NumericUpDown();
            this.bFind           = new System.Windows.Forms.Button();
            this.panelTrees.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numNudge)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.nTile)).BeginInit();
            this.SuspendLayout();
            //
            // panelTrees
            //
            this.panelTrees.Controls.Add(this.tItems);
            this.panelTrees.Controls.Add(this.splitter);
            this.panelTrees.Controls.Add(this.tCat);
            this.panelTrees.Location = new System.Drawing.Point(0, 0);
            this.panelTrees.Name     = "panelTrees";
            this.panelTrees.Size     = new System.Drawing.Size(284, 140);
            this.panelTrees.TabIndex = 0;
            //
            // tItems
            //
            this.tItems.AllowDrop          = true;
            this.tItems.ContextMenu        = this.cmItems;
            this.tItems.Dock               = System.Windows.Forms.DockStyle.Fill;
            this.tItems.HideSelection      = false;
            this.tItems.ImageIndex         = -1;
            this.tItems.Location           = new System.Drawing.Point(135, 0);
            this.tItems.Name               = "tItems";
            this.tItems.SelectedImageIndex = -1;
            this.tItems.ShowLines          = false;
            this.tItems.ShowRootLines      = false;
            this.tItems.Size               = new System.Drawing.Size(149, 140);
            this.tItems.Sorted             = true;
            this.tItems.TabIndex           = 2;
            this.tItems.KeyDown           += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.tItems.MouseDown         += new System.Windows.Forms.MouseEventHandler(this.tItems_MouseDown);
            this.tItems.DoubleClick       += new System.EventHandler(this.tItems_DoubleClick);
            this.tItems.AfterSelect       += new System.Windows.Forms.TreeViewEventHandler(this.tItems_AfterSelect);
            this.tItems.MouseMove         += new System.Windows.Forms.MouseEventHandler(this.tItems_MouseMove);
            //
            // cmItems
            //
            this.cmItems.MenuItems.AddRange(
                new System.Windows.Forms.MenuItem[]
                { this.cmAddItem, this.cmEditItem, this.cmDeleteItem, this.menuItem10, this.cmSetItemID, this.cmToSpawn });
            this.cmItems.Popup += new System.EventHandler(this.cmItems_Popup);
            //
            // cmAddItem
            //
            this.cmAddItem.Index  = 0;
            this.cmAddItem.Text   = "Items.Add";
            this.cmAddItem.Click += new System.EventHandler(this.cmAddItem_Click);
            //
            // cmEditItem
            //
            this.cmEditItem.Index  = 1;
            this.cmEditItem.Text   = "Common.Edit";
            this.cmEditItem.Click += new System.EventHandler(this.cmEditItem_Click);
            //
            // cmDeleteItem
            //
            this.cmDeleteItem.Index  = 2;
            this.cmDeleteItem.Text   = "Common.Delete";
            this.cmDeleteItem.Click += new System.EventHandler(this.cmDeleteItem_Click);
            //
            // menuItem10
            //
            this.menuItem10.Index = 3;
            this.menuItem10.Text  = "-";
            //
            // cmSetItemID
            //
            this.cmSetItemID.Index  = 4;
            this.cmSetItemID.Text   = "Items.ItemID";
            this.cmSetItemID.Click += new System.EventHandler(this.cmSetItemID_Click);
            //
            // cmToSpawn
            //
            this.cmToSpawn.Index  = 5;
            this.cmToSpawn.Text   = "NPCs.ToSpawn";
            this.cmToSpawn.Click += new System.EventHandler(this.cmToSpawn_Click);
            //
            // splitter
            //
            this.splitter.Location       = new System.Drawing.Point(132, 0);
            this.splitter.Name           = "splitter";
            this.splitter.Size           = new System.Drawing.Size(3, 140);
            this.splitter.TabIndex       = 1;
            this.splitter.TabStop        = false;
            this.splitter.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitter_SplitterMoved);
            //
            // tCat
            //
            this.tCat.ContextMenu        = this.cmCat;
            this.tCat.Dock               = System.Windows.Forms.DockStyle.Left;
            this.tCat.HideSelection      = false;
            this.tCat.ImageIndex         = -1;
            this.tCat.Location           = new System.Drawing.Point(0, 0);
            this.tCat.Name               = "tCat";
            this.tCat.SelectedImageIndex = -1;
            this.tCat.Size               = new System.Drawing.Size(132, 140);
            this.tCat.Sorted             = true;
            this.tCat.TabIndex           = 0;
            this.tCat.KeyDown           += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.tCat.AfterSelect       += new System.Windows.Forms.TreeViewEventHandler(this.tCat_AfterSelect);
            this.tCat.AfterLabelEdit    += new System.Windows.Forms.NodeLabelEditEventHandler(this.tCat_AfterLabelEdit);
            //
            // cmCat
            //
            this.cmCat.MenuItems.AddRange(
                new System.Windows.Forms.MenuItem[]
                { this.cmAddMainCat, this.cmAddSub, this.menuItem8, this.cmCatRename, this.cmCatDelete });
            this.cmCat.Popup += new System.EventHandler(this.cmCat_Popup);
            //
            // cmAddMainCat
            //
            this.cmAddMainCat.Index  = 0;
            this.cmAddMainCat.Text   = "NPCs.mCatAddCat";
            this.cmAddMainCat.Click += new System.EventHandler(this.cmAddMainCat_Click);
            //
            // cmAddSub
            //
            this.cmAddSub.Index  = 1;
            this.cmAddSub.Text   = "NPCs.mCatAddSub";
            this.cmAddSub.Click += new System.EventHandler(this.cmAddSub_Click);
            //
            // menuItem8
            //
            this.menuItem8.Index = 2;
            this.menuItem8.Text  = "-";
            //
            // cmCatRename
            //
            this.cmCatRename.Index  = 3;
            this.cmCatRename.Text   = "NPCs.mCatRename";
            this.cmCatRename.Click += new System.EventHandler(this.cmCatRename_Click);
            //
            // cmCatDelete
            //
            this.cmCatDelete.Index  = 4;
            this.cmCatDelete.Text   = "NPCs.mCatDelete";
            this.cmCatDelete.Click += new System.EventHandler(this.cmCatDelete_Click);
            //
            // Ctors
            //
            this.Ctors.Location = new System.Drawing.Point(288, 80);
            this.Ctors.Name     = "Ctors";
            this.Ctors.Size     = new System.Drawing.Size(204, 60);
            this.Ctors.TabIndex = 1;
            this.Ctors.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            //
            // bAdd
            //
            this.bAdd.Enabled    = false;
            this.bAdd.FlatStyle  = System.Windows.Forms.FlatStyle.System;
            this.bAdd.Location   = new System.Drawing.Point(288, 0);
            this.bAdd.Name       = "bAdd";
            this.bAdd.Size       = new System.Drawing.Size(52, 23);
            this.bAdd.TabIndex   = 2;
            this.bAdd.Text       = "Common.Add";
            this.bAdd.KeyDown   += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.bAdd.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bAdd_MouseDown);
            //
            // bToPack
            //
            this.bToPack.Enabled    = false;
            this.bToPack.FlatStyle  = System.Windows.Forms.FlatStyle.System;
            this.bToPack.Location   = new System.Drawing.Point(288, 28);
            this.bToPack.Name       = "bToPack";
            this.bToPack.Size       = new System.Drawing.Size(52, 23);
            this.bToPack.TabIndex   = 3;
            this.bToPack.Text       = "Items.ToPack";
            this.bToPack.KeyDown   += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.bToPack.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bToPack_MouseDown);
            //
            // chkCustomParams
            //
            this.chkCustomParams.FlatStyle       = System.Windows.Forms.FlatStyle.System;
            this.chkCustomParams.Location        = new System.Drawing.Point(292, 56);
            this.chkCustomParams.Name            = "chkCustomParams";
            this.chkCustomParams.Size            = new System.Drawing.Size(20, 20);
            this.chkCustomParams.TabIndex        = 4;
            this.chkCustomParams.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.chkCustomParams.CheckedChanged += new System.EventHandler(this.chkCustomParams_CheckedChanged);
            //
            // cmbCustomParams
            //
            this.cmbCustomParams.Location = new System.Drawing.Point(312, 56);
            this.cmbCustomParams.Name     = "cmbCustomParams";
            this.cmbCustomParams.Size     = new System.Drawing.Size(180, 21);
            this.cmbCustomParams.TabIndex = 5;
            this.cmbCustomParams.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            //
            // boxButton1
            //
            this.boxButton1.AllowEdit = true;
            this.boxButton1.ButtonID  = 47;
            this.boxButton1.Def       = null;
            this.boxButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton1.IsActive  = true;
            this.boxButton1.Location  = new System.Drawing.Point(344, 28);
            this.boxButton1.Name      = "boxButton1";
            this.boxButton1.Size      = new System.Drawing.Size(40, 23);
            this.boxButton1.TabIndex  = 7;
            this.boxButton1.Text      = "boxButton1";
            //
            // bDown
            //
            this.bDown.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.bDown.Image     = ((System.Drawing.Image)(resources.GetObject("bDown.Image")));
            this.bDown.Location  = new System.Drawing.Point(408, 0);
            this.bDown.Name      = "bDown";
            this.bDown.Size      = new System.Drawing.Size(16, 23);
            this.bDown.TabIndex  = 9;
            this.bDown.Click    += new System.EventHandler(this.bDown_Click);
            //
            // numNudge
            //
            this.numNudge.Location      = new System.Drawing.Point(428, 2);
            this.numNudge.Maximum       = new System.Decimal(new int[] { 127, 0, 0, 0 });
            this.numNudge.Name          = "numNudge";
            this.numNudge.Size          = new System.Drawing.Size(44, 20);
            this.numNudge.TabIndex      = 10;
            this.numNudge.Value         = new System.Decimal(new int[] { 127, 0, 0, 0 });
            this.numNudge.ValueChanged += new System.EventHandler(this.numNudge_ValueChanged);
            //
            // bUp
            //
            this.bUp.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.bUp.Image     = ((System.Drawing.Image)(resources.GetObject("bUp.Image")));
            this.bUp.Location  = new System.Drawing.Point(476, 0);
            this.bUp.Name      = "bUp";
            this.bUp.Size      = new System.Drawing.Size(16, 23);
            this.bUp.TabIndex  = 11;
            this.bUp.Click    += new System.EventHandler(this.bUp_Click);
            //
            // bConfigSpawn
            //
            this.bConfigSpawn.Enabled    = false;
            this.bConfigSpawn.FlatStyle  = System.Windows.Forms.FlatStyle.Popup;
            this.bConfigSpawn.Image      = ((System.Drawing.Image)(resources.GetObject("bConfigSpawn.Image")));
            this.bConfigSpawn.Location   = new System.Drawing.Point(476, 28);
            this.bConfigSpawn.Name       = "bConfigSpawn";
            this.bConfigSpawn.Size       = new System.Drawing.Size(16, 23);
            this.bConfigSpawn.TabIndex   = 13;
            this.bConfigSpawn.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bConfigSpawn_MouseDown);
            //
            // bTile
            //
            this.bTile.Enabled   = false;
            this.bTile.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bTile.Location  = new System.Drawing.Point(388, 28);
            this.bTile.Name      = "bTile";
            this.bTile.Size      = new System.Drawing.Size(36, 23);
            this.bTile.TabIndex  = 14;
            this.bTile.Text      = "Deco.Tile";
            this.bTile.Click    += new System.EventHandler(this.bTile_Click);
            //
            // nTile
            //
            this.nTile.Location      = new System.Drawing.Point(428, 30);
            this.nTile.Maximum       = new System.Decimal(new int[] { 127, 0, 0, 0 });
            this.nTile.Minimum       = new System.Decimal(new int[] { 128, 0, 0, -2147483648 });
            this.nTile.Name          = "nTile";
            this.nTile.Size          = new System.Drawing.Size(44, 20);
            this.nTile.TabIndex      = 15;
            this.nTile.Value         = new System.Decimal(new int[] { 128, 0, 0, -2147483648 });
            this.nTile.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
            //
            // bFind
            //
            this.bFind.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bFind.Location  = new System.Drawing.Point(344, 0);
            this.bFind.Name      = "bFind";
            this.bFind.Size      = new System.Drawing.Size(60, 23);
            this.bFind.TabIndex  = 16;
            this.bFind.Text      = "Common.Find";
            this.bFind.Click    += new System.EventHandler(this.lnkFind_LinkClicked);
            //
            // Items
            //
            this.Controls.Add(this.bFind);
            this.Controls.Add(this.nTile);
            this.Controls.Add(this.bTile);
            this.Controls.Add(this.bConfigSpawn);
            this.Controls.Add(this.bUp);
            this.Controls.Add(this.numNudge);
            this.Controls.Add(this.bDown);
            this.Controls.Add(this.boxButton1);
            this.Controls.Add(this.cmbCustomParams);
            this.Controls.Add(this.chkCustomParams);
            this.Controls.Add(this.bToPack);
            this.Controls.Add(this.bAdd);
            this.Controls.Add(this.Ctors);
            this.Controls.Add(this.panelTrees);
            this.Name     = "Items";
            this.Size     = new System.Drawing.Size(496, 142);
            this.Load    += new System.EventHandler(this.Items_Load);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DoKeys);
            this.panelTrees.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numNudge)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.nTile)).EndInit();
            this.ResumeLayout(false);
        }
Beispiel #16
0
        /// <summary>
        /// Gets the ButtonDef object given the button's ID
        /// </summary>
        public ButtonDef this[BoxButton button]
        {
            get
            {
                string filename = GetFile(button.ButtonID);

                if (File.Exists(filename))
                {
                    // There's a custom def

                    try
                    {
                        ButtonDef def = Load(filename);
                        button.Def = def;
                        return(def);
                    }
                    catch (Exception err)
                    {
                        Pandora.Log.WriteError(err, string.Format("Custom file for button {0} was corrupted. It has been renamed to {0}.old.xml", filename));

                        try
                        {
                            File.Move(filename, string.Format("{0}.old.xml", filename));
                        }
                        catch
                        {
                            Pandora.Log.WriteError(null, "Cannot rename file");
                        }
                    }
                }
                // Get default

                // TODO : Read the def from the correct memory location instead for the release

                try
                {
                    string    defaultFile = string.Format(@"D:\Dev\Pandora 2.0\Data\Buttons\{0}.xml", button.ButtonID);
                    ButtonDef def         = Load(defaultFile);
                    button.Def = def;
                    return(def);
                }
                catch (Exception err)
                {
                    Pandora.Log.WriteError(err, string.Format("Cannot read default def file for button #{0}", button.ButtonID));
                }

                button.Def = null;
                return(null);
            }
            set
            {
                // TODO : Add correct code to save in custom folder
                string filename = string.Format(@"D:\Dev\Pandora 2.0\Data\Buttons\{0}.xml", button.ButtonID);

                try
                {
                    Save(filename, value);
                    button.Def = value;
                }
                catch (Exception err)
                {
                    Pandora.Log.WriteError(err, string.Format("Error occurred when setting the def object for button #{0}", button.ButtonID));
                    button.Def = null;
                }
            }
        }
Beispiel #17
0
        /// <summary>
        ///     Required method for Designer support - do not modify
        ///     the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            var resources = new System.Resources.ResourceManager(typeof(General));

            this.lnkSound     = new System.Windows.Forms.LinkLabel();
            this.cmbSpeech    = new System.Windows.Forms.ComboBox();
            this.cmbWeb       = new System.Windows.Forms.ComboBox();
            this.bTell        = new System.Windows.Forms.Button();
            this.bSM          = new System.Windows.Forms.Button();
            this.bBCast       = new System.Windows.Forms.Button();
            this.bWeb         = new System.Windows.Forms.Button();
            this.bPriv        = new System.Windows.Forms.Button();
            this.bSound       = new System.Windows.Forms.Button();
            this.groupBox1    = new System.Windows.Forms.GroupBox();
            this.groupBox2    = new System.Windows.Forms.GroupBox();
            this.groupBox3    = new System.Windows.Forms.GroupBox();
            this.boxButton4   = new TheBox.Buttons.BoxButton();
            this.boxButton3   = new TheBox.Buttons.BoxButton();
            this.boxButton2   = new TheBox.Buttons.BoxButton();
            this.boxButton1   = new TheBox.Buttons.BoxButton();
            this.boxButton5   = new TheBox.Buttons.BoxButton();
            this.boxButton6   = new TheBox.Buttons.BoxButton();
            this.groupBox4    = new System.Windows.Forms.GroupBox();
            this.numSkill     = new System.Windows.Forms.NumericUpDown();
            this.lnkSkill     = new System.Windows.Forms.LinkLabel();
            this.bGetSkill    = new System.Windows.Forms.Button();
            this.bSetSkill    = new System.Windows.Forms.Button();
            this.groupBox5    = new System.Windows.Forms.GroupBox();
            this.bInBag       = new System.Windows.Forms.Button();
            this.numDupe      = new System.Windows.Forms.NumericUpDown();
            this.chkDupe      = new System.Windows.Forms.CheckBox();
            this.bDupe        = new System.Windows.Forms.Button();
            this.groupBox6    = new System.Windows.Forms.GroupBox();
            this.bLightGlobal = new System.Windows.Forms.Button();
            this.bLightLocal  = new System.Windows.Forms.Button();
            this.numLight     = new System.Windows.Forms.NumericUpDown();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numSkill)).BeginInit();
            this.groupBox5.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numDupe)).BeginInit();
            this.groupBox6.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numLight)).BeginInit();
            this.SuspendLayout();
            //
            // lnkSound
            //
            this.lnkSound.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lnkSound.Location    = new System.Drawing.Point(4, 40);
            this.lnkSound.Name        = "lnkSound";
            this.lnkSound.Size        = new System.Drawing.Size(116, 20);
            this.lnkSound.TabIndex    = 0;
            this.lnkSound.TabStop     = true;
            this.lnkSound.Text        = "General.ChooseSnd";
            this.lnkSound.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
            this.lnkSound.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.lnkSound_MouseDown);
            //
            // cmbSpeech
            //
            this.cmbSpeech.Location = new System.Drawing.Point(4, 16);
            this.cmbSpeech.Name     = "cmbSpeech";
            this.cmbSpeech.Size     = new System.Drawing.Size(228, 21);
            this.cmbSpeech.TabIndex = 1;
            //
            // cmbWeb
            //
            this.cmbWeb.Location = new System.Drawing.Point(4, 16);
            this.cmbWeb.Name     = "cmbWeb";
            this.cmbWeb.Size     = new System.Drawing.Size(184, 21);
            this.cmbWeb.TabIndex = 2;
            //
            // bTell
            //
            this.bTell.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bTell.Location  = new System.Drawing.Point(4, 40);
            this.bTell.Name      = "bTell";
            this.bTell.Size      = new System.Drawing.Size(72, 21);
            this.bTell.TabIndex  = 3;
            this.bTell.Text      = "General.Tell";
            this.bTell.Click    += new System.EventHandler(this.bTell_Click);
            //
            // bSM
            //
            this.bSM.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bSM.Location  = new System.Drawing.Point(80, 40);
            this.bSM.Name      = "bSM";
            this.bSM.Size      = new System.Drawing.Size(72, 21);
            this.bSM.TabIndex  = 4;
            this.bSM.Text      = "General.SM";
            this.bSM.Click    += new System.EventHandler(this.bSM_Click);
            //
            // bBCast
            //
            this.bBCast.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bBCast.Location  = new System.Drawing.Point(156, 40);
            this.bBCast.Name      = "bBCast";
            this.bBCast.Size      = new System.Drawing.Size(76, 21);
            this.bBCast.TabIndex  = 5;
            this.bBCast.Text      = "General.BCast";
            this.bBCast.Click    += new System.EventHandler(this.bBCast_Click);
            //
            // bWeb
            //
            this.bWeb.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bWeb.Location  = new System.Drawing.Point(192, 16);
            this.bWeb.Name      = "bWeb";
            this.bWeb.Size      = new System.Drawing.Size(56, 21);
            this.bWeb.TabIndex  = 6;
            this.bWeb.Text      = "General.www";
            this.bWeb.Click    += new System.EventHandler(this.bWeb_Click);
            //
            // bPriv
            //
            this.bPriv.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bPriv.Location  = new System.Drawing.Point(124, 40);
            this.bPriv.Name      = "bPriv";
            this.bPriv.Size      = new System.Drawing.Size(64, 21);
            this.bPriv.TabIndex  = 7;
            this.bPriv.Text      = "General.priv";
            this.bPriv.Click    += new System.EventHandler(this.bPriv_Click);
            //
            // bSound
            //
            this.bSound.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bSound.Location  = new System.Drawing.Point(192, 40);
            this.bSound.Name      = "bSound";
            this.bSound.Size      = new System.Drawing.Size(56, 21);
            this.bSound.TabIndex  = 8;
            this.bSound.Text      = "General.Snd";
            this.bSound.Click    += new System.EventHandler(this.bSound_Click);
            //
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.bSM);
            this.groupBox1.Controls.Add(this.cmbSpeech);
            this.groupBox1.Controls.Add(this.bBCast);
            this.groupBox1.Controls.Add(this.bTell);
            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox1.Location  = new System.Drawing.Point(4, 76);
            this.groupBox1.Name      = "groupBox1";
            this.groupBox1.Size      = new System.Drawing.Size(236, 64);
            this.groupBox1.TabIndex  = 9;
            this.groupBox1.TabStop   = false;
            this.groupBox1.Text      = "Misc.Speech";
            //
            // groupBox2
            //
            this.groupBox2.Controls.Add(this.cmbWeb);
            this.groupBox2.Controls.Add(this.bWeb);
            this.groupBox2.Controls.Add(this.bPriv);
            this.groupBox2.Controls.Add(this.bSound);
            this.groupBox2.Controls.Add(this.lnkSound);
            this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox2.Location  = new System.Drawing.Point(240, 76);
            this.groupBox2.Name      = "groupBox2";
            this.groupBox2.Size      = new System.Drawing.Size(252, 64);
            this.groupBox2.TabIndex  = 10;
            this.groupBox2.TabStop   = false;
            this.groupBox2.Text      = "Misc.WebSnd";
            //
            // groupBox3
            //
            this.groupBox3.Controls.Add(this.boxButton4);
            this.groupBox3.Controls.Add(this.boxButton3);
            this.groupBox3.Controls.Add(this.boxButton2);
            this.groupBox3.Controls.Add(this.boxButton1);
            this.groupBox3.Controls.Add(this.boxButton5);
            this.groupBox3.Controls.Add(this.boxButton6);
            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox3.Location  = new System.Drawing.Point(4, 0);
            this.groupBox3.Name      = "groupBox3";
            this.groupBox3.Size      = new System.Drawing.Size(196, 72);
            this.groupBox3.TabIndex  = 11;
            this.groupBox3.TabStop   = false;
            this.groupBox3.Text      = "General.Cmd";
            //
            // boxButton4
            //
            this.boxButton4.AllowEdit = true;
            this.boxButton4.ButtonID  = 73;
            this.boxButton4.Def       = null;
            this.boxButton4.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton4.IsActive  = true;
            this.boxButton4.Location  = new System.Drawing.Point(68, 44);
            this.boxButton4.Name      = "boxButton4";
            this.boxButton4.Size      = new System.Drawing.Size(60, 23);
            this.boxButton4.TabIndex  = 3;
            this.boxButton4.Text      = "Restock";
            //
            // boxButton3
            //
            this.boxButton3.AllowEdit = true;
            this.boxButton3.ButtonID  = 72;
            this.boxButton3.Def       = null;
            this.boxButton3.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton3.IsActive  = true;
            this.boxButton3.Location  = new System.Drawing.Point(68, 16);
            this.boxButton3.Name      = "boxButton3";
            this.boxButton3.Size      = new System.Drawing.Size(60, 23);
            this.boxButton3.TabIndex  = 2;
            this.boxButton3.Text      = "Players";
            //
            // boxButton2
            //
            this.boxButton2.AllowEdit = true;
            this.boxButton2.ButtonID  = 71;
            this.boxButton2.Def       = null;
            this.boxButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton2.IsActive  = true;
            this.boxButton2.Location  = new System.Drawing.Point(4, 44);
            this.boxButton2.Name      = "boxButton2";
            this.boxButton2.Size      = new System.Drawing.Size(60, 23);
            this.boxButton2.TabIndex  = 1;
            this.boxButton2.Text      = "Misc";
            //
            // boxButton1
            //
            this.boxButton1.AllowEdit = true;
            this.boxButton1.ButtonID  = 70;
            this.boxButton1.Def       = null;
            this.boxButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton1.IsActive  = true;
            this.boxButton1.Location  = new System.Drawing.Point(4, 16);
            this.boxButton1.Name      = "boxButton1";
            this.boxButton1.Size      = new System.Drawing.Size(60, 23);
            this.boxButton1.TabIndex  = 0;
            this.boxButton1.Text      = "Bank";
            //
            // boxButton5
            //
            this.boxButton5.AllowEdit = true;
            this.boxButton5.ButtonID  = 74;
            this.boxButton5.Def       = null;
            this.boxButton5.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton5.IsActive  = true;
            this.boxButton5.Location  = new System.Drawing.Point(132, 16);
            this.boxButton5.Name      = "boxButton5";
            this.boxButton5.Size      = new System.Drawing.Size(60, 23);
            this.boxButton5.TabIndex  = 4;
            this.boxButton5.Text      = "Items";
            //
            // boxButton6
            //
            this.boxButton6.AllowEdit = true;
            this.boxButton6.ButtonID  = 75;
            this.boxButton6.Def       = null;
            this.boxButton6.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.boxButton6.IsActive  = true;
            this.boxButton6.Location  = new System.Drawing.Point(132, 44);
            this.boxButton6.Name      = "boxButton6";
            this.boxButton6.Size      = new System.Drawing.Size(60, 23);
            this.boxButton6.TabIndex  = 5;
            this.boxButton6.Text      = "Cast";
            //
            // groupBox4
            //
            this.groupBox4.Controls.Add(this.numSkill);
            this.groupBox4.Controls.Add(this.lnkSkill);
            this.groupBox4.Controls.Add(this.bGetSkill);
            this.groupBox4.Controls.Add(this.bSetSkill);
            this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox4.Location  = new System.Drawing.Point(200, 0);
            this.groupBox4.Name      = "groupBox4";
            this.groupBox4.Size      = new System.Drawing.Size(120, 72);
            this.groupBox4.TabIndex  = 12;
            this.groupBox4.TabStop   = false;
            this.groupBox4.Text      = "Misc.Skills";
            //
            // numSkill
            //
            this.numSkill.DecimalPlaces = 1;
            this.numSkill.Location      = new System.Drawing.Point(32, 44);
            this.numSkill.Maximum       = new System.Decimal(new int[] { 10000, 0, 0, 0 });
            this.numSkill.Name          = "numSkill";
            this.numSkill.Size          = new System.Drawing.Size(48, 20);
            this.numSkill.TabIndex      = 1;
            this.numSkill.Value         = new System.Decimal(new int[] { 1099, 0, 0, 65536 });
            this.numSkill.ValueChanged += new System.EventHandler(this.numSkill_ValueChanged);
            //
            // lnkSkill
            //
            this.lnkSkill.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lnkSkill.Location    = new System.Drawing.Point(4, 16);
            this.lnkSkill.Name        = "lnkSkill";
            this.lnkSkill.Size        = new System.Drawing.Size(112, 23);
            this.lnkSkill.TabIndex    = 0;
            this.lnkSkill.TabStop     = true;
            this.lnkSkill.Text        = "Common.Choose";
            this.lnkSkill.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
            this.lnkSkill.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.lnkSkill_MouseDown);
            //
            // bGetSkill
            //
            this.bGetSkill.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.bGetSkill.Image     = ((System.Drawing.Image)(resources.GetObject("bGetSkill.Image")));
            this.bGetSkill.Location  = new System.Drawing.Point(4, 44);
            this.bGetSkill.Name      = "bGetSkill";
            this.bGetSkill.Size      = new System.Drawing.Size(24, 23);
            this.bGetSkill.TabIndex  = 13;
            this.bGetSkill.Click    += new System.EventHandler(this.bGetSkill_Click);
            //
            // bSetSkill
            //
            this.bSetSkill.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bSetSkill.Location  = new System.Drawing.Point(80, 44);
            this.bSetSkill.Name      = "bSetSkill";
            this.bSetSkill.Size      = new System.Drawing.Size(36, 23);
            this.bSetSkill.TabIndex  = 13;
            this.bSetSkill.Text      = "Common.Set";
            this.bSetSkill.Click    += new System.EventHandler(this.bSetSkill_Click);
            //
            // groupBox5
            //
            this.groupBox5.Controls.Add(this.bInBag);
            this.groupBox5.Controls.Add(this.numDupe);
            this.groupBox5.Controls.Add(this.chkDupe);
            this.groupBox5.Controls.Add(this.bDupe);
            this.groupBox5.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox5.Location  = new System.Drawing.Point(320, 0);
            this.groupBox5.Name      = "groupBox5";
            this.groupBox5.Size      = new System.Drawing.Size(96, 72);
            this.groupBox5.TabIndex  = 13;
            this.groupBox5.TabStop   = false;
            this.groupBox5.Text      = "General.Dupe";
            //
            // bInBag
            //
            this.bInBag.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bInBag.Location  = new System.Drawing.Point(4, 44);
            this.bInBag.Name      = "bInBag";
            this.bInBag.Size      = new System.Drawing.Size(44, 23);
            this.bInBag.TabIndex  = 17;
            this.bInBag.Text      = "General.Bag";
            this.bInBag.Click    += new System.EventHandler(this.bInBag_Click);
            //
            // numDupe
            //
            this.numDupe.Location      = new System.Drawing.Point(24, 16);
            this.numDupe.Maximum       = new System.Decimal(new int[] { 10000, 0, 0, 0 });
            this.numDupe.Minimum       = new System.Decimal(new int[] { 1, 0, 0, 0 });
            this.numDupe.Name          = "numDupe";
            this.numDupe.Size          = new System.Drawing.Size(60, 20);
            this.numDupe.TabIndex      = 15;
            this.numDupe.Value         = new System.Decimal(new int[] { 1, 0, 0, 0 });
            this.numDupe.ValueChanged += new System.EventHandler(this.numDupe_ValueChanged);
            //
            // chkDupe
            //
            this.chkDupe.FlatStyle       = System.Windows.Forms.FlatStyle.System;
            this.chkDupe.Location        = new System.Drawing.Point(8, 16);
            this.chkDupe.Name            = "chkDupe";
            this.chkDupe.Size            = new System.Drawing.Size(16, 20);
            this.chkDupe.TabIndex        = 14;
            this.chkDupe.CheckedChanged += new System.EventHandler(this.chkDupe_CheckedChanged);
            //
            // bDupe
            //
            this.bDupe.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bDupe.Location  = new System.Drawing.Point(48, 44);
            this.bDupe.Name      = "bDupe";
            this.bDupe.Size      = new System.Drawing.Size(44, 23);
            this.bDupe.TabIndex  = 16;
            this.bDupe.Text      = "General.Dupe";
            this.bDupe.Click    += new System.EventHandler(this.bDupe_Click);
            //
            // groupBox6
            //
            this.groupBox6.Controls.Add(this.bLightGlobal);
            this.groupBox6.Controls.Add(this.bLightLocal);
            this.groupBox6.Controls.Add(this.numLight);
            this.groupBox6.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.groupBox6.Location  = new System.Drawing.Point(416, 0);
            this.groupBox6.Name      = "groupBox6";
            this.groupBox6.Size      = new System.Drawing.Size(76, 72);
            this.groupBox6.TabIndex  = 14;
            this.groupBox6.TabStop   = false;
            this.groupBox6.Text      = "General.Light";
            //
            // bLightGlobal
            //
            this.bLightGlobal.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bLightGlobal.Location  = new System.Drawing.Point(40, 44);
            this.bLightGlobal.Name      = "bLightGlobal";
            this.bLightGlobal.Size      = new System.Drawing.Size(32, 23);
            this.bLightGlobal.TabIndex  = 2;
            this.bLightGlobal.Text      = "General.All";
            this.bLightGlobal.Click    += new System.EventHandler(this.bLightGlobal_Click);
            //
            // bLightLocal
            //
            this.bLightLocal.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bLightLocal.Location  = new System.Drawing.Point(8, 44);
            this.bLightLocal.Name      = "bLightLocal";
            this.bLightLocal.Size      = new System.Drawing.Size(32, 23);
            this.bLightLocal.TabIndex  = 1;
            this.bLightLocal.Text      = "General.You";
            this.bLightLocal.Click    += new System.EventHandler(this.bLightLocal_Click);
            //
            // numLight
            //
            this.numLight.Location      = new System.Drawing.Point(16, 16);
            this.numLight.Minimum       = new System.Decimal(new int[] { 100, 0, 0, -2147483648 });
            this.numLight.Name          = "numLight";
            this.numLight.Size          = new System.Drawing.Size(48, 20);
            this.numLight.TabIndex      = 0;
            this.numLight.ValueChanged += new System.EventHandler(this.numLight_ValueChanged);
            //
            // General
            //
            this.Controls.Add(this.groupBox6);
            this.Controls.Add(this.groupBox5);
            this.Controls.Add(this.groupBox4);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.groupBox1);
            this.Name  = "General";
            this.Size  = new System.Drawing.Size(496, 142);
            this.Load += new System.EventHandler(this.General_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox2.ResumeLayout(false);
            this.groupBox3.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numSkill)).EndInit();
            this.groupBox5.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numDupe)).EndInit();
            this.groupBox6.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numLight)).EndInit();
            this.ResumeLayout(false);
        }