public MainWindow() { InitializeComponent(); // Hide modal windows gridEditParams.Visibility = Visibility.Hidden; gridBatchMonitor.Visibility = Visibility.Hidden; // Instantiate the main Manager object MainManager = new Manager(); // Get all libraries from Unifi and display in the libraries combobox MainManager.Libraries = Unifi.GetLibraries(); // Sort the libraries by name MainManager.Libraries.OrderBy(o => o.Name).ToList(); // Add each library to the combobox as items foreach (var library in MainManager.Libraries) { comboLibraries.Items.Add(library); } MainManager.Assets = Asset.GetAssetsFromDb(Connector.InitializeSheet()); }
public MainWindow() { InitializeComponent(); // Hide modal windows gridEditParams.Visibility = Visibility.Hidden; gridBatchMonitor.Visibility = Visibility.Hidden; // Get all libraries from Unifi and display in the libraries combobox var libraries = Unifi.GetLibraries(Secrets.ApiKey); // Sort the libraries by name libraries = libraries.OrderBy(o => o.Name).ToList(); // Add each library to the combobox as items foreach (var library in libraries) { comboLibraries.Items.Add(library); } }