private void configApplication() { try { //Create event log and database trace listeners try { ArgixTrace.AddListener(new DBTraceListener((LogLevel)App.Config.TraceLevel, App.Mediator, App.USP_TRACE, App.EventLogName)); } catch { ArgixTrace.AddListener(new DBTraceListener(LogLevel.Debug, App.Mediator, App.USP_TRACE, App.EventLogName)); } ArgixTrace.WriteLine(new TraceMessage(App.Version, App.Product, LogLevel.Information, "App Started")); //Create business objects with configuration values App.Mediator.DataStatusUpdate += new DataStatusHandler(OnDataStatusUpdate); StationOperator.ScanSize = App.Config.ScanSize; StationOperator.LabelTypeOverrideRegular = App.Config.LabelOverrideRegular; StationOperator.LabelTypeOverrideReturns = App.Config.LabelOverrideReturn; StationOperator.ValidateLane = App.Config.ValidateLane; StationOperator.ValidateSmallLane = App.Config.ValidateSmallLane; Carton.LanePrefix = App.Config.LanePrefix; this.mStationOperator = new StationOperator(); this.mStationOperator.AssignmentChanged += new EventHandler(this.OnAssignmentChanged); this.mStationOperator.CartonCreated += new CartonEventHandler(OnCartonCreated); this.mStationOperator.CartonDeleted += new CartonEventHandler(OnCartonDeleted); this.mStationOperator.Station.PrinterChanged += new EventHandler(this.OnPrinterChanged); } catch (ApplicationException ex) { throw ex; } catch (Exception ex) { throw new ApplicationException("Configuration Failure", ex); } }
private System.ComponentModel.Container components = null; //Required designer variable #endregion //Interface public dlgCartonDelete(StationOperator stationOperator) { //Constructor InitializeComponent(); //Initialize members this.mStationOperator = stationOperator; this.mStationOperator.CartonDeleted += new CartonEventHandler(OnCartonDeleted); }