コード例 #1
0
        static void Main()
        {
            chatController = ChatController.getController();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LoginForm(chatController));
        }
コード例 #2
0
        public void clientListUpdated(long count)
        {
            if (controller == null)
                controller = ChatController.getController();

            Console.WriteLine("* New client list is ready, event is: " + count);

            Thread t = new Thread(() => controller.updateClientList(count));
            t.TrySetApartmentState(ApartmentState.STA);
            t.Start();
        }
コード例 #3
0
        public LoginForm(ChatController chatController)
        {
            this.controller = chatController;
            InitializeComponent();
            this.serverPort.Text = TDIN_chatlib.Constants.DEFAULT_SERVER_PORT.ToString();
            this.serverHost.Text = "127.0.0.1";

            INIT_HEIGHT = this.Height;

            setRegisto(false);
        }
コード例 #4
0
        public MainWindow(ChatController controller)
        {
            InitializeComponent();

            this.userList.DisplayMember = "DisplayName";
            this.userList.ValueMember = "UID";

            Program.window = this;
            this.controller = controller;

            this.Text = controller.Session.DisplayName;

            _refreshList(controller.UserList);
        }
コード例 #5
0
 public LocalClient()
 {
     if (controller == null)
         controller = ChatController.getController();
 }
コード例 #6
0
        public static ChatController getController()
        {
            if( _singleton == null )
                _singleton = new ChatController();

            return _singleton;
        }