using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace FLY.Thick.FilmCasting.UI.Server
{
    /// <summary>
    /// PgLoading.xaml 的交互逻辑
    /// </summary>
    public partial class PgLoading : Page
    {
        DispatcherTimer timer;
        string msgPre;
        public PgLoading()
        {
            InitializeComponent();
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick += Timer_Tick;
            timer.Start();
            Timer_Tick(null, null);

            msgPre = (string)Application.Current.FindResource("str.PgLoading.Loading");

        }
        int cnt = 0;
        private void Timer_Tick(object sender, EventArgs e)
        {
            string str = "";
            for (int i = 0; i < cnt; i++)
            {
                str += ".";
            }
            message.Text = msgPre + str;
            cnt++;
            if (cnt > 6)
                cnt = 0;
        }
    }
}

