private void ShowInformation() { if (Parent != null) { int indexStartElem = _treeTask.SelectedNode.Text.IndexOf("(id:"); int indexEndElem = _treeTask.SelectedNode.Text.IndexOf(")", indexStartElem); string id = ""; if (indexStartElem >= 0 && indexEndElem > indexStartElem) { for (int i = indexStartElem + 4; i < indexEndElem; i++) { id += _treeTask.SelectedNode.Text[i]; } } if (id.Trim() != "") { SpooledObject obj = ActiveQLibrary.QueueScheduled.GiveSpooledObject(string.Format("{0}?{1}", _treeTask.SelectedNode.Parent.Text, id)); if (obj != null) { _bDelete.Enabled = true; ActiveQLibrary.Serialization.ConfigTask.Task task = (ActiveQLibrary.Serialization.ConfigTask.Task)obj.Object; this._tbAddress.Text = task.Address; this._tbMethod.Text = task.Method; this._tbDateStart.Text = task.DateStart.ToString(); this._tbDateEnd.Text = task.DateEnd.ToString(); this._tbNextExecution.Text = obj.SendingDate.ToString(); } } } }
private void ShowInformation(string Name) { SpooledObject obj = ActiveQLibrary.QueueStandard.GiveSpooledObject(Name); if (obj != null) { if (_bDelete.Enabled == false) { _bDelete.Enabled = true; } Object message = Activator.CreateInstance(Global.ActiveMailAsm.GetType("ActiveUp.Net.Mail.Message", true)); message = obj.Object; this._tbFrom.Text = message.GetType().GetProperty("From").GetValue(message, null).GetType().GetProperty("Email").GetValue(message.GetType().GetProperty("From").GetValue(message, null), null).ToString(); this._tbTo.Text = message.GetType().GetProperty("To").GetValue(message, null).GetType().GetProperty("Merged").GetValue(message.GetType().GetProperty("To").GetValue(message, null), null).ToString(); this._tbCc.Text = message.GetType().GetProperty("Cc").GetValue(message, null).GetType().GetProperty("Merged").GetValue(message.GetType().GetProperty("Cc").GetValue(message, null), null).ToString(); this._tbBcc.Text = message.GetType().GetProperty("Bcc").GetValue(message, null).GetType().GetProperty("Merged").GetValue(message.GetType().GetProperty("Bcc").GetValue(message, null), null).ToString(); this._tbSubject.Text = message.GetType().GetProperty("Subject").GetValue(message, null).ToString(); this._tbAddedDate.Text = obj.AddedDate.ToString(); } }