Correct progress position and text.

This commit is contained in:
2017-05-17 06:26:20 +01:00
parent 02f68d3e0d
commit 3c5c10f75a
4 changed files with 33 additions and 36 deletions

View File

@@ -110,24 +110,16 @@
</StackLayout>
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<StackLayout Orientation="Horizontal">
<StackLayoutItem HorizontalAlignment="Left">
<Label ID="lblProgress" Visible="False">Progress</Label>
</StackLayoutItem>
<StackLayoutItem Expand="True" HorizontalAlignment="Right">
<ProgressBar ID="prgProgress" Visible="False" />
</StackLayoutItem>
</StackLayout>
<Label ID="lblProgress" Visible="False">Progress</Label>
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<StackLayout Orientation="Horizontal">
<StackLayoutItem HorizontalAlignment="Left">
<Label ID="lblProgress2" Visible="False">Progress2</Label>
</StackLayoutItem>
<StackLayoutItem Expand="True" HorizontalAlignment="Right">
<ProgressBar ID="prgProgress2" Visible="False" />
</StackLayoutItem>
</StackLayout>
<ProgressBar ID="prgProgress" Visible="False" />
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<Label ID="lblProgress2" Visible="False">Progress2</Label>
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<ProgressBar ID="prgProgress2" Visible="False" />
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Center">
<StackLayout Orientation="Horizontal">

View File

@@ -560,7 +560,9 @@ namespace osrepodbmgr.Eto
{
Application.Instance.Invoke(delegate
{
if(!string.IsNullOrWhiteSpace(inner))
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress.Text = string.Format("{0}: {1}", text, inner);
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress.Text = inner;
else
lblProgress.Text = text;
@@ -580,7 +582,9 @@ namespace osrepodbmgr.Eto
{
Application.Instance.Invoke(delegate
{
if(!string.IsNullOrWhiteSpace(inner))
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = string.Format("{0}: {1}", text, inner);
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = inner;
else
lblProgress2.Text = text;
@@ -816,6 +820,7 @@ namespace osrepodbmgr.Eto
Context.dbInfo.mdid[4].ToString(),
Context.dbInfo.mdid) + ".zip");
lblProgress.Visible = false;
prgProgress.Visible = false;
btnClose.Enabled = true;
});

View File

@@ -7,22 +7,18 @@
</GridView>
</GroupBox>
</StackLayoutItem>
<StackLayout Orientation="Horizontal">
<StackLayoutItem Expand="True" HorizontalAlignment="Left">
<Label ID="lblProgress">lblProgress</Label>
</StackLayoutItem>
<StackLayoutItem Expand="True" HorizontalAlignment="Stretch">
<ProgressBar ID="prgProgress" />
</StackLayoutItem>
</StackLayout>
<StackLayout Orientation="Horizontal">
<StackLayoutItem Expand="True" HorizontalAlignment="Left">
<Label ID="lblProgress2" Visible="False">lblProgress2</Label>
</StackLayoutItem>
<StackLayoutItem Expand="True" HorizontalAlignment="Stretch">
<ProgressBar ID="prgProgress2" Visible="False" />
</StackLayoutItem>
</StackLayout>
<StackLayoutItem HorizontalAlignment="Stretch">
<Label ID="lblProgress">lblProgress</Label>
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<ProgressBar ID="prgProgress" />
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<Label ID="lblProgress2" Visible="False">lblProgress2</Label>
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<ProgressBar ID="prgProgress2" Visible="False" />
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Center">
<StackLayout Orientation="Horizontal">
<Button x:Name="btnAdd" Click="OnBtnAddClicked" Visible="False">Add</Button>

View File

@@ -205,7 +205,9 @@ namespace osrepodbmgr.Eto
{
Application.Instance.Invoke(delegate
{
if(!string.IsNullOrWhiteSpace(inner))
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress.Text = string.Format("{0}: {1}", text, inner);
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress.Text = inner;
else
lblProgress.Text = text;
@@ -225,7 +227,9 @@ namespace osrepodbmgr.Eto
{
Application.Instance.Invoke(delegate
{
if(!string.IsNullOrWhiteSpace(inner))
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = string.Format("{0}: {1}", text, inner);
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = inner;
else
lblProgress2.Text = text;