private void btnUpdate_Click(object sender, EventArgs e)
{
DisplayAttributes.DisplayAttributesType NewDisplayAttribute = new DisplayAttributes.DisplayAttributesType();
NewDisplayAttribute.ItemName = this.comboBoxDataItem.Text;
NewDisplayAttribute.TextSize = int.Parse(this.comboBoxTextSizeChoice.Text);
NewDisplayAttribute.TextFont = new FontFamily(this.comboBoxTextFontChoice.Text);
NewDisplayAttribute.TextColor = Color.FromName(this.comboBoxTextColorChoice.Text);
NewDisplayAttribute.LineWidth = int.Parse(this.comboBoxLineWidth.Text);
NewDisplayAttribute.LineColor = Color.FromName(this.comboBoxLineColorChoice.Text);
NewDisplayAttribute.LineStyle = DisplayAttributes.GetLineStypefromString(this.comboBoxLineStyleChoice.Text);
NewDisplayAttribute.AreaPolygonColor = Color.FromName(this.comboBoxAreaPolygonColorChoice.Text);
NewDisplayAttribute.ImageSize = new Size((int)this.numericUpDown_X.Value, (int)this.numericUpDown_Y.Value);
DisplayAttributes.SetDisplayAttribute((DisplayAttributes.DisplayItemsType)Enum.Parse(typeof(DisplayAttributes.DisplayItemsType), NewDisplayAttribute.ItemName, true), NewDisplayAttribute);
// Always update the background color as well
NewDisplayAttribute = new DisplayAttributes.DisplayAttributesType();
NewDisplayAttribute.TextColor = Color.FromName(this.comboBoxBackgroundColor.Text);
NewDisplayAttribute.ItemName = "BackgroundColor";
DisplayAttributes.SetDisplayAttribute(DisplayAttributes.DisplayItemsType.BackgroundColor, NewDisplayAttribute);
// Populate the display origin
GeoCordSystemDegMinSecUtilities.LatLongPrefix LatPrefix;
GeoCordSystemDegMinSecUtilities.LatLongPrefix LoNPrefix;
if (this.comboBoxLatDirection.SelectedIndex == 0)
LatPrefix = GeoCordSystemDegMinSecUtilities.LatLongPrefix.N;
else
LatPrefix = GeoCordSystemDegMinSecUtilities.LatLongPrefix.W;
if (this.comboBoxLonDirection.SelectedIndex == 0)
LoNPrefix = GeoCordSystemDegMinSecUtilities.LatLongPrefix.E;
else
LoNPrefix = GeoCordSystemDegMinSecUtilities.LatLongPrefix.S;
GeoCordSystemDegMinSecUtilities.LatLongClass LatLon =
new GeoCordSystemDegMinSecUtilities.LatLongClass(int.Parse(this.txtLatDDD.Text), int.Parse(this.txtLatMM.Text), int.Parse(this.txtLatSS.Text), LatPrefix,
int.Parse(this.txtLonDDD.Text), int.Parse(this.txtLonMM.Text), int.Parse(this.txtLonSS.Text), LoNPrefix);
SystemAdaptationDataSet.SystemOrigin = new GMap.NET.PointLatLng(LatLon.GetLatLongDecimal().LatitudeDecimal, LatLon.GetLatLongDecimal().LongitudeDecimal);
}