public void UpdateData(ObjectInfo objInfo) { deletedLabel.Visible = false; Tag = objInfo; for (int member = 0; member < noMembers; member++) { dataMembers[member].Tag = objInfo; dataMembers[member].SetFieldValues(); } if (objInfo is MessageInfo) { MessageInfo msgInfo = (MessageInfo)objInfo; instanceTextBox.Text = msgInfo.getChannelId().ToString(); } else if (objInfo is ServiceHandlerInfo) { ServiceHandlerInfo serviceInfo = (ServiceHandlerInfo)objInfo; instanceTextBox.Text = serviceInfo.getHandlerId().ToString(); } else if (objInfo is EntityInfo) { EntityInfo entityInfo = (EntityInfo)objInfo; instanceTextBox.Text = entityInfo.getInstanceId().ToString(); } }
private void sendServiceReqLink_Click(object sender, EventArgs e) { if (!MainForm.Instance.CheckConnection()) { return; } if (objectPanel.SetObjectMembers()) { ServiceHandlerInfo srvInfo = (ServiceHandlerInfo)Tag; if (srvInfo.getHandlerId() == null) { srvInfo.setHandlerId(new Safir.Dob.Typesystem.HandlerId()); } MainForm.Instance.ServiceRequest(srvInfo); } }
private void listView_DoubleClick(object sender, EventArgs e) { this.listView.SelectedItems[0].ImageIndex = 1; if (listView.SelectedItems[0].Tag is MessageInfo) { MessageInfo msgInfo = (MessageInfo)listView.SelectedItems[0].Tag; MainForm.Instance.AddTabPage(new ObjectEditTabPage(msgInfo)); } else if (listView.SelectedItems[0].Tag is ServiceHandlerInfo) { ServiceHandlerInfo srvInfo = (ServiceHandlerInfo)listView.SelectedItems[0].Tag; MainForm.Instance.AddTabPage(new ObjectEditTabPage(srvInfo)); } else if (listView.SelectedItems[0].Tag is ResponseInfo) { ResponseInfo replyInfo = (ResponseInfo)listView.SelectedItems[0].Tag; MainForm.Instance.AddTabPage(new ObjectEditTabPage(replyInfo)); } else if (listView.SelectedItems[0].Tag is EntityInfo) { EntityInfo entityInfo = (EntityInfo)listView.SelectedItems[0].Tag; MainForm.Instance.AddTabPage(new ObjectEditTabPage(entityInfo)); } else if (listView.SelectedItems[0].Tag is Safir.Dob.Typesystem.Object) { ObjectInfo objInfo = (ObjectInfo)listView.SelectedItems[0].Tag; MainForm.Instance.AddTabPage(new ObjectEditTabPage(objInfo)); } #if STSYLI else if (listView.SelectedItems[0].Tag is Safir.Dob.Typesystem.ObjectId) { try { MainForm.Instance.Dose.Read((Safir.Dob.Typesystem.ObjectId)listView.SelectedItems[0].Tag); } catch { } } #endif // also invalidate children Invalidate(true); }