X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=win%2FC%23%2FfrmActivityWindow.cs;h=ee3d3bf750d20980f044f3efd290bbfaad629469;hb=4560ade3c833f282f02d15a9473e233488617df9;hp=6c0b4f2e4bf96aa09ca12b0f1c8ea1569bb08951;hpb=badc894f12a8837ae5ee3ce28144a6e42a94b1ac;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 6c0b4f2e..ee3d3bf7 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -13,7 +13,8 @@ namespace Handbrake
using System.Threading;
using System.Windows.Forms;
- using HandBrake.ApplicationServices.Services;
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Services.Interfaces;
using HandBrake.ApplicationServices.Services.Interfaces;
using Model;
@@ -157,14 +158,27 @@ namespace Handbrake
/// The sender.
///
///
- /// The e.
+ /// The EventArgs.
///
- private void NewActivityWindow_Load(object sender, EventArgs e)
+ private void ActivityWindowLoad(object sender, EventArgs e)
{
try
{
- ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);
- SetMode(activitLogMode);
+ // Set the inital log file.
+ if (encode.IsEncoding)
+ {
+ this.logSelector.SelectedIndex = 1;
+ }
+ else if (scan.IsScanning)
+ {
+ this.logSelector.SelectedIndex = 0;
+ }
+ else
+ {
+ // Otherwise, use the last mode the window was in.
+ ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);
+ this.logSelector.SelectedIndex = activitLogMode == ActivityLogMode.Scan ? 0 : 1;
+ }
}
catch (Exception exc)
{
@@ -429,31 +443,13 @@ namespace Handbrake
}
///
- /// Set scan mode
+ /// Change the Log file in the viewer
///
- ///
- /// The sender.
- ///
- ///
- /// The e.
- ///
- private void BtnScanLogClick(object sender, EventArgs e)
+ /// The Sender
+ /// The EventArgs
+ private void LogSelectorClick(object sender, EventArgs e)
{
- SetMode(ActivityLogMode.Scan);
- }
-
- ///
- /// Set the encode mode
- ///
- ///
- /// The sender.
- ///
- ///
- /// The e.
- ///
- private void BtnEncodeLogClick(object sender, EventArgs e)
- {
- SetMode(ActivityLogMode.Encode);
+ this.SetMode((string)this.logSelector.SelectedItem == "Scan Log" ? ActivityLogMode.Scan : ActivityLogMode.Encode);
}
/* Overrides */