Ejemplo n.º 1
0
        public ChangelogWindow()
        {
            InitializeComponent();

            IntroTextBlock.Text += " " + Util.GetAssemblyVersion() + ".";

            try
            {
                using (var client = new WebClient())
                {
                    client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36");

                    dynamic releaseInfo = JsonConvert.DeserializeObject(
                        client.DownloadString("https://api.github.com/repos/goaaats/FFXIVQuickLauncher/releases/latest"));

                    ExceptionTextBox.AppendText((string)releaseInfo.body);
                }
            }
            catch (Exception)
            {
                ExceptionTextBox.AppendText("Couldn't get release info.");
            }

            SystemSounds.Asterisk.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
Ejemplo n.º 2
0
        public ErrorWindow(Exception exc, string message, string context)
        {
            InitializeComponent();

            ExceptionTextBox.AppendText(exc.ToString());
            ExceptionTextBox.AppendText("\n" + Util.GetAssemblyVersion());
            ExceptionTextBox.AppendText("\n" + Util.GetGitHash());
            ExceptionTextBox.AppendText("\nContext: " + context);
            ExceptionTextBox.AppendText("\n" + Environment.OSVersion);
            ExceptionTextBox.AppendText("\n" + Environment.Is64BitProcess);
            ExceptionTextBox.AppendText("\n" + Settings.IsDX11());
            ExceptionTextBox.AppendText("\n" + Settings.IsInGameAddonEnabled());
            ExceptionTextBox.AppendText("\n" + Settings.IsAutologin());
            ExceptionTextBox.AppendText("\n" + Settings.UniqueIdCacheEnabled);
            ExceptionTextBox.AppendText("\n" + Settings.GetLanguage());

            #if DEBUG
            ExceptionTextBox.AppendText("\nDebugging");
            #endif

            ExceptionTextBox.AppendText("\n\n\n" + Properties.Settings.Default.Addons);

            ContextTextBlock.Text = message;

            Serilog.Log.Error("ErrorWindow called: [{0}] [{1}]\n" + new TextRange(ExceptionTextBox.Document.ContentStart, ExceptionTextBox.Document.ContentEnd).Text, message, context);

            SystemSounds.Hand.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
Ejemplo n.º 3
0
        public ChangelogWindow()
        {
            InitializeComponent();

            DiscordButton.Click += Util.OpenDiscord;
            DataContext          = new ChangeLogWindowViewModel();
            try
            {
                // GitHub requires TLS 1.2, we need to hardcode this for Windows 7
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

                using (var client = new WebClient())
                {
                    client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36");

                    dynamic releaseInfo = JsonConvert.DeserializeObject(
                        client.DownloadString("https://api.github.com/repos/goaaats/FFXIVQuickLauncher/releases/latest"));

                    ExceptionTextBox.AppendText((string)releaseInfo.body);
                }

                ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
            }
            catch (Exception)
            {
                ExceptionTextBox.AppendText(Loc.Localize("ReleaseInfoUnavailable", "Couldn't get release info."));
            }

            SystemSounds.Asterisk.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
        public ChangelogWindow()
        {
            InitializeComponent();

            IntroTextBlock.Text += " " + Util.GetAssemblyVersion() + ".";

            try
            {
                // GitHub requires TLS 1.2, we need to hardcode this for Windows 7
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

                using (var client = new WebClient())
                {
                    client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36");

                    dynamic releaseInfo = JsonConvert.DeserializeObject(
                        client.DownloadString("https://api.github.com/repos/Mortalitas/FFXIVQuickLauncherLite/releases/latest"));

                    ExceptionTextBox.AppendText((string)releaseInfo.body);
                }

                ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
            }
            catch (Exception)
            {
                ExceptionTextBox.AppendText("Couldn't get release info.");
            }

            SystemSounds.Asterisk.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
Ejemplo n.º 5
0
        public ErrorWindow(Exception exc, string message, string context)
        {
            InitializeComponent();

            DiscordButton.Click += Util.OpenDiscord;
            DataContext          = new ErrorWindowViewModel();

            ExceptionTextBox.AppendText(exc.ToString());
            ExceptionTextBox.AppendText("\nVersion: " + Util.GetAssemblyVersion());
            ExceptionTextBox.AppendText("\nGit Hash: " + Util.GetGitHash());
            ExceptionTextBox.AppendText("\nContext: " + context);
            ExceptionTextBox.AppendText("\nOS: " + Environment.OSVersion);
            ExceptionTextBox.AppendText("\n64bit? " + Environment.Is64BitProcess);

            if (App.Settings != null)
            {
                ExceptionTextBox.AppendText("\nDX11? " + App.Settings.IsDx11);
                ExceptionTextBox.AppendText("\nAddons Enabled? " + App.Settings.InGameAddonEnabled);
                ExceptionTextBox.AppendText("\nAuto Login Enabled? " + App.Settings.AutologinEnabled);
                ExceptionTextBox.AppendText("\nLanguage: " + App.Settings.Language);
                ExceptionTextBox.AppendText("\nGame path: " + App.Settings.GamePath);

                // When this happens we probably don't want them to run into it again, in case it's an issue with a moved game for example
                App.Settings.AutologinEnabled = false;
            }

#if DEBUG
            ExceptionTextBox.AppendText("\nDebugging");
#endif

            ExceptionTextBox.AppendText("\n\n\nAddons: " + Properties.Settings.Default.Addons);

            ContextTextBlock.Text = message;

            Serilog.Log.Error("ErrorWindow called: [{0}] [{1}]\n" + new TextRange(ExceptionTextBox.Document.ContentStart, ExceptionTextBox.Document.ContentEnd).Text, message, context);

            SystemSounds.Hand.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
        public ErrorWindow(Exception exc, string message, string context)
        {
            InitializeComponent();

            var setting = LauncherSettings.Load();

            ExceptionTextBox.AppendText(exc.ToString());
            ExceptionTextBox.AppendText("\n" + Util.GetAssemblyVersion());
            ExceptionTextBox.AppendText("\n" + Util.GetGitHash());
            ExceptionTextBox.AppendText("\nContext: " + context);
            ExceptionTextBox.AppendText("\nOS: " + Environment.OSVersion);
            ExceptionTextBox.AppendText("\n" + Environment.Is64BitProcess);

            if (setting != null)
            {
                ExceptionTextBox.AppendText("\nDX11? " + setting.IsDx11);
                ExceptionTextBox.AppendText("\nAuto Login Enabled? " + setting.AutologinEnabled);
                ExceptionTextBox.AppendText("\nLanguage: " + setting.Language);
                ExceptionTextBox.AppendText("\nGame path: " + setting.GamePath);

                // When this happens we probably don't want them to run into it again, in case it's an issue with a moved game for example
                setting.AutologinEnabled = false;
            }

#if DEBUG
            ExceptionTextBox.AppendText("\nDebugging");
#endif

            ContextTextBlock.Text = message;

            Serilog.Log.Error("ErrorWindow called: [{0}] [{1}]\n" + new TextRange(ExceptionTextBox.Document.ContentStart, ExceptionTextBox.Document.ContentEnd).Text, message, context);

            SystemSounds.Hand.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }
Ejemplo n.º 7
0
        public ErrorWindow(Exception exc, string message, string context, ILauncherSettingsV3 setting = null)
        {
            InitializeComponent();

            ExceptionTextBox.AppendText(exc.ToString());
            ExceptionTextBox.AppendText("\nVersion: " + Util.GetAssemblyVersion());
            ExceptionTextBox.AppendText("\nGit Hash: " + Util.GetGitHash());
            ExceptionTextBox.AppendText("\nContext: " + context);
            ExceptionTextBox.AppendText("\nOS: " + Environment.OSVersion);
            ExceptionTextBox.AppendText("\n64bit? " + Environment.Is64BitProcess);

            if (setting != null)
            {
                ExceptionTextBox.AppendText("\nDX11? " + setting.IsDx11);
                ExceptionTextBox.AppendText("\nAddons Enabled? " + setting.InGameAddonEnabled);
                ExceptionTextBox.AppendText("\nAuto Login Enabled? " + setting.AutologinEnabled);
                ExceptionTextBox.AppendText("\nLanguage: " + setting.Language);
                ExceptionTextBox.AppendText("\nGame path: " + setting.GamePath);
            }

#if DEBUG
            ExceptionTextBox.AppendText("\nDebugging");
            #endif

            ExceptionTextBox.AppendText("\n\n\nAddons: " + Properties.Settings.Default.Addons);

            ContextTextBlock.Text = message;

            Serilog.Log.Error("ErrorWindow called: [{0}] [{1}]\n" + new TextRange(ExceptionTextBox.Document.ContentStart, ExceptionTextBox.Document.ContentEnd).Text, message, context);

            SystemSounds.Hand.Play();

            Activate();
            Topmost = true;
            Topmost = false;
            Focus();
        }