public void Save(string fileName, ScreenshotHelper ssh) { if (string.IsNullOrEmpty(fileName)) { return; } if (ssh.shotInfo.Count <= 0) { var tempDelegate = ssh.DefaultsSet; ssh.DefaultsSet = null; ssh.SetDefaults(); ssh.DefaultsSet = tempDelegate; } sizes = ssh.shotInfo; orientation = ssh.orientation; lastSavePath = ssh.savePath; buildPathRoot = ssh.buildSavePathRoot; buildPathExtra = ssh.buildSavePathExtra; textureFormat = ssh.SSHTextureFormat; var serializer = new XmlSerializer(typeof(SSHPreset)); using (var stream = new FileStream(fileName, FileMode.Create)) serializer.Serialize(stream, this); }
bool IsAlphaFormat(ScreenshotHelper.tSSHTextureFormat textureFormat) { string tf = textureFormat.ToString().ToLower(); if (tf.Contains("a")) { return(true); } return(false); }