// Returns list index based on the enumerated type. private static int DisplayItemToIndex(DisplayItemsType ItemToGet) { int Index = 0; switch (ItemToGet) { case DisplayItemsType.Radar: Index = 0; break; case DisplayItemsType.Waypoint: Index = 1; break; case DisplayItemsType.StateBorder: Index = 2; break; case DisplayItemsType.BackgroundColor: Index = 3; break; case DisplayItemsType.SectorBorder: Index = 4; break; case DisplayItemsType.RunwayBorder: Index = 5; break; default: break; } return(Index); }
// Set display attribute public static void SetDisplayAttribute(DisplayItemsType Item, DisplayAttributesType Attribute) { DisplayAttributeDataSet[DisplayItemToIndex(Item)] = Attribute; //DisplayAttribute.ItemName = words[0]; //DisplayAttribute.TextSize = int.Parse(words[1]); //DisplayAttribute.TextFont = new FontFamily(words[2]); //DisplayAttribute.TextColor = Color.FromName(words[3]); //DisplayAttribute.LineWidth = int.Parse(words[4]); //DisplayAttribute.LineColor = Color.FromName(words[5]); //DisplayAttribute.LineStyle = DashStyle.Solid; //DisplayAttribute.AreaPolygonColor = Color.FromName(words[7]); //DisplayAttribute.ImageSize = new Size(int.Parse(words[8]), int.Parse((words[9]))); StaticDisplayBuildRequired = true; }
// Gets display attribute based on the passed in display item name. public static DisplayAttributesType GetDisplayAttribute(DisplayItemsType ItemToGet) { return DisplayAttributeDataSet[DisplayItemToIndex(ItemToGet)]; }
// Returns list index based on the enumerated type. private static int DisplayItemToIndex(DisplayItemsType ItemToGet) { int Index = 0; switch (ItemToGet) { case DisplayItemsType.Radar: Index = 0; break; case DisplayItemsType.Waypoint: Index = 1; break; case DisplayItemsType.StateBorder: Index = 2; break; case DisplayItemsType.BackgroundColor: Index = 3; break; case DisplayItemsType.SectorBorder: Index = 4; break; case DisplayItemsType.RunwayBorder: Index = 5; break; default: break; } return Index; }
// Gets display attribute based on the passed in display item name. public static DisplayAttributesType GetDisplayAttribute(DisplayItemsType ItemToGet) { return(DisplayAttributeDataSet[DisplayItemToIndex(ItemToGet)]); }