private void ToggleTextBoxState(EddieTextBox box)
        {
            switch (_toggleState)
            {
            default:
                box.Text       = "Normal";
                box.IsReadOnly = false;
                box.IsEnabled  = true;
                _toggleState   = 1;
                break;

            case 1:
                box.Text       = "Readonly";
                box.IsReadOnly = true;
                box.IsEnabled  = true;
                _toggleState++;
                break;

            case 2:
                box.Text       = "Disabled";
                box.IsReadOnly = false;
                box.IsEnabled  = false;
                _toggleState++;
                break;

            case 3:
                box.Text       = "Changed Icon";
                box.Icon       = CommonShapeFactory.GetShapeGeometry(CommonShapeType.AttentionTriangle);
                box.IsReadOnly = false;
                box.IsEnabled  = true;
                _toggleState++;
                break;

            case 4:
                box.Text       = "Changed Path";
                box.Icon       = CommonShapeFactory.GetShapeGeometry(CommonShapeType.SpeakBubble);
                box.IsReadOnly = false;
                box.IsEnabled  = true;
                _toggleState++;
                break;
            }
        }
예제 #2
0
        public IconsViewModel()
        {
            foreach (CommonShapeType value in Enum.GetValues(typeof(CommonShapeType)))
            {
                CommonShapes.Add(new IconWrapper
                {
                    Name     = value.ToString(),
                    Geometry = CommonShapeFactory.GetShapeGeometry(value)
                });
            }

            foreach (MdiShapeType value in Enum.GetValues(typeof(MdiShapeType)))
            {
                MdiShapes.Add(new IconWrapper
                {
                    Name     = value.ToString(),
                    Geometry = MdiShapeFactory.GetShapeGeometry(value)
                });
            }
        }