public override object CreateMultiResolutionImage(System.Collections.Generic.IEnumerable <object> images) { var refImg = (WpfImage)images.First(); var f = refImg.Frames[0]; var frames = images.Cast <WpfImage> ().Select(img => new WpfImage.ImageFrame(img.Frames[0].ImageSource, f.Width, f.Height)); return(new WpfImage(frames)); }
/// <summary> /// Make a Dictionary<string, int> Dictionary /// </summary> /// <param name="keyEnums"></param> /// <returns></returns> private Dictionary <string, int> MakeDictionary <T>(System.Collections.Generic.IEnumerable <T> keyEnums) { var keyNames = keyEnums.ToList(); var keyCodes = keyEnums.Cast <int>().ToList(); // Add key names and codes to dictionary .. for (int i = 0; i < keyNames.Count; i++) { this.keyEnum.Add(keyNames[i].ToString(), keyCodes[i]); } return(this.keyEnum); }
public override object CreateMultiSizeImage(System.Collections.Generic.IEnumerable <object> images) { return(new WpfImage(images.Cast <WpfImage> ().Select(i => i.Frames[0]))); }