Exemple #1
0
        private void ShowSelectedImage()
        {
            string str = toolStripComboBox1.SelectedItem.ToString();

            FGEImage img = fgeimages.FirstOrDefault(i => i.FileName == str);

            ShowImage(img);
        }
Exemple #2
0
        private void AddImages()
        {
            string datapath = Path.Combine(Tools.GetAppDataDirectory(), "Maps");

            if (Directory.Exists(datapath))
            {
                LoadImages(datapath);
                fgeimages.AddRange(FGEImage.LoadFixedImages(datapath));
            }
        }
Exemple #3
0
        public static List <FGEImage> LoadImages(string datapath)
        {
            List <FGEImage> fgeimages = new List <FGEImage>();
            DirectoryInfo   dirInfo   = new DirectoryInfo(datapath);

            FileInfo[] allFiles = null;

            try
            {
                allFiles = dirInfo.GetFiles("*.json");
            }
            catch
            {
            }

            if (allFiles != null)
            {
                foreach (FileInfo fi in allFiles)
                {
                    JObject pfile = null;
                    string  json  = EDDiscovery.EDDiscoveryForm.LoadJsonFile(fi.FullName);

                    if (json != null)
                    {
                        FGEImage fgeimg;
                        pfile = (JObject)JObject.Parse(json);

                        if (File.Exists(fi.FullName.Replace(".json", ".png")))
                        {
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".png"));
                        }
                        else
                        {
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".jpg"));
                        }

                        fgeimg.TopLeft   = new Point(pfile["x1"].Value <int>(), pfile["y1"].Value <int>());
                        fgeimg.pxTopLeft = new Point(pfile["px1"].Value <int>(), pfile["py1"].Value <int>());

                        fgeimg.TopRight   = new Point(pfile["x2"].Value <int>(), pfile["y1"].Value <int>());
                        fgeimg.pxTopRight = new Point(pfile["px2"].Value <int>(), pfile["py1"].Value <int>());

                        fgeimg.BottomLeft   = new Point(pfile["x1"].Value <int>(), pfile["y2"].Value <int>());
                        fgeimg.pxBottomLeft = new Point(pfile["px1"].Value <int>(), pfile["py2"].Value <int>());

                        fgeimg.BottomRight   = new Point(pfile["x2"].Value <int>(), pfile["y2"].Value <int>());
                        fgeimg.pxBottomRight = new Point(pfile["px2"].Value <int>(), pfile["py2"].Value <int>());
                        fgeimages.Add(fgeimg);
                    }
                }
            }

            return(fgeimages);
        }
Exemple #4
0
 private void ShowImage(FGEImage fgeimg)
 {
     //currentImage = (Bitmap)Image.FromFile(fgeimg.Name, true);
     if (fgeimg != null)
     {
         //panel1.BackgroundImage = new Bitmap(fgeimg.FilePath);
         imageViewer1.Image = new Bitmap(fgeimg.FilePath);
         imageViewer1.ZoomToFit();
         currentFGEImage = fgeimg;
         DrawTravelHistory();
     }
 }
Exemple #5
0
        private void ShowImage(FGEImage fgeimg)
        {
            //currentImage = (Bitmap)Image.FromFile(fgeimg.Name, true);
            if (fgeimg != null && initdone)
            {
                //panel1.BackgroundImage = new Bitmap(fgeimg.FilePath);
                imageViewer1.Image = new Bitmap(fgeimg.FilePath);
                imageViewer1.ZoomToFit();
                currentFGEImage = fgeimg;

                if (toolStripButtonStars.Checked)
                {
                    DrawStars();
                }

                DrawTravelHistory();
            }
        }
Exemple #6
0
        private void LoadMapImages()
        {
            string datapath = System.IO.Path.Combine(Tools.GetAppDataDirectory(), "Maps");

            if (System.IO.Directory.Exists(datapath))
            {
                fgeimages = FGEImage.LoadImages(datapath);
                fgeimages.AddRange(FGEImage.LoadFixedImages(datapath));
            }

            dropdownMapNames.DropDownItems.Clear();

            foreach (var img in fgeimages)
            {
                var item = new ToolStripButton {
                    Text         = img.FileName,
                    CheckOnClick = true,
                    DisplayStyle = ToolStripItemDisplayStyle.Text,
                    Tag          = img
                };
                item.Click += new EventHandler(dropdownMapNames_DropDownItemClicked);
                dropdownMapNames.DropDownItems.Add(item);
            }
        }
