private void uiThread_ComponentDeSerializationFailed(long componentId, string componentTypeName)
 {
     if (WinFormsHelper.ShowMessageBox("A component [id " + componentId.ToString() + ", type " + componentTypeName + "] has failed on deserialization or initialization, " + System.Environment.NewLine + "would you like to remove it?",
                                       "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.Yes)
     {
         _platform.RemovePersistedComponentById(componentId);
     }
 }
Пример #2
0
 private void toolStripButtonRemoveAdapter_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem item in listViewIntegrations.SelectedItems)
     {
         IIntegrationAdapter adapter = (IIntegrationAdapter)item.Tag;
         if (WinFormsHelper.ShowMessageBox(string.Format("Remove adapter [{0}]?", adapter.Name), string.Empty, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
         {
             Operator.Adapters.Remove(adapter);
         }
     }
 }