Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Adjusted colour of load elapsed time.
Browse files Browse the repository at this point in the history
  • Loading branch information
KFreon committed May 25, 2017
1 parent b68ce8e commit 4fba314
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions UI_Project/NewMainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@
Visibility="{Binding MergeChannelsPanelOpen, Converter={StaticResource BoolToVisConverter}, ConverterParameter={StaticResource TrueValue}}"/>

<TextBlock x:Name="TitleBlock" Text="{Binding WindowTitle}" Foreground="White" VerticalAlignment="Center" Margin="10,0,0,0" IsHitTestVisible="False" FontSize="22"/>
<TextBlock x:Name="LoadingTimeLabel" Text="{Binding LoadDuration}" Foreground="LightGreen" Margin="10,0,0,0" VerticalAlignment="Center" IsHitTestVisible="False" FontSize="22"/>
</DockPanel>

<!--Loaded Image Box-->
Expand Down
17 changes: 16 additions & 1 deletion UI_Project/NewViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,19 @@ public string WindowTitle
}
}

string loadDuration = "";
public string LoadDuration
{
get
{
return loadDuration;
}
set
{
SetProperty(ref loadDuration, value);
}
}


public string LoadedPath
{
Expand Down Expand Up @@ -1234,7 +1247,8 @@ internal async Task<bool> LoadImage(byte[] data)
}

Trace.WriteLine($"Loading of {LoadedFormat} ({Width}x{Height}, {(MipCount > 1 ? "Mips Present" : "No Mips")}) = {timer.ElapsedMilliseconds}ms.");
WindowTitle = $"Image Engine - View: {timer.ElapsedMilliseconds}ms";
WindowTitle = "Image Engine - View:";
LoadDuration = $"{timer.ElapsedMilliseconds}ms";
timer.Restart();
UpdateLoadedPreview(true);

Expand Down Expand Up @@ -1290,6 +1304,7 @@ void CloseImage(bool updateUI)
SaveAttempted = false;
MipIndex = 0;
WindowTitle = "Image Engine";
LoadDuration = "";
RemoveGeneralAlpha = false; // Other alpha settings not reset because they're specific, but this one spans formats.
BulkProgressValue = 0;
BulkProgressMax = 0;
Expand Down

0 comments on commit 4fba314

Please sign in to comment.