public MainWindow(AniDBAPI api)
        {
            m_aniDBAPI = api;
            AniDBAPI.AppendDebugLine("Welcome to AniDBmini, connected to: " + m_aniDBAPI.APIServer);

            InitializeComponent();

            SetMylistVisibility();

            m_mpcProcWatcher = new MPCProcWatcher();
            m_mpcProcWatcher.OnMPCStarted += new MPCStartedHandler(OnMPCStarted);
            m_mpcProcWatcher.StartUp();

            mylistStats.ItemsSource     = mylistStatsList;
            debugListBox.ItemsSource    = m_aniDBAPI.DebugLog;
            hashingListBox.ItemsSource  = hashFileList;
            animeTabControl.ItemsSource = animeTabList;

            animeTabList.OnCountChanged += new CountChangedHandler(animeTabList_OnCountChanged);

            m_aniDBAPI.OnFileHashingProgress += new FileHashingProgressHandler(OnFileHashingProgress);
            m_aniDBAPI.OnAnimeTabFetched     += new AnimeTabFetchedHandler(OnAnimeTabFetched);
            m_aniDBAPI.OnFileInfoFetched     += new FileInfoFetchedHandler(OnFileInfoFetched);
        }
Example #2
0
        public MainWindow(AniDBAPI api)
        {
            m_aniDBAPI = api;
            AniDBAPI.AppendDebugLine("Welcome to AniDBmini, connected to: " + m_aniDBAPI.APIServer);

            InitializeComponent();

            SetMylistVisibility();

            m_mpcProcWatcher = new MPCProcWatcher();
            m_mpcProcWatcher.OnMPCStarted += new MPCStartedHandler(OnMPCStarted);
            m_mpcProcWatcher.StartUp();

            mylistStats.ItemsSource = mylistStatsList;
            debugListBox.ItemsSource = m_aniDBAPI.DebugLog;
            hashingListBox.ItemsSource = hashFileList;
            animeTabControl.ItemsSource = animeTabList;

            animeTabList.OnCountChanged += new CountChangedHandler(animeTabList_OnCountChanged);

            m_aniDBAPI.OnFileHashingProgress += new FileHashingProgressHandler(OnFileHashingProgress);
            m_aniDBAPI.OnAnimeTabFetched += new AnimeTabFetchedHandler(OnAnimeTabFetched);
            m_aniDBAPI.OnFileInfoFetched += new FileInfoFetchedHandler(OnFileInfoFetched);
        }