Example #1
0
 // Hall mode - Watcher Mode
 public AoDisplay(string sv, int room, ushort uid,
     string name, bool record, bool msglog)
 {
     InitializeComponent();
     Init();
     mzi = null; mvisi = null;
     VW.Cyvi vi = new VW.Cyvi(this);
     visiThread = new Thread(delegate()
     {
         int port = Base.NetworkCode.HALL_PORT + room;
         vi.Init();
         mvisi = new XIVisi(uid, name, 0, vi, sv, room, record, msglog, true, this);
         mvisi.RunAsync();
     });
     visiThread.Start();
     yhTV = new OI.AoTV(this);
     tvDict = new Dictionary<string, OI.Television>();
 }
Example #2
0
        // Constructor 3#: Used for Replay mode
        public XIVisi(string fileName, AoDisplay ad)
        {
            VI = new VW.Cyvi(ad);
            VI.Init(); VI.SetInGame(true);
            VW.Eywi eywi = new VW.Eywi(fileName);
            WI = eywi;

            this.ad = ad;
            Log = new ClLog(); Log.Start(Uid, false, false, 0);
            CommonConstruct();
            this.auid = eywi.Uid;
            isReplay = true;
        }
Example #3
0
        // Constructor 2#: Used for Direct Connection
        private XIVisi(string server, int port, string name, int avatar,
            int hopeTeam, bool record, bool watcher, bool msglog, AoDisplay ad)
        {
            this.server = server; this.port = port;
            this.name = name; this.avatar = avatar;
            this.hopeTeam = hopeTeam;

            VI = new VW.Cyvi(ad);
            VI.Init(); VI.SetInGame(true);
            VW.Bywi bywi = new VW.Bywi(server, port, name, avatar, hopeTeam, 0, this);
            WI = bywi;

            this.ad = ad;
            Log = new ClLog(); Log.Start(Uid, record, msglog, 0);
            CommonConstruct();
            if (!bywi.StartConnectDirect(watcher, VI))
            {
                VI.Cout(Uid, "咦,您是不是掉线或者连错人了:-(");
                auid = 0; return;
            }
            VI.Cout(Uid, watcher ? "您开始旁观~" : "游戏开始咯~");
            this.auid = bywi.Uid;
            if (watcher)
                Uid = bywi.Uid;
            bywi.Log = Log; VI.Log = Log;
            WI.Send("C2ST," + Uid, Uid, 0);
            isReplay = false;
        }