ShowErrorMessage() 공개 정적인 메소드

public static ShowErrorMessage ( string text, string title = null ) : void
text string
title string
리턴 void
예제 #1
0
 public static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         Application.Run(new FormMain());
     }
     catch (System.IO.FileNotFoundException e)
     {
         Helpers.ShowErrorMessage(Resources.FormMain_CouldNotFindFile.Replace("FILENAME", e.FileName), Resources.Error);
     }
 }
예제 #2
0
        public static void Main()
        {
            if (Environment.OSVersion.Version.Major >= 6)
            {
                SetProcessDPIAware();
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                Application.Run(new FormMain());
            }
            catch (System.IO.FileNotFoundException e)
            {
                Helpers.ShowErrorMessage(Resources.FormMain_CouldNotFindFile.Replace("FILENAME", e.FileName));
            }
        }
예제 #3
0
        public FormMain()
        {
            InitializeComponent();
            Text = string.Format(Resources.FormMainTitle, typeof(FormMain).Assembly.GetName().Version);

            FormBorderStyle = FormBorderStyle.FixedSingle;

            //set language menu items for checking
            languageMenuItems.Add("de", deutschToolStripMenuItem);
            languageMenuItems.Add("en", englishToolStripMenuItem);
            languageMenuItems.Add("es", espanolToolStripMenuItem);
            languageMenuItems.Add("fr", francaisToolStripMenuItem);
            languageMenuItems.Add("it", italianoToolStripMenuItem);
            languageMenuItems.Add("nl", nederlandsToolStripMenuItem);
            languageMenuItems.Add("pl", polishToolStripMenuItem);

            //get language
            var appSettingsFilePath = $"{Paths.ExePath}\\{Paths.AppSettingsName}";

            if (File.Exists(appSettingsFilePath))
            {
                var json        = File.ReadAllText(appSettingsFilePath, Encoding.Default);
                var appSettings = JsonConvert.DeserializeObject <AppSettings>(json);
                _language = appSettings.Language;
            }
            setCheckOfLanguageInMenu(true);

            _moddingService         = new ModdingService();
            _progressBarManipulator = new ProgressBarManipulator(modProgressStatusBar);

            if (!File.Exists($"{Paths.ExePath}\\{Paths.WigglesExecutableName}"))
            {
                Helpers.ShowErrorMessage(Resources.FormMain_CouldNotFindWigglesExeErrorText, Resources.Error);
            }
            else
            {
                ResetStatusNote();
                ReadMods();
            }
        }