summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/Functions/Main.cs17
-rw-r--r--win/C#/frmMain.cs25
2 files changed, 20 insertions, 22 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 6374d7407..f8600d3e9 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -19,23 +19,6 @@ namespace Handbrake.Functions
class Main
{
/// <summary>
- /// Take in a File destination and change it's file extension to a new Extension
- /// </summary>
- /// <param name="destination"></param>
- /// <param name="newExtension"></param>
- /// <returns>String of the new file path and extension</returns>
- public string setExtension(string destination, string newExtension)
- {
- destination.Replace(".mp4", newExtension);
- destination.Replace(".m4v", newExtension);
- destination.Replace(".mkv", newExtension);
- destination.Replace(".avi", newExtension);
- destination.Replace(".ogm", newExtension);
-
- return destination;
- }
-
- /// <summary>
/// Calculate the duration of the selected title and chapters
/// </summary>
public TimeSpan calculateDuration(string chapter_start, string chapter_end, Parsing.Title selectedTitle)
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index e7345b539..d66692da6 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -713,15 +713,16 @@ namespace Handbrake
private void drop_format_SelectedIndexChanged(object sender, EventArgs e)
{
if (drop_format.SelectedIndex == 0)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mp4");
+ setExtension(".mp4");
else if (drop_format.SelectedIndex == 1)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".m4v");
+ setExtension(".m4v");
else if (drop_format.SelectedIndex == 2)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mkv");
+ setExtension(".mkv");
else if (drop_format.SelectedIndex == 3)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".avi");
+ setExtension(".avi");
else if (drop_format.SelectedIndex == 4)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".ogm");
+ setExtension(".ogm");
+
}
//Video Tab
@@ -1578,6 +1579,20 @@ namespace Handbrake
}
}
}
+ /// <summary>
+ /// Take in a File destination and change it's file extension to a new Extension
+ /// </summary>
+ /// <param name="destination"></param>
+ /// <param name="newExtension"></param>
+ /// <returns>String of the new file path and extension</returns>
+ public void setExtension(string newExtension)
+ {
+ text_destination.Text = text_destination.Text.Replace(".mp4", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".m4v", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".mkv", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".avi", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".ogm", newExtension);
+ }
#endregion
#region Drive Detection