コード例 #1
0
        ////public void Main(String[] args)
        ////{
        ////    FlightSimulator applet = new FlightSimulator();
        ////    // Frame frame = new Frame("Applet");

        ////    // frame.AddWindowListener(applet);
        ////    // frame.Add("Center", applet);
        ////    //  frame.SetSize((int)sX1, (int)sY1);
        ////    //  frame.Show();

        ////    applet.Init();
        ////    //applet.Start();
        ////}

        public void Init()
        {
            //base.Init();
            //AddKeyListener(this);
            //AddMouseListener(this);
            //AddMouseMotionListener(this);

            // codeBase = GetCodeBase();
            gd = new GraphicsGenerator(codeBase, sX0, sY0, sX1, sY1);

            //doubleBuffer = CreateImage((int)gd.proj.screenXSize, (int)gd.proj.screenYSize);
            //myGC = doubleBuffer.GetGraphics();
            //LocusImage = CreateImage((int)gd.proj.screenXSize, (int)gd.proj.screenYSize);
            //locusGC = LocusImage.GetGraphics();

            Jp.Maker1.Util.Gui.Caption.Initial(270, 180, GraphicsGenerator.CAPTION_COLOR, GraphicsGenerator.CAPTION_FONT);

            apl = new AirPlaneList(codeBase, "data/airplane_list.txt");
            apl.Print();

            ap = new AirPlane(codeBase, apl.GetPath(0));

            ap.Set_pMotionLand();

            configMenu = new ConfigMenu(sX0, sY0, sX1, sY1, apl);

            InitPadlockList();

            tp.SetTSTART();
        }
コード例 #2
0
        public ConfigMenu(double sX0, double sY0, double sX1, double sY1, AirPlaneList aplIn)
        {
            bgColor          = Color.FromArgb(255, 255, 255);
            stdColor         = Color.FromArgb(0, 0, 0);
            ca_bgCol         = Color.FromArgb(240, 240, 240);
            ca_bdCol         = Color.FromArgb(0, 0, 0);
            stdFont          = new Font("SansSelif", 12);
            bigFont          = new Font("SansSelif", 16);
            smallFont        = new Font("SansSelif", 9);
            airplaneCange    = 0;
            selectedAirPlane = 0;
            displayAirPlane  = 0;
            SETTING_NOMAL    = 0;
            SETTING_LOWLEVEL = 1;
            selectedSetting  = 0;
            displaySetting   = 0;
            settingName      = new String[] { "NORMAL", "LOW_LEVEL" };
            dt       = new double[] { 0.005D, 0.01D };
            t_disp   = new int[] { 6, 7 };
            t_record = new int[] { 40, 20 };
            clip     = new Clipper(sX0, sY0, sX1, sY1);
            apl      = aplIn;

            ok               = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            cancel           = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            airplaneNext     = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            airplanePrev     = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            setting_normal   = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            setting_lowlevel = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
        }
コード例 #3
0
 public AirPlaneListFile(AirPlaneList apl, Uri codeBase, String path)
 {
     //url = null;
     //file = null;
     //try {
     //    url = new Uri(codeBase, path);
     //} catch (Exception e) {
     //    Console.Error.WriteLine(e.StackTrace);
     //}
     //Open(url);
     Open(path);
     ReadAirPlaneListFile(apl, false);
     Close();
 }
コード例 #4
0
 public AirPlaneListFile(AirPlaneList apl, String path)
 {
     url  = null;
     file = null;
     try
     {
         file = new FileInfo(path);
     }
     catch (Exception e)
     {
         Console.Error.WriteLine(e.StackTrace);
     }
     Open(file);
     ReadAirPlaneListFile(apl, false);
     Close();
 }
コード例 #5
0
 private void ReadAirPlaneListFile(AirPlaneList apl, bool flagMessage)
 {
     while (true)
     {
         int c = ReadSkipSpace();
         if (c == -1)
         {
             break;
         }
         if (c == 35)
         {
             ReadLine();
         }
         else
         {
             String name = (char)c + DispFormat.Trm(ReadToKugiri("="));
             String path = DispFormat.Trm(ReadToKugiri(";"));
             apl.Add(name, path);
             ReadLine();
         }
     }
 }