private void AddNewStationForm_Shown(object sender, EventArgs e)
        {
            // load radio station categories from json file
            var radioCategories = _radioDb.ReadCategoriesFromFile();

            // fill categories list
            for (int i = 1; i < radioCategories.Count - 1; i++)
            {
                var category = radioCategories[i];
                CategoryList.Items.Add(category.Title);
            }
            CategoryList.SelectedIndex = 0;
        }
Example #2
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            // load radio station categories from json file
            _radioCategories = _radioDb.ReadCategoriesFromFile();
            // fill categories list
            foreach (var category in _radioCategories)
            {
                CategoryList.Items.Add(category.Title);
            }
            CategoryList.SelectedIndex = 0;

            LoadStations();
            _volumeLevel = VolumeBar.Value;

            StationsList.Columns[1].Width = 60;
            StationsList.Columns[0].Width = StationsList.ClientSize.Width - 10 - StationsList.Columns[1].Width;

            // load general program settings
            LoadSettings();
        }