Esempio n. 1
0
        public MainWindow()
        {
            // Make sure ffmpeg exists in the same directory.
            if (!File.Exists("ffmpeg.exe"))
            {
                MessageBox.Show(this, "Couldn't start HLDJConverter!  Make sure ffmpeg.exe is in the same directory as HLDJConverter.", "There was a problem");
                Close();
            }

            Settings          = new Settings();
            ConversionJobs    = new ObservableCollection <ConversionItem>();
            YoutubeDownloader = new YoutubeDownloaders.YTEYoutubeDownloader();

            // Load user config
            if (File.Exists("HLDJConverterConfig.cfg"))
            {
                try
                {
                    Settings = JsonConvert.DeserializeObject <Settings>(File.ReadAllText("HLDJConverterConfig.cfg"));
                }
                catch (Exception e)
                {
                    File.Delete("HLDJConverterConfig.cfg");
                    MessageBox.Show(this, "HLDJConverterConfig.cfg was improperly formatted.  It has been deleted and reset.", "There was a problem");
                }
            }

            Title = $"HLDJConverter {ApplicationHelper.GetVersion()}";
            InitializeComponent();
        }
Esempio n. 2
0
 public Music(IGuildMusicQueueCollection queueCollection, IYoutubeDownloader youtube, IMusicLibrary library, Random rng)
 {
     _queueCollection = queueCollection;
     _youtube         = youtube;
     _library         = library;
     _rng             = rng;
 }
Esempio n. 3
0
 public Administration(DiscordSocketClient client, ConversationalResponseService conversations, IYoutubeDownloader yt, SeasonalAvatar avatar)
 {
     _client        = client;
     _conversations = conversations;
     _yt            = yt;
     _avatar        = avatar;
 }