summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-02-27 18:19:28 +0000
committersr55 <[email protected]>2010-02-27 18:19:28 +0000
commit477178a22e1508361828e11593e6bf2be6770c85 (patch)
tree68976637f6bc7361bb04618005b382818b65ce8b /win/C#/frmMain.cs
parentda04bbd1b4b264b3d4c419b721699e658d50e545 (diff)
WinGui:
- Moved the Activity Log Code out of the Activity window into the Encode and Scan services. They now provide the log data. (Some duplicate code here will need to be refactored into a base class later) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3144 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 5ec925973..e4f6c05be 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -34,12 +34,13 @@ namespace Handbrake
private frmActivityWindow ActivityWindow;
private Form splash;
public string sourcePath;
- private string lastAction;
+ private ActivityLogMode lastAction;
private SourceType selectedSourceType;
private string dvdDrivePath;
private string dvdDriveLabel;
private Preset CurrentlySelectedPreset;
private DVD currentSource;
+ private Scan SourceScan = new Scan();
// Delegates **********************************************************
private delegate void UpdateWindowHandler();
@@ -337,7 +338,7 @@ namespace Handbrake
private void encodeStarted(object sender, EventArgs e)
{
- lastAction = "encode";
+ lastAction = ActivityLogMode.Encode;
SetEncodeStarted();
// Experimental HBProc Process Monitoring.
@@ -385,7 +386,7 @@ namespace Handbrake
private void mnu_encodeLog_Click(object sender, EventArgs e)
{
- frmActivityWindow dvdInfoWindow = new frmActivityWindow(lastAction);
+ frmActivityWindow dvdInfoWindow = new frmActivityWindow(lastAction, encodeQueue, SourceScan);
dvdInfoWindow.Show();
}
@@ -850,10 +851,10 @@ namespace Handbrake
SetEncodeStarted(); // Encode is running, so setup the GUI appropriately
encodeQueue.Start(); // Start The Queue Encoding Process
- lastAction = "encode"; // Set the last action to encode - Used for activity window.
+ lastAction = ActivityLogMode.Encode; // Set the last action to encode - Used for activity window.
}
if (ActivityWindow != null)
- ActivityWindow.SetEncodeMode();
+ ActivityWindow.SetMode(ActivityLogMode.Encode);
this.Focus();
}
@@ -924,18 +925,18 @@ namespace Handbrake
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
if (ActivityWindow == null || !ActivityWindow.IsHandleCreated)
- ActivityWindow = new frmActivityWindow(lastAction);
+ ActivityWindow = new frmActivityWindow(lastAction, encodeQueue, SourceScan);
else
switch (lastAction)
{
- case "scan":
- ActivityWindow.SetScanMode();
+ case ActivityLogMode.Scan:
+ ActivityWindow.SetMode(ActivityLogMode.Scan);
break;
- case "encode":
- ActivityWindow.SetEncodeMode();
+ case ActivityLogMode.Encode:
+ ActivityWindow.SetMode(ActivityLogMode.Encode);
break;
default:
- ActivityWindow.SetEncodeMode();
+ ActivityWindow.SetMode(ActivityLogMode.Encode);
break;
}
@@ -1011,7 +1012,7 @@ namespace Handbrake
private void SelectSource(string file)
{
Check_ChapterMarkers.Enabled = true;
- lastAction = "scan";
+ lastAction = ActivityLogMode.Scan;
sourcePath = string.Empty;
if (file == string.Empty) // Must have a file or path
@@ -1630,7 +1631,6 @@ namespace Handbrake
#region Source Scan
public bool isScanning { get; set; }
- private Scan SourceScan;
private void StartScan(string filename, int title)
{
@@ -1650,7 +1650,7 @@ namespace Handbrake
mnu_killCLI.Visible = true;
if (ActivityWindow != null)
- ActivityWindow.SetScanMode();
+ ActivityWindow.SetMode(ActivityLogMode.Scan);
// Start the Scan
try