You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ConUpdate
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
internal string info = "";
private LogHelper log = new LogHelper();
private void Application_Startup(object sender, StartupEventArgs e)
{
//http://1000my.cn:8080/update/ConUpdate.xml
try
{
if (e.Args.Count() > 0)
{
log.WriteInfoFile("收到" + e.Args[0].ToString());
info = e.Args[0].ToString();
}
}
catch (Exception ex)
{
log.WriteInfoFile(ex.ToString());
}
{
MainWindow win = new MainWindow();
win.Show();
}
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Current.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException);
}
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
}
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception ex = (Exception)e.ExceptionObject;
}
}
}