Exemple #7
0
        public static List<FGEImage> LoadImages(string datapath)
        {
            List<FGEImage> fgeimages = new List<FGEImage>();
            DirectoryInfo dirInfo = new DirectoryInfo(datapath);
            FileInfo[] allFiles = null;

            try
            {
                allFiles = dirInfo.GetFiles("*.json");
            }
            catch
            {
            }

            if (allFiles != null)
            {
                foreach (FileInfo fi in allFiles)
                {
                    JObject pfile = null;
                    string json = EDDiscovery.EDDiscoveryForm.LoadJsonFile(fi.FullName);

                    if (json != null)
                    {
                        FGEImage fgeimg;
                        pfile = (JObject)JObject.Parse(json);

                        if (File.Exists(fi.FullName.Replace(".json", ".png")))
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".png"));
                        else
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".jpg"));

                        fgeimg.TopLeft = new Point(pfile["x1"].Value<int>(), pfile["y1"].Value<int>());
                        fgeimg.pxTopLeft = new Point(pfile["px1"].Value<int>(), pfile["py1"].Value<int>());

                        fgeimg.TopRight = new Point(pfile["x2"].Value<int>(), pfile["y1"].Value<int>());
                        fgeimg.pxTopRight = new Point(pfile["px2"].Value<int>(), pfile["py1"].Value<int>());

                        fgeimg.BottomLeft = new Point(pfile["x1"].Value<int>(), pfile["y2"].Value<int>());
                        fgeimg.pxBottomLeft = new Point(pfile["px1"].Value<int>(), pfile["py2"].Value<int>());

                        fgeimg.BottomRight = new Point(pfile["x2"].Value<int>(), pfile["y2"].Value<int>());
                        fgeimg.pxBottomRight = new Point(pfile["px2"].Value<int>(), pfile["py2"].Value<int>());

                        fgeimg.Area = (double)(fgeimg.TopRight.X - fgeimg.TopLeft.X) * (double)(fgeimg.TopLeft.Y - fgeimg.BottomRight.Y);
                        //Console.WriteLine("img {0} {1}", fgeimg.FileName, fgeimg.Area);

                        fgeimages.Add(fgeimg);
                    }
                }

                fgeimages.Sort(delegate (FGEImage p1, FGEImage p2)      // biggest first.. name if same..
                {
                    if (p1.Area == p2.Area)
                        return p1.FileName.CompareTo(p2.FileName);
                    else if (p1.Area < p2.Area)
                        return 1;
                    else
                        return -1;
                }
                );
            }

            return fgeimages;
        }
Exemple #8
0
        private void AddImages()
        {
            LoadImages(Path.Combine(Tools.GetAppDataDirectory(), "Maps"));
            if (Directory.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps")))
            {
                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-01.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-01.jpg"));

                    fgeimg.TopLeft   = new Point(-3000, 6000);
                    fgeimg.pxTopLeft = new Point(329, 144);

                    fgeimg.TopRight   = new Point(3000, 6000);
                    fgeimg.pxTopRight = new Point(2625, 129);

                    fgeimg.BottomLeft   = new Point(-3000, 0);
                    fgeimg.pxBottomLeft = new Point(175, 2635);

                    fgeimg.BottomRight   = new Point(3000, 0);
                    fgeimg.pxBottomRight = new Point(2871, 2616);


                    fgeimg.Yaxispoints.Add(new Point(0, 2634));
                    fgeimg.Yaxispoints.Add(new Point(1000, 2158));
                    fgeimg.Yaxispoints.Add(new Point(2000, 1710));
                    fgeimg.Yaxispoints.Add(new Point(3000, 1288));
                    fgeimg.Yaxispoints.Add(new Point(4000, 887));
                    fgeimg.Yaxispoints.Add(new Point(5000, 503));
                    fgeimg.Yaxispoints.Add(new Point(6000, 144));

                    fgeimages.Add(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-02.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-02.jpg"));

                    fgeimg.TopLeft   = new Point(-1000, 9000);
                    fgeimg.pxTopLeft = new Point(281, 169);

                    fgeimg.TopRight   = new Point(5000, 9000);
                    fgeimg.pxTopRight = new Point(2688, 150);

                    fgeimg.BottomLeft   = new Point(-1000, 3000);
                    fgeimg.pxBottomLeft = new Point(152, 2648);

                    fgeimg.BottomRight   = new Point(5000, 3000);
                    fgeimg.pxBottomRight = new Point(2817, 2620);


                    fgeimg.Yaxispoints.Add(new Point(3000, 2643));
                    fgeimg.Yaxispoints.Add(new Point(4000, 2199));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1767));
                    fgeimg.Yaxispoints.Add(new Point(6000, 1341));
                    fgeimg.Yaxispoints.Add(new Point(7000, 936));
                    fgeimg.Yaxispoints.Add(new Point(8000, 545));
                    fgeimg.Yaxispoints.Add(new Point(9000, 167));

                    fgeimages.Add(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-03.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-03.jpg"));

                    fgeimg.TopLeft   = new Point(3000, 8000);
                    fgeimg.pxTopLeft = new Point(319, 187);

                    fgeimg.TopRight   = new Point(9000, 8000);
                    fgeimg.pxTopRight = new Point(2646, 166);

                    fgeimg.BottomLeft   = new Point(3000, 2000);
                    fgeimg.pxBottomLeft = new Point(184, 2631);

                    fgeimg.BottomRight   = new Point(9000, 2000);
                    fgeimg.pxBottomRight = new Point(2777, 2609);


                    fgeimg.Yaxispoints.Add(new Point(2000, 2631));
                    fgeimg.Yaxispoints.Add(new Point(3000, 2186));
                    fgeimg.Yaxispoints.Add(new Point(4000, 1757));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1343));
                    fgeimg.Yaxispoints.Add(new Point(6000, 944));
                    fgeimg.Yaxispoints.Add(new Point(7000, 557));
                    fgeimg.Yaxispoints.Add(new Point(8000, 187));

                    fgeimages.Add(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-04.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-04.jpg"));

                    fgeimg.TopLeft   = new Point(8000, 8000);
                    fgeimg.pxTopLeft = new Point(253, 129);

                    fgeimg.TopRight   = new Point(14000, 8000);
                    fgeimg.pxTopRight = new Point(2661, 112);

                    fgeimg.BottomLeft   = new Point(8000, 2000);
                    fgeimg.pxBottomLeft = new Point(105, 2701);

                    fgeimg.BottomRight   = new Point(14000, 2000);
                    fgeimg.pxBottomRight = new Point(2788, 2696);


                    fgeimg.Yaxispoints.Add(new Point(2000, 2701));
                    fgeimg.Yaxispoints.Add(new Point(3000, 2234));
                    fgeimg.Yaxispoints.Add(new Point(4000, 1781));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1345));
                    fgeimg.Yaxispoints.Add(new Point(6000, 927));
                    fgeimg.Yaxispoints.Add(new Point(7000, 520));
                    fgeimg.Yaxispoints.Add(new Point(8000, 129));

                    fgeimages.Add(fgeimg);
                }



                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-L4.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-L4.jpg"));

                    fgeimg.TopLeft   = new Point(0, 30000);
                    fgeimg.pxTopLeft = new Point(344, 106);

                    fgeimg.TopRight   = new Point(30000, 30000);
                    fgeimg.pxTopRight = new Point(2511, 119);

                    fgeimg.BottomLeft   = new Point(0, -5000);
                    fgeimg.pxBottomLeft = new Point(136, 2839);

                    fgeimg.BottomRight   = new Point(30000, -5000);
                    fgeimg.pxBottomRight = new Point(2881, 2855);


                    fgeimg.Yaxispoints.Add(new Point(-5000, 2839));
                    fgeimg.Yaxispoints.Add(new Point(0000, 2392));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1926));
                    fgeimg.Yaxispoints.Add(new Point(10000, 1523));
                    fgeimg.Yaxispoints.Add(new Point(15000, 1117));
                    fgeimg.Yaxispoints.Add(new Point(20000, 771));
                    fgeimg.Yaxispoints.Add(new Point(25000, 406));
                    fgeimg.Yaxispoints.Add(new Point(30000, 106));

                    fgeimages.Add(fgeimg);
                }
                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-U4.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-U4.jpg"));

                    fgeimg.TopLeft   = new Point(0, 60000);
                    fgeimg.pxTopLeft = new Point(273, 445);

                    fgeimg.TopRight   = new Point(30000, 60000);
                    fgeimg.pxTopRight = new Point(2496, 439);

                    fgeimg.BottomLeft   = new Point(0, 30000);
                    fgeimg.pxBottomLeft = new Point(100, 2868);

                    fgeimg.BottomRight   = new Point(30000, 30000);
                    fgeimg.pxBottomRight = new Point(2840, 2862);


                    fgeimg.Yaxispoints.Add(new Point(30000, 2868));
                    fgeimg.Yaxispoints.Add(new Point(35000, 2385));
                    fgeimg.Yaxispoints.Add(new Point(40000, 1944));
                    fgeimg.Yaxispoints.Add(new Point(45000, 1524));
                    fgeimg.Yaxispoints.Add(new Point(50000, 1143));
                    fgeimg.Yaxispoints.Add(new Point(55000, 773));
                    fgeimg.Yaxispoints.Add(new Point(60000, 445));

                    fgeimages.Add(fgeimg);
                }
            }
        }
