示例#1
0
        public bool Initialilze(Form1 form)
        {
            serverSocket = new ServerSocket();
            connectDB    = new ConnectDB();
            //デリゲート登録
            GetByter gtb = GetByter;
            GetData  gtd = GetDatar;

            form1 = form;

            //サーバークラスを初期化する
            if (!serverSocket.Initialize())
            {
                return(false);
            }


            //アクセプトしたときに返すメソッドをソケット側に定義
            if (!serverSocket.AcceptMethod(gtb, gtd))
            {
                return(false);
            }

            //データベース接続クラスを初期化する
            if (!connectDB.Initialize())
            {
                return(false);
            }

            return(true);
        }
示例#2
0
 public bool AcceptMethod(GetByter gtb, GetData gtd)
 {
     this.gtb = gtb;
     this.gtd = gtd;
     return(true);
 }