Exemple #1
0
        public AddItemForm(Controller.ServerControl server)
        {
            //creates a new form
            this.InitializeComponent();

            //adds reference to controller creating form
            this.m_Server = server;
        }
Exemple #2
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 static void addReferenceToMainController(ServerControl refToServer)
 {
     server = refToServer;
 }