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);
            }
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
 protected override void OnStartup(StartupEventArgs e)
 {
     WPFClient.Start();
     base.OnStartup(e);
 }
Beispiel #5
0
 public IAsyncResult BeginReceive(WPFClient.SVC.Message msg, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 public IAsyncResult BeginIsWritingCallback(WPFClient.SVC.Client client, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
 public IAsyncResult BeginReceiverFile(WPFClient.SVC.FileMessage fileMsg, WPFClient.SVC.Client receiver, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }
Beispiel #8
0
 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();
 }
Beispiel #9
0
 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();
     }
 }
Beispiel #10
0
 public void IsWritingCallback(WPFClient.SVC.Client client)
 {
     if (client == null)
     {
         chatLabelWritingMsg.Content = "";
     }
     else
     {
         chatLabelWritingMsg.Content += client.Name + " is writing a message.., ";
     }
 }
Beispiel #11
0
 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);
 }