Beispiel #1
0
    public Form1(int id)
    {
        if (id == 0)
        {
            //KITCHEN
            Text = "Kitchen";
            InitializeComponent();
            listServer = (IManagement)RemoteNew.New(typeof(IManagement));

            items             = listServer.GetItems();
            tables            = listServer.GetTables();
            ordersPending     = listServer.GetOrdersPending(id);
            ordersPreparation = listServer.GetOrdersInPreparation(id);

            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
        }
        else if (id == 1)
        {
            //BAR
            Text = "Bar";
            InitializeComponent();
            listServer = (IManagement)RemoteNew.New(typeof(IManagement));

            items             = listServer.GetItems();
            tables            = listServer.GetTables();
            ordersPending     = listServer.GetOrdersPending(id);
            ordersPreparation = listServer.GetOrdersInPreparation(id);

            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
        }
    }
 public PaymentTerminalForm()
 {
     RemotingConfiguration.Configure("PaymentTerminal.exe.config", false);
     InitializeComponent();
     listServer = (IListSingleton)RemoteNew.New(typeof(IListSingleton));
     updateTablesListView();
     evRepeater             = new AlterEventRepeater();
     evRepeater.alterEvent += new AlterDelegate(DoAlterations);
     listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
 }
Beispiel #3
0
        public Program()
        {
            RemotingConfiguration.Configure("Printer.exe.config", false);
            listServer             = (IListSingleton)RemoteNew.New(typeof(IListSingleton));
            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
            tables = listServer.getTables();

            Console.ReadLine();
        }
Beispiel #4
0
        public DinningRoomForm()
        {
            RemotingConfiguration.Configure("DinningRoom.exe.config", false);
            InitializeComponent();
            listServer = (IListSingleton)RemoteNew.New(typeof(IListSingleton));

            startTablesComboBox();
            startProductsComboBox();
            updateOrdersListView();

            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
        }
Beispiel #5
0
    public Form1()
    {
        RemotingConfiguration.Configure("DinningRoom.exe.config", false);
        InitializeComponent();
        listServer = (IManagement)RemoteNew.New(typeof(IManagement));


        items  = listServer.GetItems();
        tables = listServer.GetTables();


        evRepeater             = new AlterEventRepeater();
        evRepeater.alterEvent += new AlterDelegate(DoAlterations);
        listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
    }
Beispiel #6
0
    public OnlineList(IServer serv, ClientInstance cI)
    {
        server        = serv;
        self          = cI;
        clientsOnline = server.GetClientsOnline();

        InitializeComponent();

        evRepeater             = new AlterEventRepeater();
        evRepeater.alterEvent += new AlterDelegate(ClientChange);
        server.alterEvent     += new AlterDelegate(evRepeater.Repeater);

        chEvRepeater            = new ChatEventRepeater();
        chEvRepeater.chatEvent += new ChatDelegate(ChatRequested);
        server.chatEvent       += new ChatDelegate(chEvRepeater.Repeater);
    }
Beispiel #7
0
        public KitchenBarForm(KitchenBarForm.Type type)
        {
            RemotingConfiguration.Configure("KitchenBar.exe.config", false);
            InitializeComponent();
            listServer = (IListSingleton)RemoteNew.New(typeof(IListSingleton));

            if (type.Equals(Type.KITCHEN))
            {
                this.ProductType = Product.Type.FOOD;
                this.Text        = "Kitchen";
            }
            else if (type.Equals(Type.BAR))
            {
                this.ProductType = Product.Type.DRINK;
                this.Text        = "Bar";
            }

            updateOrdersListView();
            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
        }
Beispiel #8
0
        public ChatRoom(ISingleServer server, String username, String port)
        {
            InitializeComponent();
            this.server      = server;
            this.username    = username;
            this.address     = "tcp://localhost:" + port.ToString() + "/Message";
            this.Text        = " Chat - " + username;
            onlineUsers.View = View.List;
            groupChats.View  = View.List;
            activeUsers      = new Hashtable();
            chatTabs         = new Hashtable();
            groupChatsList   = new List <string>();
            UpdateOnlineUsers();
            UpdateGroupChats();
            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            server.alterEvent     += new AlterDelegate(evRepeater.Repeater);
            r = (RemMessage)RemotingServices.Connect(typeof(RemMessage), "tcp://localhost:" + port.ToString() + "/Message");    // connect to the registered my remote object here
            r.PutMyForm(this);
            groupChatActive = false;

            selectedGroup     = null;
            inviteToGroupChat = false;
        }
Beispiel #9
0
 private void AlterEventRepeaterSection()
 {
     evRepeater             = new AlterEventRepeater();
     evRepeater.alterEvent += new AlterDelegate(DoAlterations);
     server.alterEvent     += new AlterDelegate(evRepeater.Repeater);
 }