Example #1
0
        public ServerView()
        {
            writeToStatusTextBox = new changeServerStatus(writeToServerBox);

            //create new server
            server = new AuctionServer.Controller.ServerControl();
            InitializeComponent();

            //add controller methods to handle certain events
            this.ListenButton.Click += new System.EventHandler(server.listenOnPortButtonClick);
            this.AddAuctionItemButton.Click += new System.EventHandler(server.addAuctionItem);
            this.timer1.Tick += new EventHandler(this.server.checkItemTimes);
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(server.closeServer);
        }
        public RTPServerMainView()
        {
            InitializeComponent();

            //attach delegates to methods
            changeServerStatusTextBox = new changeServerStatus(writeToServerTextBox);
            changeClientRequestTextBox = new changeClientRequest(writeToClientRequestTextBox);
            checkHeader = new checkPrintHeaderStatus(checkPrintHeader);
            changeFrameNumber = new changeFrameNumberTextBox(changeFrameTextBox);

            //passing a reference of the view to the server controller
            listeningServer = new StreamingServer(this);

            listening = false;
        }