public ClientController(ClientModel model)
 {
     this.itsModel               = model;
     this.itsState               = ClientState.UNAUTENTIZED;
     this.loginHandler           = new LoginHandler(this.tryToAutentize);
     this.placeBidHandler        = new PlaceBidHandler(this.bidProduct);
     this.productListViewHandler = new ProductListViewHandler(this.showSelectedProduct);
     this.registry               = new List <ClientObserver>();
     this.serverProxy            = new ServerProxy(this);
 }
 public PlaceBidForm(ClientModel model, PlaceBidHandler placeBidHandler, ProductListViewHandler productListViewHandler)
 {
     this.itsModel = model;
     this.itsState = ClientState.UNAUTENTIZED;
     this.handleProductListClick = productListViewHandler;
     this.placeBidHandler        = placeBidHandler;
     this.updateObserver         = this.update;
     this.Show();
     this.Hide();
     InitializeComponent();
     this.Invoke(new Action(() =>
     {
         update(this.itsState);
     }));
 }