Ejemplo n.º 1
0
        private void Initialize()
        {
            TextStrings.Add(0, "sıfır");
            TextStrings.Add(1, "bir");
            TextStrings.Add(2, "iki");
            TextStrings.Add(3, "üç");
            TextStrings.Add(4, "dört");
            TextStrings.Add(5, "beş");
            TextStrings.Add(6, "altı");
            TextStrings.Add(7, "yedi");
            TextStrings.Add(8, "sekiz");
            TextStrings.Add(9, "dokuz");
            TextStrings.Add(10, "on");
            TextStrings.Add(20, "yirmi");
            TextStrings.Add(30, "otuz");
            TextStrings.Add(40, "kırk");
            TextStrings.Add(50, "elli");
            TextStrings.Add(60, "altmış");
            TextStrings.Add(70, "yetmiş");
            TextStrings.Add(80, "seksen");
            TextStrings.Add(90, "doksan");
            TextStrings.Add(100, "yüz");

            Scales.Add(1000000000, "milyar");
            Scales.Add(1000000, "milyon");
            Scales.Add(1000, "bin");
        }
Ejemplo n.º 2
0
        public void AddScaling(String[] Parameters)
        {
            Affectation Affectation = new Affectation("S", GroupDepth, Parameters, CurrentLoop);

            Scales.Add(Affectation);
            Content += Affectation.getEquivalentLine();
        }
Ejemplo n.º 3
0
        public PatliteControl()
        {
            InitializeComponent();

            Scales.Add("rEnv", rScale);
            Scales.Add("yEnv", yScale);
            Scales.Add("gEnv", gScale);
        }
        private void Initialize()
        {
            TextStrings.Add(0, "Нуль");
            TextStrings.Add(1, "Одна");
            TextStrings.Add(2, "Дві");
            TextStrings.Add(3, "Три");
            TextStrings.Add(4, "Чотири");
            TextStrings.Add(5, "П'ять");
            TextStrings.Add(6, "Шість");
            TextStrings.Add(7, "Сім");
            TextStrings.Add(8, "Вісім");
            TextStrings.Add(9, "Дев'ять");
            TextStrings.Add(10, "Десять");
            TextStrings.Add(11, "Одинадцять");
            TextStrings.Add(12, "Дванадцять");
            TextStrings.Add(13, "Тринадцять");
            TextStrings.Add(14, "Чотирнадцять");
            TextStrings.Add(15, "П'ятнадцять");
            TextStrings.Add(16, "Шістнадцять");
            TextStrings.Add(17, "Сімнадцять");
            TextStrings.Add(18, "Вісімнадцять");
            TextStrings.Add(19, "Дев'ятнадцять");
            TextStrings.Add(20, "Двадцять");
            TextStrings.Add(30, "Тридцять");
            TextStrings.Add(40, "Сорок");
            TextStrings.Add(50, "П'ятдесят");
            TextStrings.Add(60, "Шістдесят");
            TextStrings.Add(70, "Сімдесят");
            TextStrings.Add(80, "Вісімдесят");
            TextStrings.Add(90, "Дев'яносто");
            TextStrings.Add(100, "Сто");
            TextStrings.Add(200, "Двісті");
            TextStrings.Add(300, "Триста");
            TextStrings.Add(400, "Чотириста");
            TextStrings.Add(500, "П'ятсот");
            TextStrings.Add(600, "Шістсот");
            TextStrings.Add(700, "Сімсот");
            TextStrings.Add(800, "Вісімсот");
            TextStrings.Add(900, "Дев'ятсот");

            AdditionalStrings.Add(1, "Один");
            AdditionalStrings.Add(2, "Два");
            AdditionalStrings.Add(1000, "тисяча");
            AdditionalStrings.Add(1000000, "мільйон");
            AdditionalStrings.Add(1000000000, "мільярд");

            Scales.Add(1000000000, "мільярдів");
            Scales.Add(1000000, "мільйонів");
            Scales.Add(1000, "тисяч");

            AdditionalScales.Add(1000000000, "мільярди");
            AdditionalScales.Add(1000000, "мільйони");
            AdditionalScales.Add(1000, "тисячі");
        }
Ejemplo n.º 5
0
 public void SetScale(string name, Vector3 scale)
 {
     if (Scales.ContainsKey(name))
     {
         Scales[name] = scale;
     }
     else
     {
         Scales.Add(name, scale);
     }
 }
