Exemple #1
0
        public static Caption LoadFile(string FileName, TextBox tb)
        {
            Caption ct = null;

            string[] buffer = Pub.ReadFile(FileName);
            if (buffer != null)
            {
                if (tb != null)
                {
                    tb.Lines = buffer;
                }
                try
                {
                    ct = CaptionParser.Parse(buffer);
                }
                catch (ExtendException ee)
                {
                    MessageBox.Show(ee.Message, Pub.GetSetting("CaptionParseExceptionTitle"), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            return(ct);
        }
Exemple #2
0
 public static Caption Parse(string FileName)
 {
     return(Parse(Pub.ReadFile(FileName)));
 }