Skip to content

Commit

Permalink
2.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-saplin committed Aug 24, 2019
1 parent 0410de1 commit c50b213
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 66 deletions.
94 changes: 47 additions & 47 deletions CrossPlatformDiskTest.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Saplin.CPDT.UICore", "Sapli
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saplin.CPDT.Android", "Saplin.CPDT.Android\Saplin.CPDT.Android.csproj", "{6A84BA8D-A85D-4293-BC21-EE856012ADA3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saplin.CPDT.iOS", "Saplin.CPDT.iOS\Saplin.CPDT.iOS.csproj", "{AADDB830-469D-451D-B441-74A2D71038D4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saplin.CPDT.Mac", "Saplin.CPDT.Mac\Saplin.CPDT.Mac.csproj", "{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saplin.CPDT.WPF", "Saplin.CPDT.WPF\Saplin.CPDT.WPF.csproj", "{C55F73EA-53AE-4E86-A6E3-B86517288BB6}"
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Saplin.CPDT.iOS", "Saplin.CPDT.iOS\Saplin.CPDT.iOS.csproj", "{FCED8895-B93F-48FC-B1EF-F130B68B7D12}"
EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Saplin.CPDT.WPF", "Saplin.CPDT.WPF\Saplin.CPDT.WPF.csproj", "{E392BCEF-CE6F-4710-A657-9A562AA07CDB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -76,30 +76,6 @@ Global
{6A84BA8D-A85D-4293-BC21-EE856012ADA3}.Release|x64.Build.0 = Release|Any CPU
{6A84BA8D-A85D-4293-BC21-EE856012ADA3}.Release|x86.ActiveCfg = Release|Any CPU
{6A84BA8D-A85D-4293-BC21-EE856012ADA3}.Release|x86.Build.0 = Release|Any CPU
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|ARM.Build.0 = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|iPhone.ActiveCfg = Debug|iPhone
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|iPhone.Build.0 = Debug|iPhone
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|x64.Build.0 = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Debug|x86.Build.0 = Debug|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|ARM.Build.0 = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|iPhone.ActiveCfg = Release|iPhone
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|iPhone.Build.0 = Release|iPhone
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|x64.ActiveCfg = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|x64.Build.0 = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|x86.ActiveCfg = Release|iPhoneSimulator
{AADDB830-469D-451D-B441-74A2D71038D4}.Release|x86.Build.0 = Release|iPhoneSimulator
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -120,26 +96,50 @@ Global
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Release|x64.Build.0 = Release|Any CPU
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Release|x86.ActiveCfg = Release|Any CPU
{E73EDEA1-DF38-40F4-A3D9-82C3EC186008}.Release|x86.Build.0 = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|ARM.Build.0 = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|x64.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|x64.Build.0 = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|x86.ActiveCfg = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Debug|x86.Build.0 = Debug|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|Any CPU.Build.0 = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|ARM.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|ARM.Build.0 = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|iPhone.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|x64.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|x64.Build.0 = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|x86.ActiveCfg = Release|Any CPU
{C55F73EA-53AE-4E86-A6E3-B86517288BB6}.Release|x86.Build.0 = Release|Any CPU
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|ARM.Build.0 = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|iPhone.ActiveCfg = Debug|iPhone
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|iPhone.Build.0 = Debug|iPhone
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|x64.Build.0 = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Debug|x86.Build.0 = Debug|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|ARM.Build.0 = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|iPhone.ActiveCfg = Release|iPhone
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|iPhone.Build.0 = Release|iPhone
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|x64.ActiveCfg = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|x64.Build.0 = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|x86.ActiveCfg = Release|iPhoneSimulator
{FCED8895-B93F-48FC-B1EF-F130B68B7D12}.Release|x86.Build.0 = Release|iPhoneSimulator
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|ARM.Build.0 = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|x64.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|x64.Build.0 = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|x86.ActiveCfg = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Debug|x86.Build.0 = Debug|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|Any CPU.Build.0 = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|ARM.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|ARM.Build.0 = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|iPhone.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|x64.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|x64.Build.0 = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|x86.ActiveCfg = Release|Any CPU
{E392BCEF-CE6F-4710-A657-9A562AA07CDB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
18 changes: 18 additions & 0 deletions Saplin.CPDT.Android/AndroidHooks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Android.Content;
using Saplin.CPDT.UICore;
using Xamarin.Forms;

[assembly: Dependency(typeof(Saplin.CPDT.Droid.AndroidHooks))]
namespace Saplin.CPDT.Droid
{
class AndroidHooks : IPlatformHooks
{
public void MinimizeApp()
{
Intent home = new Intent(Intent.ActionMain);
home.AddCategory(Intent.CategoryHome);
home.SetFlags(ActivityFlags.NewTask);
MainActivity.Instance.StartActivity(home);
}
}
}
2 changes: 1 addition & 1 deletion Saplin.CPDT.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="23" android:versionName="2.2.6" package="com.Saplin.CPDT" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="24" android:versionName="2.2.7" package="com.Saplin.CPDT" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:label="Cross Platform Disk Test" android:icon="@mipmap/ic_launcher" android:largeHeap="true"></application>
Expand Down
5 changes: 2 additions & 3 deletions Saplin.CPDT.Android/Saplin.CPDT.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<IntermediateOutputPath>Tmp</IntermediateOutputPath>
<AndroidCreatePackagePerAbi>true</AndroidCreatePackagePerAbi>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidAapt2LinkExtraArgs>--no-version-vectors -c en-rUS</AndroidAapt2LinkExtraArgs>
<AndroidLinkSkip>Saplin.CPDT.UICore;Saplin.CPDT.UICore.resources;Saplin.StorageSpeedMeter;CPDT.Extra.Android;</AndroidLinkSkip>
Expand All @@ -64,12 +64,10 @@
<HintPath Condition="'$(Configuration)'=='Debug'">..\..\CPDT.Extra.git\CPDT.Extra.Android\bin\Debug\CPDT.Extra.Android.dll</HintPath>
<HintPath Condition="'$(Configuration)'=='Release'">..\References\CPDT.Extra.Android.dll</HintPath>
</Reference>

<Reference Include="CPDT.Extra">
<HintPath Condition="'$(Configuration)'=='Debug'">..\..\CPDT.Extra.git\CPDT.Extra\bin\Debug\netstandard2.0\CPDT.Extra.dll</HintPath>
<HintPath Condition="'$(Configuration)'=='Release'">..\References\CPDT.Extra.dll</HintPath>
</Reference>

<Reference Include="System" />
</ItemGroup>
<ItemGroup>
Expand All @@ -78,6 +76,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AndroidHooks.cs" />
<Compile Include="FreeMemory.cs" />
<Compile Include="KeepScreenOn.cs" />
<Compile Include="MainActivity.cs" />
Expand Down
7 changes: 7 additions & 0 deletions Saplin.CPDT.UICore/Misc/IPlatformHooks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Saplin.CPDT.UICore
{
public interface IPlatformHooks
{
void MinimizeApp();
}
}
20 changes: 20 additions & 0 deletions Saplin.CPDT.UICore/ViewModels/NavigationViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,26 @@ public bool IsStatusVisible
}
}

public bool IsDbVisible
{
get
{
return ViewModelContainer.ResultsDbViewModel.IsVisible;
}
}

public bool IsHomePage
{
get
{
if (ViewModelContainer.DriveTestViewModel.TestStarted) return false;
if (IsAnyPopupVisible) return false;
if (IsDbVisible) return false;

return true;
}
}

private ICommand showOptions = new Command(() => { ViewModelContainer.OptionsViewModel.DoShow(null); ViewModelContainer.ResultsDbViewModel.SendPageHit("showOptions"); });

public ICommand ShowOptions
Expand Down
23 changes: 23 additions & 0 deletions Saplin.CPDT.UICore/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,34 @@ public void CloseAplication()
}
}

bool clickedfOnceBeforeMinimization = false;

protected override bool OnBackButtonPressed()
{
if (ViewModelContainer.ResultsDbViewModel.IsVisible) ViewModelContainer.ResultsDbViewModel.IsVisible = false;
else OnKeyPressed((char)27, SysKeys.Esc);


if (ViewModelContainer.NavigationViewModel.IsHomePage)
{
if (!ViewModelContainer.NavigationViewModel.IsSimpleUI)
{
ViewModelContainer.NavigationViewModel.IsSimpleUI = true;
}
else if (!clickedfOnceBeforeMinimization)
{
clickedfOnceBeforeMinimization = true;
}
else
{
clickedfOnceBeforeMinimization = false;

var ph = DependencyService.Get<IPlatformHooks>();

try { ph?.MinimizeApp(); } catch { }
}
}

return true;
}

Expand Down
23 changes: 19 additions & 4 deletions Saplin.CPDT.UICore/Views/TestCompletion.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,23 @@
AbsoluteLayout.LayoutBounds="0.5, 0.75"
AbsoluteLayout.LayoutFlags="PositionProportional"
Orientation="Vertical"
BackgroundColor="#33999999" WidthRequest="240" HeightRequest="30">
<Label x:Name="testProgressLabel" WidthRequest="240" Margin="0, 0, 0, -3" HorizontalOptions="CenterAndExpand" HorizontalTextAlignment="Center" />
<BoxView x:Name="progressBox" Color="White" HeightRequest="2" WidthRequest="240" TranslationX="-240" HorizontalOptions="Start"/>

Spacing="0"
BackgroundColor="#33999999" WidthRequest="230" HeightRequest="30">
<Label x:Name="testProgressLabel" WidthRequest="230" HeightRequest="29" HorizontalOptions="CenterAndExpand" HorizontalTextAlignment="Center" VerticalTextAlignment="Center">
<Label.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WPF" Value="0, 0, 0, 0"/>
<On Platform="macOS" Value="0, 0, 0, 0"/>
<On Platform="Android, iOS" Value="0, 0, 0, 0" />
</OnPlatform>
</Label.Margin>
</Label>
<BoxView x:Name="progressBox" HeightRequest="1" WidthRequest="0" HorizontalOptions="Start" VerticalOptions="End">
<BoxView.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WPF, macOS" Value="0, 0, 0, 0"/>
<On Platform="Android, iOS" Value="0, 0, 0, 0" />
</OnPlatform>
</BoxView.Margin>
</BoxView>
</StackLayout>
19 changes: 9 additions & 10 deletions Saplin.CPDT.UICore/Views/TestCompletion.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public TestCompletion()
{
InitializeComponent();


progressBox.Color = testProgressLabel.TextColor;
}

bool animationStarted = false;
string[] animationSeq = {"/", "-", "\\", "|"};
int curAnimIndex = 0;
const int progressWidth = 240;
const int progressWidth = 230;

protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
Expand All @@ -30,6 +30,8 @@ protected override void OnPropertyChanged([CallerMemberName] string propertyName
if (IsVisible)
{
animationStarted = true;
testProgressLabel.Text = " ";
progressBox.WidthRequest = 0;
Device.StartTimer(TimeSpan.FromMilliseconds(450),
() =>
{
Expand All @@ -47,21 +49,20 @@ protected override void OnPropertyChanged([CallerMemberName] string propertyName
totalTests);

var curPercent = ((float)(curTest - 1) / totalTests) * 100 + (float)progress / totalTests;
//if (curTest == totalTests) curTest = 100;
//if (accumPercent < curPercent && --spiner < 0) accumPercent = curPercent;

var totalPercent = string.Format(ViewModelContainer.L11n.TestTotal, curPercent);

testProgressLabel.Text = testNum + " " + animationSeq[curAnimIndex] + " " + totalPercent;
testProgressLabel.Text = testNum + " " + animationSeq[curAnimIndex] + " " + totalPercent;

if (curAnimIndex % 3 == 0)
progressBox.TranslateTo(progressWidth*curPercent/100 - progressWidth, 0, 600);
if (curAnimIndex % 3 == 0 || curPercent >=99)
new Animation(val => progressBox.WidthRequest = val, progressBox.WidthRequest, progressWidth * curPercent / 100, Easing.Linear)
.Commit(progressBox, "p", 32, 600);

return true;
}

testProgressLabel.Text = " ";
progressBox.TranslationX = -progressWidth;
progressBox.WidthRequest = 0;

return false;
}
Expand All @@ -70,8 +71,6 @@ protected override void OnPropertyChanged([CallerMemberName] string propertyName
else
{
animationStarted = false;
testProgressLabel.Text = " ";
progressBox.TranslationX = -progressWidth;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Saplin.CPDT.UICore/Views/TestResultsNarrow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@
</ctrl2:TimeSeriesGraph>

<ctrl2:HistogramGraph VerticalOptions="CenterAndExpand" Results="{Binding RecentResults}" Trigger="{Binding ProgressPercent}" BinsNumber="12" IsVisible="{Binding ShowHistogram}"
Color="{StaticResource DefaultColor}" Grid.Column="2" HeightRequest="38" CacheId="{Binding RandTestCounterForHistogramCache}">
Color="{StaticResource DefaultColor}" Grid.Column="2" HeightRequest="38" CacheId="{Binding RandTestCounterForHistogramCache}"
ModeH="{Binding ModeH, Mode=OneWayToSource}" ModeHPercent="{Binding ModeHPercent, Mode=OneWayToSource}">
<ctrl2:HistogramGraph.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="macOS, WPF" Value="4, 2, 4, 2"/>
Expand Down

0 comments on commit c50b213

Please sign in to comment.