Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,7 @@ devcert.pfx
*.msix

# GUI app package outputs
/src/winapp-CLI/Identity.GUI.Experimental/AppPackages
/src/winapp-GUI/winapp-GUI/AppPackages
/src/winapp-GUI/winapp-GUI/BundleArtifacts
/src/winapp-GUI/winapp-GUI/Properties/PublishProfiles
/src/winapp-GUI/winapp-GUI/winapp-GUI.csproj
15 changes: 15 additions & 0 deletions docs/gui-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ The Windows Development CLI **must** be in your [PATH](#adding-to-path) for the

Alternatively, you can clone and build this repository. Run Identity.GUI.Experimental in Visual Studio to build and run the app.

## Usage

### .NET apps (WPF, WinForms)

- Drop in an .exe from your binaries folder to add debug identity to it. The app will find the .csproj for the .exe (ie. if your .exe is in the /bin folder, the app will find the parent .csproj and create Assets and appxmanifest in that location). The .exe will be granted app identity via external location (sparse) packaging.
- Drop in a folder, and that app will be packaged into an MSIX

### Python

- This is currently a feature we are experimenting with. Currently, python files/scripts (.py) are supported or entire folders for packaging

### MSIX

- Drop in an MSIX and a cert will be created, installed and registered locally

## Feedback for this Experimental App

Please note that this app is experimental and may have issues as we gather feedback on the functionality, usefulness and value of the UI-based solution. If you see value or issues in this app, please let us know:
Expand Down
43 changes: 43 additions & 0 deletions src/winapp-GUI/winapp-GUI.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36408.4 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winapp-GUI", "winapp-GUI\winapp-GUI.csproj", "{8C1F6AEE-36CD-4871-A2AF-97566468E684}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|ARM64.ActiveCfg = Debug|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|ARM64.Build.0 = Debug|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|ARM64.Deploy.0 = Debug|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x64.ActiveCfg = Debug|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x64.Build.0 = Debug|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x64.Deploy.0 = Debug|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x86.ActiveCfg = Debug|x86
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x86.Build.0 = Debug|x86
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Debug|x86.Deploy.0 = Debug|x86
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|ARM64.ActiveCfg = Release|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|ARM64.Build.0 = Release|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|ARM64.Deploy.0 = Release|ARM64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x64.ActiveCfg = Release|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x64.Build.0 = Release|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x64.Deploy.0 = Release|x64
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x86.ActiveCfg = Release|x86
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x86.Build.0 = Release|x86
{8C1F6AEE-36CD-4871-A2AF-97566468E684}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DAC9315A-1024-4379-BB63-9DD2BB81E2C5}
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions src/winapp-GUI/winapp-GUI/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="winapp_GUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:winapp_GUI"
RequestedTheme="Light">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
</Application.Resources>
</Application>
50 changes: 50 additions & 0 deletions src/winapp-GUI/winapp-GUI/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.UI.Xaml.Shapes;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace winapp_GUI
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
private Window? _window;

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}

/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
_window = new MainWindow();
_window.Activate();
}
}
}
Binary file added src/winapp-GUI/winapp-GUI/Assets/AppIcon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/winapp-GUI/winapp-GUI/Assets/SplashScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/winapp-GUI/winapp-GUI/Assets/StoreLogo.png
Binary file added src/winapp-GUI/winapp-GUI/Assets/Upload.png
23 changes: 23 additions & 0 deletions src/winapp-GUI/winapp-GUI/Controls/CertificatePickerControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<UserControl
x:Class="winapp_GUI.Controls.CertificatePickerControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:winapp_GUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="60" d:DesignWidth="400">
<StackPanel Orientation="Vertical" Margin="0,16,0,16" HorizontalAlignment="Stretch">
<TextBlock x:Name="CertLabel" Text="Certificate File (.pfx, .cer, etc: optional - if no certificate provided one will be created by default)" Margin="0,0,0,4"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="260"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="CertPathBox" Grid.Column="0" PlaceholderText="Select certificate file..." IsReadOnly="True"/>
<Button x:Name="CertBrowseButton" Grid.Column="1" Content="Browse..." Margin="8,0,8,0"/>
<TextBox x:Name="CertPasswordBox" Grid.Column="2" PlaceholderText="password" Text="password" HorizontalAlignment="Stretch"/>
</Grid>
</StackPanel>
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;

