private static void OnWarningException(Exception ex) { Trace.WriteLine($"BUGSNAG Warning Notify: {ex}"); App.Current.Dispatcher.BeginInvoke((Action)(() => { WPFClient.Notify(ex, Severity.Warning); })); }
internal static void Initialize() { AppTrace.Initialize(OnWarningException); try { Application.Current.Exit += (_, __) => _isAppShuttingDown = true; #if DEBUG WPFClient.Config.ApiKey = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\eartrumpet.bugsnag.apikey"); #endif WPFClient.Config.StoreOfflineErrors = true; WPFClient.Config.AppVersion = App.Current.GetVersion().ToString(); WPFClient.Start(); WPFClient.Config.BeforeNotify(OnBeforeNotify); Task.Factory.StartNew(WPFClient.SendStoredReports); } catch (Exception ex) { // No point in AppTrace.LogWarning here because bugsnag is broken. Trace.WriteLine(ex); } }
internal static void Initialize() { AppTraceListener.Initialize(); try { #if DEBUG WPFClient.Config.ApiKey = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\eartrumpet.bugsnag.apikey"); #endif WPFClient.Config.StoreOfflineErrors = true; WPFClient.Config.AppVersion = App.Current.HasIdentity() ? Package.Current.Id.Version.ToVersionString() : "DevInternal"; WPFClient.Start(); WPFClient.Config.BeforeNotify(OnBeforeNotify); Task.Factory.StartNew(WPFClient.SendStoredReports); } catch (Exception ex) { Trace.WriteLine(ex); } }
protected override void OnStartup(StartupEventArgs e) { WPFClient.Start(); base.OnStartup(e); }
public IAsyncResult BeginReceive(WPFClient.SVC.Message msg, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); }
public IAsyncResult BeginIsWritingCallback(WPFClient.SVC.Client client, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); }
public IAsyncResult BeginReceiverFile(WPFClient.SVC.FileMessage fileMsg, WPFClient.SVC.Client receiver, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); }
public void UserLeave(WPFClient.SVC.Client client) { ListBoxItem item = MakeItem(client.AvatarID, "------------ " + client.Name + " left chat ------------"); chatListBoxMsgs.Items.Add(item); ScrollViewer sv = FindVisualChild(chatListBoxMsgs); sv.LineDown(); }
public void ReceiverFile(WPFClient.SVC.FileMessage fileMsg, WPFClient.SVC.Client receiver) { try { FileStream fileStrm = new FileStream(rcvFilesPath + fileMsg.FileName, FileMode.Create, FileAccess.ReadWrite); fileStrm.Write(fileMsg.Data, 0, fileMsg.Data.Length); chatLabelSendFileStatus.Content = "Received file, " + fileMsg.FileName; } catch (Exception ex) { chatLabelSendFileStatus.Content = ex.Message.ToString(); } }
public void IsWritingCallback(WPFClient.SVC.Client client) { if (client == null) { chatLabelWritingMsg.Content = ""; } else { chatLabelWritingMsg.Content += client.Name + " is writing a message.., "; } }
public void ReceiveWhisper(WPFClient.SVC.Message msg, WPFClient.SVC.Client receiver) { foreach (SVC.Client c in this.OnlineClients.Values) { if (c.Name == msg.Sender) { ListBoxItem item = MakeItem(c.AvatarID, msg.Sender + " whispers " + receiver.Name + " : " + msg.Content); chatListBoxMsgs.Items.Add(item); } } ScrollViewer sv = FindVisualChild(chatListBoxMsgs); sv.LineDown(); }
private static void OnWarningException(Exception ex) { Trace.WriteLine($"BUGSNAG Warning Notify: {ex}"); WPFClient.Notify(ex, Severity.Warning); }