void ReleaseDesignerOutlets()
        {
            if (AliasField != null)
            {
                AliasField.Dispose();
                AliasField = null;
            }

            if (CertificateField != null)
            {
                CertificateField.Dispose();
                CertificateField = null;
            }

            if (OpenFileButton != null)
            {
                OpenFileButton.Dispose();
                OpenFileButton = null;
            }

            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AliasField != null)
            {
                AliasField.Dispose();
                AliasField = null;
            }

            if (PrivateKeyField != null)
            {
                PrivateKeyField.Dispose();
                PrivateKeyField = null;
            }

            if (CertificateField != null)
            {
                CertificateField.Dispose();
                CertificateField = null;
            }

            if (OpenPrivateKeyFileButton != null)
            {
                OpenPrivateKeyFileButton.Dispose();
                OpenPrivateKeyFileButton = null;
            }

            if (OpenCertificateFileButton != null)
            {
                OpenCertificateFileButton.Dispose();
                OpenCertificateFileButton = null;
            }

            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }
        }
Пример #3
0
        public static IFieldHelper ConvertToFieldHelper(IEntity fieldEntity)
        {
            if (fieldEntity == null)
            {
                throw new ArgumentNullException("fieldEntity");
            }

            // Ensure we have the specific type of field in question.
            IEntity field = Entity.AsNative(fieldEntity);

            if (field == null)
            {
                throw new Exception("Assert false");
            }

            StringField stringField = field as StringField;

            if (stringField != null)
            {
                return(new StringFieldHelper(stringField));
            }

            AliasField aliasField = field as AliasField;

            if (aliasField != null)
            {
                return(new AliasFieldHelper(aliasField));
            }

            AutoNumberField autoNumberField = field as AutoNumberField;

            if (autoNumberField != null)
            {
                return(new AutoNumberFieldHelper(autoNumberField));
            }

            BoolField boolField = field as BoolField;

            if (boolField != null)
            {
                return(new BoolFieldHelper(boolField));
            }

            CurrencyField currencyField = field as CurrencyField;

            if (currencyField != null)
            {
                return(new CurrencyFieldHelper(currencyField));
            }

            DateField dateField = field as DateField;

            if (dateField != null)
            {
                return(new DateFieldHelper(dateField));
            }

            DateTimeField dateTimeField = field as DateTimeField;

            if (dateTimeField != null)
            {
                return(new DateTimeFieldHelper(dateTimeField));
            }

            DecimalField decimalField = field as DecimalField;

            if (decimalField != null)
            {
                return(new DecimalFieldHelper(decimalField));
            }

            IntField intField = field as IntField;

            if (intField != null)
            {
                return(new IntFieldHelper(intField));
            }

            TimeField timeField = field as TimeField;

            if (timeField != null)
            {
                return(new TimeFieldHelper(timeField));
            }

            GuidField guidField = field as GuidField;

            if (guidField != null)
            {
                return(new GuidFieldHelper(guidField));
            }

            XmlField xmlField = field as XmlField;

            if (xmlField != null)
            {
                return(new XmlFieldHelper(xmlField));
            }

            throw new Exception("Entity is not a valid field type: " + field.GetType().ToString());
        }
Пример #4
0
 /// <summary>
 ///     Constructor.
 /// </summary>
 internal AliasFieldHelper(AliasField fieldEntity)
 {
     _field = fieldEntity;
 }