示例#1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TypeLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 2:
                this.TypeComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 11 "..\..\..\Settings\CRMSiteSettingForm.xaml"
                this.TypeComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TypeComboBox_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.URLLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.URLTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.DefaultCredentialCheckBox = ((System.Windows.Controls.CheckBox)(target));

            #line 14 "..\..\..\Settings\CRMSiteSettingForm.xaml"
                this.DefaultCredentialCheckBox.Checked += new System.Windows.RoutedEventHandler(this.DefaultCredentialCheckBox_Checked);

            #line default
            #line hidden

            #line 14 "..\..\..\Settings\CRMSiteSettingForm.xaml"
                this.DefaultCredentialCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.DefaultCredentialCheckBox_Unchecked);

            #line default
            #line hidden
                return;

            case 6:
                this.UsernameLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.UserTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.PasswordTextBox = ((Sobiens.Connectors.Studio.UI.Controls.BindablePasswordBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
示例#2
0
        /// <summary>
        /// Handles changes to the password dependency property.
        /// </summary>
        /// <param name="d">the dependency object</param>
        /// <param name="eventArgs">the event args</param>
        private static void OnPasswordPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs eventArgs)
        {
            BindablePasswordBox bindablePasswordBox = (BindablePasswordBox)d;
            PasswordBox         passwordBox         = (PasswordBox)bindablePasswordBox.Child;

            if (bindablePasswordBox.isPreventCallback)
            {
                return;
            }

            passwordBox.PasswordChanged -= bindablePasswordBox.savedCallback;
            passwordBox.Password         = (eventArgs.NewValue != null) ? eventArgs.NewValue.ToString() : "";
            passwordBox.PasswordChanged += bindablePasswordBox.savedCallback;
        }