private void setQuickAmis() { fetchQuickAmis(); foreach (CEc2Ami item in _quickAmis) { bool exist = false; foreach (CEc2Ami it in _amis) { if (string.Compare(it.imageId, item.imageId) == 0) { exist = true; break; } } if (exist == false) { _amis.Add(item); } } }
public void getInstances() { try { if (_instances.Count == 0) { CEc2Service serv = new CEc2Service(); List <CEc2Instance> list = serv.describeInstances(); foreach (CEc2Instance inst in list) { _instances.Add(inst); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } _dashboard.Dispatcher.Invoke(new StopProgressbarCallback(_dashboard.disableProgressBar)); this.Dispatcher.Invoke(new SetBorderThickNessCallback(setBorderThickNess)); fectchingInstance = false; }