示例#1
0
文件: App.xaml.cs 项目: kenzya/ds4ui
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            string applicationDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DS4Tool");
            string languageDirectory = Path.Combine(applicationDirectory, "Languages");
            string controllerDirectory = Path.Combine(applicationDirectory, "Controllers");
            string configurationFile = Path.Combine(applicationDirectory, "configuration.xml");

            CheckDirectories(applicationDirectory, languageDirectory, controllerDirectory, configurationFile);

            IConfigurationManager configuration = new ConfigurationManager(configurationFile);
            ITranslationManager translation = new TranslationManager(languageDirectory);
            IControllerConfigurationManager controller = new ControllerConfigurationManager(controllerDirectory);
            IMessengerManager messenger = new MessengerManager();
            IUserManager user = new UserManager();
            INotifyIconManager notifyIcon = new NotifyIconManager();
            IEventLogManager logger = new EventLogManager();
            IThemeManager theme = new ThemeManager();

            appManager = new ApplicationManager(messenger, translation, configuration, user, notifyIcon, logger, controller, theme);
            appManager.Start();
        }
示例#2
0
 public TranslationManager(string path)
 {
     translationManager = this;
     Initialize(path);
 }
示例#3
0
 public TranslationManager()
 {
     translationManager = this;
 }
 /// <summary>
 /// Remove a listener for the given source's event.
 /// </summary>
 internal static void RemoveListener(TranslationManager source, IWeakEventListener listener)
 {
     CurrentManager.ProtectedRemoveListener(source, listener);
 }