Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //var culture = new System.Globalization.CultureInfo("es-ES");
            //System.Globalization.CultureInfo.CurrentCulture = culture;
            //System.Globalization.CultureInfo.CurrentUICulture = culture;

            // Initialize the console view model first thing so we can see any problems that may occur
            var consoleViewModel = ConsoleViewModel.Instance;

            Log.WriteLine($"Started {Assembly.GetExecutingAssembly().GetName().Version}");
            //Log.WriteLine($"Culture: {System.Globalization.CultureInfo.CurrentCulture.Name}");

            SetPerMonitorDpiAwareness();

            ConfigHelper.EnsureConfigs();
            ConfigHelper.Main.Loaded += Config_Loaded;

            m_SkinFile          = new FileContainer(ConfigHelper.Main.Values.SkinFileName);
            m_SkinFile.Changed += (s1, e1) => { LoadSkin(); };
            LoadSkin();

            m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow());

            base.OnStartup(e);
        }
Ejemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //var culture = new System.Globalization.CultureInfo("es-ES");
            //System.Globalization.CultureInfo.CurrentCulture = culture;
            //System.Globalization.CultureInfo.CurrentUICulture = culture;

            // Initialize the console view model first thing so we can see any problems that may occur
            var consoleViewModel = ConsoleViewModel.Instance;

            Log.WriteLine($"Started {Assembly.GetExecutingAssembly().GetName().Version}");
            //Log.WriteLine($"Culture: {System.Globalization.CultureInfo.CurrentCulture.Name}");

            SetPerMonitorDpiAwareness();

            ConfigHelper.EnsureConfigs();
            ConfigHelper.Main.Loaded += Config_Loaded;

            m_SkinFile          = new FileContainer(ConfigHelper.Main.Values.SkinFileName);
            m_SkinFile.Changed += (s1, e1) => { LoadSkin(); };
            LoadSkin();

            try
            {
                string[] files = Directory.GetFiles(".");
                string   v     = ConfigHelper.Versions.Values.SmartHunter;
                foreach (string file in files)
                {
                    if (Path.GetExtension(file).Equals(".exe"))
                    {
                        if (file.Contains("SmartHunter_"))
                        {
                            if (!file.Contains(v))
                            {
                                File.Delete(file);
                            }
                        }
                        else if (file.Contains("SmartHunter"))
                        {
                            File.Delete(file); // i feel dirty for this but didn't want to do something else :P
                        }
                    }
                }
            }
            catch
            {
            }

            m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow());

            base.OnStartup(e);
        }
Ejemplo n.º 3
0
        protected override void OnStartup(StartupEventArgs e)
        {
            // Initialize the console view model first thing so we can see any problems that may occur
            var consoleViewModel = ConsoleViewModel.Instance;

            var assemblyVersion        = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            var fileVersionInfoVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;

            Log.WriteLine($"Started: Assembly Version: {assemblyVersion} | File Version: {fileVersionInfoVersion}");

            SetPerMonitorDpiAwareness();

            ConfigHelper.EnsureConfigs();
            ConfigHelper.Main.Loaded += Config_Loaded;

            m_SkinFile          = new FileContainer(ConfigHelper.Main.Values.SkinFileName);
            m_SkinFile.Changed += (s1, e1) => { LoadSkin(); };
            LoadSkin();

            m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow(), new DebugWidgetWindow());

            base.OnStartup(e);
        }