コード例 #1
0
        public override void Execute(object parameter)
        {
            try
            {
                HsCommandParams cp = parameter as HsCommandParams;

                if (cp != null)
                {
                    if (cp.ActionKey == SysActionKeys.UserDo1)
                    {
                        allowCheck = false;

                        this._checkIsUpgrade();
                    }
                }
                else
                {
                    base.Execute(parameter);
                }
            }
            catch (Exception e)
            {
                this.ShowError(e.Message);
            }
            finally
            {
                allowCheck = true;
            }
        }
コード例 #2
0
        public static HsActionKey GetActionKey(this MenuItem item)
        {
            HsCommandParams cp = item.CommandParameter as HsCommandParams;

            return(cp?.ActionKey);
        }