Example #1
0
        public MaskInfoCollection Copy()
        {
            MaskInfoCollection maskInfos = new MaskInfoCollection();

            foreach (MaskInfo maskInfo in this)
            {
                maskInfos.Add(maskInfo.Copy());
            }

            return(maskInfos);
        }
Example #2
0
        public MaskInfo()
        {
            _TitleFont      = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
            _TitleTextColor = Color.Black;
            _TitleBackColor = Color.Transparent;
            _Title          = string.Empty;
            _TitleAlignment = HorzAlignment.Center;
            _MaskedField    = string.Empty;
            _MaskedFont     = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
            _MaskedWidth    = 55;
            _ShowTitle      = true;
            _TitleWidth     = 55;

            _MaskedTextColor = Color.Black;
            _MaskedBackColor = Color.Transparent;
            _MaskedAlignment = HorzAlignment.Center;

            _ShowUnderLine     = true;
            _VerticalAlignment = VertAlignment.Bottom;
            _BrotherMaskInfos  = new MaskInfoCollection();
            _DateFormat        = @"M/d/yy";
        }
Example #3
0
 public MaskInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         this._VerticalAlignment = (DevExpress.Utils.VertAlignment)info.GetValue("_VerticalAlignment", typeof(DevExpress.Utils.VertAlignment));
     }
     catch
     {
         _VerticalAlignment = VertAlignment.Bottom;
     }
     try
     {
         _TitleFont = (System.Drawing.Font)info.GetValue("_TitleFont", typeof(System.Drawing.Font));
     }
     catch
     {
         _TitleFont = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
     }
     try
     {
         _TitleTextColor = (System.Drawing.Color)info.GetValue("_TitleTextColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _TitleTextColor = Color.Black;
     }
     try
     {
         _TitleBackColor = (System.Drawing.Color)info.GetValue("_TitleBackColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _TitleBackColor = Color.Transparent;
     }
     try
     {
         _Title = info.GetString("_Title");
     }
     catch
     {
         _Title = string.Empty;
     }
     try
     {
         _DateFormat = info.GetString("_DateFormat");
     }
     catch
     {
         _DateFormat = @"M/d/yy";
     }
     try
     {
         _TitleAlignment = (DevExpress.Utils.HorzAlignment)info.GetValue("_TitleAlignment", typeof(DevExpress.Utils.HorzAlignment));
     }
     catch
     {
         _TitleAlignment = HorzAlignment.Center;
     }
     try
     {
         _MaskedField = info.GetString("_MaskedField");
     }
     catch
     {
         _MaskedField = string.Empty;
     }
     try
     {
         _MaskedFont = (System.Drawing.Font)info.GetValue("_MaskedFont", typeof(System.Drawing.Font));
     }
     catch
     {
         _MaskedFont = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
     }
     try
     {
         _MaskedWidth = info.GetInt32("_MaskedWidth");
     }
     catch
     {
         _MaskedWidth = 55;
     }
     try
     {
         this._MaskedTextColor = (System.Drawing.Color)info.GetValue("_MaskedTextColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _MaskedTextColor = Color.Black;
     }
     try
     {
         this._MaskedBackColor = (System.Drawing.Color)info.GetValue("_MaskedBackColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _MaskedBackColor = Color.Transparent;
     }
     try
     {
         this._MaskedAlignment = (DevExpress.Utils.HorzAlignment)info.GetValue("_MaskedAlignment", typeof(DevExpress.Utils.HorzAlignment));
     }
     catch
     {
         _MaskedAlignment = HorzAlignment.Center;
     }
     try
     {
         this._TitleWidth = info.GetInt32("_TitleWidth");
     }
     catch
     {
         _TitleWidth = 55;
     }
     try
     {
         this._ShowTitle = info.GetBoolean("_ShowTitle");
     }
     catch
     {
         _ShowTitle = true;
     }
     try
     {
         this._ShowUnderLine = info.GetBoolean("_ShowUnderLine");
     }
     catch
     {
         this._ShowUnderLine = true;
     }
     try
     {
         this._BrotherMaskInfos = (MaskInfoCollection)info.GetValue("_BrotherMaskInfos", typeof(MaskInfoCollection));
     }
     catch
     {
         _BrotherMaskInfos = new MaskInfoCollection();
     }
 }