Esempio n. 1
0
        private void ButtonShowDevices_Click(object sender, RoutedEventArgs e)
        {
            if (EventbusManager.IsViewOpen(typeof(DevicesView), 2))
            {
                EventbusManager.CloseView <DevicesView>(2);
                return;
            }

            EventbusManager.OpenView <DevicesView>(2);
        }
Esempio n. 2
0
        private void ButtonOpenUserList_Click(object sender, RoutedEventArgs e)
        {
            if (EventbusManager.IsViewOpen(typeof(UserlistView), 0))
            {
                return;
            }

            this._viewModel.ViewOpened = ViewOpen.Userlist;
            EventbusManager.OpenView <UserlistView>(0);
        }
Esempio n. 3
0
        private void ButtonOpenMain_Click(object sender, RoutedEventArgs e)
        {
            if (EventbusManager.IsViewOpen(typeof(MainView), 0))
            {
                return;
            }

            this._viewModel.ViewOpened = ViewOpen.Main;
            EventbusManager.OpenView <MainView>(0);
        }
Esempio n. 4
0
        private void SetupUpdate()
        {
            MessengerManager.GetInstance().Add(() =>
            {
                if (!EventbusManager.IsViewOpen(typeof(DevicesView), this._channel))
                {
                    return;
                }


                EventbusManager.Send<DevicesView, DeviceUpdateCommand>(new DeviceUpdateCommand(CommandMessage.Update), this._channel);
            });
            EventbusManager.Register<DevicesView, DeviceUpdateCommand>(this.ReceiveUpdateCommand);
        }
        private void SetupUpdate()
        {
            MessengerManager.GetInstance().Add(() =>
            {
                if (!EventbusManager.IsViewOpen(typeof(UserlistView), 0))
                {
                    return;
                }


                EventbusManager.Send <UserlistView, UpdateCommandMessage>(new UpdateCommandMessage(CommandMessage.Update), 0);
            });
            EventbusManager.Register <UserlistView, UpdateCommandMessage>(this.ReceiveUpdateCommand);
        }
Esempio n. 6
0
        public ChatView()
        {
            this.InitializeComponent();

            this._viewModel = (ChatViewModel)this.DataContext;

            MessengerManager.GetInstance().Add(() =>
            {
                if (!EventbusManager.IsViewOpen(typeof(ChatView), 0))
                {
                    return;
                }

                this._dispatcherTimer_Tick();
            });
            EventbusManager.Register <ChatView, LoadCommandMessage>(this.LoadCommandReceived);
        }