Do not rebase the filter images on devices (for debug/simulator only)

This commit is contained in:
Sebastien Pouliot 2012-11-21 16:31:10 -05:00
Родитель 05c0bcb2ab
Коммит b01f40c3aa
1 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -2,6 +2,7 @@ using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.CoreImage;
using MonoTouch.ObjCRuntime;
using System.Collections.Generic;
using MonoTouch.Dialog;
@ -373,14 +374,20 @@ namespace coreimage
if(!Directory.Exists(directory))
Directory.CreateDirectory(directory);
if(File.Exists(fileName))
File.Delete(fileName);
if (Runtime.Arch == Arch.SIMULATOR) {
if(File.Exists(fileName))
File.Delete(fileName);
image.AsPNG().Save(fileName, NSDataWritingOptions.FileProtectionNone, out err);
image.AsPNG().Save(fileName, NSDataWritingOptions.FileProtectionNone, out err);
if(err != null)
Console.WriteLine("Could not write image File. " + Environment.NewLine + err.LocalizedDescription);
if(err != null)
Console.WriteLine("Could not write image File. " + Environment.NewLine + err.LocalizedDescription);
}
}
if (Runtime.Arch == Arch.DEVICE)
Console.WriteLine ("File cannnot be updated on device (only on the simulator)");
text.Text = "Done";
};