private void ControlService_DisplayOSSelection(List<AvailableOverlaySetting> remoteSettings, SettingSelectedHandler handler)
        {
            // Must be called via dispatcher, this event is called from a network thread
                    Dispatcher.Invoke(new Action(delegate()
                        {
                            SelectOverlaySettings sosWindow = new SelectOverlaySettings() { AvailableSettings = remoteSettings, Owner = this };

                            if (handler != null)
                                sosWindow.SettingSelected += handler;

                            sosWindow.AvailableSettings.AddRange(OverlaySettings.GetValidOverlaySettings());
                            sosWindow.ShowDialog();
                        }
                    ));
        }
 private void menuOpen_Click(object sender, RoutedEventArgs e)
 {
     if (ControlClientService.Instance.ConnectedStatus != ConnectionStatus.NotConnected)
                 {
                     ControlClientService.Instance.DisplayOpenMenuWithRemoteSettings();
                 } else {
                     if (ControlServerService.Instance.ConnectedStatus != ConnectionStatus.NotConnected)
                     {
                         ControlServerService.Instance.DisplayOpenMenuWithRemoteSettings();
                     } else {
                         SelectOverlaySettings sos = new SelectOverlaySettings() { Owner = this, AvailableSettings = OverlaySettings.GetValidOverlaySettings(), LocalOnly = true };
                         sos.SettingSelected += new SettingSelectedHandler(SelectOverlaySettings_OverlaySettingSelected);
                         sos.ShowDialog();
                     }
                 }
 }
Esempio n. 3
0
        private void ControlService_DisplayOSSelection(List <AvailableOverlaySetting> remoteSettings, SettingSelectedHandler handler)
        {
            // Must be called via dispatcher, this event is called from a network thread
            Dispatcher.Invoke(new Action(delegate()
            {
                SelectOverlaySettings sosWindow = new SelectOverlaySettings()
                {
                    AvailableSettings = remoteSettings, Owner = this
                };

                if (handler != null)
                {
                    sosWindow.SettingSelected += handler;
                }

                sosWindow.AvailableSettings.AddRange(OverlaySettings.GetValidOverlaySettings());
                sosWindow.ShowDialog();
            }
                                         ));
        }
Esempio n. 4
0
 private void menuOpen_Click(object sender, RoutedEventArgs e)
 {
     if (ControlClientService.Instance.ConnectedStatus != ConnectionStatus.NotConnected)
     {
         ControlClientService.Instance.DisplayOpenMenuWithRemoteSettings();
     }
     else
     {
         if (ControlServerService.Instance.ConnectedStatus != ConnectionStatus.NotConnected)
         {
             ControlServerService.Instance.DisplayOpenMenuWithRemoteSettings();
         }
         else
         {
             SelectOverlaySettings sos = new SelectOverlaySettings()
             {
                 Owner = this, AvailableSettings = OverlaySettings.GetValidOverlaySettings(), LocalOnly = true
             };
             sos.SettingSelected += new SettingSelectedHandler(SelectOverlaySettings_OverlaySettingSelected);
             sos.ShowDialog();
         }
     }
 }