fixed #277: Default task settings problem

This commit is contained in:
Jaex 2014-09-11 11:45:30 +03:00
parent a06ba651ca
commit d6b78b9d01
7 changed files with 16 additions and 11 deletions

View file

@ -1533,7 +1533,7 @@ private void AfterCapture(Image img, CaptureType captureType, TaskSettings taskS
{
if (taskSettings.GeneralSettings.PlaySoundAfterCapture)
{
Helpers.PlaySoundAsync(Resources.CameraSound);
Helpers.PlaySoundAsync(Resources.CaptureSound);
}
if (taskSettings.ImageSettings.ImageEffectOnlyRegionCapture && !IsRegionCapture(captureType))

View file

@ -215,7 +215,7 @@ public static string ToolsFolder
#endregion Paths
public const bool IsBeta = false;
public static bool IsBeta = false;
public static string Title
{
@ -270,10 +270,12 @@ private static void Main(string[] args)
applicationBase.Startup += StartupHandler;
applicationBase.StartupNextInstance += StartupNextInstanceHandler;
applicationBase.Shutdown += ShutdownHandler;
try {
try
{
applicationBase.Run(Arguments);
}
catch (CantStartSingleInstanceException) {
catch (CantStartSingleInstanceException)
{
MessageBox.Show("Couldn't launch the application.");
}
}

View file

@ -213,9 +213,9 @@ public class Resources {
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
public static System.IO.UnmanagedMemoryStream CameraSound {
public static System.IO.UnmanagedMemoryStream CaptureSound {
get {
return ResourceManager.GetStream("CameraSound", resourceCulture);
return ResourceManager.GetStream("CaptureSound", resourceCulture);
}
}

View file

@ -367,13 +367,13 @@
<data name="film" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\film.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CameraSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CameraSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ErrorSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ErrorSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="TaskCompletedSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TaskCompletedSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="CaptureSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CaptureSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View file

@ -490,7 +490,7 @@
<None Include="Resources\film.png" />
<None Include="Resources\TaskCompletedSound.wav" />
<None Include="Resources\ErrorSound.wav" />
<None Include="Resources\CameraSound.wav" />
<None Include="Resources\CaptureSound.wav" />
<Content Include="ShareX_Icon.ico" />
<None Include="Resources\globe--pencil.png" />
<None Include="Resources\camcorder--pencil.png" />

View file

@ -136,7 +136,10 @@ public bool IsUsingDefaultSettings
public static TaskSettings GetDefaultTaskSettings()
{
return GetSafeTaskSettings(Program.DefaultTaskSettings);
TaskSettings taskSettings = new TaskSettings();
taskSettings.SetDefaultSettings();
taskSettings.TaskSettingsReference = Program.DefaultTaskSettings;
return taskSettings;
}
public static TaskSettings GetSafeTaskSettings(TaskSettings taskSettings)