Example #1
0
        // Done!
        public void AlterConfiguration()
        {
            if (!Dispatcher.CheckAccess())
            {
                Dispatcher.Invoke(DispatcherPriority.Send, new AlterConfigurationDelegate(this.AlterConfiguration));
                return;
            }

            UserImage.IsEnabled = true;
            Enter.IsEnabled     = true;
            Loader.Visibility   = Visibility.Hidden;

            Loader.BeginStoryboard(LoaderStoryboard.Storyboard);

            ContentHolder.Opacity     = 0;
            ContentHolder.Visibility  = Visibility.Hidden;
            ContactsHolder.Opacity    = 1;
            ContactsHolder.Visibility = Visibility.Visible;

            //int count = 0;

            new Thread(() =>
            {
                AlterConfigurationDelegate call = AlterContacts;
                int time = System.Environment.TickCount;
                while (true)
                {
                    Thread.Sleep(200);
                    if (mc.ContactsSyncronized())
                    {
                        break;
                    }
                }
                this.Dispatcher.BeginInvoke(DispatcherPriority.Send, call);
            }).Start();
        }