Ejemplo n.º 6
0
        private void Initialize()
        {
            TextStrings.Add(0, "ноль");
            TextStrings.Add(1, "один");
            TextStrings.Add(2, "два");
            TextStrings.Add(3, "три");
            TextStrings.Add(4, "четыре");
            TextStrings.Add(5, "пять");
            TextStrings.Add(6, "шесть");
            TextStrings.Add(7, "семь");
            TextStrings.Add(8, "восемь");
            TextStrings.Add(9, "девять");
            TextStrings.Add(10, "десять");
            TextStrings.Add(11, "одиннадцать");
            TextStrings.Add(12, "двенадцать");
            TextStrings.Add(13, "тринадцать");
            TextStrings.Add(14, "четырнадцать");
            TextStrings.Add(15, "пятнадцать");
            TextStrings.Add(16, "шестнадцать");
            TextStrings.Add(17, "семнадцать");
            TextStrings.Add(18, "восемнадцать");
            TextStrings.Add(19, "девятнадцать");
            TextStrings.Add(20, "двадцать");
            TextStrings.Add(30, "тридцать");
            TextStrings.Add(40, "сорок");
            TextStrings.Add(50, "пятьдесят");
            TextStrings.Add(60, "шестьдесят");
            TextStrings.Add(70, "семьдесят");
            TextStrings.Add(80, "восемьдесят");
            TextStrings.Add(90, "девяносто");
            TextStrings.Add(100, "сто");
            TextStrings.Add(200, "двести");
            TextStrings.Add(300, "триста");
            TextStrings.Add(400, "четыреста");
            TextStrings.Add(500, "пятьсот");
            TextStrings.Add(600, "шестьсот");
            TextStrings.Add(700, "семьсот");
            TextStrings.Add(800, "восемьсот");
            TextStrings.Add(900, "девятьсот");

            AdditionalStrings.Add(1, "одна");
            AdditionalStrings.Add(2, "две");
            AdditionalStrings.Add(1000, "тысяча");
            AdditionalStrings.Add(2000, "тысячи");
            AdditionalStrings.Add(1000000, "миллион");
            AdditionalStrings.Add(2000000, "миллиона");
            AdditionalStrings.Add(1000000000, "миллиард");
            AdditionalStrings.Add(2000000000, "миллиарда");

            Scales.Add(1000000000, "миллиардов");
            Scales.Add(1000000, "миллионов");
            Scales.Add(1000, "тысяч");
        }
Ejemplo n.º 7
0
        public IScaleDescriptorAssignment AddDynamicScaleForProperty(string name)
        {
            var scaleAssignment = this.Scales.ForProperty(name);

            if (null == scaleAssignment)
            {
                var scale = new DynamicPropertyScaleDescriptor(this, name);
                scaleAssignment = new ScaleDescriptorAssignment {
                    PropertyName = name, Scale = scale
                };
                Scales.Add(scaleAssignment);
            }
            return(scaleAssignment);
        }
        private void Initialize()
        {
            TextStrings.Add(0, "cero");
            TextStrings.Add(1, "uno");
            TextStrings.Add(2, "dos");
            TextStrings.Add(3, "tres");
            TextStrings.Add(4, "cuatro");
            TextStrings.Add(5, "cinco");
            TextStrings.Add(6, "seis");
            TextStrings.Add(7, "siete");
            TextStrings.Add(8, "ocho");
            TextStrings.Add(9, "nueve");
            TextStrings.Add(10, "diez");
            TextStrings.Add(11, "once");
            TextStrings.Add(12, "doce");
            TextStrings.Add(13, "trece");
            TextStrings.Add(14, "catorce");
            TextStrings.Add(15, "quince");
            TextStrings.Add(16, "dieciséis");
            TextStrings.Add(17, "diecisiete");
            TextStrings.Add(18, "dieciocho");
            TextStrings.Add(19, "diecinueve");
            TextStrings.Add(20, "veinte");
            TextStrings.Add(30, "treinta");
            TextStrings.Add(40, "cuarenta");
            TextStrings.Add(50, "cincuenta");
            TextStrings.Add(60, "sesenta");
            TextStrings.Add(70, "setenta");
            TextStrings.Add(80, "ochenta");
            TextStrings.Add(90, "noventa");
            TextStrings.Add(100, "cien");
            TextStrings.Add(200, "doscientos");
            TextStrings.Add(300, "trescientos");
            TextStrings.Add(400, "cuatrocientos");
            TextStrings.Add(500, "quinientos");
            TextStrings.Add(600, "seiscientos");
            TextStrings.Add(700, "setecientos");
            TextStrings.Add(800, "ochocientos");
            TextStrings.Add(900, "novecientos");

            AdditionalStrings.Add(1, "un");
            AdditionalStrings.Add(1000000, "milones");

            Scales.Add(1000000000, "mil millones");
            Scales.Add(1000000, "millón");
            Scales.Add(1000, "mil");
        }
