Skip to content

Commit 0f091d2

Browse files
committed
*
1 parent 2dbab30 commit 0f091d2

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

SmartImage.UI/MainWindow.xaml.cs

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -764,16 +764,6 @@ public void Dispose(bool full)
764764

765765
#endregion
766766

767-
private void ChangeStatus2(ResultItem ri)
768-
{
769-
if (ri is UniResultItem { Uni: { } } uri) {
770-
Tb_Status2.Text = uri.Description;
771-
}
772-
else {
773-
Tb_Status2.Text = $"{ri.Name}";
774-
}
775-
}
776-
777767
#region
778768

779769
private async Task DownloadResultAsync(UniResultItem uri)
@@ -967,6 +957,8 @@ private async void RetryEngineAsync(ResultItem ri)
967957

968958
#endregion
969959

960+
#region
961+
970962
public static readonly string[] Args = Environment.GetCommandLineArgs();
971963

972964
public static readonly Dictionary<string, Func<ResultItem, string?>> SearchFields = new()
@@ -1028,6 +1020,20 @@ private void ParseArgs(string[] args)
10281020

10291021
}
10301022

1023+
#endregion
1024+
1025+
private void ChangeStatus2(ResultItem ri)
1026+
{
1027+
if (ri is UniResultItem { Uni: { } } uri) {
1028+
Tb_Status2.Text = uri.Description;
1029+
}
1030+
else {
1031+
Tb_Status2.Text = $"{ri.Name}";
1032+
}
1033+
}
1034+
1035+
#region
1036+
10311037
private void Log(LogEntry l)
10321038
{
10331039
Logs.Add(l);
@@ -1036,6 +1042,8 @@ private void Log(LogEntry l)
10361042

10371043
public ObservableCollection<LogEntry> Logs { get; }
10381044

1045+
#endregion
1046+
10391047
private async void CheckForUpdate()
10401048
{
10411049
var cv = AppUtil.Version;
@@ -1072,6 +1080,8 @@ private void OnPropertyChanged([CallerMemberName] string? propertyName = null)
10721080
10731081
public event PreviewChangedCallback? PreviewChanged;*/
10741082

1083+
#region
1084+
10751085
private void UpdatePreview(ResultItem ri)
10761086
{
10771087
/*if (ri.Load()) {
@@ -1080,12 +1090,14 @@ private void UpdatePreview(ResultItem ri)
10801090

10811091
Application.Current.Dispatcher.InvokeAsync(() =>
10821092
{
1083-
10841093
if (ri.LoadImage()) {
10851094
Img_Preview.Source = ri.Image;
10861095
// Debug.WriteLine($"updated image {ri.Image}");
10871096
// PreviewChanged?.Invoke(ri);
10881097
}
1098+
else {
1099+
Img_Preview.Source = m_image;
1100+
}
10891101
});
10901102
}
10911103

@@ -1099,6 +1111,8 @@ private void UpdatePreview(ImageSource x)
10991111
});
11001112
}
11011113

1114+
#endregion
1115+
11021116
private void OnPipeReceived(string s)
11031117
{
11041118
Dispatcher.Invoke(() =>

0 commit comments

Comments
 (0)