忙碌进度条

private TMCBusyIndicator()
        {
            InitializeComponent();
        }
        public static object o=new object();
        private static TMCBusyIndicator  instance;
        public static TMCBusyIndicator Instance
        {
            get
            {
                lock (o)
                {
                    if (instance == null)
                    {
                        instance = new TMCBusyIndicator();
                        instance.ShowInTaskbar = false;
                    }
                    return instance;
                }
            }
        }
        public void Start()
        {
            //this.busyIndicator.IsBusy = true;
            this.Dispatcher.BeginInvoke(new Action(() => { ; }));
            this.Visibility = Visibility.Visible;
            this.Show();
           
        }
        public void Stop()
        {
            //this.busyIndicator.IsBusy = false;
            this.Dispatcher.BeginInvoke(new Action(() => { ; }));
            this.Visibility = Visibility.Hidden;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ;
        }
posted @ 2011-12-14 18:07  东风125  阅读(153)  评论(0编辑  收藏  举报