New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter
|
| | | {
|
| | | /// <summary>
|
| | | /// Loading控件
|
| | | /// </summary>
|
| | | public class LoadingControl : Button
|
| | | {
|
| | | /// <summary>
|
| | | /// 初始化
|
| | | /// </summary>
|
| | | public LoadingControl()
|
| | | {
|
| | | this.Width = HdlControlLogic.Current.GetPictrueRealSize(74);
|
| | | this.Height = HdlControlLogic.Current.GetPictrueRealSize(76);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 开启动画效果
|
| | | /// </summary>
|
| | | public void StartAction()
|
| | | {
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | int index = 1;
|
| | | while (this.Parent != null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(50);
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | this.UnSelectedImagePath = "Loading/" + index + ".png";
|
| | | }, ShowErrorMode.NO);
|
| | | index++;
|
| | | if (index > 32)
|
| | | {
|
| | | index = 1;
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|