protected override void OnAppearing() { base.OnAppearing(); Device.BeginInvokeOnMainThread(async() => { await System.Threading.Tasks.Task.Delay(150); FNameEntry.Focus(); }); }
public FNameEntry ReadNameEntry(int maxLen = 10485760, UE4Version ue4Version = UE4Version.UE4__4_14) { FNameEntry entry = new FNameEntry(); entry.StringLength = this.ReadInt(); if (entry.StringLength == 0) { return(entry); } //Validate length if (entry.StringLength > maxLen) { throw new Exception($"Failed to read null-terminated string; Length from file exceeded maximum length requested. Offset {ms.Position:X8}"); } //My friend's arg broke this reader. Turns out extended characters use TWO bytes. I think if the length is negative, it's two bytes per character if (entry.StringLength < 0) { //Read this many bytes * 2 //byte[] buf = ReadBytes((-length * 2) - 1); byte[] buf = ReadBytes(entry.StringLength - 1); //Read null byte, but discard byte nullByte1 = ReadByte(); if (nullByte1 != 0x00) { throw new Exception("Failed to read null-terminated string; 1st terminator in 2-bytes-per-character string was not null!"); } //Convert to string entry.Name = Encoding.ASCII.GetString(buf); } else { //Read this many bytes. byte[] buf = ReadBytes(entry.StringLength - 1); //Read null byte, but discard byte nullByte = ReadByte(); if (nullByte != 0x00) { throw new Exception("Failed to read null-terminated string; Terminator was not null!"); } //Convert to string entry.Name = Encoding.ASCII.GetString(buf); } if (ue4Version == UE4Version.UE4__4_14) { entry.unkRef = ReadUInt(); } return(entry); }
public FNameEntry[] ReadFNameEntries(int length, UE4Version uE4Version = UE4Version.UE4__4_14) { //Create array FNameEntry[] data = new FNameEntry[length]; //Read for (int i = 0; i < length; i++) { data[i] = ReadNameEntry(10485760, uE4Version); } //data[i] = ReadUEString(); return(data); }
protected override void OnAppearing() { base.OnAppearing(); Device.BeginInvokeOnMainThread(async() => { await Task.Delay(150); FNameEntry.Focus(); if (uih.UInfoIDIsNullOrEmpty()) { var uinfo = uih.GetUserInfoByID(Settings.UserId); FNameEntry.Text = uinfo.FirstName; LNameEntry.Text = uinfo.LastName; EmailEntry.Text = uinfo.Email; FlanPicker.SelectedItem = uinfo.FLanguage; SlanPicker.SelectedItem = uinfo.SLanguage; } }); }