private void DoProperty() { string name = GetSelectedItem(); if (string.IsNullOrEmpty(name)) { return; } //object obj = null; string itemName = ""; TransStream ts = ManagementApi.Get(name).Command(QueueCmd.QueueProperty); //var obj = TransStream.ReadValue(ts); var obj = (ts != null) ? ts.ReadValue() : null; //var obj = AgentManager.Queue.Get(name); //RemoteQueue Client = new RemoteQueue(name); //obj = Client; itemName = "RemoteQueue"; if (obj != null) { PropertyForm dlg = new PropertyForm(name);//, obj, itemName); dlg.Text = "Queue Item Property"; dlg.ControlLayout = ControlLayout.Visual; //dlg.FormBorderStyle = FormBorderStyle.FixedDialog; dlg.VGrid.SetDataBinding(obj, itemName); dlg.ShowDialog(); } }
private void ClearAllItem() { string name = GetSelectedItem(); if (MsgBox.ShowQuestion("Clear All items Queue " + name + "?", "Nistec", MessageBoxButtons.YesNo) == DialogResult.Yes) { TransStream ts = ManagementApi.Get(name).Command(QueueCmd.ClearQueue); object val = (ts != null) ? ts.ReadValue() : null; //var val = TransStream.ReadValue(ts); //AgentManager.Queue.ClearAllItems(name); CreateNodeItems(true); } }