Example #1
0
 public LoadingHelper(LoadingType type, Window window = null)
 {
     if (type == LoadingType.Circle)
     {
         loading = new Loading(window);
         opened  = true;
     }
     else if (type == LoadingType.Progress)
     {
         thread = new Thread(new ThreadStart(() =>
         {
             loading = new ProgressLoading();
             opened  = true;
             loading.IShowDialog();
         }));
         thread.TrySetApartmentState(ApartmentState.STA);
         thread.Start();
     }
     else
     {
         throw new ArgumentNullException();
     }
 }
Example #2
0
 public void Show()
 {
     loading.IShowDialog();
 }