-
-
Save anonymous/0bc5729ece9b264d3d3f27a32acb7b6d to your computer and use it in GitHub Desktop.
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
public DispatcherTimer _timer; | |
public GeneralWindowViewModel() | |
{ | |
_timer = new DispatcherTimer(DispatcherPriority.Render); | |
_timer.Interval = TimeSpan.FromSeconds(15); | |
_timer.Tick += new EventHandler(timer1_Tick); | |
_timer.Start(); | |
} | |
public void timer1_Tick(object sender, EventArgs e) | |
{ | |
MessengerInstance.Send<NotificationMessage>(new NotificationMessage("fingerprintTimer")); | |
MessengerInstance.Send<NotificationMessage>(new NotificationMessage("RebootFriends")); | |
} | |
MessengerInstance.Register<NotificationMessage>(this, (message) => | |
{ // Checks the actual content of the message. | |
switch (message.Notification) | |
{ | |
case "fingerprintTimer": | |
au = AuthSingleton.Instance.getAuthUser(); | |
friends.Clear(); | |
auxCheckins.Clear(); | |
Friends.Clear(); | |
loadFriends(); | |
break; | |
default: | |
break; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment