Files
Ryan Durand 9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00

64 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace iPhonePackager
{
public partial class SlowProgressDialog : Form
{
public SlowProgressDialog()
{
InitializeComponent();
}
public delegate void WorkToDoSignature(BackgroundWorker BGWorker);
public WorkToDoSignature OnBeginBackgroundWork = null;
private void SlowWork_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
DialogResult = DialogResult.OK;
ProgressIndicator.Value = 0;
StatusLabel.Text = "";
}
private void SlowWork_DoWork(object sender, DoWorkEventArgs e)
{
Program.BGWorker = SlowWork;
Program.ProgressIndex = 0;
try
{
OnBeginBackgroundWork(SlowWork);
}
catch (Exception ex)
{
Program.Error(ex.Message);
}
Program.BGWorker = null;
}
private void SlowWork_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
ProgressIndicator.Value = e.ProgressPercentage;
StatusLabel.Text = e.UserState as string;
}
private void SlowProgressDialog_Shown(object sender, EventArgs e)
{
if (OnBeginBackgroundWork != null)
{
SlowWork.RunWorkerAsync();
}
else
{
DialogResult = DialogResult.Abort;
}
}
}
}