From 42dc1d36235292786322d28340a81c6cb3fd46c0 Mon Sep 17 00:00:00 2001 From: hurter Date: Wed, 31 Aug 2011 16:25:05 +0000 Subject: --- AnotoData/AnotoHotArea.cs | 112 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 AnotoData/AnotoHotArea.cs (limited to 'AnotoData/AnotoHotArea.cs') diff --git a/AnotoData/AnotoHotArea.cs b/AnotoData/AnotoHotArea.cs new file mode 100644 index 0000000..85c8757 --- /dev/null +++ b/AnotoData/AnotoHotArea.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; + +using System.Text; +using System.Drawing; +using System.ComponentModel; + +namespace AnotoData +{ + public enum Categories { Strip, StripBoard, Screen }; + public enum SubCategories {NotDefined, Information, C0, C1, C2, C4, CallSign, Name, AircraftType, CruseSpeed, Departure, Arrival, SSR, InputFL, PrintTime, Sector, Frequency, FL1, FL2, + Beacon0, Beacon1, Beacon2, Beacon3, Beacon4, Beacon5, Beacon6, Beacon7, Beacon8, Beacon9, + Time0, Time1, Time2, Time3, Time4, Time5, Time6, Time7, Time8, Time9, + Unknown + }; + + [DefaultPropertyAttribute("PagesIP")] + public class AnotoHotArea + { + public static string[] PagesIP = { + "1728.0.0.0", + "1728.0.0.1", + "1728.0.0.2", + "1728.0.0.3", + "1728.0.0.4", + "1728.0.0.5", + "1728.0.0.6", + "1728.0.0.7", + "1728.0.0.8", + "1728.0.0.9", + "1728.0.0.10", + "1728.0.0.11", + "1728.0.0.12", + "1728.0.0.13", + "1728.0.0.14", + "1728.0.0.15", + "1728.0.0.16", + "1728.0.0.17", + "1728.0.0.18", + "1728.0.0.19", + "1728.0.0.20" + }; + + public static int MaxX = 5500; + public static int MaxY = 7850; + + public static PointF GetHomogeneousCoordinate(int x, int y){ + return new PointF((float)x / (float)MaxX, (float)y / (float)MaxY); + } + + public virtual bool IsInside(int x, int y, string page) + { + return false; + } + + + + + public override string ToString() + { + return this.Category.ToString(); + } + + private Rectangle _Rectangle; + [CategoryAttribute("HotBox"), DescriptionAttribute("the active hotbox")] + public Rectangle Rectangle + { + get { return _Rectangle; } + set { _Rectangle = value; } + } + + private int _PageIndex; + [CategoryAttribute("HotBox"), DescriptionAttribute("the page Index")] + public int PageIndex + { + get { return _PageIndex; } + set { _PageIndex = value; } + } + + + [CategoryAttribute("HotBox"), DescriptionAttribute("the page name")] + public string Page + { + get { + if (_PageIndex != -1) + return PagesIP[_PageIndex]; + else + return "Multi pages"; + } + } + + private Categories _Category; + [CategoryAttribute("Category"), DescriptionAttribute("the main category")] + public Categories Category + { + get { return _Category; } + set { _Category = value; } + } + + private SubCategories _SubCategory; + [CategoryAttribute("Category"), DescriptionAttribute("the sub category")] + public SubCategories SubCategory + { + get { return _SubCategory; } + set { _SubCategory = value; } + } + + + + + } +} -- cgit v1.1