Esempio n. 1
0
        /// <summary>
        /// Disables the specified index of <see cref="Step"/>.
        /// </summary>
        /// <param name="index">The index to disable.</param>
        public async Task Disable(int index)
        {
            for (int i = 0; i < ChildComponents.Count; i++)
            {
                GetChild(i).Disable(false);
            }

            GetChild(index).Disable();
            await OnDisabled.InvokeAsync(index);

            NotifyStateChanged();
        }
Esempio n. 2
0
 /// <summary>
 /// 禁用按钮的状态。
 /// </summary>
 /// <param name="disabled">是否禁用按钮。</param>
 public async Task Disable(bool disabled = true)
 {
     Disabled = disabled;
     await OnDisabled.InvokeAsync(disabled);
 }