Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaexplorer74 committed Sep 11, 2022
1 parent dc43665 commit d4142a7
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ public static DeviceType ConvertToDeviceType(string kind)
default:return DeviceType.Unknown;
}
}

public static string GetStatusMessage(RemoteSystemStatus status,string uniqueId)
{
if(status==RemoteSystemStatus.Available)
//TODO / TEMP : fix status (more statuses needed)
if(1==1)//(status==RemoteSystemStatus.Available)
{
if (DatabaseHelper.Exists(uniqueId))
return "Available".GetLocalized();
Expand All @@ -38,6 +40,8 @@ public static string GetStatusMessage(RemoteSystemStatus status,string uniqueId)
return "Unavailable".GetLocalized();
}
}


public static async Task<RemoteLaunchUriStatus> ExecuteCommand(RemoteSystem remoteSystem,Command comm)
{
if (remoteSystem != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,21 @@ public static async Task<bool> Auth()
{
if(await WindowsHelloAvailableCheckAsync())
{
UserConsentVerificationResult consentResult = await UserConsentVerifier.RequestVerificationAsync("");
UserConsentVerificationResult consentResult = new UserConsentVerificationResult();

try
{
consentResult = await UserConsentVerifier.RequestVerificationAsync("Please verify");
}
catch (Exception ex)
{
Debug.WriteLine("[ex] Exception : " + ex.Message);
await new MessageDialog("Verification failed (Device was not unlocked?)", "Failed").ShowAsync();

// TEMP
return false;// true;
}

if (consentResult != UserConsentVerificationResult.Verified)
{
return false;
Expand Down
31 changes: 28 additions & 3 deletions 05 ProjectRet/ProjectRetMobile/ProjectRet.UWP/Styles/TextBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<Style x:Key="TextBoxStyle" TargetType="TextBox">
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}"/>
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}"/>
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}"/>
<!--Setter Property="Foreground" Value="Azure"/-->
<!--Value="{ThemeResource TextControlForeground}"/-->
<Setter Property="Background" Value="{ThemeResource TextControlBackground}"/>
<Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}"/>
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}"/>
Expand Down Expand Up @@ -64,7 +65,20 @@
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<TextBlock x:Name="GlyphElement" AutomationProperties.AccessibilityView="Raw" FontStyle="Normal" FontFamily="{ThemeResource SymbolThemeFontFamily}" Foreground="{ThemeResource TextControlButtonForeground}" FontSize="12" HorizontalAlignment="Center" Text="&#xE10A;" VerticalAlignment="Center"/>

<!--
Foreground="{ThemeResource TextControlButtonForeground}"
-->
<TextBlock x:Name="GlyphElement"
AutomationProperties.AccessibilityView="Raw"
FontStyle="Normal"
FontFamily="{ThemeResource SymbolThemeFontFamily}"

FontSize="12"
HorizontalAlignment="Center"
Text="&#xE10A;"
VerticalAlignment="Center"
/>
</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down Expand Up @@ -155,7 +169,18 @@
<Border x:Name="BorderElement" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2" Grid.RowSpan="1" Grid.Row="1"/>
<ContentPresenter x:Name="HeaderContentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.ColumnSpan="2" FontWeight="Normal" Foreground="{ThemeResource TextControlHeaderForeground}" Margin="0,0,0,8" Grid.Row="0" TextWrapping="{TemplateBinding TextWrapping}" Visibility="Collapsed" x:DeferLoadStrategy="Lazy"/>
<ScrollViewer x:Name="ContentElement" AutomationProperties.AccessibilityView="Raw" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsTabStop="False" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.Row="1" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" ZoomMode="Disabled"/>
<TextBlock x:Name="PlaceholderTextContentPresenter" Grid.ColumnSpan="2" Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource Mode=TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}" IsHitTestVisible="False" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.Row="1" Text="{TemplateBinding PlaceholderText}" TextWrapping="{TemplateBinding TextWrapping}" TextAlignment="{TemplateBinding TextAlignment}"/>

<!--Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource Mode=TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}" -->
<TextBlock x:Name="PlaceholderTextContentPresenter"
Grid.ColumnSpan="2"

IsHitTestVisible="False"
Margin="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
Grid.Row="1" Text="{TemplateBinding PlaceholderText}"
TextWrapping="{TemplateBinding TextWrapping}"
TextAlignment="{TemplateBinding TextAlignment}"/>

<Button x:Name="DeleteButton" AutomationProperties.AccessibilityView="Raw" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" FontSize="{TemplateBinding FontSize}" IsTabStop="False" MinWidth="34" Margin="{ThemeResource HelperButtonThemePadding}" Grid.Row="1" Style="{StaticResource DeleteButtonStyle}" VerticalAlignment="Stretch" Visibility="Collapsed"/>
</Grid>
</ControlTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync
private RelayCommand<string> _deleteCommand;

/// <summary>
/// Gets the DeleteCommand.
/// Gets the Delete Command.
/// </summary>
public RelayCommand<string> DeleteCommand
{
Expand All @@ -140,7 +140,7 @@ public RelayCommand<string> DeleteCommand
private RelayCommand<DeviceDetails> _shutdownCommand;

/// <summary>
/// Gets the ShutdownCommand.
/// Gets the Shutdown Command.
/// </summary>
public RelayCommand<DeviceDetails> ShutdownCommand
{
Expand Down Expand Up @@ -172,7 +172,7 @@ await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync
private RelayCommand<DeviceDetails> _rebootCommand;

/// <summary>
/// Gets the ShutdownCommand.
/// Gets the Reboot Command.
/// </summary>
public RelayCommand<DeviceDetails> RebootCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,21 @@
<Button.Content>
<StackPanel Orientation="Horizontal">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE7E8;" />
<TextBlock x:Uid="ShutdownBtn" Text="Shutdown" Margin="4,0,0,0"></TextBlock>

<!-- Text="Shutdown" -->
<TextBlock x:Uid="ShutdownBtn"

Margin="4,0,0,0"></TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Reboot_Btn" Margin="0,0,8,0" Height="40" Width="120" Foreground="White" Background="#00cc6a" Visibility="{Binding ShowCommandButton}" IsEnabled="{Binding IsEnabled}" Command="{Binding RebootCommand,Source={Binding MainViewModel, Source={StaticResource Locator}}}" CommandParameter="{Binding Details}">
<Button.Content>
<StackPanel Orientation="Horizontal">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE72C;" />
<TextBlock x:Uid="RestartBtn" Text="Restart" Margin="4,0,0,0"></TextBlock>

<!--Text="Restart"-->
<TextBlock x:Uid="RestartBtn" Margin="4,0,0,0"></TextBlock>
</StackPanel>
</Button.Content>
</Button>
Expand Down

0 comments on commit d4142a7

Please sign in to comment.