Esempio n. 1
0
 private void NumMaxZ_ValueChanged(object sender, EventArgs e)
 {
     if (!m_Updating)
     {
         OnRegionChanged(RegionEventArgs.ChangeZ((int)NumMinZ.Value, (int)NumMaxZ.Value));
     }
 }
Esempio n. 2
0
 private void checkBoxSmartNoHousing_CheckedChanged(object sender, EventArgs e)
 {
     if (!m_Updating)
     {
         OnRegionChanged(RegionEventArgs.ChangeSmartNoHousing(checkBoxSmartNoHousing.Checked));
     }
 }
Esempio n. 3
0
 private void checkBoxLogoutDelay_CheckedChanged(object sender, EventArgs e)
 {
     if (!m_Updating)
     {
         OnRegionChanged(RegionEventArgs.ChangeLogoutDelay(checkBoxLogoutDelay.Checked));
     }
 }
Esempio n. 4
0
        public static RegionEventArgs ClearGoLoc()
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.ResetGoLoc;
            return(e);
        }
Esempio n. 5
0
 private void checkBoxGuardsDisabled_CheckedChanged(object sender, EventArgs e)
 {
     if (!m_Updating)
     {
         OnRegionChanged(RegionEventArgs.ChangeGuardsDisabled(checkBoxGuardsDisabled.Checked));
     }
 }
Esempio n. 6
0
        public static RegionEventArgs Clear()
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.ClearRegion;
            return(e);
        }
Esempio n. 7
0
        public static RegionEventArgs Delete()
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.DeleteRegion;
            return(e);
        }
Esempio n. 8
0
        public static RegionEventArgs SetGo()
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.SetGo;
            return(e);
        }
Esempio n. 9
0
 private void TextBoxMusicName_TextChanged(object sender, EventArgs e)
 {
     if (!m_Updating)
     {
         OnRegionChanged(RegionEventArgs.ChangeMusic(TextBoxMusicName.Text));
     }
 }
Esempio n. 10
0
        public static RegionEventArgs PriorityChange(int newPriority)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_X      = newPriority;
            e.m_Action = RegionActions.ChangePriority;
            return(e);
        }
Esempio n. 11
0
        public static RegionEventArgs ChangeGuardsDisabled(bool state)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action         = RegionActions.ChangeGuardsDisabled;
            e.m_GuardsDisabled = state;
            return(e);
        }
Esempio n. 12
0
        public static RegionEventArgs NewSubregion(string subregionName)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.AddSubregion;
            e.m_Name   = subregionName;
            return(e);
        }
Esempio n. 13
0
        public static RegionEventArgs ChangeType(string newType)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action   = RegionActions.ChangeTypeName;
            e.m_TypeName = newType;
            return(e);
        }
Esempio n. 14
0
        public static RegionEventArgs ChangeLogoutDelay(bool state)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action      = RegionActions.ChangeLogoutDelay;
            e.m_LogoutDelay = state;
            return(e);
        }
Esempio n. 15
0
        public static RegionEventArgs ChangeName(string newName)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.RenameRegion;
            e.m_Name   = newName;
            return(e);
        }
Esempio n. 16
0
        public static RegionEventArgs ChangeRuneName(string newRuneName)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action   = RegionActions.ChangeRuneName;
            e.m_RuneName = newRuneName;
            return(e);
        }
Esempio n. 17
0
        public static RegionEventArgs ChangeMusic(string newMusic)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action    = RegionActions.ChangeMusicName;
            e.m_MusicName = newMusic;
            return(e);
        }
Esempio n. 18
0
        public static RegionEventArgs ChangeSmartNoHousing(bool state)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action         = RegionActions.ChangeSmartNoHousing;
            e.m_SmartNoHousing = state;
            return(e);
        }
Esempio n. 19
0
        public static RegionEventArgs ChangeZ(int minZ, int maxZ)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.ChangeZ;
            e.m_MinZ   = minZ;
            e.m_MaxZ   = maxZ;
            return(e);
        }
