Fix build errors
This commit is contained in:
parent
3a9833697d
commit
17b36580b3
3 changed files with 35 additions and 50 deletions
|
|
@ -84,24 +84,6 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
private Stopwatch totalDrawTime = new Stopwatch();
|
||||
|
||||
private const int RaygunMaxNotifications = 15;
|
||||
|
||||
private static int raygunNotificationCount = 0;
|
||||
|
||||
private static RaygunClient _raygunClient = GetCorrectClient();
|
||||
|
||||
private static RaygunClient GetCorrectClient()
|
||||
{
|
||||
if (AggContext.OperatingSystem == OSType.Mac)
|
||||
{
|
||||
return new RaygunClient("qmMBpKy3OSTJj83+tkO7BQ=="); // this is the Mac key
|
||||
}
|
||||
else
|
||||
{
|
||||
return new RaygunClient("hQIlyUUZRGPyXVXbI6l1dA=="); // this is the PC key
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsLoading { get; private set; } = true;
|
||||
|
||||
public static void RequestPowerShutDown()
|
||||
|
|
@ -332,23 +314,6 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
private bool dropWasOnChild = true;
|
||||
|
||||
public enum ReportSeverity2 { Warning, Error }
|
||||
|
||||
public void ReportException(Exception e, string key = "", string value = "", ReportSeverity2 warningLevel = ReportSeverity2.Warning)
|
||||
{
|
||||
// Conditionally spin up error reporting if not on the Stable channel
|
||||
string channel = UserSettings.Instance.get(UserSettingsKey.UpdateFeedType);
|
||||
if (string.IsNullOrEmpty(channel) || channel != "release" || OemSettings.Instance.WindowTitleExtra == "Experimental")
|
||||
{
|
||||
#if !DEBUG
|
||||
if (raygunNotificationCount++ < RaygunMaxNotifications)
|
||||
{
|
||||
_raygunClient.Send(e);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private EventHandler unregisterEvent;
|
||||
|
||||
public static MatterControlApplication Instance
|
||||
|
|
|
|||
48
Program.cs
48
Program.cs
|
|
@ -8,25 +8,22 @@ using System.Threading.Tasks;
|
|||
using System.Windows.Forms;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.SettingsManagement;
|
||||
using Mindscape.Raygun4Net;
|
||||
using MatterHackers.Agg.Platform;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
|
||||
// ** Standard Winforms Main ** //
|
||||
//[STAThread]
|
||||
//static void Main()
|
||||
//{
|
||||
// Application.EnableVisualStyles();
|
||||
// Application.SetCompatibleTextRenderingDefault(false);
|
||||
// Application.Run(new Form1());
|
||||
//}
|
||||
private const int RaygunMaxNotifications = 15;
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
private static int raygunNotificationCount = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
|
||||
|
|
@ -69,5 +66,28 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private static RaygunClient _raygunClient = GetCorrectClient();
|
||||
|
||||
private static RaygunClient GetCorrectClient()
|
||||
{
|
||||
if (AggContext.OperatingSystem == OSType.Mac)
|
||||
{
|
||||
return new RaygunClient("qmMBpKy3OSTJj83+tkO7BQ=="); // this is the Mac key
|
||||
}
|
||||
else
|
||||
{
|
||||
return new RaygunClient("hQIlyUUZRGPyXVXbI6l1dA=="); // this is the PC key
|
||||
}
|
||||
}
|
||||
|
||||
// ** Standard Winforms Main ** //
|
||||
//[STAThread]
|
||||
//static void Main()
|
||||
//{
|
||||
// Application.EnableVisualStyles();
|
||||
// Application.SetCompatibleTextRenderingDefault(false);
|
||||
// Application.Run(new Form1());
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MatterControlApplication.Instance.ReportException(e);
|
||||
System.Diagnostics.Trace.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
return request;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue