private async Task SetupOperationLookup() { var proxy = new AnraServiceProxy(USS_SERVER); try { Cursor.Current = Cursors.WaitCursor; operations = await proxy.GetOperations(); cmbOperation.DataSource = operations; cmbOperation.DisplayMember = "Gufi"; cmbOperation.SelectedIndex = -1; //if (simulators != null && simulators.Any()) //{ // foreach (var item in simulators) item.RefreshOperationLookup(operations); //} } catch (Exception ex) { MessageBox.Show("Unable to connect to the remote server. Please check config.", "Anra USS Client Proxy", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } finally { Cursor.Current = Cursors.Default; } }
private async Task SetupUssInstanceLookup() { var proxy = new AnraServiceProxy(USS_SERVER); try { Cursor.Current = Cursors.WaitCursor; ussInstanceLookupItems = await proxy.GetUssInstances(); //cmbUssInstance.DataSource = ussInstanceLookupItems; //cmbUssInstance.DisplayMember = "Name"; //cmbUssInstance.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show("Unable to connect to the remote server. Please check config.", "Anra USS Client Proxy", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } finally { Cursor.Current = Cursors.Default; } }