originale view support
This commit is contained in:
@@ -108,7 +108,7 @@ public partial class ErrorPreviewVM:ObservableObject
|
|||||||
ImageAnalysis = null;
|
ImageAnalysis = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
OriginalView= false;
|
||||||
IsNextImageEnabled = imageIndex < _errorsVm.Errors.Count - 1;
|
IsNextImageEnabled = imageIndex < _errorsVm.Errors.Count - 1;
|
||||||
IsPreviousImageEnabled = imageIndex > 0;
|
IsPreviousImageEnabled = imageIndex > 0;
|
||||||
ImageName = _errorData.Title;
|
ImageName = _errorData.Title;
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ namespace VisionBuilder.UI.Common
|
|||||||
|
|
||||||
public bool CanStop => IsRunning;
|
public bool CanStop => IsRunning;
|
||||||
public bool CanStart => !IsRunning && SelectedRecipe!=null;
|
public bool CanStart => !IsRunning && SelectedRecipe!=null;
|
||||||
public bool CanPause => (IsRunning && !IsPaused);
|
public bool CanPause => (IsRunning && !IsPaused)&&_uiConfiguration.ShowPauseButton;
|
||||||
public bool CanResume => (IsRunning && IsPaused);
|
public bool CanResume => (IsRunning && IsPaused) && _uiConfiguration.ShowPauseButton;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,17 @@ namespace VisionBuilder.UI.Windows.Test
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
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,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace Inspectron.HawkEye.View
|
|||||||
btnSwitchView.Primary = false;
|
btnSwitchView.Primary = false;
|
||||||
btnSwitchView.Size = new Size(168, 64);
|
btnSwitchView.Size = new Size(168, 64);
|
||||||
btnSwitchView.TabIndex = 7;
|
btnSwitchView.TabIndex = 7;
|
||||||
btnSwitchView.Text = "Switch view";
|
btnSwitchView.Text = "Show original";
|
||||||
btnSwitchView.UseVisualStyleBackColor = true;
|
btnSwitchView.UseVisualStyleBackColor = true;
|
||||||
btnSwitchView.Click += btnSwitchView_Click;
|
btnSwitchView.Click += btnSwitchView_Click;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ namespace Inspectron.HawkEye.View
|
|||||||
case nameof(ErrorPreviewVM.ImageName):
|
case nameof(ErrorPreviewVM.ImageName):
|
||||||
this.lblErrName.Text = _previewVm.ImageName;
|
this.lblErrName.Text = _previewVm.ImageName;
|
||||||
break;
|
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)
|
private void btnSwitchView_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
_previewVm.SwitchView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user