コード例 #1
0
ファイル: Program.cs プロジェクト: Memhave/Chat-System
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ClientSocket client = new ClientSocket();
            ModelManager model = new ModelManager(client);
            ChatSystem chat = new ChatSystem("Client");
            Observer observer=new Observer("Observer", chat, model);
            Controller controller = new Controller(model, chat);

            Application.Run(new Login(controller)); //Mistake this call will go into a a loop which first leaves it when closing the GUI. First then it connects to the server
            //with the last 2 method calls.

            client.setObserver(observer);
            client.Loopconnect();
        }
コード例 #2
0
ファイル: Login.cs プロジェクト: Memhave/Chat-System
        public Login(Controller controller)
        {
            this.controller = controller;

            InitializeComponent();
        }