public void ShowNotification(MyStringId text, int time) { var msg = new ShowNotificationMsg(); msg.Text = text; msg.Time = time; MySession.Static.SyncLayer.SendMessageToAll(ref msg); }
private async void ShowNotification(ShowNotificationMsg obj) { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Dismiss(); if (/*Name == obj.ModuleName || */ true) { Show(obj.Text, obj.Duration); } }); }
static void OnShowNotification(ref ShowNotificationMsg msg, MyNetworkClient sender) { var notification = new MyHudNotification(msg.Text, msg.Time, level: MyNotificationLevel.Important); MyHud.Notifications.Add(notification); }