🚨 捕获异常, 取消崩溃通知
This commit is contained in:
@@ -54,7 +54,7 @@ namespace GeekDesk
|
|||||||
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "严重异常!");
|
LogUtil.WriteErrorLog(e, "严重异常!");
|
||||||
MessageBox.Show("GeekDesk遇到未知问题崩溃!");
|
//MessageBox.Show("GeekDesk遇到未知问题崩溃!");
|
||||||
}
|
}
|
||||||
public static void DoEvents()
|
public static void DoEvents()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="200"></ColumnDefinition>
|
<ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="280"></ColumnDefinition>
|
||||||
<ColumnDefinition x:Name="RightColumn" Width="*"></ColumnDefinition>
|
<ColumnDefinition x:Name="RightColumn" Width="*"></ColumnDefinition>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
<uc:LeftCardControl x:Name="LeftCard" Grid.Row="1" Grid.Column="0"/>
|
<uc:LeftCardControl x:Name="LeftCard" Grid.Row="1" Grid.Column="0"/>
|
||||||
|
|
||||||
<!--分割线-->
|
<!--分割线-->
|
||||||
<GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
|
<GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="5" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
|
||||||
|
|
||||||
<Border x:Name="SearchResContainer" Panel.ZIndex="2"
|
<Border x:Name="SearchResContainer" Panel.ZIndex="2"
|
||||||
Visibility="Collapsed"
|
Visibility="Collapsed"
|
||||||
|
|||||||
@@ -124,11 +124,14 @@ namespace ShowSeconds
|
|||||||
|
|
||||||
private void SecondsHookSetFuc(object sender, MouseEventExtArgs e)
|
private void SecondsHookSetFuc(object sender, MouseEventExtArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (e.Button == System.Windows.Forms.MouseButtons.Left)
|
if (e.Button == System.Windows.Forms.MouseButtons.Left)
|
||||||
{
|
{
|
||||||
if (ScreenUtil.IsPrimaryFullScreen()) return;
|
if (ScreenUtil.IsPrimaryFullScreen()) return;
|
||||||
|
|
||||||
App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
|
App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
int x = e.X;
|
int x = e.X;
|
||||||
int y = e.Y;
|
int y = e.Y;
|
||||||
@@ -209,7 +212,7 @@ namespace ShowSeconds
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BGBorder.Visibility= Visibility.Collapsed;
|
BGBorder.Visibility = Visibility.Collapsed;
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -231,8 +234,11 @@ namespace ShowSeconds
|
|||||||
timer.Stop();
|
timer.Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ namespace GeekDesk.Task
|
|||||||
private static void Check(object source, ElapsedEventArgs e)
|
private static void Check(object source, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
App.Current.Dispatcher.Invoke((Action)(() =>
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (MainWindow.appData.ToDoList.Count > 0)
|
if (MainWindow.appData.ToDoList.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -46,6 +48,8 @@ namespace GeekDesk.Task
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
//ClearMemory();
|
//ClearMemory();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,6 +295,8 @@ namespace GeekDesk.Util
|
|||||||
/// 排序图标
|
/// 排序图标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void SortIconList()
|
public static void SortIconList()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM)
|
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM)
|
||||||
{
|
{
|
||||||
@@ -324,6 +326,9 @@ namespace GeekDesk.Util
|
|||||||
MainWindow.appData.AppConfig.SelectedMenuIcons = MainWindow.appData.MenuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList;
|
MainWindow.appData.AppConfig.SelectedMenuIcons = MainWindow.appData.MenuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ namespace GeekDesk.Util
|
|||||||
private static void RefreshLinkMenuIcon(AppData appData)
|
private static void RefreshLinkMenuIcon(AppData appData)
|
||||||
{
|
{
|
||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
foreach (MenuInfo menuInfo in appData.MenuList)
|
foreach (MenuInfo menuInfo in appData.MenuList)
|
||||||
{
|
{
|
||||||
@@ -128,6 +130,8 @@ namespace GeekDesk.Util
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
}).Start();
|
}).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user