Fix crash adding first target.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace OrbisLib2.Common.Database
|
||||
db.CreateTable<TargetInfo>();
|
||||
|
||||
_Info = db.Find<TargetInfo>(x => x.TargetId == Id);
|
||||
if (_Info == null)
|
||||
if (_Info == null && Id != 0)
|
||||
{
|
||||
_Info = new TargetInfo();
|
||||
_Info.TargetId = Id;
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
InputDescription="Shows the Title number of the games on the home screen of this target.">
|
||||
<simpleControls:SimpleSwitch Tag="ShowTitleIdLabels"
|
||||
Height="17"
|
||||
Loaded="ShowTitleIdLabels_Loaded"
|
||||
IsEnabled="False"
|
||||
MouseDown="ShowTitleIdLabels_MouseDown"/>
|
||||
</controls:InputPanel>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
InputDescription="Shows the devkit information display panel that will show some information about the target like the IP Address.">
|
||||
<simpleControls:SimpleSwitch Tag="ShowDevkitPanel"
|
||||
Height="17"
|
||||
Loaded="ShowDevkitPanel_Loaded"
|
||||
IsEnabled="False"
|
||||
MouseDown="ShowDevkitPanel_MouseDown"/>
|
||||
</controls:InputPanel>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
InputDescription="Shows a shortcut on the Home screen that can be used to quickly access the Orbis Toolbox menu.">
|
||||
<simpleControls:SimpleSwitch Tag="ShowToolboxShortcut"
|
||||
Height="17"
|
||||
Loaded="ShowToolboxShortcut_Loaded"
|
||||
IsEnabled="False"
|
||||
MouseDown="ShowToolboxShortcut_MouseDown"/>
|
||||
</controls:InputPanel>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
InputDescription="Shows the '★APP_HOME' on the home screen that can be used to quickly launch home brew to debug it with out a pkg.">
|
||||
<simpleControls:SimpleSwitch Tag="ShowAppHome"
|
||||
Height="17"
|
||||
Loaded="ShowAppHome_Loaded"
|
||||
IsEnabled="False"
|
||||
MouseDown="ShowAppHome_MouseDown"/>
|
||||
</controls:InputPanel>
|
||||
|
||||
|
||||
@@ -88,49 +88,24 @@ namespace OrbisNeighborHood.MVVM.View.SubView
|
||||
|
||||
#region Target Settings
|
||||
|
||||
private void ShowTitleIdLabels_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
Switch.IsToggled = _newTarget.Info.ShowTitleId;
|
||||
|
||||
}
|
||||
|
||||
private void ShowTitleIdLabels_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
_newTarget.Info.ShowTitleId = Switch.IsToggled;
|
||||
}
|
||||
|
||||
private void ShowDevkitPanel_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
Switch.IsToggled = _newTarget.Info.ShowDevkitPanel;
|
||||
}
|
||||
|
||||
private void ShowDevkitPanel_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
_newTarget.Info.ShowDevkitPanel = Switch.IsToggled;
|
||||
}
|
||||
|
||||
private void ShowToolboxShortcut_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
Switch.IsToggled = _newTarget.Info.ShowToolboxShortcut;
|
||||
}
|
||||
|
||||
private void ShowToolboxShortcut_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
_newTarget.Info.ShowToolboxShortcut = Switch.IsToggled;
|
||||
}
|
||||
|
||||
private void ShowAppHome_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
Switch.IsToggled = _newTarget.Info.ShowAppHome;
|
||||
}
|
||||
|
||||
private void ShowAppHome_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var Switch = (SimpleSwitch)sender;
|
||||
|
||||
@@ -1 +1 @@
|
||||
2636
|
||||
2642
|
||||
|
||||
@@ -1 +1 @@
|
||||
Version 3.0.2636 Release Build Friday February 17 2023 7:35 PM
|
||||
Version 3.0.2642 Debug Build Friday February 17 2023 10:08 PM
|
||||
|
||||
Reference in New Issue
Block a user