Exemple #1
0
        public IO(IFileManager filemanager, IMessageManager messagemanager, Lang language)
        {
            fileManager = filemanager;
            messageManager = messagemanager;
            ActiveLanguage = language;

            WorkPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "TOWare");

            if (!Directory.Exists(WorkPath))
                Directory.CreateDirectory(WorkPath);
            if (!Directory.Exists(LanguagePath))
                Directory.CreateDirectory(LanguagePath);
            if (File.Exists(SettingsFile))
            {
                LoadSettings();
                if (File.Exists(Path.Combine(LanguagePath, ActiveSettings.ActiveLanguage + ".towlang")))
                    LoadLanguage();
                else
                    SaveLanguage();
            }
            else
            {
                ActiveSettings = new Settings();
                SaveSettings(ActiveSettings);
                SaveLanguage();
            }
        }
 public TournamentController(IO _io, Lang _lang)
 {
     io = _io;
     lang = _lang;
 }
Exemple #3
0
 public Controller(IFileManager fileManager, IMessageManager messageManager, Lang lang)
 {
     activeIO = new IO(fileManager, messageManager, lang);
     activeSetting = activeIO.ActiveSettings;
 }