public RobotWrapper() { Evo = new EVOAPILib.SystemClass(); Evo.ErrorEvent += delegate(DateTime StartTime, DateTime EndTime, string Device, string Macro, string Object, string Message, short Status, string ProcessName, int ProcessID, string MacroID) { string Title = string.Format("Error from Evo:StartTime={0} EndTime={1} Device={2} Macro={3} Object={4} Message={5} Status={6} ProcessName={7} ProcessID={8} MacroID={9}", StartTime, EndTime, Device, Macro, Object, Message, Status, ProcessName, ProcessID, MacroID); if (Status==11) { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation","RobotWrapper",Title,LoggingEntery.EnteryTypes.Debug)); } else if (Status==5) { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation","RobotWrapper",Title,LoggingEntery.EnteryTypes.Warning)); } else { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation","RobotWrapper",Title,LoggingEntery.EnteryTypes.Error)); } }; Evo.StatusChanged += delegate(SC_Status Status) { string Title = string.Format("Status From Evo:{0}" , Status); Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation","RobotWrapper",Title,LoggingEntery.EnteryTypes.Debug)); }; // Evo.UserPromptEvent += delegate(int ID, string Text, string Caption, int Choices, out int Answer) // { // myLogger.Add(string.Format("****UserPromptEvent: ID={0} Text={1} Caption={2} Choices={3}", ID, Text, Caption, Choices)); // Answer = 0; // }; RobotSamplingRate = Convert.ToInt32(ConfigurationManager.AppSettings["RobotSamplelingRate"]); if (RobotSamplingRate == 0) { throw new NullReferenceException("AppSettings RobotSamplelingRate is null"); } }
public RobotWrapper() { Evo = new EVOAPILib.SystemClass(); Evo.ErrorEvent += delegate(DateTime StartTime, DateTime EndTime, string Device, string Macro, string Object, string Message, short Status, string ProcessName, int ProcessID, string MacroID) { string Title = string.Format("Error from Evo:StartTime={0} EndTime={1} Device={2} Macro={3} Object={4} Message={5} Status={6} ProcessName={7} ProcessID={8} MacroID={9}", StartTime, EndTime, Device, Macro, Object, Message, Status, ProcessName, ProcessID, MacroID); if (Status == 11) { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation", "RobotWrapper", Title, LoggingEntery.EnteryTypes.Debug)); } else if (Status == 5) { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation", "RobotWrapper", Title, LoggingEntery.EnteryTypes.Warning)); } else { Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation", "RobotWrapper", Title, LoggingEntery.EnteryTypes.Error)); } }; Evo.StatusChanged += delegate(SC_Status Status) { string Title = string.Format("Status From Evo:{0}", Status); Log.LogEntery(new LoggingEntery("OctoTipPlus Appilcation", "RobotWrapper", Title, LoggingEntery.EnteryTypes.Debug)); }; // Evo.UserPromptEvent += delegate(int ID, string Text, string Caption, int Choices, out int Answer) // { // myLogger.Add(string.Format("****UserPromptEvent: ID={0} Text={1} Caption={2} Choices={3}", ID, Text, Caption, Choices)); // Answer = 0; // }; RobotSamplingRate = Convert.ToInt32(ConfigurationManager.AppSettings["RobotSamplelingRate"]); if (RobotSamplingRate == 0) { throw new NullReferenceException("AppSettings RobotSamplelingRate is null"); } }