Example #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            ProductListProxy p = new ProductListProxy();

            c = new ClientController(p);

            LoginForm lf = new LoginForm(c.InputHandler);
            BidForm   bf = new BidForm(c.GetProxy, c.InputHandler);


            lf.showBidForm += bf.OnShowForm;
            c.StateObservor(lf.StateObservor);
            c.StateBidbservor(bf.StateObservor);
            MessageReceive r = new MessageReceive(c);

            r.StateObservor(lf.StateObservor);
            r.StateBidObservor(bf.StateObservor);
            c.MessageReceived += r.MessageReceived;

            Application.Run(lf);
        }
Example #2
0
        public BidForm(ProductListProxy p, InputHandler ih)
        {
            this.p = p;

            InitializeComponent();
            this.iHandler = ih;
        }
Example #3
0
        public ClientController(ProductListProxy p)
        {
            this._proxy = p;
            // Connects to the server
            ws            = new WebSocket("ws://127.0.0.1:8002/MessageReceived");
            ws.OnMessage += (sender, e) => { MessageReceived(e.Data); };



            ws.Connect();
        }