示例#1
0
 public FormMain()
 {
     if (!string.IsNullOrEmpty(Properties.Settings.Default.Language))
     {
         Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language);
         Thread.CurrentThread.CurrentCulture   = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language);
     }
     is_en_culture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == "en";
     InitializeComponent();
     tbLog       = new FormMainLog(this);
     fc          = new FileCollection(tbLog);
     tbPath.Text = fc.GetDefaultDirectory();
     myDelegate  = new AddListItem(AddListItemMethod);
 }
示例#2
0
        /// <summary>
        /// The main entry point for the application
        /// </summary>
        static void Main(string[] args)
        {
            bool           is_en_culture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == "en";
            FileCollection fc            = new FileCollection(new ConsoleLog());

            Console.WriteLine(is_en_culture? "Application launch" : "Запуск приложения");
            try
            {
                fc.RunProcess(fc.GetDefaultDirectory(true));
            }
            catch (Exception e)
            {
                Console.WriteLine(is_en_culture ? "Error in Process: {0}" : "Ошибка при выполнении: {0}", e.Message);
            }
            Console.WriteLine(is_en_culture ? "Press the key to exit..." : "Нажмите клавишу для завершения...");
            Console.Read();
        }