Beispiel #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Title = WebInterface.RandomString(WebInterface.Rnd.Next(10, 32));

            BetaStatus   = Globals.Options.BetaRelease;
            LaunchStatus = Globals.Options.AutoLaunch;

            AutoLaunchBox.IsChecked  = Globals.Options.AutoLaunch;
            AutoAttachBox.IsChecked  = Globals.Options.AutoAttach;
            UnlockBox.IsChecked      = Globals.Options.UnlockFPS;
            InternalUIBox.IsChecked  = Globals.Options.InternalUI;
            IngameChatBox.IsChecked  = Globals.Options.IngameChat;
            BetaReleaseBox.IsChecked = Globals.Options.BetaRelease;
            ScaleSlider.Value        = Globals.Options.WindowScale;

            ScaleSetup = true;
        }
Beispiel #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Title = WebInterface.RandomString(WebInterface.Rnd.Next(10, 32));

            var Resp = WebInterface.GetUsername();

            if (Resp.Result == WebInterface.GetUsernameResult.OK)
            {
                UsernameBox.Text = Resp.Username;
            }
            else
            {
                switch (Resp.Result)
                {
                case WebInterface.GetUsernameResult.INVALID_HWID:
                {
                    MessageBox.Show(
                        "Synapse tried to get your username from the database, but failed. (IH) This should not happen, contact 3dsboy08 on Discord.",
                        "Synapse Xen", MessageBoxButton.OK, MessageBoxImage.Error);
                    Environment.Exit(0);
                    return;
                }

                case WebInterface.GetUsernameResult.INVALID_REQUEST:
                {
                    MessageBox.Show(
                        "Synapse tried to get your username from the database, but failed. (IR) This should not happen, contact 3dsboy08 on Discord.",
                        "Synapse Xen", MessageBoxButton.OK, MessageBoxImage.Error);
                    Environment.Exit(0);
                    return;
                }

                default:
                {
                    MessageBox.Show(
                        "Synapse tried to get your username from the database, but failed. (" + Convert.ToInt32(Resp.Result) + ") This should not happen, contact 3dsboy08 on Discord.",
                        "Synapse Xen", MessageBoxButton.OK, MessageBoxImage.Error);
                    Environment.Exit(0);
                    return;
                }
                }
            }
        }
Beispiel #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Title = WebInterface.RandomString(WebInterface.Rnd.Next(10, 32));

            var TScriptHub = Globals.Theme.ScriptHub;

            ThemeInterface.ApplyWindow(this, TScriptHub.Base);
            ThemeInterface.ApplyLogo(IconBox, TScriptHub.Logo);
            ThemeInterface.ApplySeperator(TopBox, TScriptHub.TopBox);
            ThemeInterface.ApplyLabel(TitleBox, TScriptHub.TitleBox);
            ThemeInterface.ApplyListBox(ScriptBox, TScriptHub.ScriptBox);
            ThemeInterface.ApplyTextBox(DescriptionBox, TScriptHub.DescriptionBox);
            ThemeInterface.ApplyButton(MiniButton, TScriptHub.MinimizeButton);
            ThemeInterface.ApplyButton(ExecuteButton, TScriptHub.ExecuteButton);
            ThemeInterface.ApplyButton(CloseButton, TScriptHub.CloseButton);

            foreach (var Script in Data.Entries)
            {
                DictData[Script.Name] = Script;
                ScriptBox.Items.Add(Script.Name);
            }
        }
Beispiel #4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     Title = WebInterface.RandomString(WebInterface.Rnd.Next(10, 32));
 }