Esempio n. 20
0
        public static RegionEventArgs ChangeGo(int x, int y, int z)
        {
            RegionEventArgs e = new RegionEventArgs();

            e.m_Action = RegionActions.ChangeGo;
            e.m_X      = x;
            e.m_Y      = y;
            e.m_Z      = z;
            return(e);
        }
Esempio n. 21
0
 private void CheckBoxSet_CheckedChanged(object sender, System.EventArgs e)
 {
     if (CheckBoxSet.Checked)
     {
         if (!m_Updating)
         {
             OnRegionChanged(RegionEventArgs.SetGo());
         }
     }
 }
Esempio n. 22
0
        private void ButtonAddSubsection_Click(object sender, System.EventArgs e)
        {
            if (TextBoxSubregionName.Text.Length == 0)
            {
                MessageBox.Show("Please enter a name for the subsection");
                return;
            }

            OnRegionChanged(RegionEventArgs.NewSubregion(TextBoxSubregionName.Text));
        }
Esempio n. 23
0
 private void ButtonClearRegion_Click(object sender, System.EventArgs e)
 {
     if (MessageBox.Show(
             this,
             "This will remove all the rectangles and subregions from the current region. Are you sure?",
             "Confirm region clear",
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Question) == DialogResult.Yes)
     {
         OnRegionChanged(RegionEventArgs.Clear());
     }
 }
Esempio n. 24
0
        private void TextBoxRegionName_TextChanged(object sender, System.EventArgs e)
        {
            if (TextBoxRegionName.Text.Length == 0)
            {
                return;
            }

            if (!m_Updating)
            {
                OnRegionChanged(RegionEventArgs.ChangeName(TextBoxRegionName.Text));
            }
        }
Esempio n. 25
0
 private void ButtonResetGoLoc_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(
             this,
             "This will reset the go location to it's default location. Are you sure?",
             "Confirm reset go location",
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Question) == DialogResult.Yes)
     {
         OnRegionChanged(RegionEventArgs.ClearGoLoc());
     }
 }
Esempio n. 26
0
 private void ButtonDelRegion_Click(object sender, System.EventArgs e)
 {
     if (MessageBox.Show(
             this,
             "This will delete the current region from its facet. Are you sure?",
             "Confirm region deletion",
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Question) == DialogResult.Yes)
     {
         OnRegionChanged(RegionEventArgs.Delete());
     }
 }
Esempio n. 27
0
        private void NumPriority_ValueChanged(object sender, System.EventArgs e)
        {
            int val = (int)NumPriority.Value;

            if (val > 100)
            {
                val = 100;
            }
            if (val < 0)
            {
                val = 0;
            }

            if (!m_Updating)
            {
                OnRegionChanged(RegionEventArgs.PriorityChange(val));
            }
        }
Esempio n. 28
0
        private void ChangePos()
        {
            int x = (int)NumX.Value;
            int y = (int)NumY.Value;
            int z = (int)NumZ.Value;

            if (x < 0)
            {
                x = 0;
            }
            if (y < 0)
            {
                y = 0;
            }
            if (z < -128)
            {
                z = -128;
            }

            if (x >= m_MapWidth)
            {
                x = m_MapWidth - 1;
            }
            if (y >= m_MapHeight)
            {
                y = m_MapHeight - 1;
            }
            if (z > 127)
            {
                z = 127;
            }

            if (!m_Updating)
            {
                OnRegionChanged(RegionEventArgs.ChangeGo(x, y, z));
            }
        }
Esempio n. 29
0
 private void CheckBoxSet_Click(object sender, System.EventArgs e)
 {
     OnRegionChanged(RegionEventArgs.SetGo());
 }
Esempio n. 30
0
 protected virtual void OnRegionChanged(RegionEventArgs e)
 {
     RegionChanged(this, e);
 }