/// /// <summary> /// Edit's selected target's settings. /// </summary> public void editTarget() { if (_strTabIndex == "") { return; } string strTarget = _tabInter.getSelectedIP(_strTabIndex); if ((strTarget == "") || (_proInter.checkActiveSingle(_strTabIndex, strTarget) == true)) { return; } else { List <TargetSettings> lstTSettings = _proInter.getTargets(_strTabIndex); TargetSettings oldTs = null; foreach (TargetSettings ts in lstTSettings) { if (ts.TargetServer == strTarget) { oldTs = ts; break; } } frmAddTarget targetDialog = new frmAddTarget(lstTSettings, oldTs); if (targetDialog.ShowDialog() == DialogResult.OK) { _proInter.removeTarget(_strTabIndex); TargetSettings ts = targetDialog.getTargetSettings(); //Fetches target settings from addTargetDialog _proInter.addTarget(_strTabIndex, ts); //Adds target to project } } }
public bool checkIfActive(string strProName, string strTarget) { return(_proInter.checkActiveSingle(strProName, strTarget)); }