Exemple #1
0
        public static AllTexts GetAllTexts()
        {
            AllTexts formsett = null;
            string   filename = Globals.TextForBoxes.AllTexts.FileName;

            if (File.Exists(filename))
            {
                try
                {
                    using (FileStream fs = new FileStream(filename, FileMode.Open))
                    {
                        XmlSerializer xser = new XmlSerializer(typeof(AllTexts));
                        formsett = (AllTexts)xser.Deserialize(fs);
                        fs.Close();
                        return(formsett);
                    }
                }
                catch (Exception e)
                {
                }
            }

            formsett             = new AllTexts();
            formsett.NameandFile = new XmlSerializableDictionary <string, string>();
            return(formsett);
        }
Exemple #2
0
 public Form1()
 {
     InitializeComponent();
     ReaderOriginal.GetInstalledVoices().ToList().ForEach(v => Voices.Add(new Voice()
     {
         Name = v.VoiceInfo.Name, InstalledVoice = v
     }));
     allTexts = AllTexts.GetAllTexts();
     LoadComboBox();
     cmbTextes.SelectedIndex = 0;
 }