예제 #1
0
        private static void OnFalseStateChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            DataStateBehavior dataStateBehavior = (DataStateBehavior)obj;

            dataStateBehavior.ValidateStateName(dataStateBehavior.FalseState);
            dataStateBehavior.Evaluate();
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.AddTwo = ((PRISM4.MATH_MODULE.VIEWS.SubtractView)(target));
                return;

            case 2:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.TextBox1ExceptionBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 4:
                this.TextBox2ExceptionBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 5:
                this.BothTextBoxesBlankOrClearBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 6:
                this.TextBox1HasValueBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 7:
                this.TextBox1AndTextbox2HasValueBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 8:
                this.Exception1TextBoxStates = ((System.Windows.VisualStateGroup)(target));
                return;

            case 9:
                this.TextBox1ExceptionStatusTrueState = ((System.Windows.VisualState)(target));
                return;

            case 10:
                this.TextBox1ExceptionStatusFalseState = ((System.Windows.VisualState)(target));
                return;

            case 11:
                this.TextBox2ExceptionStates = ((System.Windows.VisualStateGroup)(target));
                return;

            case 12:
                this.TextBox2ExceptionStatusTrueState = ((System.Windows.VisualState)(target));
                return;

            case 13:
                this.TextBox2ExceptionStatusFalseState = ((System.Windows.VisualState)(target));
                return;

            case 14:
                this.EnabledStates = ((System.Windows.VisualStateGroup)(target));
                return;

            case 15:
                this.BothTextBoxesBlankOrClearState = ((System.Windows.VisualState)(target));
                return;

            case 16:
                this.TextBox1HasValueState = ((System.Windows.VisualState)(target));
                return;

            case 17:
                this.TextBox1AndTextbox2HasValueState = ((System.Windows.VisualState)(target));
                return;

            case 18:
                this.HelpText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 19:
                this.ContentGroupBox = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 20:
                this.CalculationGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 21:
                this.Integer1Label = ((System.Windows.Controls.Label)(target));
                return;

            case 22:
                this.Integer1TextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 23:
                this.Integer2Label = ((System.Windows.Controls.Label)(target));
                return;

            case 24:
                this.Integer2TextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.TotalLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 26:
                this.TotalTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 27:
                this.ClearButton = ((System.Windows.Controls.Button)(target));
                return;

            case 28:
                this.CalculateButton = ((System.Windows.Controls.Button)(target));
                return;

            case 29:
                this.FormulaLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 30:
                this.FormulaBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 31:
                this.FormulaText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 32:
                this.StatusLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 33:
                this.StatusBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 34:
                this.StatusTextBox = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.AddTwo = ((PRISM4.MATH_MODULE.VIEWS.AddTwoViewTemp)(target));
                return;

            case 2:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.StartupClearStateBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 4:
                this.ValidValueInTextBox1StateBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 5:
                this.ValidValueInTextBox2StateBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 6:
                this.ExceptionInTextBox1StateBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 7:
                this.ExceptionInTextBox2StateBehavior = ((Microsoft.Expression.Interactivity.Core.DataStateBehavior)(target));
                return;

            case 8:
                this.AddTwoViewStates = ((System.Windows.VisualStateGroup)(target));
                return;

            case 9:
                this.ClearState = ((System.Windows.VisualState)(target));
                return;

            case 10:
                this.ValueEnteredInTextBoxOneState = ((System.Windows.VisualState)(target));
                return;

            case 11:
                this.ExceptionInTextBoxOneState = ((System.Windows.VisualState)(target));
                return;

            case 12:
                this.ValueEnteredInTextBoxTwoState = ((System.Windows.VisualState)(target));
                return;

            case 13:
                this.ExceptionInTextBoxTwoState = ((System.Windows.VisualState)(target));
                return;

            case 14:
                this.HelpText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.ContentGroupBox = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 16:
                this.CalculationGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 17:
                this.Integer1Label = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.Integer1TextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 19:
                this.Integer2Label = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.Integer2TextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 21:
                this.TotalLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 22:
                this.TotalTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 23:
                this.ClearButton = ((System.Windows.Controls.Button)(target));
                return;

            case 24:
                this.CalculateButton = ((System.Windows.Controls.Button)(target));
                return;

            case 25:
                this.FormulaLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 26:
                this.FormulaBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 27:
                this.FormulaText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 28:
                this.StatusLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 29:
                this.StatusBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 30:
                this.StatusTextBox = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #4
0
        private static void OnValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            DataStateBehavior dataStateBehavior = (DataStateBehavior)obj;

            dataStateBehavior.Evaluate();
        }