Ejemplo n.º 9
0
        protected void ExtendScale(Scale scale, byte interval)
        {
            Scale extendedScale = scale.Duplicate();

            extendedScale.Extend(interval);
            if (!extendedScale.IsDone)
            {
                CreateScale(extendedScale);
            }
            else if (extendedScale.IsValid)
            {
                if (ValidateMinMax(extendedScale))
                {
                    Scales.Add(extendedScale);
                }
            }
        }
Ejemplo n.º 10
0
 private void SafeAddScaleDescriptorAssignment(DynamicMemberDescriptor m)
 {
     using (_log.PushContext("SafeAddScaleDescriptorAssignment"))
     {
         IScaleDescriptor sd = m.ScaleDescriptor;
         if (null == sd)
         {
             _log.DebugFormat("getting/creating scale descriptor for {0}", m.MemberInfo.Name);
             GetOrCreateScaleAssignment(m.MemberInfo.Name, m.MemberInfo);
         }
         else
         {
             _log.DebugFormat("adding scale descriptor assignment for {0} to {1}", m.MemberInfo.Name,
                              m.ScaleDescriptor.Name);
             Scales.Add(new ScaleDescriptorAssignment
             {
                 PropertyName = m.MemberInfo.Name, Scale = m.ScaleDescriptor
             });
         }
     }
 }
Ejemplo n.º 11
0
        private void Initialize()
        {
            TextStrings.Add(0, "zéro");
            TextStrings.Add(1, "un");
            TextStrings.Add(2, "deux");
            TextStrings.Add(3, "trois");
            TextStrings.Add(4, "quatre");
            TextStrings.Add(5, "cinq");
            TextStrings.Add(6, "six");
            TextStrings.Add(7, "sept");
            TextStrings.Add(8, "huit");
            TextStrings.Add(9, "neuf");
            TextStrings.Add(10, "dix");
            TextStrings.Add(11, "onze");
            TextStrings.Add(12, "douze");
            TextStrings.Add(13, "treize");
            TextStrings.Add(14, "quatorze");
            TextStrings.Add(15, "quinze");
            TextStrings.Add(16, "seize");
            TextStrings.Add(17, "dix-sept");
            TextStrings.Add(18, "dix-huit");
            TextStrings.Add(19, "dix-neuf");
            TextStrings.Add(20, "vingt");
            TextStrings.Add(30, "trente");
            TextStrings.Add(40, "quarante");
            TextStrings.Add(50, "cinquante ");
            TextStrings.Add(60, "soixante");
            TextStrings.Add(80, "quatre-vingt");
            TextStrings.Add(100, "cent");

            AdditionalStrings.Add(1, "et un");
            AdditionalStrings.Add(11, "et onze");
            AdditionalStrings.Add(80, "quatre-vingts");

            Scales.Add(1000000000, "milliard");
            Scales.Add(1000000, "million");
            Scales.Add(1000, "mille");
        }
Ejemplo n.º 12
0
        private void Initialize()
        {
            TextStrings.Add(0, "zero");
            TextStrings.Add(1, "one");
            TextStrings.Add(2, "two");
            TextStrings.Add(3, "three");
            TextStrings.Add(4, "four");
            TextStrings.Add(5, "five");
            TextStrings.Add(6, "six");
            TextStrings.Add(7, "seven");
            TextStrings.Add(8, "eight");
            TextStrings.Add(9, "nine");
            TextStrings.Add(10, "ten");
            TextStrings.Add(11, "eleven");
            TextStrings.Add(12, "twelve");
            TextStrings.Add(13, "thirteen");
            TextStrings.Add(14, "fourteen");
            TextStrings.Add(15, "fifteen");
            TextStrings.Add(16, "sixteen");
            TextStrings.Add(17, "seventeen");
            TextStrings.Add(18, "eighteen");
            TextStrings.Add(19, "nineteen");
            TextStrings.Add(20, "twenty");
            TextStrings.Add(30, "thirty");
            TextStrings.Add(40, "forty");
            TextStrings.Add(50, "fifty");
            TextStrings.Add(60, "sixty");
            TextStrings.Add(70, "seventy");
            TextStrings.Add(80, "eighty");
            TextStrings.Add(90, "ninety");
            TextStrings.Add(100, "hundred");

            Scales.Add(1000000000, "billion");
            Scales.Add(1000000, "million");
            Scales.Add(1000, "thousand");
        }
