Ejemplo n.º 1
0
 public static TEdit CreatEdit <TEdit>(TEdit edit = null, RepositoryItemCollection collection = null, Action <TEdit> initialize = null)
     where TEdit : RepositoryItem, new()
 {
     edit = edit ?? new TEdit();
     if (collection != null)
     {
         collection.Add(edit);
     }
     if (initialize != null)
     {
         initialize(edit);
     }
     return(edit);
 }
Ejemplo n.º 2
0
 public static RepositoryItemDateEdit CreatDateEdit(RepositoryItemDateEdit edit = null, RepositoryItemCollection collection = null)
 {
     return(CreatEdit <RepositoryItemDateEdit>(edit, collection));
 }
Ejemplo n.º 3
0
 public static RepositoryItemImageComboBox CreateEnumImageComboBox <TEnum>(RepositoryItemImageComboBox edit = null, RepositoryItemCollection collection = null,
                                                                           Converter <TEnum, string> displayTextConverter = null)
 {
     return(CreatEdit <RepositoryItemImageComboBox>(edit, collection, (e) => e.Items.AddEnum <TEnum>(displayTextConverter)));
 }
Ejemplo n.º 4
0
        public static RepositoryItemImageComboBox CreateManeuverImageComboBox(RepositoryItemImageComboBox edit = null, RepositoryItemCollection collection = null)
        {
            RepositoryItemImageComboBox ret = CreateEnumImageComboBox <DevExpress.XtraMap.BingManeuverType>(edit, collection);

            foreach (ImageComboBoxItem item in ret.Items)
            {
                switch ((DevExpress.XtraMap.BingManeuverType)item.Value)
                {
                case DevExpress.XtraMap.BingManeuverType.DepartStart:
                    item.ImageIndex = 0;
                    break;

                case DevExpress.XtraMap.BingManeuverType.TurnLeft:
                    item.ImageIndex = 1;
                    break;

                case DevExpress.XtraMap.BingManeuverType.TurnRight:
                    item.ImageIndex = 2;
                    break;

                case DevExpress.XtraMap.BingManeuverType.ArriveFinish:
                    item.ImageIndex = 3;
                    break;

                case DevExpress.XtraMap.BingManeuverType.UTurn:
                    item.ImageIndex = 4;
                    break;

                case DevExpress.XtraMap.BingManeuverType.BearLeft:
                    item.ImageIndex = 5;
                    break;

                case DevExpress.XtraMap.BingManeuverType.BearRight:
                    item.ImageIndex = 6;
                    break;
                }
                item.Description = string.Empty;
            }
            ret.SmallImages    = CreateBingManeuverTypeImageCollection();
            ret.GlyphAlignment = HorzAlignment.Center;
            return(ret);
        }
Ejemplo n.º 5
0
        public static RepositoryItemImageComboBox CreateTaskPriorityImageComboBox(RepositoryItemImageComboBox edit = null, RepositoryItemCollection collection = null)
        {
            RepositoryItemImageComboBox ret = CreateEnumImageComboBox <EmployeeTaskPriority>(edit, collection);

            ret.SmallImages = CreateTaskPriorityImageCollection();
            if (edit == null)
            {
                ret.GlyphAlignment = HorzAlignment.Center;
            }
            return(ret);
        }
Ejemplo n.º 6
0
        public static RepositoryItemImageComboBox CreatePersonPrefixImageComboBox(RepositoryItemImageComboBox edit = null, RepositoryItemCollection collection = null)
        {
            RepositoryItemImageComboBox ret = CreateEnumImageComboBox <PersonPrefix>(edit, collection);

            ret.SmallImages = CreatePersonPrefixImageCollection();
            if (edit == null)
            {
                ret.GlyphAlignment = HorzAlignment.Center;
            }
            return(ret);
        }
Ejemplo n.º 7
0
        public static RepositoryItemImageComboBox CreateShipmentStatusImageComboBox(ISkinProvider provider, RepositoryItemImageComboBox edit = null, RepositoryItemCollection collection = null)
        {
            RepositoryItemImageComboBox ret = CreateEnumImageComboBox <ShipmentStatus>(edit, collection);

            ret.SmallImages = CreateShipmentStatusImageCollection(provider);
            if (edit == null)
            {
                ret.GlyphAlignment = HorzAlignment.Center;
            }
            return(ret);
        }