public MsgUpdateTreeNode(MessageStatisticsItem message, ProjectParameters parameters) { _message = message; _parameters = parameters; Name = "updatedTreeViewItem1"; Text = string.Empty; SelectedImageKey = ImageKey = @"watch16"; TimerService.Instance.Tick += new EventHandler(Timer_Tick); EventAggregator.Instance.Subscribe <StorageAppEvent>(e1 => { if (e1.Details.DataObjects == DataObjects.ParameterProperty && e1.Details.PropertyDescriptor.Name == PropertyPlus.GetPropertyName(() => e1.Storage.Parameters.TimestampFormat)) { Text = CultureService.Instance.GetString(CultureText.node_Time_Text) + @": "; if (_message.Timestamp != null) { Text += _message.Timestamp.Value.ToString(e1.Storage.Parameters.TimestampFormat, System.Globalization.CultureInfo.InvariantCulture); } else { Text += AppConstants.ValueNotAvailable2; } } }); message.DefaultStateComplete += (o, e) => Timer_Tick(null, EventArgs.Empty); }
public MsgDataTreeNode(MessageStatisticsItem message) { _message = message; Name = "dataTreeViewItem1"; Text = CultureService.Instance.GetString(CultureText.node_Data_Text) + @": " + new DataFrameConverter().ConvertTo(message.Data, typeof(string)); SelectedImageKey = ImageKey = @"data16"; EventAggregator.Instance.Subscribe <StorageAppEvent>(e1 => { if (e1.Details.DataObjects == DataObjects.ParameterProperty && e1.Details.PropertyDescriptor.Name == PropertyPlus.GetPropertyName(() => e1.Storage.Parameters.DataFormat)) { if (message.Data != null) { Text = CultureService.Instance.GetString(CultureText.node_Data_Text) + @": " + new DataFrameConverter().ConvertTo(message.Data, typeof(string)); } else { Text = AppConstants.ValueNotAvailable2; } } }); TimerService.Instance.Tick += new EventHandler(Timer_Tick); message.DefaultStateComplete += (o, e) => Timer_Tick(null, EventArgs.Empty); }
public MsgDeltaMinTimeTreeNode(MessageStatisticsItem message) { _message = message; Name = "deltaMinTimeTreeViewItem1"; Text = @"dtMin: " + (message.DeltaMinTime.HasValue ? message.DeltaMinTime.ToString() : AppConstants.ValueNotAvailable2) + @" ms"; SelectedImageKey = ImageKey = @"stats_min"; TimerService.Instance.Tick += new EventHandler(Timer_Tick); message.DefaultStateComplete += (o, e) => Timer_Tick(null, EventArgs.Empty); }
public MsgPeriodTimeTreeNode(MessageStatisticsItem message, TreeNode[] subNodes) { _messge = message; Text = CultureService.Instance.GetString(CultureText.node_PeriodTime_Text) + @": "; Text += (message.PeriodTime.HasValue ? message.PeriodTime.ToString() : AppConstants.ValueNotAvailable2) + @" ms"; SelectedImageKey = ImageKey = @"l_clock"; Nodes.AddRange(subNodes); TimerService.Instance.Tick += new EventHandler(Timer_Tick); message.DefaultStateComplete += (o, e) => Timer_Tick(null, EventArgs.Empty); }
public MsgCountTreeNode(MessageStatisticsItem message) { _message = message; Name = "countTreeViewItem1"; Text = CultureService.Instance.GetString(CultureText.node_Count_Text) + @": " + message.Count.ToString(); SelectedImageKey = ImageKey = @"counter16"; TimerService.Instance.Tick += new EventHandler(Timer_Tick); message.DefaultStateComplete += (o, e) => Timer_Tick(null, EventArgs.Empty); }
public MsgArbitrationIdTreeNode(MessageStatisticsItem message) { SelectedImageKey = ImageKey = @"id16"; /*Arbitration Id: [{0}]*/ Text = string.Format(CultureService.Instance.GetString(CultureText.node_ArbitrationId_Text), new ArbitrationIdConverter().ConvertTo(message.ArbitrationId, typeof(string))); EventAggregator.Instance.Subscribe <StorageAppEvent>(e1 => { if (e1.Details.DataObjects == DataObjects.ParameterProperty && e1.Details.PropertyDescriptor.Name == PropertyPlus.GetPropertyName(() => e1.Storage.Parameters.ArbitrationIdFormat)) { Text = string.Format(CultureService.Instance.GetString(CultureText.node_ArbitrationId_Text), new ArbitrationIdConverter().ConvertTo(message.ArbitrationId, typeof(string))); } }); }
public MsgNameTreeNode(MessageStatisticsItem message, TreeNode[] subNodes) { Message = message; Name = "nameTreeViewItem1"; Nodes.AddRange(subNodes); SelectedImageKey = ImageKey = @"Mail_16x16"; var arbid = new ArbitrationIdConverter().ConvertTo(message.ArbitrationId, typeof(string)) as string; if (string.IsNullOrEmpty(message.Name)) { /*Message: No Name [{0}]*/ Text = string.Format(CultureService.Instance.GetString(CultureText.node_MessageNoNameArbId_Text), arbid); } else { /*Message: {0} [{1}]*/ Text = string.Format(CultureService.Instance.GetString(CultureText.node_MessageNameArbId_Text), message.Name, arbid); } EventAggregator.Instance.Subscribe <StorageAppEvent>(e1 => { if (e1.Details.DataObjects == DataObjects.ParameterProperty && e1.Details.PropertyDescriptor.Name == PropertyPlus.GetPropertyName(() => e1.Storage.Parameters.ArbitrationIdFormat)) { arbid = new ArbitrationIdConverter().ConvertTo(message.ArbitrationId, typeof(string)) as string; if (string.IsNullOrEmpty(message.Name)) { /*Message: No Name [{0}]*/ Text = string.Format(CultureService.Instance.GetString(CultureText.node_MessageNoNameArbId_Text), arbid); } else { /*Message: {0} [{1}]*/ Text = string.Format(CultureService.Instance.GetString(CultureText.node_MessageNameArbId_Text), message.Name, arbid); } } }); }
public MsgDirectionTreeNode(MessageStatisticsItem message) { Name = "directionTreeViewItem1"; Text = CultureService.Instance.GetString(CultureText.node_Direction_Text) + @": " + message.Direction.ToString(); SelectedImageKey = ImageKey = @"Sync16"; }
public MsgTypeTreeNode(MessageStatisticsItem message) { Name = "typeTreeViewItem1"; Text = CultureService.Instance.GetString(CultureText.node_Type_Text) + @": " + message.Type; SelectedImageKey = ImageKey = @"mail16"; }