Beispiel #1
0
 private void godtoiso_RemoveFinished_btn_Click(object sender, EventArgs e)
 {
     try
     {
         var itemToRemove = godtoiso_blvex.Items.Where(
             obj =>
         {
             GameOnDemand di = (GameOnDemand)obj.Value;
             if ((di.Status == PackageStatus.Canceled) ||
                 (di.Status == PackageStatus.Finished) ||
                 (di.Status == PackageStatus.Errored))
             {
                 return(true);
             }
             return(false);
         }).ToList();
         foreach (var item in itemToRemove)
         {
             godtoiso_blvex.Items.Remove(item);
         }
     }
     catch (Exception ex)
     {
         Console.Write(ex.ToString());
         throw;
     }
 }
Beispiel #2
0
        private void godtoiso_Remove_btn_Click(object sender, EventArgs e)
        {
            GameOnDemand god = (GameOnDemand)godtoiso_blvex.SelectedValue;

            if ((god?.Status == PackageStatus.Canceled) || (god?.Status == PackageStatus.Invalid) || (god?.Status == PackageStatus.Errored))
            {
                _godList.Remove(god);
            }
            else
            {
                MessageBox.Show("Unable to remove. Status must be 'Waiting'.", "Alert");
            }
        }
Beispiel #3
0
        private void godtoiso_CreateIso_btn_Click(object sender, EventArgs e)
        {
            //XcpInstance xcp = (XcpInstance) xcptogod_blvex.SelectedValue
            GameOnDemand god = (GameOnDemand)godtoiso_blvex.SelectedValue;

            if (god == null)
            {
                MessageBox.Show("Please Select a Game to Convert", "Alert");
                return;
            }
            Task.Run(() =>
            {
                god.CreateIso(BindingStrings.Instance.IsoPath, ConverterOptions.fixcbHeader);
            }).ContinueWith(prevTask =>
            {
                if (prevTask.Exception != null)
                {
                    throw prevTask.Exception;
                }
            });
        }
Beispiel #4
0
        private void God_CreateIsoProgress(object sender, ProgressChangedEventArgs e)
        {
            GameOnDemand god = (GameOnDemand)sender;

            _godList.ResetItem(_godList.IndexOf(god));
        }