Ejemplo n.º 1
0
 void ReadConfigValues(string cfgpath)
 {
     GlobalFuncs.Config(cfgpath, false);
     textBox2.Text = GlobalVars.UserConfiguration.UserID.ToString();
     label3.Text   = GlobalVars.UserConfiguration.PlayerTripcode.ToString();
     textBox1.Text = GlobalVars.UserConfiguration.PlayerName;
 }
Ejemplo n.º 2
0
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var config  = new NLog.Config.LoggingConfiguration();
            var logfile = new NLog.Targets.FileTarget("logfile")
            {
                FileName = GlobalPaths.ConfigDir + "\\URI-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log"
            };

            config.AddRuleForAllLevels(logfile);
            LogManager.Configuration = config;

            GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            GlobalVars.ColorsLoaded = GlobalFuncs.InitColors();
            if (args.Length == 0)
            {
                Application.Run(new InstallForm());
            }
            else
            {
                foreach (string s in args)
                {
                    LocalVars.SharedArgs = s;
                }

                Application.Run(new LoaderForm());
            }
        }
Ejemplo n.º 3
0
        private static void Main(string[] args)
        {
            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);

            var config  = new NLog.Config.LoggingConfiguration();
            var logfile = new NLog.Targets.FileTarget("logfile")
            {
                FileName = GlobalPaths.ConfigDir + "\\Launcher-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log"
            };

            config.AddRuleForAllLevels(logfile);
            LogManager.Configuration = config;

            GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            GlobalVars.ColorsLoaded = GlobalFuncs.InitColors();
            if (args.Length == 0)
            {
                RunLauncher();
            }
            else
            {
                CommandLineArguments.Arguments CommandLine = new CommandLineArguments.Arguments(args);

                if (CommandLine["sdk"] != null)
                {
                    System.Windows.Forms.Application.Run(new NovetusSDK());
                }
            }
        }
Ejemplo n.º 4
0
    private void NovetusSDK_Close(object sender, CancelEventArgs e)
    {
        GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
#if LAUNCHER
        GlobalFuncs.ReadClientValues(null);
#else
        GlobalFuncs.ReadClientValues();
#endif
    }
