示例#1
0
 private void btnToggleState_Click(object sender, EventArgs e)
 {
     if (_selectedRemote == null)
     {
         btnToggleState.Visible = false;
         return;
     }
     _selectedRemote.Disabled = !_selectedRemote.Disabled;
     _gitRemoteController.ToggleRemoteState(_selectedRemote.Name, _selectedRemote.Disabled);
     BindBtnToggleState(_selectedRemote.Disabled);
     BindRemotes(_selectedRemote.Name);
 }
示例#2
0
        private void btnToggleState_Click(object sender, EventArgs e)
        {
            if (_selectedRemote == null)
            {
                btnToggleState.Visible = false;
                return;
            }
            _selectedRemote.Disabled = !_selectedRemote.Disabled;
            btnToggleState.Image     = _selectedRemote.Disabled ? Properties.Resources.light_bulb_icon_off_16 : Properties.Resources.light_bulb_icon_on_16;
            _gitRemoteController.ToggleRemoteState(_selectedRemote.Name, _selectedRemote.Disabled);

            BindRemotes(_selectedRemote.Name);
        }
 public void SetRemoteState_should_throw_if_remote_is_null()
 {
     ((Action)(() => _controller.ToggleRemoteState(null, false))).ShouldThrow <ArgumentNullException>()
     .WithMessage("Value cannot be null.\r\nParameter name: remoteName");
 }