Last active
December 22, 2015 18:59
-
-
Save natelowry/6516693 to your computer and use it in GitHub Desktop.
Snippets from https://github.com/natelowry/DynamicSplashScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Imaging; | |
using System.Windows.Shapes; | |
namespace DynamicSplashScreen | |
{ | |
/// <summary> | |
/// Interaction logic for SplashScreenWindow.xaml | |
/// </summary> | |
public partial class AnimatedSplashScreenWindow : Window, ISplashScreen | |
{ | |
public AnimatedSplashScreenWindow() | |
{ | |
InitializeComponent(); | |
} | |
public void AddMessage(string message) | |
{ | |
Dispatcher.Invoke((Action)delegate() | |
{ | |
this.UpdateMessageTextBox.Text = message; | |
}); | |
} | |
public void LoadComplete() | |
{ | |
Dispatcher.InvokeShutdown(); | |
} | |
} | |
public interface ISplashScreen | |
{ | |
void AddMessage(string message); | |
void LoadComplete(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment