originale view support

This commit is contained in:
EugeneTes
2026-02-13 07:58:54 +01:00
parent 51fe29e5e5
commit 216d9d4316
5 changed files with 19 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ public partial class ErrorPreviewVM:ObservableObject
ImageAnalysis = null;
return;
}
OriginalView= false;
IsNextImageEnabled = imageIndex < _errorsVm.Errors.Count - 1;
IsPreviousImageEnabled = imageIndex > 0;
ImageName = _errorData.Title;

View File

@@ -57,8 +57,8 @@ namespace VisionBuilder.UI.Common
public bool CanStop => IsRunning;
public bool CanStart => !IsRunning && SelectedRecipe!=null;
public bool CanPause => (IsRunning && !IsPaused);
public bool CanResume => (IsRunning && IsPaused);
public bool CanPause => (IsRunning && !IsPaused)&&_uiConfiguration.ShowPauseButton;
public bool CanResume => (IsRunning && IsPaused) && _uiConfiguration.ShowPauseButton;

View File

@@ -33,6 +33,17 @@ namespace VisionBuilder.UI.Windows.Test
[STAThread]
static void Main(string[] args)
{
//AppDomain.CurrentDomain.FirstChanceException += (sender, e) =>
//{
// if (e.Exception.Message.Contains("timed out"))
// {
// File.AppendAllText("timeout_log.txt",
// $"[{DateTime.Now:O}] {e.Exception.GetType().FullName}: {e.Exception.Message}\n" +
// $"{e.Exception.StackTrace}\n" +
// $"--- Inner: {e.Exception.InnerException}\n\n");
// }
//};
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();

View File

@@ -150,7 +150,7 @@ namespace Inspectron.HawkEye.View
btnSwitchView.Primary = false;
btnSwitchView.Size = new Size(168, 64);
btnSwitchView.TabIndex = 7;
btnSwitchView.Text = "Switch view";
btnSwitchView.Text = "Show original";
btnSwitchView.UseVisualStyleBackColor = true;
btnSwitchView.Click += btnSwitchView_Click;
//

View File

@@ -44,7 +44,9 @@ namespace Inspectron.HawkEye.View
case nameof(ErrorPreviewVM.ImageName):
this.lblErrName.Text = _previewVm.ImageName;
break;
case nameof(ErrorPreviewVM.OriginalView):
btnSwitchView.Text = _previewVm.OriginalView ? "Show Analysis" : "Show Original";
break;
}
}
@@ -75,7 +77,7 @@ namespace Inspectron.HawkEye.View
private void btnSwitchView_Click(object sender, EventArgs e)
{
_previewVm.SwitchView();
}
}
}