예제 #1
0
        public bool Connect()
        {
            lock ("connect")
            {
                SimVersion = FSVersion.None;

                FSUIPC_Close();
                FSUIPC_Initialization();
                int result = 0;

                // próba połączenia z FS2004
                if (FSUIPC_Open(SIM_FS2K4, ref result))
                {
                    SimVersion = FSVersion.FS2004;
                    return(true);
                }

                FSUIPC_Close();
                FSUIPC_Initialization();
                result = 0;

                // próba połączenia z FSX
                if (FSUIPC_Open(SIM_FSX, ref result))
                {
                    SimVersion = FSVersion.FSX;
                    return(true);
                }

                return(false);
            }
        }
예제 #2
0
 public void Save(XmlTextWriter xml)
 {
     xml.WriteElementString("fsVersion", FSVersion.ToString());
     xml.WriteElementString("interval", Interval.ToString());
 }