Skip to content

Commit

Permalink
update grid and fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dvgamerr committed Oct 14, 2018
1 parent bbcf862 commit 34d6cea
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
7 changes: 5 additions & 2 deletions PSPlibrary.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2046
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSPlibrary", "PSPlibrary\PSPlibrary.csproj", "{26489E54-096B-404D-9807-BA17D56FC691}"
EndProject
Expand All @@ -25,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FD3F5F58-2017-471A-8C2A-AE431833D549}
EndGlobalSection
EndGlobal
5 changes: 3 additions & 2 deletions PSPlibrary/InitializeStore.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void Show(MainWindow me, Boolean about)

_SyncGame = new BackgroundWorker();
_SyncGame.WorkerReportsProgress = true;
_SyncGame.WorkerSupportsCancellation = false;
_SyncGame.WorkerSupportsCancellation = true;
_SyncGame.DoWork += new DoWorkEventHandler(_SyncGame_DoWork);
_SyncGame.ProgressChanged += new ProgressChangedEventHandler(_SyncGame_ProgressChanged);
_SyncGame.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_SyncGame_RunWorkerCompleted);
Expand Down Expand Up @@ -99,6 +99,7 @@ public static Item GetLibrary(PSPGame isoGame, String dataDirectory, Int32 index
String[] DirectoryName = Path.GetDirectoryName(isoGame.FileName).Split('\\');

Param.DiscID = GameSFO.Param("DISC_ID");
Param.Title = GameSFO.Param("TITLE");
Param.Filename = Path.GetFileName(isoGame.FileName);
Param.Region = Item.GetRegion(GameSFO.Param("DISC_ID"));
Param.Firmware = GameSFO.Param("PSP_SYSTEM_VER");
Expand Down Expand Up @@ -244,7 +245,7 @@ void _SyncGame_DoWork(object sender, DoWorkEventArgs e)
}
}
}
catch
catch (Exception ex)
{
_SyncGame.CancelAsync();
}
Expand Down
1 change: 1 addition & 0 deletions PSPlibrary/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace PSPlibrary
public class Item
{
public string DiscID { get; set; }
public string Title { get; set; }
public string Filename { get; set; }
public string Region { get; set; }
public string Firmware { get; set; }
Expand Down
1 change: 1 addition & 0 deletions PSPlibrary/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
FontSize="11" Width="535" HorizontalAlignment="Left" VerticalAlignment="Top" Height="574" GridLinesVisibility="Vertical" HorizontalGridLinesBrush="#FFD5DFE5" SelectionMode="Single" IsSynchronizedWithCurrentItem="False" IsReadOnly="True" RowDetailsVisibilityMode="Visible">
<DataGrid.Columns>
<DataGridTextColumn x:Name="ColumnDiscID" Binding="{Binding DiscID}" Header="Catalog ID" MinWidth="70" MaxWidth="200" Width="80"/>
<DataGridTextColumn x:Name="ColumnTitle" Binding="{Binding Title}" Header="Title" MinWidth="120" MaxWidth="200" Width="120"/>
<DataGridTextColumn x:Name="ColumnFilename" Binding="{Binding Filename}" Header="Filename" MinWidth="100" MaxWidth="600" Width="240"/>
<DataGridTextColumn x:Name="ColumnRegion" Binding="{Binding Region}" Header="Region" MinWidth="40" MaxWidth="200" Width="60"/>
<DataGridTextColumn x:Name="ColumnFirmware" Binding="{Binding Firmware}" Header="Firmware" MinWidth="60" MaxWidth="200" Width="60"/>
Expand Down
35 changes: 18 additions & 17 deletions PSPlibrary/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using System.Reflection;
using System.Text.RegularExpressions;

namespace PSPlibrary
{
Expand Down Expand Up @@ -300,23 +301,23 @@ private void AboutItem_Click(object sender, RoutedEventArgs e)

private void btnMode_Click(object sender, RoutedEventArgs e)
{
switch (_ConfigDefault.Param("Mode"))
{
case "0":
//btnMode.Content = "Viewer Mode";
//GridEditor.Visibility = Visibility.Visible;
//btnSaveLibrary.Visibility = Visibility.Visible;
//_ConfigDefault.Param("Mode", 1);

break;
case "1":
//btnMode.Content = "Editor Mode";
//GridEditor.Visibility = Visibility.Hidden;
//btnSaveLibrary.Visibility = Visibility.Hidden;
//_ConfigDefault.Param("Mode", 0);
break;
}
this.SelectedDataGame();
//switch (_ConfigDefault.Param("Mode"))
//{
// case "0":
// //btnMode.Content = "Viewer Mode";
// //GridEditor.Visibility = Visibility.Visible;
// //btnSaveLibrary.Visibility = Visibility.Visible;
// //_ConfigDefault.Param("Mode", 1);

// break;
// case "1":
// //btnMode.Content = "Editor Mode";
// //GridEditor.Visibility = Visibility.Hidden;
// //btnSaveLibrary.Visibility = Visibility.Hidden;
// //_ConfigDefault.Param("Mode", 0);
// break;
//}
//this.SelectedDataGame();
}

private void btnSaveLibrary_Click(object sender, RoutedEventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion PSPlibrary/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
-->
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
Expand Down

0 comments on commit 34d6cea

Please sign in to comment.