public static RegionEventArgs Clear() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ClearRegion; return(e); }
public static RegionEventArgs PriorityChange(int newPriority) { RegionEventArgs e = new RegionEventArgs(); e.m_X = newPriority; e.m_Action = RegionActions.ChangePriority; 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 NewSubregion(string subregionName) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.AddSubregion; e.m_Name = subregionName; 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 ChangeType(string newType) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeTypeName; e.m_TypeName = newType; 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 ChangeRuneName(string newRuneName) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeRuneName; e.m_RuneName = newRuneName; 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 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 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 CheckBoxSet_CheckedChanged(object sender, System.EventArgs e) { if (CheckBoxSet.Checked) { if (!m_Updating) { OnRegionChanged(RegionEventArgs.SetGo()); } } }
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 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 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)); } }
public static RegionEventArgs ChangeSmartNoHousing(bool state) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeSmartNoHousing; e.m_SmartNoHousing = state; 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 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 Clear() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ClearRegion; return e; }
protected virtual void OnRegionChanged( RegionEventArgs e ) { RegionChanged( this, e ); }
public static RegionEventArgs ChangeLogoutDelay(bool state) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeLogoutDelay; e.m_LogoutDelay = state; return e; }
private void regionPanel_RegionChanged(object sender, RegionEventArgs e) { MapRegion region = Tree.SelectedNode.Tag as MapRegion; m_Modified = true; switch (e.Action) { case RegionActions.DeleteRegion: MapRegion parentRegion = Tree.SelectedNode.Parent.Tag as MapRegion; if (parentRegion != null) parentRegion.SubRegions.Remove(region); // Delete the tree node Tree.Nodes.Remove(Tree.SelectedNode); SelectPanel(); break; case RegionActions.AddSubregion: // Make a new subregion MapRegion subregion = new MapRegion((string)e.Data); region.SubRegions.Add(subregion); TreeNode subregionTree = new TreeNode((string)e.Data); subregionTree.Tag = subregion; Tree.SelectedNode.Nodes.Add(subregionTree); break; case RegionActions.ChangeGo: // Change the GO location int[] newGo = e.Data as int[]; region.GoLocation.X = newGo[0]; region.GoLocation.Y = newGo[1]; region.GoLocation.Z = newGo[2]; UpdateGoLocation(); break; case RegionActions.ChangePriority: int newPriority = (int)e.Data; region.Priority = newPriority; break; case RegionActions.ClearRegion: region.Area.Clear(); Tree.SelectedNode.Nodes.Clear(); Map.RemoveAllDrawObjects(); RectList.Items.Clear(); DisplayedRects.Clear(); if ((region.GoLocation.X != -1) && (region.GoLocation.Y != -1)) { Map.AddDrawObject(m_CrossHair1, false); Map.AddDrawObject(m_CrossHair2, true); } if (region != null) { region.Area.Clear(); region.SubRegions.Clear(); } SelectPanel(); break; case RegionActions.RenameRegion: region.Name = (string)e.Data; Tree.SelectedNode.Text = (string)e.Data; break; case RegionActions.ChangeTypeName: region.TypeName = (string)e.Data; break; case RegionActions.ChangeRuneName: region.RuneName = (string)e.Data; break; case RegionActions.ChangeMusicName: region.MusicName = (string)e.Data; break; case RegionActions.SetGo: m_SetGo = true; break; case RegionActions.ChangeZ: int[] newZ = e.Data as int[]; region.MinZ = newZ[0]; region.MaxZ = newZ[1]; break; case RegionActions.ChangeLogoutDelay: if((bool)e.Data) region.LogoutDelayActive = XmlBool.True; else region.LogoutDelayActive = XmlBool.False; break; case RegionActions.ChangeGuardsDisabled: if ((bool)e.Data) region.GuardsDisabled = XmlBool.True; else region.GuardsDisabled = XmlBool.False; break; case RegionActions.ChangeSmartNoHousing: if ((bool)e.Data) region.SmartNoHousing = XmlBool.True; else region.SmartNoHousing = XmlBool.False; break; } }
public static RegionEventArgs SetGo() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.SetGo; 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 NewSubregion( string subregionName ) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.AddSubregion; e.m_Name = subregionName; 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 Delete() { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.DeleteRegion; 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 PriorityChange( int newPriority ) { RegionEventArgs e = new RegionEventArgs(); e.m_X = newPriority; e.m_Action = RegionActions.ChangePriority; return e; }
private void CheckBoxSet_Click(object sender, System.EventArgs e) { OnRegionChanged(RegionEventArgs.SetGo()); }
public static RegionEventArgs ChangeMusic(string newMusic) { RegionEventArgs e = new RegionEventArgs(); e.m_Action = RegionActions.ChangeMusicName; e.m_MusicName = newMusic; return e; }
protected virtual void OnRegionChanged(RegionEventArgs e) { RegionChanged(this, 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; }