/// <summary> /// Indică apăsarea butonului pentru confirmarea noii valori. /// Preia informatia completata, apeleaza callback-ul specificat si inchide fereastra. /// </summary> private void btnOK_Click(object sender, EventArgs e) { string newValue = txbNewValue.Text.Trim(); if (newValue == String.Empty ) { MessageBox.Show("New value must be set", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if ( value == newValue ) { MessageBox.Show("Value is the same", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } ValueUpdateEventArgs args = new ValueUpdateEventArgs(newValue); valueUpdated(this, args); this.Dispose(); }
/// <summary> /// Callback-ul apelat după completarea noii valori in UpdateForm. /// Modifica valoarea pe serverul UDDI si in lista de ontologii. /// </summary> void updateForm_ValueUpdated(object sender, ValueUpdateEventArgs e) { GetTModelDetail getTModelDetail = new GetTModelDetail(((OntInfo)selectedItem.Tag).tModelKey); TModelDetail tModelDetail = getTModelDetail.Send(uddiConnection); TModel tModel = tModelDetail.TModels[0]; tModel.OverviewDoc.OverviewUrl = e.NewValue; SaveTModel saveTModel = new SaveTModel(tModel); saveTModel.Send(uddiConnection); selectedItem.SubItems[2].Text = e.NewValue; }
/// <summary> /// Callback-ul apelat după completarea noii valori in UpdateForm. /// Modifica valoarea pe serverul UDDI si in lista de servicii. /// </summary> void updateForm_ValueUpdated(object sender, ValueUpdateEventArgs e) { GetBindingDetail getBindingDetail = new GetBindingDetail(((WSInfo)selectedItem.Tag).bindingKey); BindingDetail bindingDetail = getBindingDetail.Send(uddiConnection); BindingTemplate bindingTemplate = bindingDetail.BindingTemplates[0]; bindingTemplate.AccessPoint.Text = e.NewValue; SaveBinding saveBinding = new SaveBinding(bindingTemplate); saveBinding.Send(uddiConnection); selectedItem.SubItems[4].Text = e.NewValue; }