예제 #1
0
		public void WriteCoord(double x, double y)
		{
			if (ActualCoords.Text.CompareTo(""))
			{
				ActualCoords.AppendText(System.Environment.NewLine);
			}
			ActualCoords.AppendText(x.ToString());
			ActualCoords.AppendText(",");
			ActualCoords.AppendText(y.ToString());
			ActualCoords.AppendText(",0     ");
			ActualCoords.ScrollToCaret();
			int xxx = System.Convert.ToInt32(Math.Round(x * 60 * 10000)); // in milliminutes for NAVCOM AI use
			int yyy = System.Convert.ToInt32(Math.Round(y * 60 * 10000)); // in milliminutes for NAVCOM AI use
			if (AICMDFile.Text.CompareTo(""))
			{
				AICMDFile.AppendText(System.Environment.NewLine);
			}
			AICMDFile.AppendText("@WW ");
			AICMDFile.AppendText((AICMDFile.Lines.Length + 1).ToString());
			AICMDFile.AppendText(" ");
			AICMDFile.AppendText(yyy.ToString());
			AICMDFile.AppendText(" ");
			AICMDFile.AppendText(xxx.ToString());
			AICMDFile.ScrollToCaret();
		}
예제 #2
0
		private void DelButton_Click(object sender, System.EventArgs e)
		{
			string[] myData = null;
			string lines = null;
			string outputString = null;
			lines = ActualCoords.Text;
			myData = lines.Split('\n');
			outputString = string.Join("\n", myData, 0, myData.Length - 1);
			ActualCoords.Clear();
			ActualCoords.AppendText(outputString);
			lines = AICMDFile.Text;
			myData = lines.Split('\n');
			outputString = string.Join("\n", myData, 0, myData.Length - 1);
			AICMDFile.Clear();
			AICMDFile.AppendText(outputString);
		}