예제 #1
0
 public void ReloadStationsAndData()
 {
     _radioDb = new RadioDb(_dataFilePath, _categoryListFilePath);
     LoadStations();
 }
예제 #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            _dataFilePath = AppDomain.CurrentDomain.BaseDirectory + "\\stations.json";
            _categoryListFilePath = AppDomain.CurrentDomain.BaseDirectory + "\\categories.json";
            _settingsFilePath = AppDomain.CurrentDomain.BaseDirectory + "\\settings.json";
            _mpvPath = AppDomain.CurrentDomain.BaseDirectory + "\\mpv\\mpv.exe";

            _radioDb = new RadioDb(_dataFilePath, _categoryListFilePath);
            _settingReadWrite = new SettingReadWrite(_settingsFilePath, AppDomain.CurrentDomain.BaseDirectory + "\\eqsettings.json");

            _startInfo = PlayerProcess.StartInfo;

            _eqManager = new EqManager(PlayerProcess);

            #region taskbar buttons

            _playThumbnailToolBarButton = new ThumbnailToolBarButton(pausedIcon, "Play/Pause");
            _stopThumbnailToolBarButton = new ThumbnailToolBarButton(stopIcon, "Stop");
            _muteThumbnailToolBarButton = new ThumbnailToolBarButton(muteIcon, "Mute");
            _playThumbnailToolBarButton.Click += PlayThumbnailToolBarButtonOnClick;
            _stopThumbnailToolBarButton.Click += StopThumbnailToolBarButtonOnClick;
            _muteThumbnailToolBarButton.Click += MuteThumbnailToolBarButtonOnClick;
            _playThumbnailToolBarButton.Visible = true;
            _playThumbnailToolBarButton.Enabled = true;
            _stopThumbnailToolBarButton.Visible = true;
            _stopThumbnailToolBarButton.Enabled = true;
            _muteThumbnailToolBarButton.Visible = true;
            _muteThumbnailToolBarButton.Enabled = true;
            _playThumbnailToolBarButton.DismissOnClick = true;
            _stopThumbnailToolBarButton.DismissOnClick = true;

            TaskbarManager.Instance.ThumbnailToolBars.AddButtons(this.Handle, _playThumbnailToolBarButton,
                _stopThumbnailToolBarButton, _muteThumbnailToolBarButton);

            #endregion
        }
예제 #3
0
 private void AddNewStationForm_Load(object sender, EventArgs e)
 {
     _radioDb = new RadioDb(_datafilePath, _cateFilePath);
 }