Ejemplo n.º 13
0
        IScaleDescriptorAssignment GetOrCreateScaleAssignment(string propertyName, PSPropertyInfo member)
        {
            using (_log.PushContext("GetOrCreateScaleAssignment [{0}]", propertyName))
            {
                var scaleAssignment = (from s in Scales
                                       where StringComparer.InvariantCultureIgnoreCase.Equals(s.PropertyName, propertyName)
                                       select s).FirstOrDefault();

                if (null == scaleAssignment && null == member)
                {
                    return(null);
                }

                if (null != scaleAssignment)
                {
                    Scales.Add(new ScaleDescriptorAssignment {
                        PropertyName = member.Name, Scale = scaleAssignment.Scale
                    });
                    return(scaleAssignment);
                }

                return(AddDynamicScaleForProperty(member.Name));
            }
        }
Ejemplo n.º 14
0
        protected override void ReadInternal(BinaryReader br)
        {
            Header = CreateField <LevelHeader>("Level Management Header", br);
            var recordCount = CreateField <RecordCount>("Number of Basic/Extended Data Frame ManagementRecords, of the Parcel Entity of the Level", br);

            BasicDataFrameCount          = recordCount.BasicMapRecords;
            ExtendedDataFrameCount       = recordCount.ExtendedMapRecords;
            RouteGuidanceBasicFrameCount = recordCount.BasicRouteRecords;

            var scale1 = CreateField <N>("Display Scale Flag 1", br, 4);
            var scale2 = CreateField <N>("Display Scale Flag 2", br, 4);
            var scale3 = CreateField <N>("Display Scale Flag 3", br, 4);
            var scale4 = CreateField <N>("Display Scale Flag 4", br, 4);
            var scale5 = CreateField <N>("Display Scale Flag 5", br, 4);

            if (!scale5.IsNull)
            {
                Scales.Add(GetScaleName(scale5.Value));
            }
            if (!scale4.IsNull)
            {
                Scales.Add(GetScaleName(scale4.Value));
            }
            if (!scale3.IsNull)
            {
                Scales.Add(GetScaleName(scale3.Value));
            }
            if (!scale2.IsNull)
            {
                Scales.Add(GetScaleName(scale2.Value));
            }
            if (!scale1.IsNull)
            {
                Scales.Add(GetScaleName(scale1.Value));
            }

            var blockSetCount = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Block Sets", br);

            _blockSetCountX    = blockSetCount.Longitudinal;
            _blockSetCountY    = blockSetCount.Latitudinal;
            BlockSetsCountLong = blockSetCount.Longitudinal;
            BlockSetsCountLat  = blockSetCount.Latitudinal;

            var blocksCount = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Blocks", br);

            BlocksCountLong = blocksCount.Longitudinal;
            BlocksCountLat  = blocksCount.Latitudinal;

            var parcelsCount = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Parcels", br);

            ParcelCount      = parcelsCount.Latitudinal * parcelsCount.Longitudinal;
            ParcelsCountLong = parcelsCount.Longitudinal;
            ParcelsCountLat  = parcelsCount.Latitudinal;

            var div1 = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Divided Parcels (Parcel Division Type 1)", br);
            var div2 = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Divided Parcels (Parcel Division Type 2)", br);
            var div3 = CreateField <ElementCount>("Number of Latitudinal/Longitudinal Divided Parcels (Parcel Division Type 3)", br);

            DividedBlockCountByDivisionType.Add(1, div1.Latitudinal * div1.Longitudinal);
            DividedBlockCountByDivisionType.Add(2, div2.Latitudinal * div2.Longitudinal);
            DividedBlockCountByDivisionType.Add(3, div3.Latitudinal * div3.Longitudinal);

            _blockSetHeaderOffset = CreateField <D>("Offset to the Top of the Block Set Management Records of the Level", br).DValue;
            CreateField <SWS>("Node Record Size", br);
            var expansionCounts = CreateField <Expansion>("Expnasion counts", br);

            for (int i = 0; i < expansionCounts.RoadsCount; i++)
            {
                CreateField <N>("Road display class code " + i, br);
            }
            for (int i = 0; i < expansionCounts.BackgroundsCount; i++)
            {
                CreateField <N>("Background display class code " + i, br);
            }
            for (int i = 0; i < expansionCounts.DisplayClassCount; i++)
            {
                CreateField <N>("Name display class code " + i, br);
            }

            BgDisplayClassCount   = expansionCounts.BackgroundsCount;
            RoadDisplayClassCount = expansionCounts.RoadsCount;
            NameClassCount        = expansionCounts.DisplayClassCount;

            var currentLength = br.BaseStream.Position - Offset;

            if (currentLength < _recordSize)
            {
                br.BaseStream.Position += _recordSize - currentLength;
            }

            ReadBlockSets();
        }
