string GetHexCode1(List <Model.Page2ImageModel> source) { string hex = ""; string binary = ""; int index = 0; if (source.Count > 0) { for (int i = 0; i < 16; i++) { int flag = int.Parse(source[index].Key); if (flag == i + 1) { if (index < source.Count - 1) { index++; } binary += "1"; } else { binary += "0"; } } } else { for (int i = 0; i < 16; i++) { binary += "0"; } } hex = CmdHelper.BitTo16(binary); return(hex); }