private void SetStatus(NqsSettingItem item, int posistion, Exception error) { if (InvokeRequired) { SetStatusDelegate del = SetStatus; Invoke(del, item, posistion, error); } else { progressBar1.Value = posistion; if (rtbStatus.TextLength == 0) { rtbStatus.AppendText("Batch Results:\r\n"); } if (error == null) { SetMessage(String.Format("Message of type {0} has been stuffed into {1} queue \r\n", item.SelectedTypeName, item.QueueName), Color.Green); } else { SetMessage(String.Format("Error stuffing message of type {0} into {1} queue! \r\n", item.SelectedTypeName, item.QueueName), Color.Red); } } }
public QueueStufferView(IQueueStufferController controller, NqsSettingItem settingItem) { InitializeComponent(); tbMessageTimer.Start(); _assemblyFile = settingItem.AssemblyPath; _controller = controller; _controller.Initialize(this); _controller.GetTypesFromAssembly(settingItem.AssemblyPath, settingItem.SelectedTypeName); tbQueueName.Text = settingItem.QueueName; tbMessage.Text = settingItem.MessageContent; if (settingItem.IsLocked.HasValue && settingItem.IsLocked.Value) { checkLockSelection.CheckState = CheckState.Checked; } SetupTitle(); tbMessage_TextChanged(tbMessage, EventArgs.Empty); }
public QueueStufferView(IQueueStufferController controller, NqsSettingItem settingItem) { InitializeComponent(); tbMessageTimer.Start(); _assemblyFile = settingItem.AssemblyPath; _controller = controller; _controller.Initialize(this); _controller.GetTypesFromAssembly(settingItem.AssemblyPath, settingItem.SelectedTypeName); tbQueueName.Text = settingItem.QueueName; tbMessage.Text = settingItem.MessageContent; if (settingItem.IsLocked.HasValue && settingItem.IsLocked.Value) { checkLockSelection.CheckState = CheckState.Checked; } SetupTitle(); tbMessage_TextChanged(tbMessage, EventArgs.Empty); }
private void SetStatus(NqsSettingItem item, int posistion, Exception error) { if (InvokeRequired) { SetStatusDelegate del = SetStatus; Invoke(del, item, posistion, error); } else { progressBar1.Value = posistion; if (rtbStatus.TextLength == 0) { rtbStatus.AppendText("Batch Results:\r\n"); } if (error == null) { SetMessage(String.Format("Message of type {0} has been stuffed into {1} queue \r\n", item.SelectedTypeName, item.QueueName), Color.Green); } else { SetMessage(String.Format("Error stuffing message of type {0} into {1} queue! \r\n", item.SelectedTypeName, item.QueueName), Color.Red); } } }