예제 #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);
                });
            };
        }