Exemplo n.º 1
0
 private void a(object A_0, TextBoxEndEventArgs A_1)
 {
     if (this.c != null)
     {
         this.c(this, new MVTextBoxEndEventArgs(base.Id, A_1.get_Success()));
     }
 }
Exemplo n.º 2
0
		private void edtStartLocationCoords_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				Coordinates coords;
				if (Coordinates.TryParse(edtStartLocationCoords.Text, out coords))
				{
					edtStartLocationCoords.Text = coords.ToString();
					edtStartLocationCoords.Caret = 0;
				}
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 3
0
		private void edtPortalRunDist_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				double val;
				if (!double.TryParse(edtPortalRunDist.Text, out val) || val <= 0)
				{
					Util.Error("Invalid portal run distance");
					edtPortalRunDist.Text = RouteFinder.PortalWeight.ToString();
				}
				else
				{
					RouteFinder.PortalWeight = val;
				}
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 4
0
		private void edtDestCommand_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				ValidateCommandName(edtDestCommand, false,
					"dest", "gdest", "arrowdest", "destination", "goarrowdest");
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 5
0
		private void edtFindCommand_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				ValidateCommandName(edtFindCommand, false,
					"find", "gfind", "search", "gofind", "goarrowfind");
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 6
0
		private void edtChatCommand_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				ValidateCommandName(edtChatCommand, true,
					"goarrow", "go", "go_arrow", "ga", "goarrow2");
				MainChatCommandUpdated(edtChatCommand.Text);
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 7
0
		private void edtCoordsCommand_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				ValidateCommandName(edtCoordsCommand, false,
					"loc", "coords", "pos", "sendcoords", "sendpos");
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 8
0
		private void edtSearchCoords_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				Coordinates coords;
				if (Coordinates.TryParse(edtSearchCoords.Text, out coords))
				{
					edtSearchCoords.Text = coords.ToString();
					edtSearchCoords.Caret = 0;
				}
				if (e.Success)
					btnSearchGo_Click(null, null);
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 9
0
		private void edtRouteToCoords_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				choRouteTo.Selected = 0;
				Coordinates coords;
				if (Coordinates.TryParse(edtRouteToCoords.Text, out coords))
				{
					chkRouteToHere.Checked = false;
					edtRouteToCoords.Text = coords.ToString();
				}
				if (e.Success)
				{
					btnRouteGenerate_Click(null, null);
				}
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 10
0
		private void edtSearchRadius_End(object sender, TextBoxEndEventArgs e)
		{
			double val;
			if (!double.TryParse(edtSearchRadius.Text, out val) || val <= 0)
			{
				Util.Error("Invalid search radius; must be a number greater than 0");
				edtSearchRadius.Text = "5";
			}
		}
Exemplo n.º 11
0
		private void edtSearchName_End(object sender, TextBoxEndEventArgs e)
		{
			if (e.Success)
				btnSearchGo_Click(null, null);
		}
Exemplo n.º 12
0
		private void edtDerethMapCenterOnn_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				Coordinates center;
				if (e.Success)
				{
					btnDerethMapCenterGo_Click(null, null);
				}
				else if (Coordinates.TryParse(edtDerethMapCenterOn.Text, out center))
				{
					edtDerethMapCenterOn.Text = center.ToString();
				}
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 13
0
		private void edtTextSize_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				int textSize;
				if (int.TryParse(edtTextSize.Text, out textSize))
				{
					if (textSize >= ArrowHud.MinTextSize && textSize <= ArrowHud.MaxTextSize)
					{
						mArrowHud.TextSize = textSize;
					}
					else
					{
						Util.Error("Text size must be between " + ArrowHud.MinTextSize
							+ " and " + ArrowHud.MaxTextSize);
					}
				}
				else
				{
					Util.Error("Text size must be a number");
				}
				edtTextSize.Text = mArrowHud.TextSize.ToString();
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}
Exemplo n.º 14
0
		private void edtArrowCoords_End(object sender, TextBoxEndEventArgs e)
		{
			try
			{
				Coordinates dest;
				if (Coordinates.TryParse(edtArrowCoords.Text, out dest))
				{
					Location loc = mLocDb.GetLocationAt(dest);
					if (loc != null)
						mArrowHud.DestinationLocation = loc;
					else
						mArrowHud.DestinationCoords = dest;
				}
				else
				{
					Util.Error("Invalid coordinates. Coordinates must be in the form: 00.0N, 00.0E");
					edtArrowCoords.Text = mArrowHud.DestinationCoords.ToString();
				}
			}
			catch (Exception ex) { Util.HandleException(ex); }
		}