Example #1
0
        public void RemoveBrush(int type)
        {
            if (Brushes.Count <= 1)
            {
                System.Windows.MessageBox.Show("至少要保留一个笔刷!", "提示");
                return;
            }

            if (type == CurBrush.Type)
            {
                System.Windows.MessageBox.Show("当前使用笔刷不能被删除!", "提示");
                return;
            }

            if (!CheckExists(type.ToString()))
            {
                return;
            }

            Brushes.Remove(type.ToString());

            isModified = true;

            OnBrushModified?.Invoke();
        }
Example #2
0
 private void RemoveBrush() => Brushes.Remove(SelectedBrush);