|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Windows;
|
|
|
|
|
|
namespace GummingCommon
|
|
|
{
|
|
|
public enum ResopnseType
|
|
|
{
|
|
|
TableViewSelected
|
|
|
}
|
|
|
public enum KeyType
|
|
|
{
|
|
|
VK_LEFT,
|
|
|
VK_UP,
|
|
|
VK_RIGHT,
|
|
|
VK_DOWN,
|
|
|
VK_LEFTUP,
|
|
|
VK_UPUP,
|
|
|
VK_RIGHTUP,
|
|
|
VK_DOWNUP,
|
|
|
VK_ADD,
|
|
|
UnCheck
|
|
|
}
|
|
|
|
|
|
public enum FromType
|
|
|
{
|
|
|
Null,
|
|
|
System,
|
|
|
User
|
|
|
}
|
|
|
|
|
|
|
|
|
public enum CaptureType
|
|
|
{
|
|
|
Initialize,
|
|
|
AdjustFromControl,
|
|
|
AdjustFromCamera,
|
|
|
TpStart,
|
|
|
TpStartUp,
|
|
|
TpWidth,
|
|
|
TpType,
|
|
|
TpColorCode,
|
|
|
RemoveAll,
|
|
|
SetGraph,
|
|
|
RemoveGraph,
|
|
|
RefreshImage,
|
|
|
RefreshStandard,
|
|
|
RefreshMeridian,
|
|
|
ApplicationExit,
|
|
|
PutImageAutoParameter,
|
|
|
}
|
|
|
|
|
|
public enum CallbackType
|
|
|
{
|
|
|
Debug = 0,
|
|
|
StartProcessing = 1,
|
|
|
InProcessing = 2,
|
|
|
EndProcess = 3,
|
|
|
EvaluationCancel = 4,
|
|
|
EvaluationNext = 5,
|
|
|
PushAppWarnLog,
|
|
|
PushAppErrorLog,
|
|
|
CloseDialogView,
|
|
|
CloseWindow,
|
|
|
ShowDialogView,
|
|
|
PreviousView,
|
|
|
PatternView,
|
|
|
PatternManage,
|
|
|
ControlView,
|
|
|
QuitGumming,
|
|
|
ControlViewRefresh,
|
|
|
ControlViewJustBack,
|
|
|
ControlViewReloadParameters,
|
|
|
KeyPressThreadStop,
|
|
|
CutTest,
|
|
|
|
|
|
PrintSettingCancel,
|
|
|
ImageCancel,
|
|
|
|
|
|
HomePageCreate,
|
|
|
HoemPageList,
|
|
|
TestEditSave,
|
|
|
TestEditCancel,
|
|
|
TestEditScan,
|
|
|
TestEditAnalysis,
|
|
|
TestEditDelete,
|
|
|
|
|
|
TestRecordScan,
|
|
|
TestRecordCancel,
|
|
|
TestRecordEdit,
|
|
|
|
|
|
TabReportCancel,
|
|
|
TabReportPrintView,
|
|
|
TabReportSave,
|
|
|
TabReportAnalysis,
|
|
|
TabMeridian,
|
|
|
TabMeridianCancel,
|
|
|
TabAnalysisEvaluation,
|
|
|
|
|
|
CameraCreateNew,
|
|
|
CameraAnalysis,
|
|
|
CameraCancel,
|
|
|
|
|
|
AnalysisCancel,
|
|
|
AnalysisScan,
|
|
|
|
|
|
//<2F>¼<EFBFBD>
|
|
|
Formula,
|
|
|
AddErrMsg,
|
|
|
Robot
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// This method enumerates keys to indicate Custom MessageBox DialogState
|
|
|
/// </summary>
|
|
|
public enum DialogState
|
|
|
{
|
|
|
Ok = 0,
|
|
|
No = 1,
|
|
|
Cancel = 2,
|
|
|
YestoAll = 3,
|
|
|
CancelX = 4,
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Available Icon options.
|
|
|
/// Abstracted to allow some level of UI Agnosticness
|
|
|
/// </summary>
|
|
|
public enum CustomDialogIcons
|
|
|
{
|
|
|
None,
|
|
|
Information,
|
|
|
Question,
|
|
|
Exclamation,
|
|
|
Stop,
|
|
|
Warning,
|
|
|
Error,
|
|
|
OK
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public enum ColumnType
|
|
|
{
|
|
|
Default,
|
|
|
Hide,
|
|
|
}
|
|
|
|
|
|
public enum Severity
|
|
|
{
|
|
|
None,
|
|
|
Error,
|
|
|
Warning,
|
|
|
RedWarning,
|
|
|
NotSupported,
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Common MessageBoxService interface
|
|
|
/// </summary>
|
|
|
public interface IMessageBoxService
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// Gets or sets the state of the dialog.
|
|
|
/// </summary>
|
|
|
/// <value>The state of the dialog.</value>
|
|
|
DialogState DialogState { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the value of the CanMuchOpened.
|
|
|
/// </summary>
|
|
|
bool CanMuchOpened { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the value of the Topmost
|
|
|
/// </summary>
|
|
|
bool Topmost { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Shows an error message
|
|
|
/// </summary>
|
|
|
/// <param name="message">The error message</param>
|
|
|
void ShowError(string message, Window owner);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Shows an error message
|
|
|
/// </summary>
|
|
|
/// <param name="message">The error message</param>
|
|
|
void ShowError(string message);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Shows an information message
|
|
|
/// </summary>
|
|
|
/// <param name="message">The information message</param>
|
|
|
void ShowInformation(string message);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Shows an warning message
|
|
|
/// </summary>
|
|
|
/// <param name="message">The warning message</param>
|
|
|
void ShowWarning(string message);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Shows an Successful message
|
|
|
/// </summary>
|
|
|
/// <param name="message">The Success Message</param>
|
|
|
void ShowSuccess(string message);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Displays a Yes/No dialog and returns the user input.
|
|
|
/// </summary>
|
|
|
/// <param name="message">The message to be displayed.</param>
|
|
|
/// <param name="icon">The icon to be displayed.</param>
|
|
|
/// <returns>User selection.</returns>
|
|
|
void ShowYesNo(string message, CustomDialogIcons icon);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Displays a Yes/No/Cancel dialog and returns the user input.
|
|
|
/// </summary>
|
|
|
/// <param name="message">The message to be displayed.</param>
|
|
|
/// <param name="icon">The icon to be displayed.</param>
|
|
|
/// <returns>User selection.</returns>
|
|
|
void ShowYesNoCancel(string message, CustomDialogIcons icon);
|
|
|
|
|
|
/// <summary>
|
|
|
/// Displays a OK/Cancel dialog and returns the user input.
|
|
|
/// </summary>
|
|
|
/// <param name="message">The message to be displayed.</param>
|
|
|
/// <param name="icon">The icon to be displayed.</param>
|
|
|
/// <returns>User selection.</returns>
|
|
|
void ShowOkCancel(string message, CustomDialogIcons icon);
|
|
|
|
|
|
IMessageBoxService New();
|
|
|
|
|
|
bool ShowInTaskBar { get; set; }
|
|
|
|
|
|
bool IsKeepInProcessVisibility { get; set; }
|
|
|
}
|
|
|
|
|
|
public class ColumnViewModel : ViewModelBase
|
|
|
{
|
|
|
public ColumnType Type { get; private set; }
|
|
|
public int ColumnIndex { get; set; }
|
|
|
public string ColumnName { get; private set; }
|
|
|
public string DisplayName { get; private set; }
|
|
|
public int ColumnWidth { get; set; }
|
|
|
|
|
|
public ColumnViewModel(ColumnType columnType, string displayName, string columnName, int columnIndex, int columnWidth)
|
|
|
{
|
|
|
Type = columnType;
|
|
|
ColumnIndex = columnIndex;
|
|
|
DisplayName = displayName;
|
|
|
ColumnName = columnName;
|
|
|
ColumnWidth = columnWidth;
|
|
|
}
|
|
|
}
|
|
|
}
|