@Override
  public void ExecuteCommand(UICommand command) {
    super.ExecuteCommand(command);

    if (StringHelper.stringsEqual(command.getName(), "AddHost")) {
      AddHost();
    }
    if (StringHelper.stringsEqual(command.getName(), "OnConfirmPMHost")) {
      OnConfirmPMHost();
    }
    if (StringHelper.stringsEqual(command.getName(), "OnAddHost")) {
      OnAddHost();
    }
    if (StringHelper.stringsEqual(command.getName(), "SelectHost")) {
      SelectHost();
    }
    if (StringHelper.stringsEqual(command.getName(), "OnSelectHost")) {
      OnSelectHost();
    }
    if (StringHelper.stringsEqual(command.getName(), "Cancel")) {
      Cancel();
    }
    if (StringHelper.stringsEqual(command.getName(), "CancelConfirm")) {
      CancelConfirm();
    }
    if (StringHelper.stringsEqual(command.getName(), "CancelConfirmWithFocus")) {
      CancelConfirmWithFocus();
    }
  }
  @Override
  public void ExecuteCommand(UICommand command) {
    super.ExecuteCommand(command);

    if (command == getNewCommand()) {
      New();
    } else if (command == getEditCommand()) {
      Edit();
    } else if (command == getRemoveCommand()) {
      remove();
    } else if (StringHelper.stringsEqual(command.getName(), "OnSave")) {
      OnSave();
    } else if (StringHelper.stringsEqual(command.getName(), "Cancel")) {
      Cancel();
    } else if (StringHelper.stringsEqual(command.getName(), "OnRemove")) {
      OnRemove();
    }
  }
  @Override
  public void ExecuteCommand(UICommand command) {
    super.ExecuteCommand(command);

    if (command == getManageCommand()) {
      Manage();
    } else if (command == getSetAsDisplayCommand()) {
      SetAsDisplay();
    } else if (StringHelper.stringsEqual(command.getName(), "OnManage")) {
      OnManage();
    } else if (StringHelper.stringsEqual(command.getName(), "New")) {
      New();
    } else if (StringHelper.stringsEqual(command.getName(), "OnSave")) {
      OnSave();
    } else if (StringHelper.stringsEqual(command.getName(), "Cancel")) {
      Cancel();
    }
  }
  public void PostGetClusterNetworkList_Edit(java.util.ArrayList<network> network_list) {
    VmNetworkInterface nic = (VmNetworkInterface) getSelectedItem();
    int nicCount = Linq.<VmNetworkInterface>Cast(getItems()).size();
    java.util.ArrayList<network> networks = new java.util.ArrayList<network>();
    for (network a : network_list) {
      if (a.getStatus() == NetworkStatus.Operational) {
        networks.add(a);
      }
    }

    VmInterfaceModel model = (VmInterfaceModel) getWindow();
    model.getNetwork().setItems(networks);
    network network = null;
    for (network a : networks) {
      if (StringHelper.stringsEqual(a.getname(), nic.getNetworkName())) {
        network = a;
        break;
      }
    }
    model.getNetwork().setSelectedItem(network);

    Integer selectedNicType = nic.getType();
    java.util.ArrayList<VmInterfaceType> nicTypes =
        DataProvider.GetNicTypeList(
            getEntityStronglyTyped().getos(),
            VmInterfaceType.forValue(selectedNicType) == VmInterfaceType.rtl8139_pv);
    model.getNicType().setItems(nicTypes);

    if (selectedNicType == null || !nicTypes.contains(VmInterfaceType.forValue(selectedNicType))) {
      selectedNicType = DataProvider.GetDefaultNicType(getEntityStronglyTyped().getos()).getValue();
    }

    model.getNicType().setSelectedItem(VmInterfaceType.forValue(selectedNicType));

    model.getName().setEntity(nic.getName());
    model.getMAC().setIsAvailable(false);

    UICommand tempVar = new UICommand("OnSave", this);
    tempVar.setTitle("OK");
    tempVar.setIsDefault(true);
    model.getCommands().add(tempVar);
    UICommand tempVar2 = new UICommand("Cancel", this);
    tempVar2.setTitle("Cancel");
    tempVar2.setIsCancel(true);
    model.getCommands().add(tempVar2);
  }
예제 #5
0
 public void setGetLUNsFailure(String value) {
   if (!StringHelper.stringsEqual(getLUNsFailure, value)) {
     getLUNsFailure = value;
     OnPropertyChanged(new PropertyChangedEventArgs("GetLUNsFailure"));
   }
 }
예제 #6
0
 public void setParticipantDisks(String value) {
   if (!StringHelper.stringsEqual(participantDisks, value)) {
     participantDisks = value;
     OnPropertyChanged(new PropertyChangedEventArgs("ParticipantDisks"));
   }
 }
예제 #7
0
 public void setApps(String value) {
   if (!StringHelper.stringsEqual(apps, value)) {
     apps = value;
     OnPropertyChanged(new PropertyChangedEventArgs("Apps"));
   }
 }