private void NumMaxZ_ValueChanged(object sender, EventArgs e) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeZ((int)NumMinZ.Value, (int)NumMaxZ.Value)); } }
private void checkBoxSmartNoHousing_CheckedChanged(object sender, EventArgs e) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeSmartNoHousing(checkBoxSmartNoHousing.Checked)); } }
private void checkBoxLogoutDelay_CheckedChanged(object sender, EventArgs e) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeLogoutDelay(checkBoxLogoutDelay.Checked)); } }
public static RegionEventArgs ClearGoLoc() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ResetGoLoc; return(e); }
private void checkBoxGuardsDisabled_CheckedChanged(object sender, EventArgs e) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeGuardsDisabled(checkBoxGuardsDisabled.Checked)); } }
public static RegionEventArgs Clear() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ClearRegion; return(e); }
public static RegionEventArgs Delete() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.DeleteRegion; return(e); }
public static RegionEventArgs SetGo() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.SetGo; return(e); }
private void TextBoxMusicName_TextChanged(object sender, EventArgs e) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeMusic(TextBoxMusicName.Text)); } }
public static RegionEventArgs PriorityChange(int newPriority) { RegionEventArgs e = new RegionEventArgs(); e.m_X = newPriority; e.m_Action = RegionActions.ChangePriority; return(e); }
public static RegionEventArgs ChangeGuardsDisabled(bool state) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeGuardsDisabled; e.m_GuardsDisabled = state; return(e); }
public static RegionEventArgs NewSubregion(string subregionName) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.AddSubregion; e.m_Name = subregionName; return(e); }
public static RegionEventArgs ChangeType(string newType) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeTypeName; e.m_TypeName = newType; return(e); }
public static RegionEventArgs ChangeLogoutDelay(bool state) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeLogoutDelay; e.m_LogoutDelay = state; return(e); }
public static RegionEventArgs ChangeName(string newName) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.RenameRegion; e.m_Name = newName; return(e); }
public static RegionEventArgs ChangeRuneName(string newRuneName) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeRuneName; e.m_RuneName = newRuneName; return(e); }
public static RegionEventArgs ChangeMusic(string newMusic) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeMusicName; e.m_MusicName = newMusic; return(e); }
public static RegionEventArgs ChangeSmartNoHousing(bool state) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeSmartNoHousing; e.m_SmartNoHousing = state; return(e); }
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); }
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); }
private void CheckBoxSet_CheckedChanged(object sender, System.EventArgs e) { if (CheckBoxSet.Checked) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.SetGo()); } } }
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)); }
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()); } }
private void TextBoxRegionName_TextChanged(object sender, System.EventArgs e) { if (TextBoxRegionName.Text.Length == 0) { return; } if (!m_Updating) { OnRegionChanged(RegionEventArgs.ChangeName(TextBoxRegionName.Text)); } }
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()); } }
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()); } }
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)); } }
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)); } }
private void CheckBoxSet_Click(object sender, System.EventArgs e) { OnRegionChanged(RegionEventArgs.SetGo()); }
protected virtual void OnRegionChanged(RegionEventArgs e) { RegionChanged(this, e); }