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(); } }
public void Show() { loading.IShowDialog(); }