namespace winapp_GUI.Controls
{
public sealed partial class CertificatePickerControl : UserControl
{
public CertificatePickerControl()
{
this.InitializeComponent();
}

public string CertificatePath
{
get => CertPathBox.Text;
set => CertPathBox.Text = value;
}

public string CertificatePassword
{
get => CertPasswordBox.Text;
set => CertPasswordBox.Text = value;
}

public event RoutedEventHandler BrowseClicked
{
add { CertBrowseButton.Click += value; }
remove { CertBrowseButton.Click -= value; }
}

public string Label
{
get => CertLabel.Text;
set => CertLabel.Text = value;
}
}
}
16 changes: 16 additions & 0 deletions src/winapp-GUI/winapp-GUI/Controls/FileNamePanelControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<UserControl
x:Class="winapp_GUI.Controls.FileNamePanelControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:winapp_GUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="300">
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Center" Margin="0,4,0,0">
<TextBlock x:Name="FileNameText" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center"/>
<Button x:Name="CancelButton" Width="32" Height="32" Padding="0" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderThickness="0" ToolTipService.ToolTip="Remove file">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="&#xE10A;" VerticalAlignment="Center" HorizontalAlignment="Center"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong fontfamily, should use the resource SymbolThemeFontFamily.

</Button>
</StackPanel>
</UserControl>
26 changes: 26 additions & 0 deletions src/winapp-GUI/winapp-GUI/Controls/FileNamePanelControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;

namespace winapp_GUI.Controls
{
public sealed partial class FileNamePanelControl : UserControl
{
public FileNamePanelControl()
{
this.InitializeComponent();
}

public string FileName
{
get => FileNameText.Text;
set => FileNameText.Text = value;
}

public event RoutedEventHandler CancelClicked
{
add { CancelButton.Click += value; }
remove { CancelButton.Click -= value; }
}
}
}
32 changes: 32 additions & 0 deletions src/winapp-GUI/winapp-GUI/Controls/ProgressPanelControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<UserControl
x:Class="winapp_GUI.Controls.ProgressPanelControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:winapp_GUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="180" d:DesignWidth="400">
<StackPanel>
<TextBlock Text="Progress:" FontSize="14" Margin="0,0,0,0" HorizontalAlignment="Center"/>
<Border Margin="0,8,0,0" Padding="16" CornerRadius="16" VerticalAlignment="Top">
<ScrollViewer x:Name="ProgressScrollViewer" VerticalScrollBarVisibility="Auto">
<ListView x:Name="ProgressItemsControl">
<ListView.ItemTemplate>
<DataTemplate>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to give data type and use x:Bind

<Expander Header="{Binding Title}" HorizontalAlignment="Stretch" Width="Auto">
<ItemsControl ItemsSource="{Binding SubItems}" HorizontalAlignment="Stretch">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" TextWrapping="Wrap"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Expander>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollViewer>
</Border>
</StackPanel>
</UserControl>
21 changes: 21 additions & 0 deletions src/winapp-GUI/winapp-GUI/Controls/ProgressPanelControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System.Collections.ObjectModel;
using winapp_GUI;

namespace winapp_GUI.Controls
{
public sealed partial class ProgressPanelControl : UserControl
{
public ProgressPanelControl()
{
this.InitializeComponent();
}

public ObservableCollection<ProgressCard> ProgressCards
{
get => (ObservableCollection<ProgressCard>)ProgressItemsControl.ItemsSource;
set => ProgressItemsControl.ItemsSource = value;
}
}
}
Loading