protected virtual void OnError(TubeManagerErrorEventArgs args)
        {
            var handler = Error;

            if (handler != null)
            {
                handler(this, args);
            }
        }
        private void OnTubeManagerError(object sender, EventArgs args)
        {
            TubeManagerErrorEventArgs error_args = args as TubeManagerErrorEventArgs;

            switch (error_args.error)
            {
            case TubeManager.ErrorReason.ClosedBeforeDownloaded:
                SetStatus(AddinManager.CurrentLocalizer.GetString("A problem occured while downloading this contact's library"), true);
                break;

            case TubeManager.ErrorReason.ErrorDuringLoad:
                SetStatus(AddinManager.CurrentLocalizer.GetString("An error occurred while loading data"), true);
                break;

            case TubeManager.ErrorReason.ErrorDuringPlaylistLoad:
                SetStatus(AddinManager.CurrentLocalizer.GetString("An error occurred while loading playlists"), true);
                break;
            }
        }