Ejemplo n.º 15
0
 public void Register(Position <TKey> scale) => Scales.Add(scale);
Ejemplo n.º 16
0
        public void SynchEntities()
        {
            try
            {
                var scales = client.GetAllScales();
                foreach (var a in scales)
                {
                    var scale = Scales.SingleOrDefault(q => q.ID == a.Id);
                    if (scale == null)
                    {
                        Scales.Add(new Scale(a.Id, a.Name));
                    }
                    else
                    {
                        scale.Update(a.Name);
                    }
                }
                var sports = client.GetAllSports();
                foreach (var a in sports)
                {
                    var sport = Sports.SingleOrDefault(q => q.ID == a.Id);
                    if (sport == null)
                    {
                        sport = new Sport(a.Id, a.Name);
                        Sports.Add(sport);
                    }
                    else
                    {
                        sport.Update(a.Name);
                    }
                    var disciplines = client.GetDiscipliniesFromSport(a.Id);
                    foreach (var disc in disciplines)
                    {
                        var discipline = Disciplines.SingleOrDefault(q => q.ID == disc.Id);
                        if (discipline == null)
                        {
                            discipline = new Discipline(disc.Id, disc.Name, sport, Scales.Single(q => q.ID == disc.ScaleId), disc.Description);
                            Disciplines.Add(discipline);
                        }
                        else
                        {
                            discipline.Update(disc.Name, sport, Scales.Single(q => q.ID == disc.ScaleId), disc.Description);
                        }
                        var goals = client.GetGoalsFromDiscipline(disc.Id);
                        foreach (var g in goals)
                        {
                            var goal = Goals.SingleOrDefault(q => q.ID == g.Id);
                            if (goal == null)
                            {
                                goal = new Goal(g.Id, g.Value, discipline, g.PeriodDays, g.Description, Users.SingleOrDefault(q => q.ID == g.OwnerId));
                                Goals.Add(goal);
                            }
                            else
                            {
                                goal.Update(g.Value, discipline, g.PeriodDays, g.Description, Users.Single(q => q.ID == g.OwnerId));
                            }

                            var users_goals = client.GetUsers_GoalsFromUser(CurrentUser.ID, goal.ID);
                            foreach (var userg in users_goals)
                            {
                                var user_goal = Users_Goals.SingleOrDefault(q => q.ID == userg.Id);
                                if (user_goal == null)
                                {
                                    user_goal = new User_Goal(userg.Id, CurrentUser, goal, userg.DateStart);
                                    Users_Goals.Add(user_goal);
                                }
                                else
                                {
                                    user_goal.Update(CurrentUser, goal, userg.DateStart);
                                }
                                var stand_datas = client.GetStandart_DataFromGoal(user_goal.Goal.ID);
                                foreach (var s in stand_datas)
                                {
                                    var stand = Standarts_Datas.SingleOrDefault(q => q.ID == s.Id);
                                    if (stand == null)
                                    {
                                        stand = new Standart_Data(s.Id, s.Value, user_goal.Goal, s.Day);
                                        Standarts_Datas.Add(stand);
                                    }
                                    else
                                    {
                                        stand.Update(s.Value, user_goal.Goal, s.Day);
                                    }
                                }
                                var users_data = client.GetUsers_DataFromGoal(userg.GoalId);
                                foreach (var us in users_data)
                                {
                                    var user_data = Users_Datas.SingleOrDefault(q => q.ID == us.Id);
                                    if (user_data == null)
                                    {
                                        user_data = new User_Data(us.Id, user_goal, us.Value, us.Date);
                                        Users_Datas.Add(user_data);
                                    }
                                    else
                                    {
                                        user_data.Update(user_goal, us.Value, us.Date);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
            }
            SaveBinaryFormat();
        }