Exemple #9
0
        public static List <FGEImage> LoadImages(string datapath)
        {
            List <FGEImage> fgeimages = new List <FGEImage>();
            DirectoryInfo   dirInfo   = new DirectoryInfo(datapath);

            FileInfo[] allFiles = null;

            try
            {
                allFiles = dirInfo.GetFiles("*.json");
            }
            catch
            {
            }

            if (allFiles != null)
            {
                foreach (FileInfo fi in allFiles)
                {
                    JObject pfile = null;
                    string  json  = EDDiscovery.EDDiscoveryForm.LoadJsonFile(fi.FullName);

                    if (json != null)
                    {
                        FGEImage fgeimg;
                        pfile = (JObject)JObject.Parse(json);

                        if (File.Exists(fi.FullName.Replace(".json", ".png")))
                        {
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".png"));
                        }
                        else
                        {
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".jpg"));
                        }

                        fgeimg.TopLeft   = new Point(pfile["x1"].Value <int>(), pfile["y1"].Value <int>());
                        fgeimg.pxTopLeft = new Point(pfile["px1"].Value <int>(), pfile["py1"].Value <int>());

                        fgeimg.TopRight   = new Point(pfile["x2"].Value <int>(), pfile["y1"].Value <int>());
                        fgeimg.pxTopRight = new Point(pfile["px2"].Value <int>(), pfile["py1"].Value <int>());

                        fgeimg.BottomLeft   = new Point(pfile["x1"].Value <int>(), pfile["y2"].Value <int>());
                        fgeimg.pxBottomLeft = new Point(pfile["px1"].Value <int>(), pfile["py2"].Value <int>());

                        fgeimg.BottomRight   = new Point(pfile["x2"].Value <int>(), pfile["y2"].Value <int>());
                        fgeimg.pxBottomRight = new Point(pfile["px2"].Value <int>(), pfile["py2"].Value <int>());

                        fgeimg.Area = (double)(fgeimg.TopRight.X - fgeimg.TopLeft.X) * (double)(fgeimg.TopLeft.Y - fgeimg.BottomRight.Y);
                        //Console.WriteLine("img {0} {1}", fgeimg.FileName, fgeimg.Area);

                        fgeimages.Add(fgeimg);
                    }
                }

                fgeimages.Sort(delegate(FGEImage p1, FGEImage p2)       // biggest first.. name if same..
                {
                    if (p1.Area == p2.Area)
                    {
                        return(p1.FileName.CompareTo(p2.FileName));
                    }
                    else if (p1.Area < p2.Area)
                    {
                        return(1);
                    }
                    else
                    {
                        return(-1);
                    }
                }
                               );
            }

            return(fgeimages);
        }
