Update SimpleUI version & Add select process dialog.
This commit is contained in:
Vendored
+1
-1
Submodule External/SimpleUI updated: 60614ded85...4fa90941c5
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
#define ORBISLIB_MAJOR 3
|
||||
#define ORBISLIB_MINOR 0
|
||||
#define ORBISLIB_BUILDVERSION 715
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(_DEBUG)
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
#pragma once
|
||||
#define ORBISLIB_MAJOR 3
|
||||
#define ORBISLIB_MINOR 0
|
||||
#define ORBISLIB_BUILDVERSION 717
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(_DEBUG)
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ int main()
|
||||
// Init App install utils.
|
||||
sceAppInstUtilInitialize();
|
||||
|
||||
#define LOADTOOLBOX
|
||||
// #define LOADTOOLBOX
|
||||
#ifdef LOADTOOLBOX
|
||||
auto handle = sys_sdk_proc_prx_load("SceShellUI", "/user/data/Orbis Toolbox/OrbisToolbox-2.0.sprx");
|
||||
if (handle > 0) {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System.Data;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using static SQLite.SQLite3;
|
||||
|
||||
namespace OrbisLib2.Common.Helpers
|
||||
{
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace OrbisLib2.Common.ValueConverters
|
||||
{
|
||||
public class AppIdConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if(value == null || (int)value == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return ((int)value).ToString("X");
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return int.Parse(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<simpleDialogs:SimpleDialog x:Class="OrbisLib2.Dialog.SelectProcess"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:OrbisLib2.Dialog"
|
||||
xmlns:ValueConverters="clr-namespace:OrbisLib2.Common.ValueConverters"
|
||||
xmlns:simpleControls="clr-namespace:SimpleUI.Controls;assembly=SimpleUI"
|
||||
xmlns:simpleDialogs="clr-namespace:SimpleUI.Dialogs;assembly=SimpleUI"
|
||||
mc:Ignorable="d"
|
||||
Title="Select Process" Height="440" Width="455"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
<simpleDialogs:SimpleDialog.Resources>
|
||||
<ValueConverters:AppIdConverter x:Key="AppIdConverter"/>
|
||||
</simpleDialogs:SimpleDialog.Resources>
|
||||
|
||||
<Grid>
|
||||
<!-- Process List -->
|
||||
<ListView Grid.Row="1"
|
||||
Height="343"
|
||||
Width="417"
|
||||
MaxWidth="417"
|
||||
VerticalAlignment="Top"
|
||||
Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
Name="ProcessList"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
||||
AlternationCount="2" Grid.ColumnSpan="2">
|
||||
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="Pid" Width="40" DisplayMemberBinding="{Binding Path=ProcessId}"/>
|
||||
<GridViewColumn Header="AppId" Width="80" DisplayMemberBinding="{Binding Path=AppId, Converter={StaticResource AppIdConverter}}"/>
|
||||
<GridViewColumn Header="Name" Width="200" DisplayMemberBinding="{Binding Path=Name}"/>
|
||||
<GridViewColumn Header="TitleId" Width="80" DisplayMemberBinding="{Binding Path=TitleId}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Refresh" Click="Refresh_Click" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
</simpleDialogs:SimpleDialog>
|
||||
@@ -0,0 +1,57 @@
|
||||
using OrbisLib2.Targets;
|
||||
using SimpleUI.Dialogs;
|
||||
using System.Windows;
|
||||
|
||||
namespace OrbisLib2.Dialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SelectProcess.xaml
|
||||
/// </summary>
|
||||
public partial class SelectProcess : SimpleDialog
|
||||
{
|
||||
public SelectProcess(Window Owner)
|
||||
: base(Owner, "Select", "Cancel", "Select Process")
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Get initial process list.
|
||||
RefreshProcessList();
|
||||
}
|
||||
|
||||
public static SimpleDialogResult ShowDialog(Window Owner)
|
||||
{
|
||||
var dlg = new SelectProcess(Owner);
|
||||
dlg.ShowDialog();
|
||||
return dlg.Result;
|
||||
}
|
||||
|
||||
private void RefreshProcessList()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
var procList = TargetManager.SelectedTarget.Process.GetList();
|
||||
|
||||
if(procList != null && procList.Count > 0)
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
ProcessList.ItemsSource = procList;
|
||||
ProcessList.Items.Refresh();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
ProcessList.ItemsSource = null;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Refresh_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshProcessList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>annotations</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -15,6 +16,12 @@
|
||||
<PackageReference Include="TinyIpc" Version="4.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="SimpleUI">
|
||||
<HintPath>..\..\..\External\SimpleUI\SimpleUI\bin\Debug\net6.0-windows\SimpleUI.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="xcopy /y $(ProjectDir)$(OutDir)$(ProjectName).dll $(SolutionDir)Windows\Executables\" />
|
||||
</Target>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using Limilabs.FTP.Client;
|
||||
using OrbisLib2.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace OrbisLib2.Targets
|
||||
{
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
xmlns:simpleControls="clr-namespace:SimpleUI.Controls;assembly=SimpleUI"
|
||||
xmlns:controls="clr-namespace:OrbisLibraryManager.Controls"
|
||||
mc:Ignorable="d"
|
||||
Title="LibraryManager" Height="640" Width="960"
|
||||
MinHeight="640" MinWidth="960"
|
||||
MaxHeight="640" MaxWidth="960"
|
||||
Title="LibraryManager" Height="640" Width="980"
|
||||
MinHeight="640" MinWidth="980"
|
||||
MaxHeight="640" MaxWidth="980"
|
||||
ResizeMode="CanMinimize">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -24,19 +25,18 @@
|
||||
|
||||
<!-- Menu BG -->
|
||||
<Rectangle Grid.Column="0" Grid.Row="0"
|
||||
Fill="{DynamicResource WindowBar}"/>
|
||||
Fill="{DynamicResource WindowBar}" Grid.ColumnSpan="2"/>
|
||||
|
||||
<!-- Separation bar -->
|
||||
<Rectangle Grid.Column="0" Grid.Row="0"
|
||||
Height="0.5" VerticalAlignment="Top"
|
||||
Fill="{DynamicResource WindowBackground}"/>
|
||||
Fill="{DynamicResource WindowBackground}" Grid.ColumnSpan="2"/>
|
||||
|
||||
<!-- Current Target -->
|
||||
<controls:CurrentTargetDisplay VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
<controls:CurrentTargetDisplay VerticalAlignment="Center" Grid.ColumnSpan="2"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
HorizontalAlignment="Left" Grid.ColumnSpan="2" Margin="582,0,0,0">
|
||||
|
||||
<!-- SPRX Loader -->
|
||||
<StackPanel HorizontalAlignment="Right"
|
||||
@@ -67,13 +67,13 @@
|
||||
Content="Unload"
|
||||
Width="56"
|
||||
Height="25"/>
|
||||
|
||||
|
||||
<simpleControls:SimpleButton Grid.Column="4"
|
||||
Content="Reload"
|
||||
Width="56"
|
||||
Height="25"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -109,7 +109,8 @@
|
||||
Height="25"
|
||||
ToolTip="Attach to new process"
|
||||
ImageSource="/OrbisLibraryManager;component/Images/Attached.png"
|
||||
ImageMargin="1"/>
|
||||
ImageMargin="1"
|
||||
Click="AttachProcess_Click"/>
|
||||
|
||||
<controls:ImageButton x:Name="DetachProcess"
|
||||
Grid.Column="2"
|
||||
@@ -167,7 +168,7 @@
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
Name="LibraryList"
|
||||
AlternationCount="2">
|
||||
AlternationCount="2" Grid.ColumnSpan="2" Margin="13,0,13,0">
|
||||
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
@@ -186,5 +187,5 @@
|
||||
</ListView>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</simpleControls:SimpleWindow>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using OrbisLib2.Common.Dispatcher;
|
||||
using OrbisLib2.Targets;
|
||||
using SimpleUI.Controls;
|
||||
using System.Windows;
|
||||
|
||||
namespace OrbisLibraryManager
|
||||
{
|
||||
@@ -13,5 +15,10 @@ namespace OrbisLibraryManager
|
||||
InitializeComponent();
|
||||
DispatcherClient.Subscribe();
|
||||
}
|
||||
|
||||
private void AttachProcess_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OrbisLib2.Dialog.SelectProcess.ShowDialog(GetWindow(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
2163
|
||||
2176
|
||||
|
||||
@@ -1 +1 @@
|
||||
Version 3.0.2163 Debug Build Tuesday December 27 2022 5:28 PM
|
||||
Version 3.0.2176 Debug Build Friday December 30 2022 12:43 AM
|
||||
|
||||
Reference in New Issue
Block a user