public MainPage() { InitializeComponent(); Entry1.Completed += (sender, args) => { Entry2.IsEnabled = true; if (string.IsNullOrEmpty(Entry2.Text)) { Entry2.Focus(); } }; Entry2.Completed += (sender, args) => { Entry3.IsEnabled = true; if (string.IsNullOrEmpty(Entry3.Text)) { Entry3.Focus(); } }; Entry1.Unfocused += async(sender, args) => { if (string.IsNullOrEmpty(Entry1.Text)) { await DisplayAlert("Atenção", "Digite a mensagem!", "Ok"); Entry1.Focus(); } else { Entry1.SendCompleted(); } }; Entry2.Unfocused += async(sender, args) => { if (string.IsNullOrEmpty(Entry2.Text)) { await DisplayAlert("Atenção", "Digite a mensagem!", "Ok"); Entry2.Focus(); } else { Entry2.SendCompleted(); } }; Entry3.Unfocused += async(sender, args) => { if (string.IsNullOrEmpty(Entry3.Text)) { await DisplayAlert("Atenção", "Digite a mensagem!", "Ok"); Entry3.Focus(); } }; }
public MainPage() { InitializeComponent(); Entry1.Completed += (sender, args) => { Entry2.IsEnabled = true; Entry2.Focus(); }; Entry2.Completed += (sender, args) => { Entry3.IsEnabled = true; Entry3.Focus(); }; }
/////////PARENTS FUNCTION////////// protected override void DataUpdate() { System.IO.BinaryReader BSReader = new System.IO.BinaryReader(ByteStream); ByteStream.Position = 0; Array.Resize(ref E3, 0); Header = BSReader.ReadUInt32(); LevelNameLength = BSReader.ReadUInt32(); LevelName = BSReader.ReadChars((int)LevelNameLength).ToString(); Flags = BSReader.ReadUInt32(); EntryHeader = BSReader.ReadUInt32(); NullByte = BSReader.ReadByte(); SBID = BSReader.ReadUInt32(); uint tmp = 0; int p = (int)ByteStream.Position; while ((!(tmp == 5651)) && (ByteStream.Position < ByteStream.Length)) { tmp = BSReader.ReadByte(); if (tmp == 19) { ByteStream.Position -= 1; tmp = BSReader.ReadUInt32(); if (!(tmp == 5651)) { ByteStream.Position -= 3; } else { ByteStream.Position -= 4; } } } p = (int)ByteStream.Position - p; ByteStream.Position -= p; Garbadge = BSReader.ReadBytes(p); if (tmp == 5651 && (ByteStream.Position < ByteStream.Length)) { while ((ByteStream.Position < ByteStream.Length)) { Entry3 withBlock = new Entry3(); { withBlock.EntryHeader = BSReader.ReadUInt32(); withBlock.GCCount = BSReader.ReadUInt16(); withBlock.SBCount = BSReader.ReadUInt16(); Array.Resize(ref withBlock.Vector1, withBlock.GCCount + withBlock.SBCount); Array.Resize(ref withBlock.Vector2, withBlock.GCCount + withBlock.SBCount); Array.Resize(ref withBlock.GCID, withBlock.GCCount); Array.Resize(ref withBlock.SBID, withBlock.SBCount); Array.Resize(ref withBlock.ChunkMatrix, withBlock.GCCount + withBlock.SBCount); for (int i = 0; i <= withBlock.GCCount + withBlock.SBCount - 1; i++) { withBlock.Vector1[i].X = BSReader.ReadSingle(); withBlock.Vector1[i].Y = BSReader.ReadSingle(); withBlock.Vector1[i].Z = BSReader.ReadSingle(); withBlock.Vector1[i].W = BSReader.ReadSingle(); withBlock.Vector2[i].X = BSReader.ReadSingle(); withBlock.Vector2[i].Y = BSReader.ReadSingle(); withBlock.Vector2[i].Z = BSReader.ReadSingle(); withBlock.Vector2[i].W = BSReader.ReadSingle(); } for (int i = 0; i <= withBlock.GCCount - 1; i++) { withBlock.GCID[i] = BSReader.ReadUInt32(); } for (int i = 0; i <= withBlock.SBCount - 1; i++) { withBlock.SBID[i] = BSReader.ReadUInt32(); } for (int i = 0; i <= withBlock.GCCount + withBlock.SBCount - 1; i++) { withBlock.ChunkMatrix[i].x1 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].y1 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].z1 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].w1 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].x2 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].y2 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].z2 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].w2 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].x3 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].y3 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].z3 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].w3 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].x4 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].y4 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].z4 = BSReader.ReadSingle(); withBlock.ChunkMatrix[i].w4 = BSReader.ReadSingle(); } tmp = 0; var len = ByteStream.Position; while ((tmp != 5651) & (ByteStream.Position < ByteStream.Length)) { tmp = BSReader.ReadByte(); if (tmp == 19) { ByteStream.Position -= 1; tmp = BSReader.ReadUInt32(); if (tmp != 5651) { ByteStream.Position -= 3; } else { ByteStream.Position -= 4; } } } len = ByteStream.Position - len; ByteStream.Position -= len; withBlock.leftovers = BSReader.ReadBytes((int)len); } _Entries.Add(withBlock); } E3 = _Entries.ToArray(); } }
private void Entry1_OnCompleted(object sender, EventArgs e) { Entry3.Focus(); }