public void Remove(CompleteInfo completeInfo) { try { _AdornerLayerManager.Remove(completeInfo.Name); CompleteInfoLinks.Children.Remove(completeInfo.Link); } catch (Exception ex) { _Logger.LogError(ex); } }
public void Add(CompleteInfo completeInfo) { try { AdornerContentPresenter adorner = new AdornerContentPresenter(DisplayArea, completeInfo.Display); _AdornerLayerManager.Add(completeInfo.Name, adorner); _AdornerLayerManager.Show(completeInfo.Name); CompleteInfoLinks.Children.Add(completeInfo.Link); } catch (Exception ex) { _Logger.LogError(ex); } }
public virtual AssemblyDisplays Initialize (Object passedObj) { object[] parameters = (object[])passedObj; Dispatcher dispatcher = (Dispatcher)parameters[0]; string baseDirectory = (string)parameters[1]; ReadSettings(baseDirectory); OpenStatusUpdateServer(); InitializeSubsystemAddress(); // MDM Using the Portal Now // Widget SafetyTruck = new Widget("SafetyTruckDisplay"); Widget SafetyPortal = new Widget("SafetyPortalDisplay"); Widget Reset = new Widget("SafetyReset"); Status status = new Status(); CompleteInfo info = null; dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate() { // MDM Using now the Portal // SafetyTruck.Display = new TruckModel(_WidgetStatusHost, dispatcher); SafetyPortal.Display = new PortalModel(_WidgetStatusHost, dispatcher); Reset.Display = new ResetFaults(dispatcher, _SubsystemAddress); status.ErrorMessages = new ErrorMessages(_WidgetStatusHost, dispatcher); status.Indicator = new Indicator(_WidgetStatusHost, dispatcher); status.WarningMessages = new WarningMessages(_WidgetStatusHost, dispatcher); info = new CompleteInfo("SafetyCompleteInfo", new InfoButton(), new InfoDisplay(dispatcher, _WidgetStatusHost)); })); _AssemblyDisplays.Widgets.Add(SafetyPortal); _AssemblyDisplays.Widgets.Add(Reset); _AssemblyDisplays.Statuses.Add(status); _AssemblyDisplays.CompleteInfos.Add(info); RequestInitialValues(); return _AssemblyDisplays; }
private void RemoveCompleteInfo(CompleteInfo completeInfo) { try { _FrameWork.Remove(completeInfo); } catch (Exception ex) { _Logger.LogError(ex); } }
public virtual AssemblyDisplays Initialize (Object passedObj) { object[] parameters = (object[])passedObj; Dispatcher dispatcher = (Dispatcher)parameters[0]; string baseDirectory = (string)parameters[1]; ReadSettings(baseDirectory); OpenStatusUpdateServer(); InitializeSubsystemAddress(); Status status = new Status(); Widget scanState = new Widget("ScanState"); Widget scanAreaControls = new Widget("ScanAreaControls"); Widget scanTypeControls = new Widget("ScanTypeControls"); CompleteInfo info = null; dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate() { scanState.Display = new ScanState(dispatcher, _WidgetStatusHost); scanAreaControls.Display = new ScanAreaControls(dispatcher, _SubsystemAddress, _WidgetStatusHost); scanTypeControls.Display = new ScanTypeControls(dispatcher, _SubsystemAddress, _WidgetStatusHost); status.ErrorMessages = new ErrorMessages(_WidgetStatusHost, dispatcher); status.Indicator = new Indicator(_WidgetStatusHost, dispatcher); status.WarningMessages = new WarningMessages(_WidgetStatusHost, dispatcher); info = new CompleteInfo("ScanCompleteInfo", new InfoButton(), new InfoDisplay(dispatcher, _WidgetStatusHost)); })); _AssemblyDisplays.Statuses.Add(status); _AssemblyDisplays.Widgets.Add(scanState); _AssemblyDisplays.Widgets.Add(scanAreaControls); _AssemblyDisplays.Widgets.Add(scanTypeControls); _AssemblyDisplays.CompleteInfos.Add(info); RequestInitialValues(); return _AssemblyDisplays; }