Exemple #1
0
 private void FNTB_Validating(object sender, CancelEventArgs e)
 {
     if (!Regex.IsMatch(FNTB.Text, @"[A-Z][a-zA-Z\s\'-]*"))
     {
         MessageBox.Show("Use only alphabets or Enter first letter capital");
         FNTB.SelectAll();
         e.Cancel = true;
     }
 }
Exemple #2
0
        public byte[] Write()
        {
            MemoryStream       m  = new MemoryStream();
            EndianBinaryWriter er = new EndianBinaryWriter(m, Endianness.LittleEndian);

            Header.Write(er);
            FATB.Write(er);
            FNTB.Write(er);
            FIMG.Write(er);
            er.BaseStream.Position = 8;
            er.Write((UInt32)(er.BaseStream.Length));
            byte[] result = m.ToArray();
            er.Close();
            return(result);
        }