private void SaveAllAssetsFtpOnClick(object sender, RoutedEventArgs e)
        {
            if (!App.FtpOperations.ConnectionEstablished)
            {
                MessageBox.Show("Error: Unable to establish FTP connection.", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            var dialog = new TitleAndDbIdDialog(this);

            if (dialog.ShowDialog() != true)
            {
                return;
            }
            var tid = dialog.TitleId;
            var aid = dialog.AssetId;
            var bw  = new BackgroundWorker();

            bw.DoWork += (o, args) => {
                try {
                    if (_boxart.HavePreview)
                    {
                        App.FtpOperations.SendAssetData(string.Format("GC{0}.asset", tid), aid, _boxart.GetData());
                    }
                    if (_background.HavePreview)
                    {
                        App.FtpOperations.SendAssetData(string.Format("BK{0}.asset", tid), aid, _background.GetData());
                    }
                    if (_iconBanner.HaveBanner || _iconBanner.HaveIcon)
                    {
                        App.FtpOperations.SendAssetData(string.Format("GL{0}.asset", tid), aid, _iconBanner.GetData());
                    }
                    if (_screenshots.HaveScreenshots)
                    {
                        App.FtpOperations.SendAssetData(string.Format("SS{0}.asset", tid), aid, _screenshots.GetData());
                    }
                }
                catch (Exception ex) {
                    MessageBox.Show("There was an error while processing the request. See the log for more details about this error.");
                    SaveError(ex);
                }
            };
            bw.RunWorkerCompleted   += (o, args) => BusyIndicator.Visibility = Visibility.Collapsed;
            BusyIndicator.Visibility = Visibility.Visible;
            bw.RunWorkerAsync();
        }
 private void SaveAllAssetsFtpOnClick(object sender, RoutedEventArgs e)
 {
     if(!App.FtpOperations.ConnectionEstablished) {
         MessageBox.Show("ERROR: FTP Connection could not be established", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
         }
     var dialog = new TitleAndDbIdDialog(this);
     if(dialog.ShowDialog() != true)
         return;
     var tid = dialog.TitleId;
     var aid = dialog.AssetId;
     var bw = new BackgroundWorker();
     bw.DoWork += (o, args) => {
         try {
             if(_boxart.HavePreview)
                 App.FtpOperations.SendAssetData(string.Format("GC{0}.asset", tid), aid, _boxart.GetData());
             if(_background.HavePreview)
                 App.FtpOperations.SendAssetData(string.Format("BK{0}.asset", tid), aid, _background.GetData());
             if(_iconBanner.HaveBanner || _iconBanner.HaveIcon)
                 App.FtpOperations.SendAssetData(string.Format("GL{0}.asset", tid), aid, _iconBanner.GetData());
             if(_screenshots.HaveScreenshots)
                 App.FtpOperations.SendAssetData(string.Format("SS{0}.asset", tid), aid, _screenshots.GetData());
             }
         catch(Exception ex) {
             MessageBox.Show("There was an error while processing your request, check error.log for more information...");
             SaveError(ex);
             }
     };
     bw.RunWorkerCompleted += (o, args) => BusyIndicator.Visibility = Visibility.Collapsed;
     BusyIndicator.Visibility = Visibility.Visible;
     bw.RunWorkerAsync();
 }