Exemple #10
0
 private void LoadImages(string datapath)
 {
     fgeimages = FGEImage.LoadImages(datapath);
 }
        private void AddImages()
        {
            if (Directory.Exists("Maps"))
            {
                if (File.Exists("Maps\\SC-01.jpg"))
                {
                    FGEImage fgeimg = new FGEImage("Maps\\SC-01.jpg");

                    fgeimg.TopLeft = new Point(-3000, 6000);
                    fgeimg.pxTopLeft = new Point(329, 144);

                    fgeimg.TopRight = new Point(3000, 6000);
                    fgeimg.pxTopRight = new Point(2625, 129);

                    fgeimg.BottomLeft = new Point(-3000, 0);
                    fgeimg.pxBottomLeft = new Point(175, 2635);

                    fgeimg.BottomRight = new Point(3000, 0);
                    fgeimg.pxBottomRight = new Point(2871, 2616);

                    fgeimg.Yaxispoints.Add(new Point(0, 2634));
                    fgeimg.Yaxispoints.Add(new Point(1000, 2158));
                    fgeimg.Yaxispoints.Add(new Point(2000, 1710));
                    fgeimg.Yaxispoints.Add(new Point(3000, 1288));
                    fgeimg.Yaxispoints.Add(new Point(4000, 887));
                    fgeimg.Yaxispoints.Add(new Point(5000, 503));
                    fgeimg.Yaxispoints.Add(new Point(6000, 144));

                    fgeimages.Add(fgeimg);

                    //ShowImage(fgeimg);
                }

                if (File.Exists("Maps\\SC-02.jpg"))
                {
                    FGEImage fgeimg = new FGEImage("Maps\\SC-02.jpg");

                    fgeimg.TopLeft = new Point(-1000, 9000);
                    fgeimg.pxTopLeft = new Point(281, 169);

                    fgeimg.TopRight = new Point(5000, 9000);
                    fgeimg.pxTopRight = new Point(2688, 150);

                    fgeimg.BottomLeft = new Point(-1000, 3000);
                    fgeimg.pxBottomLeft = new Point(152, 2648);

                    fgeimg.BottomRight = new Point(5000, 3000);
                    fgeimg.pxBottomRight = new Point(2817, 2620);

                    fgeimg.Yaxispoints.Add(new Point(3000, 2643));
                    fgeimg.Yaxispoints.Add(new Point(4000, 2199));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1767));
                    fgeimg.Yaxispoints.Add(new Point(6000, 1341));
                    fgeimg.Yaxispoints.Add(new Point(7000, 936));
                    fgeimg.Yaxispoints.Add(new Point(8000, 545));
                    fgeimg.Yaxispoints.Add(new Point(9000, 167));

                    fgeimages.Add(fgeimg);

                    //ShowImage(fgeimg);
                }

                if (File.Exists("Maps\\SC-L4.jpg"))
                {
                    FGEImage fgeimg = new FGEImage("Maps\\SC-L4.jpg");

                    fgeimg.TopLeft = new Point(0, 30000);
                    fgeimg.pxTopLeft = new Point(344, 106);

                    fgeimg.TopRight = new Point(30000, 30000);
                    fgeimg.pxTopRight = new Point(2511, 119);

                    fgeimg.BottomLeft = new Point(0, -5000);
                    fgeimg.pxBottomLeft = new Point(136, 2839);

                    fgeimg.BottomRight = new Point(30000, -5000);
                    fgeimg.pxBottomRight = new Point(2881, 2855);

                    fgeimg.Yaxispoints.Add(new Point(-5000, 2839));
                    fgeimg.Yaxispoints.Add(new Point(0000, 2392));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1926));
                    fgeimg.Yaxispoints.Add(new Point(10000, 1523));
                    fgeimg.Yaxispoints.Add(new Point(15000, 1117));
                    fgeimg.Yaxispoints.Add(new Point(20000, 771));
                    fgeimg.Yaxispoints.Add(new Point(25000, 406));
                    fgeimg.Yaxispoints.Add(new Point(30000, 106));

                    fgeimages.Add(fgeimg);

                    ShowImage(fgeimg);
                }

            }
        }
 private void ShowImage(FGEImage fgeimg)
 {
     //currentImage = (Bitmap)Image.FromFile(fgeimg.Name, true);
     if (fgeimg != null)
     {
         panel1.BackgroundImage = new Bitmap(fgeimg.Name);
         currentFGEImage = fgeimg;
         DrawTravelHistory();
     }
 }
 private void ShowImage(FGEImage fgeimg)
 {
     //currentImage = (Bitmap)Image.FromFile(fgeimg.Name, true);
     if (fgeimg != null)
     {
         //panel1.BackgroundImage = new Bitmap(fgeimg.FilePath);
         imageViewer1.Image = new Bitmap(fgeimg.FilePath);
         imageViewer1.ZoomToFit();
         currentFGEImage = fgeimg;
         DrawTravelHistory();
     }
 }
        private void LoadImages(string datapath)
        {
            DirectoryInfo dirInfo = new DirectoryInfo(datapath);
            FileInfo[] allFiles = null;

            try
            {
                allFiles = dirInfo.GetFiles("*.json");
            }
            catch
            {
            }

            if (allFiles != null)
            {
                foreach (FileInfo fi in allFiles)
                {
                    JObject pfile = null;
                    string json = EDDiscoveryForm.LoadJsonFile(fi.FullName);


                    if (json != null)
                    {
                        FGEImage fgeimg;
                        pfile = (JObject)JObject.Parse(json);

                        if (File.Exists(fi.FullName.Replace(".json", ".png")))
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".png"));
                        else
                            fgeimg = new FGEImage(fi.FullName.Replace(".json", ".jpg"));

                        fgeimg.TopLeft = new Point(pfile["x1"].Value<int>(), pfile["y1"].Value<int>());
                        fgeimg.pxTopLeft = new Point(pfile["px1"].Value<int>(), pfile["py1"].Value<int>());

                        fgeimg.TopRight = new Point(pfile["x2"].Value<int>(), pfile["y1"].Value<int>());
                        fgeimg.pxTopRight = new Point(pfile["px2"].Value<int>(), pfile["py1"].Value<int>());

                        fgeimg.BottomLeft = new Point(pfile["x1"].Value<int>(), pfile["y2"].Value<int>());
                        fgeimg.pxBottomLeft = new Point(pfile["px1"].Value<int>(), pfile["py2"].Value<int>());

                        fgeimg.BottomRight = new Point(pfile["x2"].Value<int>(), pfile["y2"].Value<int>());
                        fgeimg.pxBottomRight = new Point(pfile["px2"].Value<int>(), pfile["py2"].Value<int>());
                        fgeimages.Add(fgeimg);
                    }
                }
            }
        }
        private void AddImages()
        {
            LoadImages(Path.Combine(Tools.GetAppDataDirectory(), "Maps"));
            if (Directory.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps")))
            {
                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-01.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-01.jpg"));

                    fgeimg.TopLeft = new Point(-3000, 6000);
                    fgeimg.pxTopLeft = new Point(329, 144);

                    fgeimg.TopRight = new Point(3000, 6000);
                    fgeimg.pxTopRight = new Point(2625, 129);

                    fgeimg.BottomLeft = new Point(-3000, 0);
                    fgeimg.pxBottomLeft = new Point(175, 2635);

                    fgeimg.BottomRight = new Point(3000, 0);
                    fgeimg.pxBottomRight = new Point(2871, 2616);


                    fgeimg.Yaxispoints.Add(new Point(0, 2634));
                    fgeimg.Yaxispoints.Add(new Point(1000, 2158));
                    fgeimg.Yaxispoints.Add(new Point(2000, 1710));
                    fgeimg.Yaxispoints.Add(new Point(3000, 1288));
                    fgeimg.Yaxispoints.Add(new Point(4000, 887));
                    fgeimg.Yaxispoints.Add(new Point(5000, 503));
                    fgeimg.Yaxispoints.Add(new Point(6000, 144));

                    fgeimages.Add(fgeimg);

                    ShowImage(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-02.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-02.jpg"));

                    fgeimg.TopLeft = new Point(-1000, 9000);
                    fgeimg.pxTopLeft = new Point(281, 169);

                    fgeimg.TopRight = new Point(5000, 9000);
                    fgeimg.pxTopRight = new Point(2688, 150);

                    fgeimg.BottomLeft = new Point(-1000, 3000);
                    fgeimg.pxBottomLeft = new Point(152, 2648);

                    fgeimg.BottomRight = new Point(5000, 3000);
                    fgeimg.pxBottomRight = new Point(2817, 2620);


                    fgeimg.Yaxispoints.Add(new Point(3000, 2643));
                    fgeimg.Yaxispoints.Add(new Point(4000, 2199));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1767));
                    fgeimg.Yaxispoints.Add(new Point(6000, 1341));
                    fgeimg.Yaxispoints.Add(new Point(7000, 936));
                    fgeimg.Yaxispoints.Add(new Point(8000, 545));
                    fgeimg.Yaxispoints.Add(new Point(9000, 167));

                    fgeimages.Add(fgeimg);

                    //ShowImage(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-03.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-03.jpg"));

                    fgeimg.TopLeft = new Point(3000, 8000);
                    fgeimg.pxTopLeft = new Point(319, 187);

                    fgeimg.TopRight = new Point(9000, 8000);
                    fgeimg.pxTopRight = new Point(2646, 166);

                    fgeimg.BottomLeft = new Point(3000, 2000);
                    fgeimg.pxBottomLeft = new Point(184, 2631);

                    fgeimg.BottomRight = new Point(9000, 2000);
                    fgeimg.pxBottomRight = new Point(2777, 2609);


                    fgeimg.Yaxispoints.Add(new Point(2000, 2631));
                    fgeimg.Yaxispoints.Add(new Point(3000, 2186));
                    fgeimg.Yaxispoints.Add(new Point(4000, 1757));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1343));
                    fgeimg.Yaxispoints.Add(new Point(6000, 944));
                    fgeimg.Yaxispoints.Add(new Point(7000, 557));
                    fgeimg.Yaxispoints.Add(new Point(8000, 187));

                    fgeimages.Add(fgeimg);

                    //ShowImage(fgeimg);
                }

                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-04.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-04.jpg"));

                    fgeimg.TopLeft = new Point(8000, 8000);
                    fgeimg.pxTopLeft = new Point(253, 129);

                    fgeimg.TopRight = new Point(14000, 8000);
                    fgeimg.pxTopRight = new Point(2661, 112);

                    fgeimg.BottomLeft = new Point(8000, 2000);
                    fgeimg.pxBottomLeft = new Point(105, 2701);

                    fgeimg.BottomRight = new Point(14000, 2000);
                    fgeimg.pxBottomRight = new Point(2788, 2696);


                    fgeimg.Yaxispoints.Add(new Point(2000, 2701));
                    fgeimg.Yaxispoints.Add(new Point(3000, 2234));
                    fgeimg.Yaxispoints.Add(new Point(4000, 1781));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1345));
                    fgeimg.Yaxispoints.Add(new Point(6000, 927));
                    fgeimg.Yaxispoints.Add(new Point(7000, 520));
                    fgeimg.Yaxispoints.Add(new Point(8000, 129));

                    fgeimages.Add(fgeimg);

                    //ShowImage(fgeimg);
                }



                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-L4.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-L4.jpg"));

                    fgeimg.TopLeft = new Point(0, 30000);
                    fgeimg.pxTopLeft = new Point(344, 106);

                    fgeimg.TopRight = new Point(30000, 30000);
                    fgeimg.pxTopRight = new Point(2511, 119);

                    fgeimg.BottomLeft = new Point(0, -5000);
                    fgeimg.pxBottomLeft = new Point(136, 2839);

                    fgeimg.BottomRight = new Point(30000, -5000);
                    fgeimg.pxBottomRight = new Point(2881, 2855);


                    fgeimg.Yaxispoints.Add(new Point(-5000, 2839));
                    fgeimg.Yaxispoints.Add(new Point(0000, 2392));
                    fgeimg.Yaxispoints.Add(new Point(5000, 1926));
                    fgeimg.Yaxispoints.Add(new Point(10000, 1523));
                    fgeimg.Yaxispoints.Add(new Point(15000, 1117));
                    fgeimg.Yaxispoints.Add(new Point(20000, 771));
                    fgeimg.Yaxispoints.Add(new Point(25000, 406));
                    fgeimg.Yaxispoints.Add(new Point(30000, 106));

                    fgeimages.Add(fgeimg);

                    ShowImage(fgeimg);
                }
                if (File.Exists(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-U4.jpg")))
                {
                    FGEImage fgeimg = new FGEImage(Path.Combine(Tools.GetAppDataDirectory(), "Maps\\SC-U4.jpg"));

                    fgeimg.TopLeft = new Point(0, 60000);
                    fgeimg.pxTopLeft = new Point(273, 445);

                    fgeimg.TopRight = new Point(30000, 60000);
                    fgeimg.pxTopRight = new Point(2496, 439);

                    fgeimg.BottomLeft = new Point(0, 30000);
                    fgeimg.pxBottomLeft = new Point(100, 2868);

                    fgeimg.BottomRight = new Point(30000, 30000);
                    fgeimg.pxBottomRight = new Point(2840, 2862);


                    fgeimg.Yaxispoints.Add(new Point(30000, 2868));
                    fgeimg.Yaxispoints.Add(new Point(35000, 2385));
                    fgeimg.Yaxispoints.Add(new Point(40000, 1944));
                    fgeimg.Yaxispoints.Add(new Point(45000, 1524));
                    fgeimg.Yaxispoints.Add(new Point(50000, 1143));
                    fgeimg.Yaxispoints.Add(new Point(55000, 773));
                    fgeimg.Yaxispoints.Add(new Point(60000, 445));

                    fgeimages.Add(fgeimg);

                    ShowImage(fgeimg);
                }

            }
        }