Ejemplo n.º 5
0
 public void WriteConfigValues(bool ShowBox = false)
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
     ReadClientValues();
     if (ShowBox)
     {
         MessageBox.Show("Config Saved!", "Novetus - Config Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 6
0
 public void WriteConfigValues(bool ShowBox = false)
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
     GlobalFuncs.ReadClientValues(ConsoleBox);
     GlobalFuncs.ConsolePrint("Config Saved.", 3, ConsoleBox);
     if (ShowBox)
     {
         MessageBox.Show("Config Saved!");
     }
 }
        void ReadConfigValues()
        {
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            checkBox5.Checked = GlobalVars.UserConfiguration.ReShade;
            checkBox6.Checked = GlobalVars.UserConfiguration.ReShadeFPSDisplay;
            checkBox7.Checked = GlobalVars.UserConfiguration.ReShadePerformanceMode;

            switch (GlobalVars.UserConfiguration.GraphicsMode)
            {
            case Settings.GraphicsOptions.Mode.OpenGL:
                comboBox1.SelectedIndex = 1;
                break;

            case Settings.GraphicsOptions.Mode.DirectX:
                comboBox1.SelectedIndex = 2;
                break;

            default:
                comboBox1.SelectedIndex = 0;
                break;
            }

            switch (GlobalVars.UserConfiguration.QualityLevel)
            {
            case Settings.GraphicsOptions.Level.VeryLow:
                comboBox2.SelectedIndex = 1;
                break;

            case Settings.GraphicsOptions.Level.Low:
                comboBox2.SelectedIndex = 2;
                break;

            case Settings.GraphicsOptions.Level.Medium:
                comboBox2.SelectedIndex = 3;
                break;

            case Settings.GraphicsOptions.Level.High:
                comboBox2.SelectedIndex = 4;
                break;

            case Settings.GraphicsOptions.Level.Ultra:
                comboBox2.SelectedIndex = 5;
                break;

            case Settings.GraphicsOptions.Level.Custom:
                comboBox2.SelectedIndex = 6;
                break;

            default:
                comboBox2.SelectedIndex = 0;
                break;
            }
        }
 private void button1_Click(object sender, EventArgs e)
 {
     if (comboBox2.SelectedIndex == 6)
     {
         GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
         CustomGraphicsOptions opt = new CustomGraphicsOptions();
         opt.Show();
     }
     else
     {
         MessageBox.Show("You do not have the 'Custom' option selected. Please select it before continuing.");
     }
 }
Ejemplo n.º 9
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (GlobalVars.UserConfiguration.QualityLevel == Settings.Level.Custom)
     {
         GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
         CustomGraphicsOptions opt = new CustomGraphicsOptions();
         opt.Show();
     }
     else
     {
         MessageBox.Show("You do not have the 'Custom' option selected. Please select it before continuing.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 10
0
        private static void Main(string[] args)
        {
            var config  = new NLog.Config.LoggingConfiguration();
            var logfile = new NLog.Targets.FileTarget("logfile")
            {
                FileName = GlobalPaths.ConfigDir + "\\Launcher-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log"
            };

            config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
            LogManager.Configuration = config;

            //https://stackify.com/csharp-catch-all-exceptions/
            AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
            {
                Logger log = LogManager.GetCurrentClassLogger();
                log.Error("EXEPTION THROWN: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.Message) ? eventArgs.Exception.Message : "N/A"));
                log.Error("EXCEPTION INFO: " + (eventArgs.Exception != null ? eventArgs.Exception.ToString() : "N/A"));
                log.Error("INNER EXCEPTION: " + (eventArgs.Exception.InnerException != null ? eventArgs.Exception.InnerException.ToString() : "N/A"));
                log.Error("STACK TRACE: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.StackTrace) ? eventArgs.Exception.StackTrace : "N/A"));
                log.Error("TARGET SITE: " + (eventArgs.Exception.TargetSite != null  ? eventArgs.Exception.TargetSite.ToString() : "N/A"));
                log.Error("FOOTPRINTS: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.GetExceptionFootprints()) ? eventArgs.Exception.GetExceptionFootprints() : "N/A"));
            };

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            if (args.Length == 0)
            {
                switch (GlobalVars.UserConfiguration.LauncherStyle)
                {
                case Settings.UIOptions.Style.Compact:
                    Application.Run(new LauncherFormCompact());
                    break;

                default:
                    Application.Run(new LauncherFormExtended());
                    break;
                }
            }
            else
            {
                CommandLineArguments.Arguments CommandLine = new CommandLineArguments.Arguments(args);

                if (CommandLine["sdk"] != null)
                {
                    Application.Run(new NovetusSDK());
                }
            }
        }
Ejemplo n.º 11
0
        private void NovetusSettings_Close(object sender, FormClosingEventArgs e)
        {
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);

            FormCollection fc = Application.OpenForms;

            foreach (Form frm in fc)
            {
                //iterate through
                if (frm.Name == "CustomGraphicsOptions")
                {
                    frm.Close();
                    break;
                }
            }
        }
Ejemplo n.º 12
0
        public void ReadConfigValues(bool initial = false)
        {
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);

            launcherFormStylishInterface1.minimizeOnLaunchBox.IsChecked = GlobalVars.UserConfiguration.CloseOnLaunch;
            launcherFormStylishInterface1.userIDBox.Text        = GlobalVars.UserConfiguration.UserID.ToString();
            launcherFormStylishInterface1.tripcodeLabel.Content = GlobalVars.PlayerTripcode.ToString();
            launcherFormStylishInterface1.maxPlayersBox.Text    = GlobalVars.UserConfiguration.PlayerLimit.ToString();
            launcherFormStylishInterface1.userNameBox.Text      = GlobalVars.UserConfiguration.PlayerName;
            launcherFormStylishInterface1.mapsBox.SelectedNode  = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, launcherFormStylishInterface1.mapsBox.Nodes);
            launcherFormStylishInterface1.mapsBox.Focus();
            //stupid f*****g HACK because we aren't selecting it properly.
            if (launcherFormStylishInterface1.mapsBox.SelectedNode != null)
            {
                launcherFormStylishInterface1.mapsBox.SelectedNode.BackColor = SystemColors.Highlight;
                launcherFormStylishInterface1.mapsBox.SelectedNode.ForeColor = SystemColors.HighlightText;
            }
            launcherFormStylishInterface1.joinPortBox.Text   = GlobalVars.JoinPort.ToString();
            launcherFormStylishInterface1.serverPortBox.Text = GlobalVars.UserConfiguration.RobloxPort.ToString();
            launcherFormStylishInterface1.discordRichPresenceBox.IsChecked = GlobalVars.UserConfiguration.DiscordPresence;
            launcherFormStylishInterface1.uPnPBox.IsChecked      = GlobalVars.UserConfiguration.UPnP;
            launcherFormStylishInterface1.NotifBox.IsChecked     = GlobalVars.UserConfiguration.ShowServerNotifications;
            launcherFormStylishInterface1.browserNameBox.Text    = GlobalVars.UserConfiguration.ServerBrowserServerName;
            launcherFormStylishInterface1.browserAddressBox.Text = GlobalVars.UserConfiguration.ServerBrowserServerAddress;

            switch (GlobalVars.UserConfiguration.LauncherStyle)
            {
            case Settings.Style.Compact:
                launcherFormStylishInterface1.styleBox.SelectedIndex = 1;
                break;

            case Settings.Style.Extended:
                launcherFormStylishInterface1.styleBox.SelectedIndex = 0;
                break;

            case Settings.Style.Stylish:
            default:
                launcherFormStylishInterface1.styleBox.SelectedIndex = 2;
                break;
            }

            ReadClientValues(initial);
        }
Ejemplo n.º 13
0
        private static void Main(string[] args)
        {
            var config  = new NLog.Config.LoggingConfiguration();
            var logfile = new NLog.Targets.FileTarget("logfile")
            {
                FileName = GlobalPaths.ConfigDir + "\\URI-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log"
            };

            config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
            LogManager.Configuration = config;

            //https://stackify.com/csharp-catch-all-exceptions/
            AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
            {
                Logger log = LogManager.GetCurrentClassLogger();
                log.Error("EXEPTION THROWN: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.Message) ? eventArgs.Exception.Message : "N/A"));
                log.Error("EXCEPTION INFO: " + (eventArgs.Exception != null ? eventArgs.Exception.ToString() : "N/A"));
                log.Error("INNER EXCEPTION: " + (eventArgs.Exception.InnerException != null ? eventArgs.Exception.InnerException.ToString() : "N/A"));
                log.Error("STACK TRACE: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.StackTrace) ? eventArgs.Exception.StackTrace : "N/A"));
                log.Error("TARGET SITE: " + (eventArgs.Exception.TargetSite != null ? eventArgs.Exception.TargetSite.ToString() : "N/A"));
                log.Error("FOOTPRINTS: " + (!string.IsNullOrWhiteSpace(eventArgs.Exception.GetExceptionFootprints()) ? eventArgs.Exception.GetExceptionFootprints() : "N/A"));
            };

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            if (args.Length == 0)
            {
                Application.Run(new InstallForm());
            }
            else
            {
                foreach (string s in args)
                {
                    LocalVars.SharedArgs = s;
                }

                Application.Run(new LoaderForm());
            }
        }
Ejemplo n.º 14
0
        void ReadConfigValues()
        {
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
            checkBox5.Checked       = GlobalVars.UserConfiguration.ReShade;
            checkBox6.Checked       = GlobalVars.UserConfiguration.ReShadeFPSDisplay;
            checkBox7.Checked       = GlobalVars.UserConfiguration.ReShadePerformanceMode;
            NewGUI2011MBox.Checked  = GlobalVars.UserConfiguration.NewGUI;
            comboBox1.SelectedIndex = (int)GlobalVars.UserConfiguration.GraphicsMode;
            comboBox2.SelectedIndex = (int)GlobalVars.UserConfiguration.QualityLevel;

            switch (GlobalVars.UserConfiguration.Priority)
            {
            case ProcessPriorityClass.BelowNormal:
                comboBox3.SelectedIndex = 1;
                break;

            case ProcessPriorityClass.Normal:
                comboBox3.SelectedIndex = 2;
                break;

            case ProcessPriorityClass.AboveNormal:
                comboBox3.SelectedIndex = 3;
                break;

            case ProcessPriorityClass.High:
                comboBox3.SelectedIndex = 4;
                break;

            case ProcessPriorityClass.RealTime:
                comboBox3.SelectedIndex = 5;
                break;

            case ProcessPriorityClass.Idle:
            default:
                comboBox3.SelectedIndex = 0;
                break;
            }
        }
Ejemplo n.º 15
0
 static void ReadConfigValues(bool initial = false)
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
     GlobalFuncs.ConsolePrint("Config loaded.", 3);
     GlobalFuncs.ReadClientValues(initial);
 }
Ejemplo n.º 16
0
 static void WriteConfigValues()
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
     GlobalFuncs.ReadClientValues();
     GlobalFuncs.ConsolePrint("Config Saved.", 3);
 }
Ejemplo n.º 17
0
 void QuickConfigureClose(object sender, CancelEventArgs e)
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
     GlobalFuncs.ReadClientValues();
     LocalVars.ReadyToLaunch = true;
 }
Ejemplo n.º 18
0
 private void NovetusSettings_Load(object sender, EventArgs e)
 {
     GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
     ReadConfigValues();
     CenterToScreen();
 }
Ejemplo n.º 19
0
        public void ReadConfigValues(bool initial = false)
        {
            GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);

            CloseOnLaunchCheckbox.Checked = GlobalVars.UserConfiguration.CloseOnLaunch;
            PlayerIDTextBox.Text          = GlobalVars.UserConfiguration.UserID.ToString();
            PlayerTripcodeLabel.Text      = GlobalVars.UserConfiguration.PlayerTripcode.ToString();
            PlayerLimitBox.Value          = Convert.ToDecimal(GlobalVars.UserConfiguration.PlayerLimit);
            PlayerNameTextBox.Text        = GlobalVars.UserConfiguration.PlayerName;
            SelectedClientLabel.Text      = GlobalVars.UserConfiguration.SelectedClient;
            SelectedMapLabel.Text         = GlobalVars.UserConfiguration.Map;
            Tree.SelectedNode             = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, Tree.Nodes);
            Tree.Focus();
            JoinPortBox.Value = Convert.ToDecimal(GlobalVars.JoinPort);
            HostPortBox.Value = Convert.ToDecimal(GlobalVars.UserConfiguration.RobloxPort);
            IPLabel.Text      = GlobalVars.IP;
            PortLabel.Text    = GlobalVars.JoinPort.ToString();
            DiscordPresenceCheckbox.Checked = GlobalVars.UserConfiguration.DiscordPresence;
            if (FormStyle == Settings.UIOptions.Style.Extended)
            {
                if (ReShadeCheckbox != null)
                {
                    ReShadeCheckbox.Checked = GlobalVars.UserConfiguration.ReShade;
                }

                if (ReShadeFPSDisplayCheckBox != null)
                {
                    ReShadeFPSDisplayCheckBox.Checked = GlobalVars.UserConfiguration.ReShadeFPSDisplay;
                }

                if (ReShadePerformanceModeCheckBox != null)
                {
                    ReShadePerformanceModeCheckBox.Checked = GlobalVars.UserConfiguration.ReShadePerformanceMode;
                }
            }
            uPnPCheckBox.Checked             = GlobalVars.UserConfiguration.UPnP;
            ShowServerNotifsCheckBox.Checked = GlobalVars.UserConfiguration.ShowServerNotifications;
            ServerBrowserNameBox.Text        = GlobalVars.UserConfiguration.ServerBrowserServerName;
            ServerBrowserAddressBox.Text     = GlobalVars.UserConfiguration.ServerBrowserServerAddress;

            if (FormStyle == Settings.UIOptions.Style.Extended)
            {
                if (GraphicsModeBox != null)
                {
                    switch (GlobalVars.UserConfiguration.GraphicsMode)
                    {
                    case Settings.GraphicsOptions.Mode.OpenGL:
                        GraphicsModeBox.SelectedIndex = 1;
                        break;

                    case Settings.GraphicsOptions.Mode.DirectX:
                        GraphicsModeBox.SelectedIndex = 2;
                        break;

                    default:
                        GraphicsModeBox.SelectedIndex = 0;
                        break;
                    }
                }

                if (GraphicsLevelBox != null)
                {
                    switch (GlobalVars.UserConfiguration.QualityLevel)
                    {
                    case Settings.GraphicsOptions.Level.VeryLow:
                        GraphicsLevelBox.SelectedIndex = 1;
                        break;

                    case Settings.GraphicsOptions.Level.Low:
                        GraphicsLevelBox.SelectedIndex = 2;
                        break;

                    case Settings.GraphicsOptions.Level.Medium:
                        GraphicsLevelBox.SelectedIndex = 3;
                        break;

                    case Settings.GraphicsOptions.Level.High:
                        GraphicsLevelBox.SelectedIndex = 4;
                        break;

                    case Settings.GraphicsOptions.Level.Ultra:
                        GraphicsLevelBox.SelectedIndex = 5;
                        break;

                    case Settings.GraphicsOptions.Level.Custom:
                        GraphicsLevelBox.SelectedIndex = 6;
                        break;

                    default:
                        GraphicsLevelBox.SelectedIndex = 0;
                        break;
                    }
                }
            }

            switch (GlobalVars.UserConfiguration.LauncherStyle)
            {
            case Settings.UIOptions.Style.Compact:
                StyleSelectorBox.SelectedIndex = 1;
                break;

            case Settings.UIOptions.Style.Extended:
            default:
                StyleSelectorBox.SelectedIndex = 0;
                break;
            }

            GlobalFuncs.ConsolePrint("Config loaded.", 3, ConsoleBox);
            ReadClientValues(initial);
        }