public override void SetInput(DisplayDeviceInput input) { if (AvailableInputs.All(i => i != input)) { throw new Exception("Invalid Input"); } ResetPolling(); switch (input) { case DisplayDeviceInput.BuiltIn: Send("Source=0"); break; case DisplayDeviceInput.DisplayPort: Send("Source=1"); break; case DisplayDeviceInput.HDMI1: Send("Source=2"); break; case DisplayDeviceInput.VGA: Send("Source=3"); break; case DisplayDeviceInput.Wireless: Send("Source=4"); break; } }
private void OnAddInput() { if (SelectedInput == null) { return; } OnCloseFlyout(); Inputs.Add(new InputViewModel(new InputModel(), SelectedInput)); // (Konrad) Cleanup Available Inputs AvailableInputs.Remove(SelectedInput); SelectedInput = null; }
private void OnInputDeleted(InputDeleted obj) { // (Konrad) Restore the input in the dropdown and cleanup AvailableInputs.Add(obj.InputViewModel.Input); Inputs.Remove(obj.InputViewModel); }