Пример #1
0
        public EditClient(SnapDotNet.ControlClient.JsonRpcData.Client client, SnapDotNet.ControlClient.JsonRpcData.Snapserver server)
        {
            InitializeComponent();
            m_Client     = client;
            m_SnapServer = server;
            _UpdateData();
            m_Client.SERVER_OnClientUpdated += () =>
            {
                Application.Current.Dispatcher.Invoke(new Action(_UpdateData));
            };

            m_Client.SERVER_OnInvalidate += () =>
            {
                // server is sending us a full data refresh - close this window (this client might be getting deleted for all we know)
                Dispatcher.Invoke(() =>
                {
                    this.Close();
                });
            };
        }
Пример #2
0
        public Client(SnapDotNet.ControlClient.JsonRpcData.Client client, SnapDotNet.ControlClient.JsonRpcData.Snapserver server)
        {
            InitializeComponent();
            m_Client     = client;
            m_SnapServer = server;
            m_Client.config.SERVER_OnVolumeUpdated += () =>
            {
                // execute on ui thread:
                Application.Current.Dispatcher.BeginInvoke(new Action(_OnClientUpdated));
            };

            m_Client.SERVER_OnClientUpdated += () =>
            {
                Application.Current.Dispatcher.BeginInvoke(new Action(_OnClientUpdated));
            };

            vcClient.OnMuteToggled   += VcClient_OnMuteToggled;
            vcClient.OnVolumeChanged += VcClient_OnVolumeChanged;

            _OnClientUpdated();
        }
Пример #3
0
        public Client(SnapDotNet.ControlClient.JsonRpcData.Client client, SnapDotNet.ControlClient.JsonRpcData.Snapserver server)
        {
            InitializeComponent();
            m_Client     = client;
            m_SnapServer = server;
            m_Client.config.SERVER_OnVolumeUpdated += () =>
            {
                // execute on ui thread:
                MainThread.BeginInvokeOnMainThread(_OnClientUpdated);
            };

            m_Client.SERVER_OnClientUpdated += () =>
            {
                MainThread.BeginInvokeOnMainThread(_OnClientUpdated);
            };

            vcClient.OnMuteToggled    += VcClient_OnMuteToggled;
            vcClient.OnVolumeChanged  += VcClient_OnVolumeChanged;
            vcClient.OnSettingsTapped += VcClient_OnSettingsTapped;

            _OnClientUpdated();
        }
Пример #4
0
        public ClientEditPage(SnapDotNet.ControlClient.JsonRpcData.Client client, SnapDotNet.ControlClient.JsonRpcData.Snapserver server)
        {
            InitializeComponent();
            m_Client     = client;
            m_SnapServer = server;
            _UpdateData();

            m_Client.SERVER_OnClientUpdated += () =>
            {
                MainThread.BeginInvokeOnMainThread(() =>
                {
                    _UpdateData();
                });
            };

            m_Client.SERVER_OnInvalidate += () =>
            {
                // server is sending us a full data refresh - close this window (this client might be getting deleted for all we know)
                MainThread.BeginInvokeOnMainThread(() =>
                {
                    Navigation.PopAsync().ConfigureAwait(false);
                });
            };
        }