Пример #1
0
        private void OpenStatistic_Click(object sender, RoutedEventArgs e)
        {
            if (Height < Settings.fieldHeight + 200)
            {
                Height = Settings.fieldHeight + 200;
            }

            Binding binding = new Binding();

            binding.StringFormat = Languages.Statistic.PeacStatistic + "{0}";
            binding.Path         = new PropertyPath("allTimePeacCounter");
            Peac.SetBinding(TextBlock.TextProperty, binding);

            binding = new Binding();
            binding.StringFormat = Languages.Statistic.EvilStatistic + "{0}";
            binding.Path         = new PropertyPath("allTimeEvilCounter");
            Evil.SetBinding(TextBlock.TextProperty, binding);

            binding = new Binding();
            binding.StringFormat = Languages.Statistic.MaxSpeedStatistic + "{0}";
            binding.Path         = new PropertyPath("maxSpeed");
            MaxSpeed.SetBinding(TextBlock.TextProperty, binding);

            binding = new Binding();
            binding.StringFormat = Languages.Statistic.MaxRotationSpeedStatistic + "{0}";
            binding.Path         = new PropertyPath("maxRotationSpeed");
            MaxRotationSpeed.SetBinding(TextBlock.TextProperty, binding);

            binding = new Binding();
            binding.StringFormat = Languages.Statistic.MaxMaxHealSpeedStatistic + "{0}";
            binding.Path         = new PropertyPath("maxMaxHeal");
            MaxMaxHealSpeed.SetBinding(TextBlock.TextProperty, binding);

            binding = new Binding();
            binding.StringFormat = Languages.Statistic.MaxMaxAgeSpeedStatistic + "{0}";
            binding.Path         = new PropertyPath("maxMaxAge");
            MaxMaxAgeSpeed.SetBinding(TextBlock.TextProperty, binding);
        }