Exemplo n.º 1
0
        public ReplayPage()
        {
            InitializeComponent();
            Download.Visibility = Visibility.Hidden;

            if (!Directory.Exists(Path.Combine(Client.ExecutingDirectory, "cabinet")))
                Directory.CreateDirectory(Path.Combine(Client.ExecutingDirectory, "cabinet"));

            var waitAnimation = new DoubleAnimation(0, TimeSpan.FromSeconds(0.5));
            waitAnimation.Completed +=
                (o, e) => { var showAnimation = new DoubleAnimation(1, TimeSpan.FromSeconds(0.5)); };

            Command.TextChanged += Command_TextChanged;

            #region Register Context

            context = new SerializationContext();

            context.Register(typeof(EndOfReplayGameStats));
            context.Register(typeof(ReplayParticipantStatsSummary));
            context.Register(typeof(ReplayRawStatDTO));

            #endregion Register Context

            UpdateReplays();
        }
        public ReplayPage()
        {
            InitializeComponent();
            Download.Visibility = Visibility.Hidden;

            if (!Directory.Exists("cabinet"))
                Directory.CreateDirectory("cabinet");

            var waitAnimation = new DoubleAnimation(0, TimeSpan.FromSeconds(0.5));
            waitAnimation.Completed += (o, e) =>
            {
                var showAnimation = new DoubleAnimation(1, TimeSpan.FromSeconds(0.5));
                //ReplayGrid.BeginAnimation(Grid.OpacityProperty, showAnimation);
            };
            //ReplayGrid.BeginAnimation(Grid.OpacityProperty, waitAnimation);

            Command.TextChanged += Command_TextChanged;

            #region Register Context
            context = new SerializationContext();

            //Convert replay end of game stats to parsable object
            context.Register(typeof(EndOfGameStats));
            context.Register(typeof(PlayerParticipantStatsSummary));
            context.Register(typeof(RawStatDTO));
            #endregion Register Context

            UpdateReplays();
        }