private bool CheckPermission() { bool success = false; if (this.TestPermission) { if (AccountInfoManager.TestPermission(this.AccountLevel)) { //第一次確認不進行Click事件 //if (_isLogin) { success = true; } _isLogin = true; } } else { success = true; } return(success); }
private void btnStatus_Click(object sender, EventArgs e) { bool success = false; if (this.TestPermission) { if (AccountInfoManager.TestPermission(this.AccountLevel)) { success = true; } } else { success = true; } if (success) { this.On = !this.On; if (SwitchStatusChenged != null) { SwitchStatusChenged(this, e); } } }