Fix ACTIVE error management
Fix tool table cancel buttons Removed deleted button in edit
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Step.Model;
|
||||
using Step.Model.DTOModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -32,7 +31,7 @@ namespace Step.UI
|
||||
//End the update
|
||||
LISTThreadStatus.EndUpdate();
|
||||
|
||||
if(NcConfig != null && NcConfig.NcVendor != null)
|
||||
if (NcConfig != null && NcConfig.NcVendor != null)
|
||||
TXTType.Text = NcConfig.NcVendor;
|
||||
|
||||
InitializeMessageListeners();
|
||||
@@ -40,8 +39,7 @@ namespace Step.UI
|
||||
MessageServices.Current.Subscribe(SHOW_MSG_UI, (a, b) =>
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { Focus(); MessageBox.Show(a.ToString()); });
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private static ServerControlWindow ctrlwindow = null;
|
||||
@@ -135,23 +133,42 @@ namespace Step.UI
|
||||
private void InitializeMessageListeners()
|
||||
{
|
||||
MVVMListeners = new List<RegistrationInfo>
|
||||
{
|
||||
{
|
||||
MessageServices.Current.Subscribe(SEND_MESSAGE, (a, b) =>
|
||||
{
|
||||
// Cast object to ErrorMessageModel
|
||||
ErrorMessageModel message = (ErrorMessageModel)a;
|
||||
// If error has a fatal level, icon must be error
|
||||
message.ErrorLevel = message.ErrorLevel > (int)ERROR_LEVEL.ERROR ? (int)ERROR_LEVEL.ERROR : message.ErrorLevel;
|
||||
{
|
||||
// Cast object to ErrorMessageModel
|
||||
ErrorMessageModel message = (ErrorMessageModel)a;
|
||||
|
||||
if(message.ErrorLevel <= ERROR_LEVEL.ERROR)
|
||||
{
|
||||
// If error has a fatal level, icon must be error
|
||||
message.ErrorLevel = message.ErrorLevel > ERROR_LEVEL.ERROR ? ERROR_LEVEL.ERROR : message.ErrorLevel;
|
||||
|
||||
if (!this.IsDisposed)
|
||||
this.Invoke((MethodInvoker)delegate ()
|
||||
{
|
||||
// Open BalloonTip with data
|
||||
StepNotifyIcon.ShowBalloonTip(1000, message.Title, message.Message, (ToolTipIcon)message.ErrorLevel);
|
||||
if (!this.IsDisposed)
|
||||
this.Invoke((MethodInvoker)delegate ()
|
||||
{
|
||||
// Open BalloonTip with data
|
||||
StepNotifyIcon.ShowBalloonTip(1000, message.Title, message.Message, (ToolTipIcon)message.ErrorLevel);
|
||||
|
||||
//ShowMessage on UI
|
||||
TXTstatus.Text = "[" + DateTime.Now.ToString("T") + "] " + message.Message;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this.IsDisposed)
|
||||
this.Invoke((MethodInvoker)delegate ()
|
||||
{
|
||||
// Open BalloonTip with data
|
||||
StepNotifyIcon.ShowBalloonTip(1000, message.Title, message.Message, (ToolTipIcon.Error));
|
||||
|
||||
//ShowMessage on UI
|
||||
TXTstatus.Text = "[" + DateTime.Now.ToString("T") + "] " + message.Message;
|
||||
});
|
||||
//ShowMessage on UI
|
||||
TXTstatus.Text = "[" + DateTime.Now.ToString("T") + "] " + message.Message;
|
||||
});
|
||||
// Notify user
|
||||
if(MessageBox.Show(message.Message, message.Title, MessageBoxButtons.OK, MessageBoxIcon.Error) == DialogResult.OK)
|
||||
MessageServices.Current.Publish(SEND_STOP_SERVER);
|
||||
}
|
||||
}),
|
||||
// NC status handler
|
||||
MessageServices.Current.Subscribe(SEND_NC_STATUS, (a, b) =>
|
||||
@@ -225,7 +242,7 @@ namespace Step.UI
|
||||
private static bool ClientIsRunning()
|
||||
{
|
||||
Process[] p = Process.GetProcessesByName(CLIENT_EXE_NAME_NOEXT);
|
||||
if (p.Length>0)
|
||||
if (p.Length > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user