using System;
using System.Windows.Controls;
using System.Windows.Threading;

namespace FLY.FilmCasting.AutoDie.UI.Server
{
    /// <summary>
    /// PgLoading.xaml 的交互逻辑
    /// </summary>
    public partial class PgLoading : Page
    {
        DispatcherTimer timer;
        public PgLoading()
        {
            InitializeComponent();
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick += Timer_Tick;
            timer.Start();
            Timer_Tick(null, null);
        }
        int cnt = 0;
        private void Timer_Tick(object sender, EventArgs e)
        {
            string str = "";
            for (int i = 0; i < cnt; i++)
            {
                str += ".";
            }
            message.Text = "初始化中" + str;
            cnt++;
            if (cnt > 6)
                cnt = 0;
        }
    }
}
