├── .gitignore ├── AboutBox.Designer.cs ├── AboutBox.cs ├── AboutBox.resx ├── Assets ├── Banner.png ├── Banner.psd ├── Glacier.jpg ├── Sig.png ├── Sig.psd ├── URL.txt ├── Wallpaper.jpg ├── Wallpaper2.jpg ├── Wallpaper3.jpg ├── Wallpaper4.jpg ├── Wallpaper5.jpg ├── Wallpaper6.jpg ├── borderlands.ico ├── borderlands.png ├── network.ico └── title_bar.png ├── BorderlandsAdvancedConfig.csproj ├── BorderlandsAdvancedConfig.sln ├── CurrentVersion.txt ├── ErrorHandling ├── ErrorMessageBox.Designer.cs ├── ErrorMessageBox.cs └── ErrorMessageBox.resx ├── FrmConfig.Designer.cs ├── FrmConfig.cs ├── FrmConfig.resx ├── FrmLoad.Designer.cs ├── FrmLoad.cs ├── FrmLoad.resx ├── INIParser ├── ConfigEntry.cs ├── ConfigEntryKey.cs ├── ConfigSection.cs └── INIFileParser.cs ├── LICENSE ├── LocalizedStrings.Designer.cs ├── LocalizedStrings.resx ├── PathSettings.cs ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── SettingsManagers ├── EngineSettingsManager.cs ├── GameSettingsManager.cs └── InputSettingsManager.cs ├── VersionCheck.cs ├── app.config └── borderlands.ico /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /AboutBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace BorderlandsAdvancedConfig 2 | { 3 | partial class AboutBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | protected override void Dispose(bool disposing) 14 | { 15 | if (disposing && (components != null)) 16 | { 17 | components.Dispose(); 18 | } 19 | base.Dispose(disposing); 20 | } 21 | 22 | #region Windows Form Designer generated code 23 | 24 | /// 25 | /// Required method for Designer support - do not modify 26 | /// the contents of this method with the code editor. 27 | /// 28 | private void InitializeComponent() 29 | { 30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); 31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 32 | this.logoPictureBox = new System.Windows.Forms.PictureBox(); 33 | this.labelProductName = new System.Windows.Forms.Label(); 34 | this.labelVersion = new System.Windows.Forms.Label(); 35 | this.labelCopyright = new System.Windows.Forms.Label(); 36 | this.labelCompanyName = new System.Windows.Forms.Label(); 37 | this.textBoxDescription = new System.Windows.Forms.TextBox(); 38 | this.okButton = new System.Windows.Forms.Button(); 39 | this.tableLayoutPanel.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // tableLayoutPanel 44 | // 45 | this.tableLayoutPanel.ColumnCount = 2; 46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); 47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); 48 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); 49 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); 50 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); 51 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); 52 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); 53 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); 54 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 55 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); 57 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 58 | this.tableLayoutPanel.RowCount = 6; 59 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 65 | this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); 66 | this.tableLayoutPanel.TabIndex = 0; 67 | // 68 | // logoPictureBox 69 | // 70 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 71 | this.logoPictureBox.Image = global::BorderlandsAdvancedConfig.Properties.Resources.Sig; 72 | this.logoPictureBox.Location = new System.Drawing.Point(3, 3); 73 | this.logoPictureBox.Name = "logoPictureBox"; 74 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); 75 | this.logoPictureBox.Size = new System.Drawing.Size(131, 259); 76 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 77 | this.logoPictureBox.TabIndex = 12; 78 | this.logoPictureBox.TabStop = false; 79 | // 80 | // labelProductName 81 | // 82 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; 83 | this.labelProductName.Location = new System.Drawing.Point(143, 0); 84 | this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 85 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); 86 | this.labelProductName.Name = "labelProductName"; 87 | this.labelProductName.Size = new System.Drawing.Size(271, 17); 88 | this.labelProductName.TabIndex = 19; 89 | this.labelProductName.Text = "Product Name"; 90 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 91 | // 92 | // labelVersion 93 | // 94 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; 95 | this.labelVersion.Location = new System.Drawing.Point(143, 26); 96 | this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 97 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); 98 | this.labelVersion.Name = "labelVersion"; 99 | this.labelVersion.Size = new System.Drawing.Size(271, 17); 100 | this.labelVersion.TabIndex = 0; 101 | this.labelVersion.Text = "Version"; 102 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 103 | // 104 | // labelCopyright 105 | // 106 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; 107 | this.labelCopyright.Location = new System.Drawing.Point(143, 52); 108 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 109 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); 110 | this.labelCopyright.Name = "labelCopyright"; 111 | this.labelCopyright.Size = new System.Drawing.Size(271, 17); 112 | this.labelCopyright.TabIndex = 21; 113 | this.labelCopyright.Text = "Copyright"; 114 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 115 | // 116 | // labelCompanyName 117 | // 118 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; 119 | this.labelCompanyName.Location = new System.Drawing.Point(143, 78); 120 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 121 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); 122 | this.labelCompanyName.Name = "labelCompanyName"; 123 | this.labelCompanyName.Size = new System.Drawing.Size(271, 17); 124 | this.labelCompanyName.TabIndex = 22; 125 | this.labelCompanyName.Text = "Company Name"; 126 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 127 | // 128 | // textBoxDescription 129 | // 130 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; 131 | this.textBoxDescription.Location = new System.Drawing.Point(143, 107); 132 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); 133 | this.textBoxDescription.Multiline = true; 134 | this.textBoxDescription.Name = "textBoxDescription"; 135 | this.textBoxDescription.ReadOnly = true; 136 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; 137 | this.textBoxDescription.Size = new System.Drawing.Size(271, 126); 138 | this.textBoxDescription.TabIndex = 23; 139 | this.textBoxDescription.TabStop = false; 140 | this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text"); 141 | // 142 | // okButton 143 | // 144 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 145 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 146 | this.okButton.Location = new System.Drawing.Point(339, 239); 147 | this.okButton.Name = "okButton"; 148 | this.okButton.Size = new System.Drawing.Size(75, 23); 149 | this.okButton.TabIndex = 24; 150 | this.okButton.Text = "&OK"; 151 | this.okButton.Click += new System.EventHandler(this.okButton_Click); 152 | // 153 | // AboutBox 154 | // 155 | this.AcceptButton = this.okButton; 156 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 157 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 158 | this.ClientSize = new System.Drawing.Size(435, 283); 159 | this.Controls.Add(this.tableLayoutPanel); 160 | this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 161 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; 162 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 163 | this.MaximizeBox = false; 164 | this.MinimizeBox = false; 165 | this.Name = "AboutBox"; 166 | this.Padding = new System.Windows.Forms.Padding(9); 167 | this.ShowIcon = false; 168 | this.ShowInTaskbar = false; 169 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 170 | this.Text = "AboutBox"; 171 | this.tableLayoutPanel.ResumeLayout(false); 172 | this.tableLayoutPanel.PerformLayout(); 173 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); 174 | this.ResumeLayout(false); 175 | 176 | } 177 | 178 | #endregion 179 | 180 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 181 | private System.Windows.Forms.PictureBox logoPictureBox; 182 | private System.Windows.Forms.Label labelProductName; 183 | private System.Windows.Forms.Label labelVersion; 184 | private System.Windows.Forms.Label labelCopyright; 185 | private System.Windows.Forms.Label labelCompanyName; 186 | private System.Windows.Forms.TextBox textBoxDescription; 187 | private System.Windows.Forms.Button okButton; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /AboutBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Windows.Forms; 4 | 5 | namespace BorderlandsAdvancedConfig 6 | { 7 | partial class AboutBox : Form 8 | { 9 | public AboutBox() 10 | { 11 | InitializeComponent(); 12 | this.Text = String.Format("About {0}", AssemblyTitle); 13 | this.labelProductName.Text = AssemblyProduct; 14 | this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion); 15 | this.labelCopyright.Text = AssemblyCopyright; 16 | this.labelCompanyName.Text = AssemblyCompany; 17 | } 18 | 19 | #region Assembly Attribute Accessors 20 | 21 | public string AssemblyTitle 22 | { 23 | get 24 | { 25 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 26 | if (attributes.Length > 0) 27 | { 28 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; 29 | if (titleAttribute.Title != "") 30 | { 31 | return titleAttribute.Title; 32 | } 33 | } 34 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); 35 | } 36 | } 37 | 38 | public string AssemblyVersion 39 | { 40 | get 41 | { 42 | return Assembly.GetExecutingAssembly().GetName().Version.ToString(); 43 | } 44 | } 45 | 46 | public string AssemblyDescription 47 | { 48 | get 49 | { 50 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 51 | if (attributes.Length == 0) 52 | { 53 | return ""; 54 | } 55 | return ((AssemblyDescriptionAttribute)attributes[0]).Description; 56 | } 57 | } 58 | 59 | public string AssemblyProduct 60 | { 61 | get 62 | { 63 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 64 | if (attributes.Length == 0) 65 | { 66 | return ""; 67 | } 68 | return ((AssemblyProductAttribute)attributes[0]).Product; 69 | } 70 | } 71 | 72 | public string AssemblyCopyright 73 | { 74 | get 75 | { 76 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 77 | if (attributes.Length == 0) 78 | { 79 | return ""; 80 | } 81 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; 82 | } 83 | } 84 | 85 | public string AssemblyCompany 86 | { 87 | get 88 | { 89 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 90 | if (attributes.Length == 0) 91 | { 92 | return ""; 93 | } 94 | return ((AssemblyCompanyAttribute)attributes[0]).Company; 95 | } 96 | } 97 | #endregion 98 | 99 | private void okButton_Click(object sender, EventArgs e) 100 | { 101 | this.Close(); 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Assets/Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Banner.png -------------------------------------------------------------------------------- /Assets/Banner.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Banner.psd -------------------------------------------------------------------------------- /Assets/Glacier.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Glacier.jpg -------------------------------------------------------------------------------- /Assets/Sig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Sig.png -------------------------------------------------------------------------------- /Assets/Sig.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Sig.psd -------------------------------------------------------------------------------- /Assets/URL.txt: -------------------------------------------------------------------------------- 1 | http://sirithlainion.deviantart.com/art/Game-Icons-XII-139043726 -------------------------------------------------------------------------------- /Assets/Wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper.jpg -------------------------------------------------------------------------------- /Assets/Wallpaper2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper2.jpg -------------------------------------------------------------------------------- /Assets/Wallpaper3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper3.jpg -------------------------------------------------------------------------------- /Assets/Wallpaper4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper4.jpg -------------------------------------------------------------------------------- /Assets/Wallpaper5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper5.jpg -------------------------------------------------------------------------------- /Assets/Wallpaper6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/Wallpaper6.jpg -------------------------------------------------------------------------------- /Assets/borderlands.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/borderlands.ico -------------------------------------------------------------------------------- /Assets/borderlands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/borderlands.png -------------------------------------------------------------------------------- /Assets/network.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/network.ico -------------------------------------------------------------------------------- /Assets/title_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/Assets/title_bar.png -------------------------------------------------------------------------------- /BorderlandsAdvancedConfig.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {485B6D21-5D57-4EEF-828B-FC60192B9917} 9 | WinExe 10 | Properties 11 | BorderlandsAdvancedConfig 12 | BorderlandsAdvancedConfig 13 | v4.0 14 | 512 15 | borderlands.ico 16 | BorderlandsAdvancedConfig.Program 17 | true 18 | 19 | 20 | 21 | 22 | 3.5 23 | 24 | http://localhost/BorderlandsAdvancedConfig/ 25 | true 26 | Web 27 | true 28 | Foreground 29 | 7 30 | Days 31 | false 32 | false 33 | true 34 | 0 35 | 1.0.0.%2a 36 | false 37 | true 38 | 39 | 40 | true 41 | full 42 | false 43 | bin\Debug\ 44 | DEBUG;TRACE 45 | prompt 46 | 4 47 | 48 | 49 | pdbonly 50 | true 51 | bin\Release\ 52 | TRACE 53 | prompt 54 | 4 55 | 56 | 57 | 58 | 59 | 3.5 60 | 61 | 62 | 3.5 63 | 64 | 65 | 3.5 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Form 76 | 77 | 78 | AboutBox.cs 79 | 80 | 81 | Form 82 | 83 | 84 | ErrorMessageBox.cs 85 | 86 | 87 | Form 88 | 89 | 90 | FrmLoad.cs 91 | 92 | 93 | 94 | 95 | 96 | 97 | Form 98 | 99 | 100 | FrmConfig.cs 101 | 102 | 103 | 104 | 105 | 106 | True 107 | True 108 | LocalizedStrings.resx 109 | 110 | 111 | 112 | 113 | 114 | AboutBox.cs 115 | 116 | 117 | ErrorMessageBox.cs 118 | 119 | 120 | FrmConfig.cs 121 | 122 | 123 | FrmLoad.cs 124 | 125 | 126 | ResXFileCodeGenerator 127 | LocalizedStrings.Designer.cs 128 | 129 | 130 | ResXFileCodeGenerator 131 | Resources.Designer.cs 132 | Designer 133 | 134 | 135 | True 136 | Resources.resx 137 | True 138 | 139 | 140 | SettingsSingleFileGenerator 141 | Settings.Designer.cs 142 | 143 | 144 | True 145 | Settings.settings 146 | True 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | False 162 | .NET Framework Client Profile 163 | false 164 | 165 | 166 | False 167 | .NET Framework 2.0 %28x86%29 168 | false 169 | 170 | 171 | False 172 | .NET Framework 3.0 %28x86%29 173 | false 174 | 175 | 176 | False 177 | .NET Framework 3.5 178 | false 179 | 180 | 181 | False 182 | .NET Framework 3.5 SP1 183 | true 184 | 185 | 186 | False 187 | Windows Installer 3.1 188 | true 189 | 190 | 191 | 192 | 199 | -------------------------------------------------------------------------------- /BorderlandsAdvancedConfig.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BorderlandsAdvancedConfig", "BorderlandsAdvancedConfig.csproj", "{485B6D21-5D57-4EEF-828B-FC60192B9917}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {485B6D21-5D57-4EEF-828B-FC60192B9917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {485B6D21-5D57-4EEF-828B-FC60192B9917}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {485B6D21-5D57-4EEF-828B-FC60192B9917}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {485B6D21-5D57-4EEF-828B-FC60192B9917}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /CurrentVersion.txt: -------------------------------------------------------------------------------- 1 | 1.0.2.0 2 | -------------------------------------------------------------------------------- /ErrorHandling/ErrorMessageBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace BorderlandsAdvancedConfig.ErrorHandling 2 | { 3 | partial class ErrorMessageBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.lblHeader = new System.Windows.Forms.Label(); 32 | this.btnOK = new System.Windows.Forms.Button(); 33 | this.titleBack = new System.Windows.Forms.PictureBox(); 34 | this.txtMsg = new System.Windows.Forms.RichTextBox(); 35 | ((System.ComponentModel.ISupportInitialize)(this.titleBack)).BeginInit(); 36 | this.SuspendLayout(); 37 | // 38 | // lblHeader 39 | // 40 | this.lblHeader.AutoSize = true; 41 | this.lblHeader.BackColor = System.Drawing.Color.Transparent; 42 | this.lblHeader.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 43 | this.lblHeader.ForeColor = System.Drawing.Color.White; 44 | this.lblHeader.Location = new System.Drawing.Point(9, 7); 45 | this.lblHeader.Name = "lblHeader"; 46 | this.lblHeader.Size = new System.Drawing.Size(42, 13); 47 | this.lblHeader.TabIndex = 13; 48 | this.lblHeader.Text = "[Title]"; 49 | // 50 | // btnOK 51 | // 52 | this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; 53 | this.btnOK.Location = new System.Drawing.Point(314, 192); 54 | this.btnOK.Name = "btnOK"; 55 | this.btnOK.Size = new System.Drawing.Size(74, 25); 56 | this.btnOK.TabIndex = 11; 57 | this.btnOK.Text = "OK"; 58 | this.btnOK.UseVisualStyleBackColor = true; 59 | this.btnOK.Click += new System.EventHandler(this.btnOK_Click); 60 | // 61 | // titleBack 62 | // 63 | this.titleBack.Dock = System.Windows.Forms.DockStyle.Top; 64 | this.titleBack.Image = global::BorderlandsAdvancedConfig.Properties.Resources.title_bar; 65 | this.titleBack.Location = new System.Drawing.Point(0, 0); 66 | this.titleBack.Name = "titleBack"; 67 | this.titleBack.Size = new System.Drawing.Size(398, 25); 68 | this.titleBack.TabIndex = 12; 69 | this.titleBack.TabStop = false; 70 | // 71 | // txtMsg 72 | // 73 | this.txtMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 74 | this.txtMsg.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 75 | this.txtMsg.Location = new System.Drawing.Point(12, 31); 76 | this.txtMsg.Name = "txtMsg"; 77 | this.txtMsg.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical; 78 | this.txtMsg.ShowSelectionMargin = true; 79 | this.txtMsg.Size = new System.Drawing.Size(374, 155); 80 | this.txtMsg.TabIndex = 14; 81 | this.txtMsg.Text = "lots of text"; 82 | // 83 | // ErrorMessageBox 84 | // 85 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 86 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 | this.ClientSize = new System.Drawing.Size(398, 222); 88 | this.Controls.Add(this.txtMsg); 89 | this.Controls.Add(this.lblHeader); 90 | this.Controls.Add(this.btnOK); 91 | this.Controls.Add(this.titleBack); 92 | this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 93 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 94 | this.Name = "ErrorMessageBox"; 95 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 96 | this.Text = "ErrorMessageBox"; 97 | ((System.ComponentModel.ISupportInitialize)(this.titleBack)).EndInit(); 98 | this.ResumeLayout(false); 99 | this.PerformLayout(); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private System.Windows.Forms.Label lblHeader; 106 | private System.Windows.Forms.Button btnOK; 107 | private System.Windows.Forms.PictureBox titleBack; 108 | private System.Windows.Forms.RichTextBox txtMsg; 109 | } 110 | } -------------------------------------------------------------------------------- /ErrorHandling/ErrorMessageBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace BorderlandsAdvancedConfig.ErrorHandling 5 | { 6 | public partial class ErrorMessageBox : Form 7 | { 8 | static ErrorMessageBox newMessageBox; 9 | 10 | public ErrorMessageBox(string txtMessage, string txtTitle, string header) 11 | { 12 | InitializeComponent(); 13 | 14 | lblHeader.Parent = titleBack; 15 | 16 | this.lblHeader.Text = header; 17 | this.Text = txtTitle; 18 | this.txtMsg.Text = txtMessage; 19 | } 20 | 21 | public static void ShowBox(string txtMessage, string txtTitle, string header) 22 | { 23 | newMessageBox = new ErrorMessageBox(txtMessage, txtTitle, header); 24 | 25 | newMessageBox.ShowDialog(); 26 | } 27 | 28 | private void btnOK_Click(object sender, EventArgs e) 29 | { 30 | Application.Exit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ErrorHandling/ErrorMessageBox.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /FrmConfig.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace BorderlandsAdvancedConfig 2 | { 3 | partial class FrmConfig 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmConfig)); 32 | this.SettingsDirBrowser = new System.Windows.Forms.FolderBrowserDialog(); 33 | this.midPanel = new System.Windows.Forms.Panel(); 34 | this.txtLog = new System.Windows.Forms.RichTextBox(); 35 | this.grpInput = new System.Windows.Forms.GroupBox(); 36 | this.chkCrouchToggle = new System.Windows.Forms.CheckBox(); 37 | this.chkF9Hud = new System.Windows.Forms.CheckBox(); 38 | this.chkF12Fps = new System.Windows.Forms.CheckBox(); 39 | this.label6 = new System.Windows.Forms.Label(); 40 | this.txtF11Fov = new System.Windows.Forms.TextBox(); 41 | this.label7 = new System.Windows.Forms.Label(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.txtF10Fov = new System.Windows.Forms.TextBox(); 44 | this.label5 = new System.Windows.Forms.Label(); 45 | this.chkScrollWheel = new System.Windows.Forms.CheckBox(); 46 | this.chkZoomToggle = new System.Windows.Forms.CheckBox(); 47 | this.chkConsole = new System.Windows.Forms.CheckBox(); 48 | this.chkDisablevchat = new System.Windows.Forms.CheckBox(); 49 | this.chkDisableMouseSmooth = new System.Windows.Forms.CheckBox(); 50 | this.chkFOVAdjust = new System.Windows.Forms.CheckBox(); 51 | this.grpGraphic = new System.Windows.Forms.GroupBox(); 52 | this.chkOutlines = new System.Windows.Forms.CheckBox(); 53 | this.label8 = new System.Windows.Forms.Label(); 54 | this.chkSmoothFrameRate = new System.Windows.Forms.CheckBox(); 55 | this.txtScreenPercentage = new System.Windows.Forms.TextBox(); 56 | this.label3 = new System.Windows.Forms.Label(); 57 | this.label2 = new System.Windows.Forms.Label(); 58 | this.txtHeight = new System.Windows.Forms.TextBox(); 59 | this.txtWidth = new System.Windows.Forms.TextBox(); 60 | this.label1 = new System.Windows.Forms.Label(); 61 | this.lblMaxAA = new System.Windows.Forms.Label(); 62 | this.trkMaxAA = new System.Windows.Forms.TrackBar(); 63 | this.lblMaxAnsio = new System.Windows.Forms.Label(); 64 | this.trkMaxAnsio = new System.Windows.Forms.TrackBar(); 65 | this.chkDisableStartup = new System.Windows.Forms.CheckBox(); 66 | this.chkPhysX = new System.Windows.Forms.CheckBox(); 67 | this.chkVsync = new System.Windows.Forms.CheckBox(); 68 | this.chkHBloom = new System.Windows.Forms.CheckBox(); 69 | this.chkAmbient = new System.Windows.Forms.CheckBox(); 70 | this.trkPlayerInfoMaxDist = new System.Windows.Forms.TrackBar(); 71 | this.UpdateBackgroundWorker = new System.ComponentModel.BackgroundWorker(); 72 | this.bottomPanel = new System.Windows.Forms.Panel(); 73 | this.lnkOfficialThread = new System.Windows.Forms.LinkLabel(); 74 | this.btnAbout = new System.Windows.Forms.Button(); 75 | this.btnRestore = new System.Windows.Forms.Button(); 76 | this.btnSave = new System.Windows.Forms.Button(); 77 | this.topPicture = new System.Windows.Forms.PictureBox(); 78 | this.midPanel.SuspendLayout(); 79 | this.grpInput.SuspendLayout(); 80 | this.grpGraphic.SuspendLayout(); 81 | ((System.ComponentModel.ISupportInitialize)(this.trkMaxAA)).BeginInit(); 82 | ((System.ComponentModel.ISupportInitialize)(this.trkMaxAnsio)).BeginInit(); 83 | ((System.ComponentModel.ISupportInitialize)(this.trkPlayerInfoMaxDist)).BeginInit(); 84 | this.bottomPanel.SuspendLayout(); 85 | ((System.ComponentModel.ISupportInitialize)(this.topPicture)).BeginInit(); 86 | this.SuspendLayout(); 87 | // 88 | // SettingsDirBrowser 89 | // 90 | this.SettingsDirBrowser.SelectedPath = "c:\\"; 91 | // 92 | // midPanel 93 | // 94 | this.midPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 95 | this.midPanel.Controls.Add(this.txtLog); 96 | this.midPanel.Controls.Add(this.grpInput); 97 | this.midPanel.Controls.Add(this.grpGraphic); 98 | this.midPanel.Dock = System.Windows.Forms.DockStyle.Fill; 99 | this.midPanel.Location = new System.Drawing.Point(0, 150); 100 | this.midPanel.Name = "midPanel"; 101 | this.midPanel.Size = new System.Drawing.Size(776, 358); 102 | this.midPanel.TabIndex = 35; 103 | // 104 | // txtLog 105 | // 106 | this.txtLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 107 | this.txtLog.BorderStyle = System.Windows.Forms.BorderStyle.None; 108 | this.txtLog.Dock = System.Windows.Forms.DockStyle.Right; 109 | this.txtLog.ForeColor = System.Drawing.Color.White; 110 | this.txtLog.Location = new System.Drawing.Point(456, 0); 111 | this.txtLog.Name = "txtLog"; 112 | this.txtLog.Size = new System.Drawing.Size(320, 358); 113 | this.txtLog.TabIndex = 34; 114 | this.txtLog.TabStop = false; 115 | this.txtLog.Text = ""; 116 | // 117 | // grpInput 118 | // 119 | this.grpInput.Controls.Add(this.chkCrouchToggle); 120 | this.grpInput.Controls.Add(this.chkF9Hud); 121 | this.grpInput.Controls.Add(this.chkF12Fps); 122 | this.grpInput.Controls.Add(this.label6); 123 | this.grpInput.Controls.Add(this.txtF11Fov); 124 | this.grpInput.Controls.Add(this.label7); 125 | this.grpInput.Controls.Add(this.label4); 126 | this.grpInput.Controls.Add(this.txtF10Fov); 127 | this.grpInput.Controls.Add(this.label5); 128 | this.grpInput.Controls.Add(this.chkScrollWheel); 129 | this.grpInput.Controls.Add(this.chkZoomToggle); 130 | this.grpInput.Controls.Add(this.chkConsole); 131 | this.grpInput.Controls.Add(this.chkDisablevchat); 132 | this.grpInput.Controls.Add(this.chkDisableMouseSmooth); 133 | this.grpInput.Controls.Add(this.chkFOVAdjust); 134 | this.grpInput.ForeColor = System.Drawing.Color.White; 135 | this.grpInput.Location = new System.Drawing.Point(246, 3); 136 | this.grpInput.Name = "grpInput"; 137 | this.grpInput.Size = new System.Drawing.Size(204, 349); 138 | this.grpInput.TabIndex = 32; 139 | this.grpInput.TabStop = false; 140 | this.grpInput.Text = "Input Settings"; 141 | // 142 | // chkCrouchToggle 143 | // 144 | this.chkCrouchToggle.AutoSize = true; 145 | this.chkCrouchToggle.Location = new System.Drawing.Point(18, 188); 146 | this.chkCrouchToggle.Name = "chkCrouchToggle"; 147 | this.chkCrouchToggle.Size = new System.Drawing.Size(137, 17); 148 | this.chkCrouchToggle.TabIndex = 32; 149 | this.chkCrouchToggle.Text = "Make Crouch Togglable"; 150 | this.chkCrouchToggle.UseVisualStyleBackColor = true; 151 | // 152 | // chkF9Hud 153 | // 154 | this.chkF9Hud.AutoSize = true; 155 | this.chkF9Hud.Location = new System.Drawing.Point(18, 20); 156 | this.chkF9Hud.Name = "chkF9Hud"; 157 | this.chkF9Hud.Size = new System.Drawing.Size(163, 17); 158 | this.chkF9Hud.TabIndex = 31; 159 | this.chkF9Hud.Text = "Assign F9 to Show/Hide HUD"; 160 | this.chkF9Hud.UseVisualStyleBackColor = true; 161 | // 162 | // chkF12Fps 163 | // 164 | this.chkF12Fps.AutoSize = true; 165 | this.chkF12Fps.Location = new System.Drawing.Point(18, 119); 166 | this.chkF12Fps.Name = "chkF12Fps"; 167 | this.chkF12Fps.Size = new System.Drawing.Size(166, 17); 168 | this.chkF12Fps.TabIndex = 30; 169 | this.chkF12Fps.Text = "Assign F12 to Show/Hide FPS"; 170 | this.chkF12Fps.UseVisualStyleBackColor = true; 171 | // 172 | // label6 173 | // 174 | this.label6.AutoSize = true; 175 | this.label6.Location = new System.Drawing.Point(120, 93); 176 | this.label6.Name = "label6"; 177 | this.label6.Size = new System.Drawing.Size(47, 13); 178 | this.label6.TabIndex = 24; 179 | this.label6.Text = "Degrees"; 180 | // 181 | // txtF11Fov 182 | // 183 | this.txtF11Fov.Location = new System.Drawing.Point(71, 88); 184 | this.txtF11Fov.Name = "txtF11Fov"; 185 | this.txtF11Fov.Size = new System.Drawing.Size(43, 21); 186 | this.txtF11Fov.TabIndex = 23; 187 | // 188 | // label7 189 | // 190 | this.label7.AutoSize = true; 191 | this.label7.Location = new System.Drawing.Point(15, 93); 192 | this.label7.Name = "label7"; 193 | this.label7.Size = new System.Drawing.Size(52, 13); 194 | this.label7.TabIndex = 22; 195 | this.label7.Text = "F11 FOV:"; 196 | // 197 | // label4 198 | // 199 | this.label4.AutoSize = true; 200 | this.label4.Location = new System.Drawing.Point(120, 67); 201 | this.label4.Name = "label4"; 202 | this.label4.Size = new System.Drawing.Size(47, 13); 203 | this.label4.TabIndex = 21; 204 | this.label4.Text = "Degrees"; 205 | // 206 | // txtF10Fov 207 | // 208 | this.txtF10Fov.Location = new System.Drawing.Point(71, 62); 209 | this.txtF10Fov.Name = "txtF10Fov"; 210 | this.txtF10Fov.Size = new System.Drawing.Size(43, 21); 211 | this.txtF10Fov.TabIndex = 20; 212 | // 213 | // label5 214 | // 215 | this.label5.AutoSize = true; 216 | this.label5.Location = new System.Drawing.Point(15, 67); 217 | this.label5.Name = "label5"; 218 | this.label5.Size = new System.Drawing.Size(52, 13); 219 | this.label5.TabIndex = 19; 220 | this.label5.Text = "F10 FOV:"; 221 | // 222 | // chkScrollWheel 223 | // 224 | this.chkScrollWheel.AutoSize = true; 225 | this.chkScrollWheel.Location = new System.Drawing.Point(18, 234); 226 | this.chkScrollWheel.Name = "chkScrollWheel"; 227 | this.chkScrollWheel.Size = new System.Drawing.Size(153, 17); 228 | this.chkScrollWheel.TabIndex = 29; 229 | this.chkScrollWheel.Text = "Enable Mouse Scroll Wheel"; 230 | this.chkScrollWheel.UseVisualStyleBackColor = true; 231 | // 232 | // chkZoomToggle 233 | // 234 | this.chkZoomToggle.AutoSize = true; 235 | this.chkZoomToggle.Location = new System.Drawing.Point(18, 211); 236 | this.chkZoomToggle.Name = "chkZoomToggle"; 237 | this.chkZoomToggle.Size = new System.Drawing.Size(129, 17); 238 | this.chkZoomToggle.TabIndex = 28; 239 | this.chkZoomToggle.Text = "Make Zoom Togglable"; 240 | this.chkZoomToggle.UseVisualStyleBackColor = true; 241 | // 242 | // chkConsole 243 | // 244 | this.chkConsole.AutoSize = true; 245 | this.chkConsole.Location = new System.Drawing.Point(18, 257); 246 | this.chkConsole.Name = "chkConsole"; 247 | this.chkConsole.Size = new System.Drawing.Size(99, 17); 248 | this.chkConsole.TabIndex = 27; 249 | this.chkConsole.Text = "Enable Console"; 250 | this.chkConsole.UseVisualStyleBackColor = true; 251 | // 252 | // chkDisablevchat 253 | // 254 | this.chkDisablevchat.AutoSize = true; 255 | this.chkDisablevchat.Location = new System.Drawing.Point(18, 165); 256 | this.chkDisablevchat.Name = "chkDisablevchat"; 257 | this.chkDisablevchat.Size = new System.Drawing.Size(155, 17); 258 | this.chkDisablevchat.TabIndex = 26; 259 | this.chkDisablevchat.Text = "Disable in-game Voice Chat"; 260 | this.chkDisablevchat.UseVisualStyleBackColor = true; 261 | // 262 | // chkDisableMouseSmooth 263 | // 264 | this.chkDisableMouseSmooth.AutoSize = true; 265 | this.chkDisableMouseSmooth.Location = new System.Drawing.Point(18, 142); 266 | this.chkDisableMouseSmooth.Name = "chkDisableMouseSmooth"; 267 | this.chkDisableMouseSmooth.Size = new System.Drawing.Size(147, 17); 268 | this.chkDisableMouseSmooth.TabIndex = 25; 269 | this.chkDisableMouseSmooth.Text = "Disable Mouse Smoothing"; 270 | this.chkDisableMouseSmooth.UseVisualStyleBackColor = true; 271 | // 272 | // chkFOVAdjust 273 | // 274 | this.chkFOVAdjust.AutoSize = true; 275 | this.chkFOVAdjust.Location = new System.Drawing.Point(18, 43); 276 | this.chkFOVAdjust.Name = "chkFOVAdjust"; 277 | this.chkFOVAdjust.Size = new System.Drawing.Size(170, 17); 278 | this.chkFOVAdjust.TabIndex = 18; 279 | this.chkFOVAdjust.Text = "Assign F10/F11 to Adjust FOV"; 280 | this.chkFOVAdjust.UseVisualStyleBackColor = true; 281 | this.chkFOVAdjust.CheckedChanged += new System.EventHandler(this.chkFOVAdjust_CheckedChanged); 282 | // 283 | // grpGraphic 284 | // 285 | this.grpGraphic.Controls.Add(this.chkOutlines); 286 | this.grpGraphic.Controls.Add(this.label8); 287 | this.grpGraphic.Controls.Add(this.chkSmoothFrameRate); 288 | this.grpGraphic.Controls.Add(this.txtScreenPercentage); 289 | this.grpGraphic.Controls.Add(this.label3); 290 | this.grpGraphic.Controls.Add(this.label2); 291 | this.grpGraphic.Controls.Add(this.txtHeight); 292 | this.grpGraphic.Controls.Add(this.txtWidth); 293 | this.grpGraphic.Controls.Add(this.label1); 294 | this.grpGraphic.Controls.Add(this.lblMaxAA); 295 | this.grpGraphic.Controls.Add(this.trkMaxAA); 296 | this.grpGraphic.Controls.Add(this.lblMaxAnsio); 297 | this.grpGraphic.Controls.Add(this.trkMaxAnsio); 298 | this.grpGraphic.Controls.Add(this.chkDisableStartup); 299 | this.grpGraphic.Controls.Add(this.chkPhysX); 300 | this.grpGraphic.Controls.Add(this.chkVsync); 301 | this.grpGraphic.Controls.Add(this.chkHBloom); 302 | this.grpGraphic.Controls.Add(this.chkAmbient); 303 | this.grpGraphic.Controls.Add(this.trkPlayerInfoMaxDist); 304 | this.grpGraphic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 305 | this.grpGraphic.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 306 | this.grpGraphic.ForeColor = System.Drawing.Color.White; 307 | this.grpGraphic.Location = new System.Drawing.Point(12, 3); 308 | this.grpGraphic.Name = "grpGraphic"; 309 | this.grpGraphic.Size = new System.Drawing.Size(217, 349); 310 | this.grpGraphic.TabIndex = 31; 311 | this.grpGraphic.TabStop = false; 312 | this.grpGraphic.Text = "Graphic Settings"; 313 | // 314 | // chkOutlines 315 | // 316 | this.chkOutlines.AutoSize = true; 317 | this.chkOutlines.Location = new System.Drawing.Point(17, 66); 318 | this.chkOutlines.Name = "chkOutlines"; 319 | this.chkOutlines.Size = new System.Drawing.Size(102, 17); 320 | this.chkOutlines.TabIndex = 20; 321 | this.chkOutlines.Text = "Disable Outlines"; 322 | this.chkOutlines.UseVisualStyleBackColor = true; 323 | // 324 | // label8 325 | // 326 | this.label8.AutoSize = true; 327 | this.label8.Location = new System.Drawing.Point(14, 184); 328 | this.label8.Name = "label8"; 329 | this.label8.Size = new System.Drawing.Size(101, 13); 330 | this.label8.TabIndex = 18; 331 | this.label8.Text = "Loot view Distance:"; 332 | // 333 | // chkSmoothFrameRate 334 | // 335 | this.chkSmoothFrameRate.AutoSize = true; 336 | this.chkSmoothFrameRate.Location = new System.Drawing.Point(17, 111); 337 | this.chkSmoothFrameRate.Name = "chkSmoothFrameRate"; 338 | this.chkSmoothFrameRate.Size = new System.Drawing.Size(189, 17); 339 | this.chkSmoothFrameRate.TabIndex = 17; 340 | this.chkSmoothFrameRate.Text = "Smooth Frame Rate (62 FPS Limit)"; 341 | this.chkSmoothFrameRate.UseVisualStyleBackColor = true; 342 | // 343 | // txtScreenPercentage 344 | // 345 | this.txtScreenPercentage.Location = new System.Drawing.Point(149, 305); 346 | this.txtScreenPercentage.Name = "txtScreenPercentage"; 347 | this.txtScreenPercentage.Size = new System.Drawing.Size(43, 21); 348 | this.txtScreenPercentage.TabIndex = 16; 349 | // 350 | // label3 351 | // 352 | this.label3.AutoSize = true; 353 | this.label3.Location = new System.Drawing.Point(13, 310); 354 | this.label3.Name = "label3"; 355 | this.label3.Size = new System.Drawing.Size(102, 13); 356 | this.label3.TabIndex = 15; 357 | this.label3.Text = "Screen Percentage:"; 358 | // 359 | // label2 360 | // 361 | this.label2.AutoSize = true; 362 | this.label2.Location = new System.Drawing.Point(130, 282); 363 | this.label2.Name = "label2"; 364 | this.label2.Size = new System.Drawing.Size(13, 13); 365 | this.label2.TabIndex = 13; 366 | this.label2.Text = "x"; 367 | // 368 | // txtHeight 369 | // 370 | this.txtHeight.Location = new System.Drawing.Point(149, 278); 371 | this.txtHeight.Name = "txtHeight"; 372 | this.txtHeight.Size = new System.Drawing.Size(43, 21); 373 | this.txtHeight.TabIndex = 14; 374 | // 375 | // txtWidth 376 | // 377 | this.txtWidth.Location = new System.Drawing.Point(81, 278); 378 | this.txtWidth.Name = "txtWidth"; 379 | this.txtWidth.Size = new System.Drawing.Size(43, 21); 380 | this.txtWidth.TabIndex = 12; 381 | // 382 | // label1 383 | // 384 | this.label1.AutoSize = true; 385 | this.label1.Location = new System.Drawing.Point(14, 282); 386 | this.label1.Name = "label1"; 387 | this.label1.Size = new System.Drawing.Size(61, 13); 388 | this.label1.TabIndex = 11; 389 | this.label1.Text = "Resolution:"; 390 | // 391 | // lblMaxAA 392 | // 393 | this.lblMaxAA.AutoSize = true; 394 | this.lblMaxAA.Location = new System.Drawing.Point(14, 246); 395 | this.lblMaxAA.Name = "lblMaxAA"; 396 | this.lblMaxAA.Size = new System.Drawing.Size(92, 13); 397 | this.lblMaxAA.TabIndex = 9; 398 | this.lblMaxAA.Text = "Max Anti Aliasing:"; 399 | // 400 | // trkMaxAA 401 | // 402 | this.trkMaxAA.Location = new System.Drawing.Point(128, 246); 403 | this.trkMaxAA.Maximum = 4; 404 | this.trkMaxAA.Name = "trkMaxAA"; 405 | this.trkMaxAA.Size = new System.Drawing.Size(83, 45); 406 | this.trkMaxAA.TabIndex = 10; 407 | this.trkMaxAA.Scroll += new System.EventHandler(this.trkMaxAA_Scroll); 408 | // 409 | // lblMaxAnsio 410 | // 411 | this.lblMaxAnsio.AutoSize = true; 412 | this.lblMaxAnsio.Location = new System.Drawing.Point(14, 214); 413 | this.lblMaxAnsio.Name = "lblMaxAnsio"; 414 | this.lblMaxAnsio.Size = new System.Drawing.Size(101, 13); 415 | this.lblMaxAnsio.TabIndex = 7; 416 | this.lblMaxAnsio.Text = "Max Aniso Filtering:"; 417 | // 418 | // trkMaxAnsio 419 | // 420 | this.trkMaxAnsio.Location = new System.Drawing.Point(128, 214); 421 | this.trkMaxAnsio.Maximum = 4; 422 | this.trkMaxAnsio.Name = "trkMaxAnsio"; 423 | this.trkMaxAnsio.Size = new System.Drawing.Size(83, 45); 424 | this.trkMaxAnsio.TabIndex = 8; 425 | this.trkMaxAnsio.Scroll += new System.EventHandler(this.trkMaxAniso_Scroll); 426 | // 427 | // chkDisableStartup 428 | // 429 | this.chkDisableStartup.AutoSize = true; 430 | this.chkDisableStartup.Location = new System.Drawing.Point(17, 134); 431 | this.chkDisableStartup.Name = "chkDisableStartup"; 432 | this.chkDisableStartup.Size = new System.Drawing.Size(131, 17); 433 | this.chkDisableStartup.TabIndex = 6; 434 | this.chkDisableStartup.Text = "Disable Starup Movies"; 435 | this.chkDisableStartup.UseVisualStyleBackColor = true; 436 | // 437 | // chkPhysX 438 | // 439 | this.chkPhysX.AutoSize = true; 440 | this.chkPhysX.Location = new System.Drawing.Point(17, 157); 441 | this.chkPhysX.Name = "chkPhysX"; 442 | this.chkPhysX.Size = new System.Drawing.Size(90, 17); 443 | this.chkPhysX.TabIndex = 5; 444 | this.chkPhysX.Text = "Enable PhysX"; 445 | this.chkPhysX.UseVisualStyleBackColor = true; 446 | // 447 | // chkVsync 448 | // 449 | this.chkVsync.AutoSize = true; 450 | this.chkVsync.Location = new System.Drawing.Point(17, 88); 451 | this.chkVsync.Name = "chkVsync"; 452 | this.chkVsync.Size = new System.Drawing.Size(140, 17); 453 | this.chkVsync.TabIndex = 4; 454 | this.chkVsync.Text = "V-Sync (Recommended)"; 455 | this.chkVsync.UseVisualStyleBackColor = true; 456 | this.chkVsync.CheckedChanged += new System.EventHandler(this.chkVsync_CheckedChanged); 457 | // 458 | // chkHBloom 459 | // 460 | this.chkHBloom.AutoSize = true; 461 | this.chkHBloom.Location = new System.Drawing.Point(17, 43); 462 | this.chkHBloom.Name = "chkHBloom"; 463 | this.chkHBloom.Size = new System.Drawing.Size(115, 17); 464 | this.chkHBloom.TabIndex = 3; 465 | this.chkHBloom.Text = "High Quality Bloom"; 466 | this.chkHBloom.UseVisualStyleBackColor = true; 467 | // 468 | // chkAmbient 469 | // 470 | this.chkAmbient.AutoSize = true; 471 | this.chkAmbient.Location = new System.Drawing.Point(17, 20); 472 | this.chkAmbient.Name = "chkAmbient"; 473 | this.chkAmbient.Size = new System.Drawing.Size(113, 17); 474 | this.chkAmbient.TabIndex = 2; 475 | this.chkAmbient.Text = "Ambient Occlusion"; 476 | this.chkAmbient.UseVisualStyleBackColor = true; 477 | // 478 | // trkPlayerInfoMaxDist 479 | // 480 | this.trkPlayerInfoMaxDist.LargeChange = 1000; 481 | this.trkPlayerInfoMaxDist.Location = new System.Drawing.Point(128, 179); 482 | this.trkPlayerInfoMaxDist.Maximum = 60000; 483 | this.trkPlayerInfoMaxDist.Minimum = 15000; 484 | this.trkPlayerInfoMaxDist.Name = "trkPlayerInfoMaxDist"; 485 | this.trkPlayerInfoMaxDist.Size = new System.Drawing.Size(83, 45); 486 | this.trkPlayerInfoMaxDist.SmallChange = 100; 487 | this.trkPlayerInfoMaxDist.TabIndex = 19; 488 | this.trkPlayerInfoMaxDist.TickFrequency = 5000; 489 | this.trkPlayerInfoMaxDist.Value = 15000; 490 | // 491 | // UpdateBackgroundWorker 492 | // 493 | this.UpdateBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.UpdateBackgroundWorker_DoWork); 494 | // 495 | // bottomPanel 496 | // 497 | this.bottomPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 498 | this.bottomPanel.BackgroundImage = global::BorderlandsAdvancedConfig.Properties.Resources.Glacier; 499 | this.bottomPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; 500 | this.bottomPanel.Controls.Add(this.lnkOfficialThread); 501 | this.bottomPanel.Controls.Add(this.btnAbout); 502 | this.bottomPanel.Controls.Add(this.btnRestore); 503 | this.bottomPanel.Controls.Add(this.btnSave); 504 | this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom; 505 | this.bottomPanel.Location = new System.Drawing.Point(0, 508); 506 | this.bottomPanel.Name = "bottomPanel"; 507 | this.bottomPanel.Size = new System.Drawing.Size(776, 43); 508 | this.bottomPanel.TabIndex = 33; 509 | // 510 | // lnkOfficialThread 511 | // 512 | this.lnkOfficialThread.AutoSize = true; 513 | this.lnkOfficialThread.BackColor = System.Drawing.Color.Transparent; 514 | this.lnkOfficialThread.LinkColor = System.Drawing.Color.PaleGreen; 515 | this.lnkOfficialThread.Location = new System.Drawing.Point(107, 15); 516 | this.lnkOfficialThread.Name = "lnkOfficialThread"; 517 | this.lnkOfficialThread.Size = new System.Drawing.Size(53, 13); 518 | this.lnkOfficialThread.TabIndex = 33; 519 | this.lnkOfficialThread.TabStop = true; 520 | this.lnkOfficialThread.Text = "Feedback"; 521 | this.lnkOfficialThread.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkOfficialThread_LinkClicked); 522 | // 523 | // btnAbout 524 | // 525 | this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.System; 526 | this.btnAbout.Location = new System.Drawing.Point(12, 6); 527 | this.btnAbout.Name = "btnAbout"; 528 | this.btnAbout.Size = new System.Drawing.Size(83, 31); 529 | this.btnAbout.TabIndex = 32; 530 | this.btnAbout.Text = "About"; 531 | this.btnAbout.UseVisualStyleBackColor = true; 532 | this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click); 533 | // 534 | // btnRestore 535 | // 536 | this.btnRestore.FlatStyle = System.Windows.Forms.FlatStyle.System; 537 | this.btnRestore.Location = new System.Drawing.Point(510, 6); 538 | this.btnRestore.Name = "btnRestore"; 539 | this.btnRestore.Size = new System.Drawing.Size(124, 31); 540 | this.btnRestore.TabIndex = 32; 541 | this.btnRestore.Text = "Restore Backup"; 542 | this.btnRestore.UseVisualStyleBackColor = true; 543 | this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click); 544 | // 545 | // btnSave 546 | // 547 | this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.System; 548 | this.btnSave.Location = new System.Drawing.Point(640, 6); 549 | this.btnSave.Name = "btnSave"; 550 | this.btnSave.Size = new System.Drawing.Size(124, 31); 551 | this.btnSave.TabIndex = 32; 552 | this.btnSave.Text = "Save"; 553 | this.btnSave.UseVisualStyleBackColor = true; 554 | this.btnSave.Click += new System.EventHandler(this.btnSave_Click); 555 | // 556 | // topPicture 557 | // 558 | this.topPicture.Dock = System.Windows.Forms.DockStyle.Top; 559 | this.topPicture.Image = ((System.Drawing.Image)(resources.GetObject("topPicture.Image"))); 560 | this.topPicture.Location = new System.Drawing.Point(0, 0); 561 | this.topPicture.Name = "topPicture"; 562 | this.topPicture.Size = new System.Drawing.Size(776, 150); 563 | this.topPicture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; 564 | this.topPicture.TabIndex = 0; 565 | this.topPicture.TabStop = false; 566 | // 567 | // FrmConfig 568 | // 569 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 570 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 571 | this.BackColor = System.Drawing.Color.Black; 572 | this.ClientSize = new System.Drawing.Size(776, 551); 573 | this.Controls.Add(this.midPanel); 574 | this.Controls.Add(this.bottomPanel); 575 | this.Controls.Add(this.topPicture); 576 | this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 577 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; 578 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 579 | this.MaximizeBox = false; 580 | this.Name = "FrmConfig"; 581 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 582 | this.Text = "Borderlands Advanced Settings"; 583 | this.midPanel.ResumeLayout(false); 584 | this.grpInput.ResumeLayout(false); 585 | this.grpInput.PerformLayout(); 586 | this.grpGraphic.ResumeLayout(false); 587 | this.grpGraphic.PerformLayout(); 588 | ((System.ComponentModel.ISupportInitialize)(this.trkMaxAA)).EndInit(); 589 | ((System.ComponentModel.ISupportInitialize)(this.trkMaxAnsio)).EndInit(); 590 | ((System.ComponentModel.ISupportInitialize)(this.trkPlayerInfoMaxDist)).EndInit(); 591 | this.bottomPanel.ResumeLayout(false); 592 | this.bottomPanel.PerformLayout(); 593 | ((System.ComponentModel.ISupportInitialize)(this.topPicture)).EndInit(); 594 | this.ResumeLayout(false); 595 | this.PerformLayout(); 596 | 597 | } 598 | 599 | #endregion 600 | 601 | private System.Windows.Forms.PictureBox topPicture; 602 | private System.Windows.Forms.FolderBrowserDialog SettingsDirBrowser; 603 | private System.Windows.Forms.Panel bottomPanel; 604 | private System.Windows.Forms.Panel midPanel; 605 | private System.Windows.Forms.RichTextBox txtLog; 606 | private System.Windows.Forms.GroupBox grpInput; 607 | private System.Windows.Forms.Label label6; 608 | private System.Windows.Forms.TextBox txtF11Fov; 609 | private System.Windows.Forms.Label label7; 610 | private System.Windows.Forms.Label label4; 611 | private System.Windows.Forms.TextBox txtF10Fov; 612 | private System.Windows.Forms.Label label5; 613 | private System.Windows.Forms.CheckBox chkScrollWheel; 614 | private System.Windows.Forms.CheckBox chkZoomToggle; 615 | private System.Windows.Forms.CheckBox chkConsole; 616 | private System.Windows.Forms.CheckBox chkDisablevchat; 617 | private System.Windows.Forms.CheckBox chkDisableMouseSmooth; 618 | private System.Windows.Forms.CheckBox chkFOVAdjust; 619 | private System.Windows.Forms.GroupBox grpGraphic; 620 | private System.Windows.Forms.TextBox txtScreenPercentage; 621 | private System.Windows.Forms.Label label3; 622 | private System.Windows.Forms.Label label2; 623 | private System.Windows.Forms.TextBox txtHeight; 624 | private System.Windows.Forms.TextBox txtWidth; 625 | private System.Windows.Forms.Label label1; 626 | private System.Windows.Forms.Label lblMaxAA; 627 | private System.Windows.Forms.TrackBar trkMaxAA; 628 | private System.Windows.Forms.Label lblMaxAnsio; 629 | private System.Windows.Forms.TrackBar trkMaxAnsio; 630 | private System.Windows.Forms.CheckBox chkDisableStartup; 631 | private System.Windows.Forms.CheckBox chkPhysX; 632 | private System.Windows.Forms.CheckBox chkVsync; 633 | private System.Windows.Forms.CheckBox chkHBloom; 634 | private System.Windows.Forms.CheckBox chkAmbient; 635 | private System.Windows.Forms.Button btnSave; 636 | private System.Windows.Forms.Button btnRestore; 637 | private System.Windows.Forms.LinkLabel lnkOfficialThread; 638 | private System.Windows.Forms.Button btnAbout; 639 | private System.Windows.Forms.CheckBox chkF12Fps; 640 | private System.Windows.Forms.CheckBox chkSmoothFrameRate; 641 | private System.Windows.Forms.CheckBox chkF9Hud; 642 | private System.Windows.Forms.Label label8; 643 | private System.Windows.Forms.TrackBar trkPlayerInfoMaxDist; 644 | private System.Windows.Forms.CheckBox chkOutlines; 645 | private System.ComponentModel.BackgroundWorker UpdateBackgroundWorker; 646 | private System.Windows.Forms.CheckBox chkCrouchToggle; 647 | } 648 | } 649 | 650 | -------------------------------------------------------------------------------- /FrmConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.IO; 4 | using System.Reflection; 5 | using System.Threading; 6 | using System.Windows.Forms; 7 | using BorderlandsAdvancedConfig.INIParser; 8 | using BorderlandsAdvancedConfig.SettingsManagers; 9 | 10 | namespace BorderlandsAdvancedConfig 11 | { 12 | public partial class FrmConfig : Form 13 | { 14 | public delegate void SetProgressDeleg(int percent, string text); 15 | public delegate void HideDeleg(); 16 | 17 | private FrmLoad frmLoad = new FrmLoad(); 18 | private Thread loadingThread; 19 | 20 | private PathSettings pathSettings = new PathSettings(); 21 | 22 | private EngineSettingsManager EngineManager; 23 | private InputSettingsManager InputManager; 24 | private GameSettingsManager GameManager; 25 | 26 | private const string codeRepository = "https://github.com/TheLonerD/BorderlandsAdvancedConfig"; 27 | 28 | public string AssemblyVersion 29 | { 30 | get 31 | { 32 | return Assembly.GetExecutingAssembly().GetName().Version.ToString(); 33 | } 34 | } 35 | 36 | private void SetProgress(int percent, string text) 37 | { 38 | try 39 | { 40 | frmLoad.Invoke(new SetProgressDeleg(frmLoad.setProgress), new object[] { percent, text }); 41 | } 42 | catch { } 43 | } 44 | 45 | private void HideLoading() 46 | { 47 | try 48 | { 49 | frmLoad.Invoke(new HideDeleg(frmLoad.Hide)); 50 | this.BringToFront(); 51 | } 52 | catch { } 53 | } 54 | 55 | private void ShowLoadingForm() 56 | { 57 | frmLoad.ShowDialog(); 58 | } 59 | 60 | public FrmConfig() 61 | { 62 | InitializeComponent(); 63 | 64 | loadingThread = new Thread(new ThreadStart(ShowLoadingForm)); 65 | loadingThread.Start(); 66 | 67 | if (!InitializeSettingsDirectory()) 68 | { 69 | Environment.Exit(10); 70 | } 71 | 72 | BackupFiles(false); 73 | 74 | if (!ParseConfigFiles()) 75 | { 76 | Environment.Exit(30); 77 | } 78 | 79 | this.Text = String.Format("Borderlands Advanced Settings Version {0} by isNull(MDK)", AssemblyVersion); 80 | 81 | log("> Reading settings..."); 82 | ReadSettings(); 83 | 84 | log("Checking for updates..."); 85 | UpdateBackgroundWorker.RunWorkerAsync(); 86 | log("> Ready"); 87 | } 88 | 89 | public void log(string logTxt) 90 | { 91 | txtLog.AppendText(logTxt + Environment.NewLine); 92 | 93 | txtLog.SelectionStart = txtLog.Text.Length; 94 | txtLog.ScrollToCaret(); 95 | } 96 | 97 | private void BackupFiles(bool forceBackup) 98 | { 99 | string backupDir = Path.Combine(pathSettings.SettingsDir, "Backup"); 100 | 101 | if (!Directory.Exists(backupDir)) 102 | { 103 | Directory.CreateDirectory(backupDir); 104 | } 105 | 106 | DirectoryInfo sourceDir = new DirectoryInfo(pathSettings.SettingsDir); 107 | DirectoryInfo destDir = new DirectoryInfo(backupDir); 108 | 109 | foreach (FileInfo fi in sourceDir.GetFiles("*.ini")) 110 | { 111 | if (fi.IsReadOnly) 112 | { 113 | fi.IsReadOnly = false; 114 | } 115 | 116 | if (!File.Exists(Path.Combine(destDir.FullName, fi.Name)) || forceBackup) 117 | { 118 | fi.CopyTo(Path.Combine(destDir.FullName, fi.Name), true); 119 | } 120 | } 121 | } 122 | 123 | private void RestoreFiles() 124 | { 125 | string backupDir = Path.Combine(pathSettings.SettingsDir, "Backup"); 126 | 127 | if (!Directory.Exists(backupDir)) 128 | { 129 | MessageBox.Show("Oh oh, backup directory not found. Cannot restore.", "Backup files not found", MessageBoxButtons.OK, MessageBoxIcon.Error); 130 | return; 131 | } 132 | 133 | DirectoryInfo destDir = new DirectoryInfo(pathSettings.SettingsDir); 134 | DirectoryInfo sourceDir = new DirectoryInfo(backupDir); 135 | 136 | string destPath; 137 | 138 | foreach (FileInfo fi in sourceDir.GetFiles("*.ini")) 139 | { 140 | destPath = Path.Combine(destDir.FullName, fi.Name); 141 | if (File.Exists(destPath)) 142 | { 143 | FileInfo fInfo = new FileInfo(destPath); 144 | fInfo.IsReadOnly = false; 145 | fInfo = null; 146 | File.Delete(destPath); 147 | } 148 | 149 | fi.CopyTo(destPath, true); 150 | } 151 | 152 | log("> Backup Restored."); 153 | MessageBox.Show("Backup Restored. Exiting.", "Original files restored", MessageBoxButtons.OK, MessageBoxIcon.Information); 154 | Environment.Exit(0); 155 | } 156 | 157 | private bool ParseConfigFiles() 158 | { 159 | try 160 | { 161 | SetProgress(0, "Loading Engine Settings..."); 162 | EngineManager = new EngineSettingsManager(new INIFileParser(pathSettings.EngineIniPath)); 163 | 164 | SetProgress(25, "Loading Input Settings..."); 165 | InputManager = new InputSettingsManager(new INIFileParser(pathSettings.InputIniPath)); 166 | 167 | SetProgress(50, "Loading Game Settings. This will take a while. Please wait..."); 168 | GameManager = new GameSettingsManager(new INIFileParser(pathSettings.GameIniPath)); 169 | 170 | SetProgress(100, "Done."); 171 | HideLoading(); 172 | } 173 | catch 174 | { 175 | return false; 176 | } 177 | return true; 178 | } 179 | 180 | private bool InitializeSettingsDirectory() 181 | { 182 | if (string.IsNullOrEmpty(pathSettings.SettingsDir)) 183 | { 184 | DialogResult result = MessageBox.Show(LocalizedStrings.ConfigNotFound, "Config files not found", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); 185 | 186 | if (result == DialogResult.Yes) 187 | { 188 | DialogResult browseResult = SettingsDirBrowser.ShowDialog(); 189 | 190 | if (browseResult == DialogResult.OK) 191 | { 192 | if (pathSettings.SetSettingsDir(SettingsDirBrowser.SelectedPath)) 193 | { 194 | return true; 195 | } 196 | else 197 | { 198 | MessageBox.Show("Config files not found at the selected path.", "Bad directory", MessageBoxButtons.OK, MessageBoxIcon.Error); 199 | } 200 | } 201 | } 202 | } 203 | else 204 | { 205 | return true; 206 | } 207 | 208 | return false; 209 | } 210 | 211 | private void ReadSettings() 212 | { 213 | LoadEngineSection(); 214 | LoadInputSection(); 215 | LoadGameSection(); 216 | } 217 | 218 | private void SaveSettings() 219 | { 220 | SaveEngineSection(); 221 | SaveInputSection(); 222 | SaveGameSection(); 223 | 224 | log("> Saved. Have fun playing!"); 225 | MessageBox.Show("Settings Saved. Have fun!", "Save settings", MessageBoxButtons.OK, MessageBoxIcon.Information); 226 | } 227 | 228 | private void LoadInputSection() 229 | { 230 | chkF9Hud.Checked = InputManager.SetF9ShowHud; 231 | 232 | try 233 | { 234 | chkFOVAdjust.Checked = InputManager.FovKeysEnabled(); 235 | if (chkFOVAdjust.Checked) 236 | { 237 | txtF10Fov.Text = InputManager.GetF10Fov().Value.ToString(); 238 | txtF11Fov.Text = InputManager.GetF11Fov().Value.ToString(); 239 | } 240 | chkFOVAdjust_CheckedChanged(this, null); 241 | } 242 | catch 243 | { 244 | chkFOVAdjust.Enabled = false; 245 | txtF10Fov.Enabled = false; 246 | txtF11Fov.Enabled = false; 247 | } 248 | 249 | chkF12Fps.Checked = InputManager.SetF12ShowFPS; 250 | 251 | chkDisableMouseSmooth.Checked = !InputManager.EnableMouseSmoothing; 252 | chkConsole.Checked = InputManager.Console; 253 | 254 | chkZoomToggle.Checked = InputManager.ZoomToggle; 255 | chkCrouchToggle.Checked = InputManager.CrouchToggle; 256 | chkScrollWheel.Checked = InputManager.ScrollWheel; 257 | } 258 | 259 | private void SaveInputSection() 260 | { 261 | InputManager.SetF9ShowHud = chkF9Hud.Checked; 262 | 263 | if (chkFOVAdjust.Enabled) 264 | { 265 | if (chkFOVAdjust.Checked && !string.IsNullOrEmpty(txtF10Fov.Text) && !string.IsNullOrEmpty(txtF11Fov.Text)) 266 | { 267 | InputManager.SetKeyFov("F10", int.Parse(txtF10Fov.Text)); 268 | InputManager.SetKeyFov("F11", int.Parse(txtF11Fov.Text)); 269 | } 270 | else if (!chkFOVAdjust.Checked) 271 | { 272 | InputManager.RemoveBinding("F10"); 273 | InputManager.RemoveBinding("F11"); 274 | } 275 | } 276 | 277 | InputManager.SetF12ShowFPS = chkF12Fps.Checked; 278 | 279 | InputManager.EnableMouseSmoothing = !chkDisableMouseSmooth.Checked; 280 | InputManager.Console = chkConsole.Checked; 281 | 282 | InputManager.ZoomToggle = chkZoomToggle.Checked; 283 | InputManager.CrouchToggle = chkCrouchToggle.Checked; 284 | InputManager.ScrollWheel = chkScrollWheel.Checked; 285 | 286 | 287 | InputManager.Save(); 288 | } 289 | 290 | private void LoadGameSection() 291 | { 292 | trkPlayerInfoMaxDist.Value = GameManager.PlayerInfoMaxDist; 293 | } 294 | 295 | private void SaveGameSection() 296 | { 297 | GameManager.PlayerInfoMaxDist = trkPlayerInfoMaxDist.Value; 298 | 299 | GameManager.Save(); 300 | } 301 | 302 | private void LoadEngineSection() 303 | { 304 | chkAmbient.Checked = EngineManager.Ambient; 305 | chkHBloom.Checked = EngineManager.HighQualityBloom; 306 | chkVsync.Checked = EngineManager.Vsync; 307 | chkPhysX.Checked = EngineManager.AllowPhysX; 308 | chkSmoothFrameRate.Checked = EngineManager.SmoothFrameRate; 309 | try 310 | { 311 | chkDisableStartup.Checked = EngineManager.StartupMovies; 312 | } 313 | catch 314 | { 315 | chkDisableStartup.Enabled = false; 316 | } 317 | chkOutlines.Checked = EngineManager.DisableOutlineShader; 318 | 319 | trkMaxAnsio.Value = 0; 320 | if (EngineManager.MaxAnisotropy != 0) 321 | { 322 | trkMaxAnsio.Value = (int)Math.Log(EngineManager.MaxAnisotropy, 2); 323 | } 324 | trkMaxAniso_Scroll(this, null); 325 | 326 | trkMaxAA.Value = 0; 327 | if (EngineManager.MaxMultisamples != 0) 328 | { 329 | trkMaxAA.Value = (int)Math.Log(EngineManager.MaxMultisamples, 2); 330 | } 331 | trkMaxAA_Scroll(this, null); 332 | 333 | txtWidth.Text = EngineManager.ResX.ToString(); 334 | txtHeight.Text = EngineManager.ResY.ToString(); 335 | txtScreenPercentage.Text = EngineManager.ScreenPercentage.ToString(); 336 | 337 | chkDisablevchat.Checked = !EngineManager.HasVoiceEnabled; 338 | } 339 | 340 | private void SaveEngineSection() 341 | { 342 | EngineManager.Ambient = chkAmbient.Checked; 343 | EngineManager.HighQualityBloom = chkHBloom.Checked; 344 | EngineManager.Vsync = chkVsync.Checked; 345 | EngineManager.AllowPhysX = chkPhysX.Checked; 346 | EngineManager.SmoothFrameRate = chkSmoothFrameRate.Checked; 347 | if (chkDisableStartup.Enabled) 348 | { 349 | EngineManager.StartupMovies = !chkDisableStartup.Checked; 350 | } 351 | EngineManager.DisableOutlineShader = chkOutlines.Checked; 352 | 353 | if (trkMaxAnsio.Value != 0) 354 | { 355 | EngineManager.MaxAnisotropy = (short)Math.Pow(2, trkMaxAnsio.Value); 356 | } 357 | else 358 | { 359 | EngineManager.MaxAnisotropy = 0; 360 | } 361 | 362 | if (trkMaxAA.Value != 0) 363 | { 364 | EngineManager.MaxMultisamples = (short)Math.Pow(2, trkMaxAA.Value); 365 | } 366 | else 367 | { 368 | EngineManager.MaxMultisamples = 0; 369 | } 370 | 371 | EngineManager.ResX = int.Parse(txtWidth.Text); 372 | EngineManager.ResY = int.Parse(txtHeight.Text); 373 | EngineManager.ScreenPercentage = int.Parse(txtScreenPercentage.Text); 374 | 375 | EngineManager.HasVoiceEnabled = !chkDisablevchat.Checked; 376 | 377 | EngineManager.Save(); 378 | } 379 | 380 | private void btnSave_Click(object sender, EventArgs e) 381 | { 382 | SaveSettings(); 383 | } 384 | 385 | private void trkMaxAniso_Scroll(object sender, EventArgs e) 386 | { 387 | double Ansiovalue = 0; 388 | 389 | if (trkMaxAnsio.Value != 0) 390 | Ansiovalue = Math.Pow(2, trkMaxAnsio.Value); 391 | 392 | lblMaxAnsio.Text = string.Format("Max Aniso Filtering: {0}x", Ansiovalue); 393 | } 394 | 395 | private void trkMaxAA_Scroll(object sender, EventArgs e) 396 | { 397 | double AAValue = 0; 398 | 399 | if (trkMaxAA.Value != 0) 400 | AAValue = Math.Pow(2, trkMaxAA.Value); 401 | 402 | lblMaxAA.Text = string.Format("Max Anti Aliasing: {0}x", AAValue); 403 | } 404 | 405 | private void chkFOVAdjust_CheckedChanged(object sender, EventArgs e) 406 | { 407 | if (chkFOVAdjust.Checked) 408 | { 409 | txtF10Fov.Text = "90"; 410 | txtF11Fov.Text = "110"; 411 | } 412 | 413 | txtF10Fov.Enabled = chkFOVAdjust.Checked; 414 | txtF11Fov.Enabled = chkFOVAdjust.Checked; 415 | } 416 | 417 | private void btnRestore_Click(object sender, EventArgs e) 418 | { 419 | RestoreFiles(); 420 | } 421 | 422 | private void lnkOfficialThread_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 423 | { 424 | System.Diagnostics.Process.Start(codeRepository); 425 | } 426 | 427 | private void btnAbout_Click(object sender, EventArgs e) 428 | { 429 | AboutBox ab = new AboutBox(); 430 | ab.ShowDialog(this); 431 | } 432 | 433 | private void chkVsync_CheckedChanged(object sender, EventArgs e) 434 | { 435 | if (!chkVsync.Checked) 436 | { 437 | chkSmoothFrameRate.Enabled = true; 438 | chkSmoothFrameRate.Checked = true; 439 | } 440 | else 441 | { 442 | chkSmoothFrameRate.Enabled = false; 443 | chkSmoothFrameRate.Checked = true; 444 | } 445 | } 446 | 447 | private void UpdateBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) 448 | { 449 | VersionCheck versionCheck = new VersionCheck(codeRepository); 450 | } 451 | } 452 | } 453 | -------------------------------------------------------------------------------- /FrmLoad.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace BorderlandsAdvancedConfig 2 | { 3 | partial class FrmLoad 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLoad)); 32 | this.progressBar1 = new System.Windows.Forms.ProgressBar(); 33 | this.lblLoad = new System.Windows.Forms.Label(); 34 | this.SuspendLayout(); 35 | // 36 | // progressBar1 37 | // 38 | this.progressBar1.Location = new System.Drawing.Point(12, 49); 39 | this.progressBar1.Name = "progressBar1"; 40 | this.progressBar1.Size = new System.Drawing.Size(485, 23); 41 | this.progressBar1.TabIndex = 0; 42 | // 43 | // lblLoad 44 | // 45 | this.lblLoad.AutoSize = true; 46 | this.lblLoad.Location = new System.Drawing.Point(12, 20); 47 | this.lblLoad.Name = "lblLoad"; 48 | this.lblLoad.Size = new System.Drawing.Size(56, 13); 49 | this.lblLoad.TabIndex = 1; 50 | this.lblLoad.Text = "Loading..."; 51 | // 52 | // FrmLoad 53 | // 54 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 55 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 56 | this.BackColor = System.Drawing.Color.Black; 57 | this.ClientSize = new System.Drawing.Size(509, 84); 58 | this.Controls.Add(this.lblLoad); 59 | this.Controls.Add(this.progressBar1); 60 | this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 61 | this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); 62 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 63 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 64 | this.Name = "FrmLoad"; 65 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 66 | this.Text = "Loading ..."; 67 | this.ResumeLayout(false); 68 | this.PerformLayout(); 69 | 70 | } 71 | 72 | #endregion 73 | 74 | private System.Windows.Forms.ProgressBar progressBar1; 75 | private System.Windows.Forms.Label lblLoad; 76 | } 77 | } -------------------------------------------------------------------------------- /FrmLoad.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace BorderlandsAdvancedConfig 4 | { 5 | public partial class FrmLoad : Form 6 | { 7 | public FrmLoad() 8 | { 9 | InitializeComponent(); 10 | } 11 | 12 | public void setProgress(int percent, string text) 13 | { 14 | progressBar1.Value = percent; 15 | lblLoad.Text = text; 16 | 17 | this.Text = text; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /INIParser/ConfigEntry.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | ///Based on work by ShadowLocke 6 | ///http://bytes.com/topic/net/insights/797169-reading-parsing-ini-file-c 7 | using System; 8 | 9 | namespace BorderlandsAdvancedConfig.INIParser 10 | { 11 | public class ConfigEntry : IEquatable, ICloneable 12 | { 13 | public ConfigEntryKey key; 14 | public string value { get; set; } 15 | 16 | public bool isCommented 17 | { 18 | get 19 | { 20 | return !string.IsNullOrEmpty(commentString); 21 | } 22 | } 23 | 24 | public string commentString { get; set; } 25 | 26 | public ConfigEntry() { } 27 | 28 | public ConfigEntry(string name, int order) 29 | { 30 | key.name = name; 31 | key.order = order; 32 | } 33 | 34 | public ConfigEntry(string name, int order, string value) 35 | : this(name, order) 36 | { 37 | this.value = value; 38 | } 39 | 40 | public ConfigEntry(string name, int order, string value, string commentString) 41 | : this(name, order, value) 42 | { 43 | this.commentString = commentString; 44 | } 45 | 46 | public override string ToString() 47 | { 48 | if (!isCommented) 49 | { 50 | return key.name + "=" + value; 51 | } 52 | else 53 | { 54 | return commentString + key.name + "=" + value; 55 | } 56 | } 57 | 58 | #region IEquatable Members 59 | 60 | public bool Equals(ConfigEntry other) 61 | { 62 | return (key.Equals(other.key)); 63 | } 64 | 65 | #endregion 66 | 67 | 68 | public object Clone() 69 | { 70 | ConfigEntry clone = new ConfigEntry(); 71 | clone.key.name = this.key.name; 72 | clone.key.order = this.key.order; 73 | 74 | clone.value = this.value; 75 | clone.commentString = this.commentString; 76 | 77 | return clone; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /INIParser/ConfigEntryKey.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | ///Based on work by ShadowLocke 6 | ///http://bytes.com/topic/net/insights/797169-reading-parsing-ini-file-c 7 | namespace BorderlandsAdvancedConfig.INIParser 8 | { 9 | public struct ConfigEntryKey 10 | { 11 | public string name { get; set; } 12 | public int order { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /INIParser/ConfigSection.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | ///Based on work by ShadowLocke 6 | ///http://bytes.com/topic/net/insights/797169-reading-parsing-ini-file-c 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | 12 | namespace BorderlandsAdvancedConfig.INIParser 13 | { 14 | public class ConfigSection 15 | { 16 | public string SectionName { get; set; } 17 | public int OrderInFile { get; set; } 18 | 19 | public List Entries; 20 | 21 | public ConfigSection(ConfigSection configSection) 22 | { 23 | SectionName = configSection.SectionName; 24 | OrderInFile = configSection.OrderInFile; 25 | Entries = new List(configSection.Entries); 26 | } 27 | 28 | public ConfigSection(string name, int orderInFile) 29 | { 30 | this.SectionName = name; 31 | this.OrderInFile = orderInFile; 32 | Entries = new List(); 33 | } 34 | 35 | public void AddEntry(string name, string value, string commentString) 36 | { 37 | ConfigEntry newEntry = new ConfigEntry(name, 0, value, commentString); 38 | while (Entries.Contains(newEntry)) 39 | { 40 | newEntry.key.order++; 41 | } 42 | 43 | Entries.Add(newEntry); 44 | } 45 | 46 | public void AddEntry(ConfigEntry entry) 47 | { 48 | Entries.Add(entry); 49 | } 50 | 51 | public void AddEntries(IList entries) 52 | { 53 | Entries.AddRange(entries); 54 | } 55 | 56 | public void RemoveEntry(string name, int order) 57 | { 58 | ConfigEntry tempEntry = new ConfigEntry(name, order); 59 | ConfigEntry entry = Entries.FirstOrDefault(x => x.key.Equals(tempEntry.key)); 60 | 61 | if (entry != null) 62 | { 63 | Entries.Remove(entry); 64 | } 65 | } 66 | 67 | public void RemoveEntry(ConfigEntry entry) 68 | { 69 | Entries.Remove(entry); 70 | } 71 | 72 | public void SetEntryValue(string name, int order, string value) 73 | { 74 | ConfigEntry tempEntry = new ConfigEntry(name, order, value); 75 | ConfigEntry entry = Entries.FirstOrDefault(x => x.key.Equals(tempEntry.key)); 76 | 77 | if (entry != null) 78 | { 79 | entry.value = value; 80 | } 81 | else 82 | { 83 | throw new InvalidOperationException("Entry not found"); 84 | } 85 | } 86 | 87 | public void SetEntryComment(string name, int order, string commentString) 88 | { 89 | ConfigEntry tempEntry = new ConfigEntry(name, order); 90 | ConfigEntry entry = Entries.FirstOrDefault(x => x.key.Equals(tempEntry.key)); 91 | 92 | if (entry != null) 93 | { 94 | entry.commentString = commentString; 95 | } 96 | else 97 | { 98 | throw new InvalidOperationException("Entry not found"); 99 | } 100 | } 101 | 102 | public ConfigEntry GetEntry(string name, int order) 103 | { 104 | ConfigEntry tempEntry = new ConfigEntry(name, order); 105 | ConfigEntry entry = Entries.FirstOrDefault(x => x.key.Equals(tempEntry.key)); 106 | 107 | return entry; 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /INIParser/INIFileParser.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | ///Based on work by ShadowLocke 6 | ///http://bytes.com/topic/net/insights/797169-reading-parsing-ini-file-c 7 | 8 | using System; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | using System.Diagnostics; 12 | using System.IO; 13 | using System.Linq; 14 | 15 | namespace BorderlandsAdvancedConfig.INIParser 16 | { 17 | 18 | public class INIFileParser 19 | { 20 | private Dictionary configSections; 21 | private String iniFilePath; 22 | 23 | /// 24 | /// Opens the INI file at the given path and enumerates the values in the IniParser. 25 | /// 26 | /// Full path to INI file. 27 | public INIFileParser(String iniPath) 28 | { 29 | configSections = new Dictionary(); 30 | 31 | TextReader iniFile = null; 32 | string strLine = null; 33 | ConfigSection currentSection = null; 34 | string[] keyValuePair = null; 35 | 36 | iniFilePath = iniPath; 37 | 38 | if (File.Exists(iniPath)) 39 | { 40 | try 41 | { 42 | iniFile = new StreamReader(iniPath); 43 | 44 | strLine = iniFile.ReadLine(); 45 | 46 | while (strLine != null) 47 | { 48 | strLine = strLine.Trim(); 49 | 50 | if (!string.IsNullOrEmpty(strLine)) 51 | { 52 | if (strLine.StartsWith("[") && strLine.EndsWith("]")) 53 | { 54 | currentSection = new ConfigSection(strLine.Substring(1, strLine.Length - 2), configSections.Count); 55 | configSections.Add(strLine.Substring(1, strLine.Length - 2), currentSection); 56 | } 57 | else 58 | { 59 | string key = null; 60 | String value = null; 61 | string commentString = GetLineCommentChars(strLine); 62 | 63 | keyValuePair = strLine.Split(new char[] { '=' }, 2); 64 | 65 | if (string.IsNullOrEmpty(commentString)) 66 | { 67 | key = keyValuePair[0]; 68 | } 69 | else 70 | { 71 | key = keyValuePair[0].Substring(commentString.Length, keyValuePair[0].Length - commentString.Length); 72 | } 73 | 74 | if (keyValuePair.Length > 1) 75 | { 76 | value = keyValuePair[1]; 77 | } 78 | 79 | currentSection.AddEntry(key, value, commentString); 80 | } 81 | 82 | } 83 | 84 | strLine = iniFile.ReadLine(); 85 | } 86 | 87 | } 88 | catch (Exception ex) 89 | { 90 | throw ex; 91 | } 92 | finally 93 | { 94 | if (iniFile != null) 95 | iniFile.Close(); 96 | } 97 | } 98 | else 99 | throw new FileNotFoundException("Unable to locate " + iniPath); 100 | } 101 | 102 | private string GetLineCommentChars(string line) 103 | { 104 | if (line.StartsWith("#")) 105 | return "#"; 106 | 107 | if (line.StartsWith(";")) 108 | return ";"; 109 | 110 | if (line.StartsWith("//")) 111 | return "//"; 112 | 113 | return string.Empty; 114 | } 115 | 116 | /// 117 | /// Returns the value for the given section, key pair. 118 | /// 119 | /// Section name. 120 | /// Key name. 121 | public ConfigEntry GetSetting(String sectionName, String settingName, int settingOrder) 122 | { 123 | ConfigSection section = configSections[sectionName]; 124 | 125 | if (section != null) 126 | { 127 | ConfigEntry entry = section.GetEntry(settingName, settingOrder); 128 | return entry; 129 | } 130 | else 131 | { 132 | throw new InvalidOperationException("Section not found"); 133 | } 134 | } 135 | 136 | public IList GetAllSettings(String sectionName, String settingName) 137 | { 138 | ConfigSection section = configSections[sectionName]; 139 | 140 | if (section != null) 141 | { 142 | return section.Entries.Where(x => x.key.name.Equals(settingName)).ToList(); 143 | } 144 | else 145 | { 146 | throw new InvalidOperationException("Section not found"); 147 | } 148 | } 149 | 150 | public void CopyReplaceSection(String sourceSection, String destSectionName) 151 | { 152 | ConfigSection clone = new ConfigSection(configSections[sourceSection]); 153 | 154 | clone.OrderInFile = configSections[destSectionName].OrderInFile; 155 | clone.SectionName = configSections[destSectionName].SectionName; 156 | 157 | configSections.Remove(destSectionName); 158 | configSections.Add(destSectionName, clone); 159 | } 160 | 161 | public void SetSetting(String sectionName, String settingName, int settingOrder, string value) 162 | { 163 | ConfigSection section = configSections[sectionName]; 164 | 165 | if (section != null) 166 | { 167 | section.SetEntryValue(settingName, settingOrder, value); 168 | } 169 | else 170 | { 171 | throw new InvalidOperationException("Section not found"); 172 | } 173 | } 174 | 175 | /// 176 | /// Enumerates all lines for given section. 177 | /// 178 | /// Section to enum. 179 | public String[] EnumSection(String sectionName) 180 | { 181 | ConfigSection section = configSections[sectionName]; 182 | 183 | if (section == null) 184 | { 185 | throw new InvalidOperationException("Section not found"); 186 | } 187 | 188 | ArrayList tmpArray = new ArrayList(); 189 | 190 | foreach (ConfigEntry entry in section.Entries) 191 | { 192 | tmpArray.Add(entry.ToString()); 193 | } 194 | 195 | return (String[])tmpArray.ToArray(); 196 | } 197 | 198 | /// 199 | /// Adds or replaces a setting to the table to be saved. 200 | /// 201 | /// Section to add under. 202 | /// Key name to add. 203 | /// Value of key. 204 | public void AddSetting(String sectionName, String settingName, String settingValue, string commentString) 205 | { 206 | ConfigSection section = configSections[sectionName]; 207 | 208 | if (section == null) 209 | { 210 | section = new ConfigSection(sectionName, configSections.Count); 211 | configSections.Add(sectionName, section); 212 | } 213 | 214 | section.AddEntry(settingName, settingValue, commentString); 215 | } 216 | 217 | internal void AddSettings(String sectionName, IList Entries) 218 | { 219 | ConfigSection section = configSections[sectionName]; 220 | 221 | if (section == null) 222 | { 223 | section = new ConfigSection(sectionName, configSections.Count); 224 | configSections.Add(sectionName, section); 225 | } 226 | 227 | foreach (ConfigEntry entry in Entries) 228 | { 229 | section.AddEntry((ConfigEntry)entry.Clone()); 230 | } 231 | } 232 | 233 | /// 234 | /// Remove a setting. 235 | /// 236 | /// Section to add under. 237 | /// Key name to add. 238 | public void DeleteSetting(String sectionName, String settingName, int settingOrder) 239 | { 240 | ConfigSection section = configSections[sectionName]; 241 | 242 | if (section == null) 243 | { 244 | throw new InvalidOperationException("Section not found"); 245 | } 246 | 247 | section.RemoveEntry(settingName, settingOrder); 248 | } 249 | 250 | public void DeleteSetting(String sectionName, ConfigEntry entry) 251 | { 252 | ConfigSection section = configSections[sectionName]; 253 | 254 | if (section != null) 255 | { 256 | section.Entries.Remove(entry); 257 | } 258 | } 259 | 260 | public void SetSettingComment(String sectionName, String settingName, int settingOrder, string commentString) 261 | { 262 | ConfigSection section = configSections[sectionName]; 263 | 264 | if (section != null) 265 | { 266 | section.SetEntryComment(settingName, settingOrder, commentString); 267 | } 268 | } 269 | 270 | /// 271 | /// Save settings to new file. 272 | /// 273 | /// New file path. 274 | public void SaveSettings(String newFilePath) 275 | { 276 | String tmpValue = ""; 277 | String strToSave = ""; 278 | 279 | IList ConfigSectionsList = new List(configSections.Values.OrderBy(x => x.OrderInFile)); 280 | 281 | foreach (ConfigSection section in ConfigSectionsList) 282 | { 283 | strToSave += ("[" + section.SectionName + "]\r\n"); 284 | 285 | foreach (ConfigEntry configEntry in section.Entries) 286 | { 287 | 288 | tmpValue = configEntry.ToString(); 289 | strToSave += (tmpValue + "\r\n"); 290 | 291 | } 292 | 293 | strToSave += "\r\n"; 294 | } 295 | 296 | try 297 | { 298 | FileInfo iniFile = new FileInfo(newFilePath); 299 | 300 | if (iniFile.IsReadOnly) 301 | { 302 | iniFile.IsReadOnly = false; 303 | } 304 | 305 | TextWriter tw = new StreamWriter(newFilePath); 306 | tw.Write(strToSave); 307 | tw.Close(); 308 | } 309 | catch (Exception ex) 310 | { 311 | throw ex; 312 | } 313 | } 314 | 315 | /// 316 | /// Save settings back to ini file. 317 | /// 318 | public void SaveSettings() 319 | { 320 | SaveSettings(iniFilePath); 321 | } 322 | 323 | public void DebugSections() 324 | { 325 | foreach (KeyValuePair section in configSections) 326 | { 327 | Debug.WriteLine(section.Value.SectionName + " " + section.Value.OrderInFile); 328 | } 329 | } 330 | } 331 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Lightwave 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /LocalizedStrings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BorderlandsAdvancedConfig 12 | { 13 | using System; 14 | 15 | 16 | /// 17 | /// A strongly-typed resource class, for looking up localized strings, etc. 18 | /// 19 | // This class was auto-generated by the StronglyTypedResourceBuilder 20 | // class via a tool like ResGen or Visual Studio. 21 | // To add or remove a member, edit your .ResX file then rerun ResGen 22 | // with the /str option, or rebuild your VS project. 23 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 24 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 25 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 26 | internal class LocalizedStrings 27 | { 28 | 29 | private static global::System.Resources.ResourceManager resourceMan; 30 | 31 | private static global::System.Globalization.CultureInfo resourceCulture; 32 | 33 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 34 | internal LocalizedStrings() 35 | { 36 | } 37 | 38 | /// 39 | /// Returns the cached ResourceManager instance used by this class. 40 | /// 41 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 42 | internal static global::System.Resources.ResourceManager ResourceManager 43 | { 44 | get 45 | { 46 | if (object.ReferenceEquals(resourceMan, null)) 47 | { 48 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BorderlandsAdvancedConfig.LocalizedStrings", typeof(LocalizedStrings).Assembly); 49 | resourceMan = temp; 50 | } 51 | return resourceMan; 52 | } 53 | } 54 | 55 | /// 56 | /// Overrides the current thread's CurrentUICulture property for all 57 | /// resource lookups using this strongly typed resource class. 58 | /// 59 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 60 | internal static global::System.Globalization.CultureInfo Culture 61 | { 62 | get 63 | { 64 | return resourceCulture; 65 | } 66 | set 67 | { 68 | resourceCulture = value; 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Your borderlands config file could not be found. They are usually located under: 74 | ///[UserName]\My Documents\My Games\Borderlands\WillowGame\Config\ 75 | ///Manually browse to config directory?. 76 | /// 77 | internal static string ConfigNotFound 78 | { 79 | get 80 | { 81 | return ResourceManager.GetString("ConfigNotFound", resourceCulture); 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /LocalizedStrings.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Your borderlands config file could not be found. They are usually located under: 122 | [UserName]\My Documents\My Games\Borderlands\WillowGame\Config\ 123 | Manually browse to config directory? 124 | 125 | -------------------------------------------------------------------------------- /PathSettings.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using System; 6 | using System.IO; 7 | 8 | namespace BorderlandsAdvancedConfig 9 | { 10 | public class PathSettings 11 | { 12 | private const string EngineIni = "WillowEngine.ini"; 13 | private const string InputIni = "WillowInput.ini"; 14 | private const string GameIni = "WillowGame.ini"; 15 | 16 | private const string GameConfigSubDir = "My Games\\Borderlands\\WillowGame\\Config"; 17 | private string DefaultSettingsDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), GameConfigSubDir); 18 | 19 | public string EngineIniPath 20 | { 21 | get 22 | { 23 | return SettingsDir + Path.DirectorySeparatorChar + EngineIni; 24 | } 25 | } 26 | 27 | public string InputIniPath 28 | { 29 | get 30 | { 31 | return SettingsDir + Path.DirectorySeparatorChar + InputIni; 32 | } 33 | } 34 | 35 | public string GameIniPath 36 | { 37 | get 38 | { 39 | return SettingsDir + Path.DirectorySeparatorChar + GameIni; 40 | } 41 | } 42 | 43 | private string _settingsDir; 44 | public string SettingsDir 45 | { 46 | get 47 | { 48 | if (String.IsNullOrEmpty(_settingsDir)) 49 | { 50 | if (Directory.Exists(DefaultSettingsDir)) 51 | { 52 | _settingsDir = DefaultSettingsDir; 53 | } 54 | 55 | return _settingsDir; 56 | } 57 | else 58 | { 59 | return _settingsDir; 60 | } 61 | } 62 | } 63 | 64 | public bool SetSettingsDir(string SettingsDirectory) 65 | { 66 | try 67 | { 68 | string EngineCheck = SettingsDirectory + Path.DirectorySeparatorChar + EngineIni; 69 | string InputCheck = SettingsDirectory + Path.DirectorySeparatorChar + InputIni; 70 | string GameCheck = SettingsDirectory + Path.DirectorySeparatorChar + GameIni; 71 | 72 | if (File.Exists(EngineCheck) && File.Exists(InputCheck) && File.Exists(GameCheck)) 73 | { 74 | _settingsDir = SettingsDirectory; 75 | return true; 76 | } 77 | else 78 | { 79 | _settingsDir = string.Empty; 80 | return false; 81 | } 82 | } 83 | catch 84 | { 85 | _settingsDir = string.Empty; 86 | return false; 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using System; 6 | using System.IO; 7 | using System.Reflection; 8 | using System.Windows.Forms; 9 | using BorderlandsAdvancedConfig.ErrorHandling; 10 | 11 | namespace BorderlandsAdvancedConfig 12 | { 13 | static class Program 14 | { 15 | /// 16 | /// The main entry point for the application. 17 | /// 18 | [STAThread] 19 | static void Main() 20 | { 21 | Application.EnableVisualStyles(); 22 | Application.SetCompatibleTextRenderingDefault(false); 23 | try 24 | { 25 | Application.Run(new FrmConfig()); 26 | } 27 | catch (Exception ex) 28 | { 29 | FileStream fs = File.Create(GetCrashLogFilePath()); 30 | StreamWriter sw = new StreamWriter(fs); 31 | sw.Write(ex.Message); 32 | sw.Write(ex.StackTrace.ToString()); 33 | sw.Close(); 34 | fs.Close(); 35 | 36 | ErrorMessageBox msgBox = new ErrorMessageBox(ex.Message + Environment.NewLine + ex.StackTrace, "Unexpected Error", "Sorry, the tool encountered an error. Error log:"); 37 | Application.Run(msgBox); 38 | } 39 | } 40 | 41 | private static string GetCrashLogFilePath() 42 | { 43 | string fileNameFormatString = "crashlog{0}.log"; 44 | string filePath = string.Empty; 45 | int num = 0; 46 | bool fileFound = true; 47 | 48 | while (fileFound) 49 | { 50 | filePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), string.Format(fileNameFormatString, num)); 51 | fileFound = File.Exists(filePath); 52 | num++; 53 | } 54 | 55 | return filePath; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Borderlands Advanced Configuration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("nQa Clan")] 12 | [assembly: AssemblyProduct("Borderlands Advanced Configuration")] 13 | [assembly: AssemblyCopyright("isNull(MDK). All rights reserved.")] 14 | [assembly: AssemblyTrademark("Borderlands(r) Config(tm)")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b6b734d3-6e89-4523-b799-006d79350b45")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.2.0")] 36 | [assembly: AssemblyFileVersion("1.0.2.0")] 37 | [assembly: NeutralResourcesLanguage("en-US")] 38 | 39 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BorderlandsAdvancedConfig.Properties 12 | { 13 | using System; 14 | 15 | 16 | /// 17 | /// A strongly-typed resource class, for looking up localized strings, etc. 18 | /// 19 | // This class was auto-generated by the StronglyTypedResourceBuilder 20 | // class via a tool like ResGen or Visual Studio. 21 | // To add or remove a member, edit your .ResX file then rerun ResGen 22 | // with the /str option, or rebuild your VS project. 23 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 24 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 25 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 26 | internal class Resources 27 | { 28 | 29 | private static global::System.Resources.ResourceManager resourceMan; 30 | 31 | private static global::System.Globalization.CultureInfo resourceCulture; 32 | 33 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 34 | internal Resources() 35 | { 36 | } 37 | 38 | /// 39 | /// Returns the cached ResourceManager instance used by this class. 40 | /// 41 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 42 | internal static global::System.Resources.ResourceManager ResourceManager 43 | { 44 | get 45 | { 46 | if (object.ReferenceEquals(resourceMan, null)) 47 | { 48 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BorderlandsAdvancedConfig.Properties.Resources", typeof(Resources).Assembly); 49 | resourceMan = temp; 50 | } 51 | return resourceMan; 52 | } 53 | } 54 | 55 | /// 56 | /// Overrides the current thread's CurrentUICulture property for all 57 | /// resource lookups using this strongly typed resource class. 58 | /// 59 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 60 | internal static global::System.Globalization.CultureInfo Culture 61 | { 62 | get 63 | { 64 | return resourceCulture; 65 | } 66 | set 67 | { 68 | resourceCulture = value; 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized resource of type System.Drawing.Bitmap. 74 | /// 75 | internal static System.Drawing.Bitmap Banner 76 | { 77 | get 78 | { 79 | object obj = ResourceManager.GetObject("Banner", resourceCulture); 80 | return ((System.Drawing.Bitmap)(obj)); 81 | } 82 | } 83 | 84 | /// 85 | /// Looks up a localized resource of type System.Drawing.Bitmap. 86 | /// 87 | internal static System.Drawing.Bitmap Glacier 88 | { 89 | get 90 | { 91 | object obj = ResourceManager.GetObject("Glacier", resourceCulture); 92 | return ((System.Drawing.Bitmap)(obj)); 93 | } 94 | } 95 | 96 | /// 97 | /// Looks up a localized resource of type System.Drawing.Bitmap. 98 | /// 99 | internal static System.Drawing.Bitmap Sig 100 | { 101 | get 102 | { 103 | object obj = ResourceManager.GetObject("Sig", resourceCulture); 104 | return ((System.Drawing.Bitmap)(obj)); 105 | } 106 | } 107 | 108 | /// 109 | /// Looks up a localized resource of type System.Drawing.Bitmap. 110 | /// 111 | internal static System.Drawing.Bitmap title_bar 112 | { 113 | get 114 | { 115 | object obj = ResourceManager.GetObject("title_bar", resourceCulture); 116 | return ((System.Drawing.Bitmap)(obj)); 117 | } 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Assets\Sig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Assets\Glacier.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Assets\Banner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Assets\title_bar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BorderlandsAdvancedConfig.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Borderlands Advanced Settings 2 | 3 | The objective of this program is to allow easy configuration of Borderlands options available in its config files. These are things that should have been included with the game.. 4 | 5 | ### Features 6 | * Tweak game settings outside the game; 7 | * Backup/restore; 8 | * Custom INI parser with error handling. 9 | 10 | ### Requirements 11 | * Windows XP or above; 12 | * .NET Framework 4 ([Web](https://www.microsoft.com/en-us/download/details.aspx?id=17851) | [Standalone](https://www.microsoft.com/en-us/download/details.aspx?id=17718) Installer); 13 | * Borderlands Installation; 14 | * **You must run the game at least once.** 15 | 16 | ### Toggle engine features: 17 | * Ambient Occlusion; 18 | * High Quality Bloom; 19 | * V-Sync; 20 | * Startup movies bypass; 21 | * Adjust FOV; 22 | * Mouse smoothing; 23 | * In-game Voice Chat; 24 | * Console; 25 | * Zoom toggle; 26 | * Scroll Wheel; 27 | * Loot view distance; 28 | * PhysX; 29 | * Remove frame rate limit; 30 | * Remove outlines; 31 | * Show/hide HUD; 32 | * Show/hide FPS. 33 | 34 | You can report bugs [here](https://github.com/TheLonerD/BorderlandsAdvancedConfig/issues). I'll try to fix them. 35 | -------------------------------------------------------------------------------- /SettingsManagers/EngineSettingsManager.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using BorderlandsAdvancedConfig.INIParser; 6 | 7 | namespace BorderlandsAdvancedConfig.SettingsManagers 8 | { 9 | public class EngineSettingsManager 10 | { 11 | private const string OutLineShaderString = "WillowEngineMaterials.WillowScenePostProcess"; 12 | 13 | private INIFileParser EngineParser; 14 | 15 | public EngineSettingsManager(INIFileParser engineParser) 16 | { 17 | this.EngineParser = engineParser; 18 | } 19 | 20 | internal bool Ambient 21 | { 22 | get 23 | { 24 | return bool.Parse(EngineParser.GetSetting("SystemSettings", "AmbientOcclusion", 0).value); 25 | } 26 | set 27 | { 28 | EngineParser.SetSetting("SystemSettings", "AmbientOcclusion", 0, value.ToString()); 29 | } 30 | } 31 | 32 | internal bool HighQualityBloom 33 | { 34 | get 35 | { 36 | return bool.Parse(EngineParser.GetSetting("SystemSettings", "UseHighQualityBloom", 0).value); 37 | } 38 | set 39 | { 40 | EngineParser.SetSetting("SystemSettings", "UseHighQualityBloom", 0, value.ToString()); 41 | } 42 | } 43 | 44 | internal bool Vsync 45 | { 46 | get 47 | { 48 | return bool.Parse(EngineParser.GetSetting("SystemSettings", "UseVsync", 0).value); 49 | } 50 | set 51 | { 52 | EngineParser.SetSetting("SystemSettings", "UseVsync", 0, value.ToString()); 53 | } 54 | } 55 | 56 | internal bool AllowPhysX 57 | { 58 | get 59 | { 60 | return bool.Parse(EngineParser.GetSetting("SystemSettings", "AllowD3D10", 0).value) && !bool.Parse(EngineParser.GetSetting("Engine.Engine", "bDisablePhysXHardwareSupport", 0).value); 61 | } 62 | set 63 | { 64 | EngineParser.SetSetting("SystemSettings", "AllowD3D10", 0, value.ToString()); 65 | EngineParser.SetSetting("Engine.Engine", "bDisablePhysXHardwareSupport", 0, (!value).ToString()); 66 | } 67 | } 68 | 69 | internal bool SmoothFrameRate 70 | { 71 | get 72 | { 73 | return bool.Parse(EngineParser.GetSetting("Engine.GameEngine", "bSmoothFrameRate", 0).value); 74 | } 75 | set 76 | { 77 | EngineParser.SetSetting("Engine.GameEngine", "bSmoothFrameRate", 0, value.ToString()); 78 | } 79 | } 80 | 81 | internal bool StartupMovies 82 | { 83 | get 84 | { 85 | ConfigEntry regularlogo = EngineParser.GetSetting("FullScreenMovie", "StartupMovies", 0); 86 | return regularlogo.isCommented; 87 | } 88 | set 89 | { 90 | bool currentSetting = StartupMovies; 91 | if (value == false && !currentSetting) 92 | { 93 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 0, "//"); 94 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 1, "//"); 95 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 2, "//"); 96 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 3, "//"); 97 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 0, "//"); 98 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 1, "//"); 99 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 2, "//"); 100 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 3, "//"); 101 | } 102 | else if (value == true && currentSetting) 103 | { 104 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 0, null); 105 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 1, null); 106 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 2, null); 107 | EngineParser.SetSettingComment("FullScreenMovie", "StartupMovies", 3, null); 108 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 0, null); 109 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 1, null); 110 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 2, null); 111 | EngineParser.SetSettingComment("FullScreenMovie", "SkippableMovies", 3, null); 112 | } 113 | } 114 | } 115 | 116 | internal short MaxAnisotropy 117 | { 118 | get 119 | { 120 | return short.Parse(EngineParser.GetSetting("SystemSettings", "MaxAnisotropy", 0).value); 121 | } 122 | set 123 | { 124 | EngineParser.SetSetting("SystemSettings", "MaxAnisotropy", 0, value.ToString()); 125 | } 126 | } 127 | 128 | internal short MaxMultisamples 129 | { 130 | get 131 | { 132 | return short.Parse(EngineParser.GetSetting("SystemSettings", "MaxMultisamples", 0).value); 133 | } 134 | set 135 | { 136 | EngineParser.SetSetting("SystemSettings", "MaxMultisamples", 0, value.ToString()); 137 | } 138 | } 139 | 140 | internal int ResX 141 | { 142 | get 143 | { 144 | return int.Parse(EngineParser.GetSetting("SystemSettings", "ResX", 0).value); 145 | } 146 | set 147 | { 148 | EngineParser.SetSetting("SystemSettings", "ResX", 0, value.ToString()); 149 | } 150 | } 151 | 152 | internal int ResY 153 | { 154 | get 155 | { 156 | return int.Parse(EngineParser.GetSetting("SystemSettings", "ResY", 0).value); 157 | } 158 | set 159 | { 160 | EngineParser.SetSetting("SystemSettings", "ResY", 0, value.ToString()); 161 | } 162 | } 163 | 164 | internal int ScreenPercentage 165 | { 166 | get 167 | { 168 | bool parseRes; 169 | double result; 170 | parseRes = double.TryParse(EngineParser.GetSetting("SystemSettings", "ScreenPercentage", 0).value, out result); 171 | 172 | if (parseRes) 173 | { 174 | return (int)result; 175 | } 176 | else 177 | { 178 | return 100; 179 | } 180 | } 181 | set 182 | { 183 | EngineParser.SetSetting("SystemSettings", "ScreenPercentage", 0, value.ToString("N6")); 184 | } 185 | } 186 | 187 | internal bool HasVoiceEnabled 188 | { 189 | get 190 | { 191 | return bool.Parse(EngineParser.GetSetting("VoIP", "bHasVoiceEnabled", 0).value); 192 | } 193 | set 194 | { 195 | EngineParser.SetSetting("VoIP", "bHasVoiceEnabled", 0, value.ToString()); 196 | } 197 | } 198 | 199 | internal bool DisableOutlineShader 200 | { 201 | get 202 | { 203 | return EngineParser.GetSetting("Engine.Engine", "DefaultPostProcessName", 0).value.Equals("WillowEngineMaterials.WillowScenePostProcess_cinematic"); 204 | } 205 | set 206 | { 207 | if (value == true) 208 | { 209 | EngineParser.SetSetting("Engine.Engine", "DefaultPostProcessName", 0, "WillowEngineMaterials.WillowScenePostProcess_cinematic"); 210 | } 211 | else 212 | { 213 | EngineParser.SetSetting("Engine.Engine", "DefaultPostProcessName", 0, OutLineShaderString); 214 | } 215 | } 216 | } 217 | 218 | internal void Save() 219 | { 220 | EngineParser.SaveSettings(); 221 | } 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /SettingsManagers/GameSettingsManager.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using BorderlandsAdvancedConfig.INIParser; 6 | 7 | namespace BorderlandsAdvancedConfig.SettingsManagers 8 | { 9 | public class GameSettingsManager 10 | { 11 | private INIFileParser GameParser; 12 | 13 | public GameSettingsManager(INIFileParser gameParser) 14 | { 15 | this.GameParser = gameParser; 16 | } 17 | 18 | internal int PlayerInfoMaxDist 19 | { 20 | get 21 | { 22 | return int.Parse(GameParser.GetSetting("WillowGame.WillowHUD", "PlayerInfoMaxDist", 0).value); 23 | } 24 | set 25 | { 26 | GameParser.SetSetting("WillowGame.WillowHUD", "PlayerInfoMaxDist", 0, value.ToString()); 27 | } 28 | } 29 | 30 | internal void Save() 31 | { 32 | GameParser.SaveSettings(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SettingsManagers/InputSettingsManager.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using BorderlandsAdvancedConfig.INIParser; 8 | 9 | namespace BorderlandsAdvancedConfig.SettingsManagers 10 | { 11 | public class InputSettingsManager 12 | { 13 | private INIFileParser InputParser; 14 | 15 | private const string FOVTemplate = "(Name=\"{0}\",Command=\"FOV {1}\",Control=False,Shift=False,Alt=False)"; 16 | private const string OrigUIListMouseLine = "(WidgetClassName=\"Engine.UIList\",WidgetStates=((StateClassName=\"Engine.UIState_Focused\",StateInputAliases=((InputAliasName=\"NextControl\",LinkedInputKeys=((InputKeyName=\"Tab\"))),(InputAliasName=\"MoveSelectionUp\",LinkedInputKeys=((InputKeyName=\"Up\"),(InputKeyName=\"Gamepad_RightStick_Up\"),(InputKeyName=\"MouseScrollUp\"))),(InputAliasName=\"MoveSelectionDown\",LinkedInputKeys=((InputKeyName=\"Down\"),(InputKeyName=\"Gamepad_RightStick_Down\"),(InputKeyName=\"MouseScrollDown\"))),(InputAliasName=\"MoveSelectionLeft\",LinkedInputKeys=((InputKeyName=\"Left\"),(InputKeyName=\"Gamepad_RightStick_Left\"))),(InputAliasName=\"MoveSelectionRight\",LinkedInputKeys=((InputKeyName=\"Right\"),(InputKeyName=\"Gamepad_RightStick_Right\"))),(InputAliasName=\"SelectFirstElement\",LinkedInputKeys=((InputKeyName=\"Home\"))),(InputAliasName=\"SelectLastElement\",LinkedInputKeys=((InputKeyName=\"End\"))),(InputAliasName=\"PageUp\",LinkedInputKeys=((InputKeyName=\"PageUp\"),(InputKeyName=\"XboxTypeS_LeftShoulder\"),(InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42))),(InputAliasName=\"PageDown\",LinkedInputKeys=((InputKeyName=\"PageDown\"),(InputKeyName=\"XboxTypeS_RightShoulder\"),(InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42))),(InputAliasName=\"SelectAllItems\",LinkedInputKeys=((InputKeyName=\"A\",ModifierKeyFlags=42))),(InputAliasName=\"SubmitListSelection\",LinkedInputKeys=((InputKeyName=\"SpaceBar\"),(InputKeyName=\"Enter\"),(InputKeyName=\"XboxTypeS_A\"),(InputKeyName=\"XboxTypeS_Start\"))),(InputAliasName=\"NavFocusUp\",LinkedInputKeys=((InputKeyName=\"XboxTypeS_DPad_Up\"),(InputKeyName=\"Gamepad_LeftStick_Up\"))),(InputAliasName=\"NavFocusDown\",LinkedInputKeys=((InputKeyName=\"XboxTypeS_DPad_Down\"),(InputKeyName=\"Gamepad_LeftStick_Down\"))),(InputAliasName=\"NavFocusLeft\",LinkedInputKeys=((InputKeyName=\"XboxTypeS_DPad_Left\"),(InputKeyName=\"Gamepad_LeftStick_Left\"))),(InputAliasName=\"NavFocusRight\",LinkedInputKeys=((InputKeyName=\"XboxTypeS_DPad_Right\"),(InputKeyName=\"Gamepad_LeftStick_Right\"))))),(StateClassName=\"Engine.UIState_Active\",StateInputAliases=((InputAliasName=\"Clicked\",LinkedInputKeys=((InputKeyName=\"LeftMouseButton\",ModifierKeyFlags=24))),(InputAliasName=\"ResizeColumn\",LinkedInputKeys=((InputKeyName=\"MouseX\",ModifierKeyFlags=0),(InputKeyName=\"MouseY\",ModifierKeyFlags=0)))))))"; 17 | private const string OrigUIScrollFrameMouseLine = "(WidgetClassName=\"Engine.UIScrollFrame\",WidgetStates=((StateClassName=\"Engine.UIState_Focused\",StateInputAliases=((InputAliasName=\"ScrollUp\",LinkedInputKeys=((InputKeyName=\"MouseScrollUp\"),(InputKeyName=\"Up\"))),(InputAliasName=\"ScrollDown\",LinkedInputKeys=((InputKeyName=\"MouseScrollDown\"),(InputKeyName=\"Down\"))),(InputAliasName=\"ScrollTop\",LinkedInputKeys=((InputKeyName=\"Home\"))),(InputAliasName=\"ScrollBottom\",LinkedInputKeys=((InputKeyName=\"End\"))),(InputAliasName=\"PageUp\",LinkedInputKeys=((InputKeyName=\"PageUp\"),(InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42))),(InputAliasName=\"PageDown\",LinkedInputKeys=((InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42),(InputKeyName=\"PageDown\")))))))"; 18 | private const string OrigZoomBind = "(Name=\"RightMouseButton\",Command=\"advancedbutton bAdvancedButtonAux5\")"; 19 | 20 | private const string CrouchTemplate = "(Name=\"LeftControl\",Command=\"{0}\",Control=False,Shift=False,Alt=False,LeftTrigger=False,RightTrigger=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)"; 21 | private const string CrouchOriginalCommand = "advancedbutton bAdvancedButtonAux1 | SwitchSeats"; 22 | private const string CrouchToggleCommand = "Duck | SwitchSeats"; 23 | 24 | private int? F10Fov; 25 | private int? F11Fov; 26 | 27 | public InputSettingsManager(INIFileParser inputParser) 28 | { 29 | this.InputParser = inputParser; 30 | 31 | IList WillowPlayerInputBindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 32 | 33 | if (WillowPlayerInputBindings == null || WillowPlayerInputBindings.Count <= 0) 34 | { 35 | //Copy default bindings 36 | IList WillowPlayerEngineBindings = InputParser.GetAllSettings("Engine.PlayerInput", "Bindings"); 37 | 38 | InputParser.AddSettings("WillowGame.WillowPlayerInput", WillowPlayerEngineBindings); 39 | } 40 | } 41 | 42 | internal bool FovKeysEnabled() 43 | { 44 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 45 | 46 | bool F10assigned = false; 47 | bool F11assigned = false; 48 | 49 | foreach (ConfigEntry binding in bindings) 50 | { 51 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 52 | string[] parameters = tempValue.Split(','); 53 | 54 | if (parameters[0].Equals("Name=\"F10\"")) 55 | { 56 | F10assigned = true; 57 | string[] commandValuePair = parameters[1].Split('='); 58 | string tempCommandValue = commandValuePair[1].Replace("\"", ""); 59 | F10Fov = int.Parse(tempCommandValue.Substring(4, tempCommandValue.Length - 4)); 60 | } 61 | if (parameters[0].Equals("Name=\"F11\"")) 62 | { 63 | F11assigned = true; 64 | string[] commandValuePair = parameters[1].Split('='); 65 | string tempCommandValue = commandValuePair[1].Replace("\"", ""); 66 | F11Fov = int.Parse(tempCommandValue.Substring(4, tempCommandValue.Length - 4)); 67 | } 68 | } 69 | 70 | return (F10assigned && F11assigned); 71 | } 72 | 73 | internal int? GetF10Fov() 74 | { 75 | return F10Fov; 76 | } 77 | 78 | internal int? GetF11Fov() 79 | { 80 | return F11Fov; 81 | } 82 | 83 | internal void SetKeyFov(string keyCode, int ang) 84 | { 85 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 86 | 87 | bool bingdingFound = false; 88 | 89 | foreach (ConfigEntry binding in bindings) 90 | { 91 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 92 | string[] parameters = tempValue.Split(','); 93 | 94 | if (parameters[0].Equals(string.Format("Name=\"{0}\"", keyCode))) 95 | { 96 | binding.value = string.Format(FOVTemplate, keyCode, ang); 97 | bingdingFound = true; 98 | } 99 | } 100 | 101 | if (!bingdingFound) 102 | { 103 | InputParser.AddSetting("WillowGame.WillowPlayerInput", "Bindings", string.Format(FOVTemplate, keyCode, ang), null); 104 | } 105 | } 106 | 107 | internal void RemoveBinding(string keyCode) 108 | { 109 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 110 | 111 | foreach (ConfigEntry binding in bindings) 112 | { 113 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 114 | string[] parameters = tempValue.Split(','); 115 | 116 | if (parameters[0].Equals(string.Format("Name=\"{0}\"", keyCode))) 117 | { 118 | InputParser.DeleteSetting("WillowGame.WillowPlayerInput", binding); 119 | break; 120 | } 121 | } 122 | } 123 | 124 | internal bool EnableMouseSmoothing 125 | { 126 | get 127 | { 128 | return bool.Parse(InputParser.GetSetting("Engine.PlayerInput", "bEnableMouseSmoothing", 0).value); 129 | } 130 | set 131 | { 132 | InputParser.SetSetting("Engine.PlayerInput", "bEnableMouseSmoothing", 0, value.ToString()); 133 | } 134 | } 135 | 136 | internal bool Console 137 | { 138 | get 139 | { 140 | return InputParser.GetSetting("Engine.Console", "ConsoleKey", 0).value.Equals("Tilde"); 141 | } 142 | set 143 | { 144 | if (value) 145 | { 146 | InputParser.SetSetting("Engine.Console", "ConsoleKey", 0, "Tilde"); 147 | } 148 | else 149 | { 150 | InputParser.SetSetting("Engine.Console", "ConsoleKey", 0, "None"); 151 | } 152 | } 153 | } 154 | 155 | internal bool SetF9ShowHud 156 | { 157 | get 158 | { 159 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 160 | 161 | foreach (ConfigEntry binding in bindings) 162 | { 163 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 164 | string[] parameters = tempValue.Split(','); 165 | 166 | if (parameters[0].Equals("Name=\"F9\"")) 167 | { 168 | return true; 169 | } 170 | } 171 | 172 | return false; 173 | } 174 | set 175 | { 176 | if (value == true && !SetF9ShowHud) 177 | { 178 | InputParser.AddSetting("WillowGame.WillowPlayerInput", "Bindings", "(Name=\"F9\",Command=\"showhud\",Control=False,Shift=False,Alt=False,LeftTrigger=False,RightTrigger=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)", null); 179 | } 180 | else if (value == false) 181 | { 182 | RemoveBinding("F9"); 183 | } 184 | } 185 | } 186 | 187 | internal bool SetF12ShowFPS 188 | { 189 | get 190 | { 191 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 192 | 193 | foreach (ConfigEntry binding in bindings) 194 | { 195 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 196 | string[] parameters = tempValue.Split(','); 197 | 198 | if (parameters[0].Equals("Name=\"F12\"")) 199 | { 200 | return true; 201 | } 202 | } 203 | 204 | return false; 205 | } 206 | set 207 | { 208 | if (value == true && !SetF12ShowFPS) 209 | { 210 | InputParser.AddSetting("WillowGame.WillowPlayerInput", "Bindings", "(Name=\"F12\",Command=\"stat fps\",Control=False,Shift=False,Alt=False,LeftTrigger=False,RightTrigger=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)", null); 211 | } 212 | else if (value == false) 213 | { 214 | RemoveBinding("F12"); 215 | } 216 | } 217 | } 218 | 219 | internal bool ZoomToggle 220 | { 221 | get 222 | { 223 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 224 | 225 | bool ZoomInassigned = false; 226 | bool ZoomOutassigned = false; 227 | 228 | foreach (ConfigEntry binding in bindings) 229 | { 230 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 231 | string[] parameters = tempValue.Split(','); 232 | 233 | if (parameters[0].Equals("Name=\"ToggleAimOn\"")) 234 | { 235 | ZoomInassigned = true; 236 | } 237 | if (parameters[0].Equals("Name=\"ToggleAimOff\"")) 238 | { 239 | ZoomOutassigned = true; 240 | } 241 | } 242 | 243 | return (ZoomInassigned && ZoomOutassigned); 244 | } 245 | set 246 | { 247 | if (value == true && !ZoomToggle) 248 | { 249 | InputParser.AddSetting("WillowGame.WillowPlayerInput", "Bindings", "(Name=\"ToggleAimOn\",Command=\"advancedbutton bAdvancedButtonAux5 | OnRelease StartAltFire | setbind RightMouseButton ToggleAimOff\")", null); 250 | InputParser.AddSetting("WillowGame.WillowPlayerInput", "Bindings", "(Name=\"ToggleAimOff\",Command=\"advancedbutton bAdvancedButtonAux5 | OnRelease StopAltFire | setbind RightMouseButton ToggleAimOn\")", null); 251 | 252 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 253 | 254 | foreach (ConfigEntry binding in bindings) 255 | { 256 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 257 | string[] parameters = tempValue.Split(','); 258 | 259 | if (parameters[0].Equals("Name=\"RightMouseButton\"")) 260 | { 261 | binding.value = "(Name=\"RightMouseButton\",Command=\"ToggleAimOn\")"; 262 | } 263 | } 264 | } 265 | else if (value == false) 266 | { 267 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 268 | 269 | foreach (ConfigEntry binding in bindings) 270 | { 271 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 272 | string[] parameters = tempValue.Split(','); 273 | 274 | if (parameters[0].Equals("Name=\"RightMouseButton\"")) 275 | { 276 | binding.value = OrigZoomBind; 277 | } 278 | } 279 | 280 | RemoveBinding("ToggleAimOn"); 281 | RemoveBinding("ToggleAimOff"); 282 | } 283 | } 284 | } 285 | 286 | internal bool CrouchToggle 287 | { 288 | get 289 | { 290 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 291 | 292 | foreach (ConfigEntry binding in bindings) 293 | { 294 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 295 | string[] parameters = tempValue.Split(','); 296 | 297 | if (parameters[0].Equals("Name=\"LeftControl\"")) 298 | { 299 | string[] commandValuePair = parameters[1].Split('='); 300 | string commandValue = commandValuePair[1].Replace("\"", ""); 301 | 302 | return commandValue.Equals(CrouchOriginalCommand); 303 | } 304 | } 305 | 306 | return false; 307 | } 308 | set 309 | { 310 | 311 | IList bindings = InputParser.GetAllSettings("WillowGame.WillowPlayerInput", "Bindings"); 312 | 313 | foreach (ConfigEntry binding in bindings) 314 | { 315 | string tempValue = binding.value.Substring(1, binding.value.Length - 2); 316 | string[] parameters = tempValue.Split(','); 317 | 318 | if (parameters[0].Equals("Name=\"LeftControl\"")) 319 | { 320 | if (value == true) 321 | { 322 | binding.value = string.Format(CrouchTemplate, CrouchOriginalCommand); 323 | } 324 | else 325 | { 326 | binding.value = string.Format(CrouchTemplate, CrouchToggleCommand); 327 | } 328 | } 329 | } 330 | } 331 | } 332 | 333 | internal bool ScrollWheel 334 | { 335 | get 336 | { 337 | IList WidgetInputAliases = InputParser.GetAllSettings("Engine.UIInputConfiguration", "WidgetInputAliases"); 338 | 339 | bool MouseScrollUpFlag = false; 340 | bool MouseScrollDownFlag = false; 341 | 342 | foreach (ConfigEntry widgetInputAlias in WidgetInputAliases) 343 | { 344 | string tempValue = widgetInputAlias.value.Substring(1, widgetInputAlias.value.Length - 2); 345 | string[] parameters = tempValue.Split(','); 346 | 347 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIList\"")) 348 | { 349 | MouseScrollUpFlag = !widgetInputAlias.value.Contains("InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42"); 350 | MouseScrollDownFlag = !widgetInputAlias.value.Contains("InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42"); 351 | } 352 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIScrollFrame\"")) 353 | { 354 | MouseScrollUpFlag = !widgetInputAlias.value.Contains("InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42"); 355 | MouseScrollDownFlag = !widgetInputAlias.value.Contains("InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42"); 356 | } 357 | } 358 | 359 | return (MouseScrollUpFlag && MouseScrollDownFlag); 360 | } 361 | set 362 | { 363 | IList WidgetInputAliases = InputParser.GetAllSettings("Engine.UIInputConfiguration", "WidgetInputAliases"); 364 | 365 | if (value == true) 366 | { 367 | foreach (ConfigEntry widgetInputAlias in WidgetInputAliases) 368 | { 369 | string tempValue = widgetInputAlias.value.Substring(1, widgetInputAlias.value.Length - 2); 370 | string[] parameters = tempValue.Split(','); 371 | 372 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIList\"")) 373 | { 374 | widgetInputAlias.value = widgetInputAlias.value.Replace("InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42", "InputKeyName=\"MouseScrollUp\""); 375 | widgetInputAlias.value = widgetInputAlias.value.Replace("InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42", "InputKeyName=\"MouseScrollDown\""); 376 | } 377 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIScrollFrame\"")) 378 | { 379 | widgetInputAlias.value = widgetInputAlias.value.Replace("InputKeyName=\"MouseScrollUp\",ModifierKeyFlags=42", "InputKeyName=\"MouseScrollUp\""); 380 | widgetInputAlias.value = widgetInputAlias.value.Replace("InputKeyName=\"MouseScrollDown\",ModifierKeyFlags=42", "InputKeyName=\"MouseScrollDown\""); 381 | } 382 | } 383 | } 384 | else if (value == false && ScrollWheel) 385 | { 386 | foreach (ConfigEntry widgetInputAlias in WidgetInputAliases) 387 | { 388 | string tempValue = widgetInputAlias.value.Substring(1, widgetInputAlias.value.Length - 2); 389 | string[] parameters = tempValue.Split(','); 390 | 391 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIList\"")) 392 | { 393 | widgetInputAlias.value = OrigUIListMouseLine; 394 | } 395 | if (parameters[0].Equals("WidgetClassName=\"Engine.UIScrollFrame\"")) 396 | { 397 | widgetInputAlias.value = OrigUIScrollFrameMouseLine; 398 | } 399 | } 400 | } 401 | } 402 | } 403 | 404 | internal void Save() 405 | { 406 | //InputParser.CopyReplaceSection("WillowGame.WillowPlayerInput", "WillowGame.WillowPlayerInput"); 407 | InputParser.SaveSettings(); 408 | } 409 | } 410 | } 411 | -------------------------------------------------------------------------------- /VersionCheck.cs: -------------------------------------------------------------------------------- 1 | ///Borderlands Advanced Settings Tool 2 | ///Developed By Babak B. MDKv4 3 | ///Code Release Date: 9/12/2010 4 | 5 | using System.IO; 6 | using System.Net; 7 | using System.Reflection; 8 | using System.Text; 9 | using System.Windows.Forms; 10 | 11 | namespace BorderlandsAdvancedConfig 12 | { 13 | public class VersionCheck 14 | { 15 | public VersionCheck(string updateURL) 16 | { 17 | string currentVersion = CheckVersion(); 18 | 19 | if (!string.IsNullOrEmpty(currentVersion)) 20 | { 21 | if (!Assembly.GetExecutingAssembly().GetName().Version.ToString().Equals(currentVersion)) 22 | { 23 | DialogResult result = MessageBox.Show("There is a new version of Borderlands Advanced Settings available. Click yes to see more information.", "New version", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); 24 | 25 | if (result == DialogResult.Yes) 26 | { 27 | System.Diagnostics.Process.Start(updateURL); 28 | } 29 | } 30 | } 31 | } 32 | 33 | public string CheckVersion() 34 | { 35 | try 36 | { 37 | // used to build entire input 38 | StringBuilder sb = new StringBuilder(); 39 | 40 | // used on each read operation 41 | byte[] buf = new byte[8192]; 42 | 43 | // prepare the web page we will be asking for 44 | HttpWebRequest request = (HttpWebRequest) 45 | WebRequest.Create("https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/master/CurrentVersion.txt"); 46 | 47 | // execute the request 48 | HttpWebResponse response = (HttpWebResponse) 49 | request.GetResponse(); 50 | 51 | // we will read data via the response stream 52 | Stream resStream = response.GetResponseStream(); 53 | 54 | string tempString = null; 55 | int count = 0; 56 | 57 | do 58 | { 59 | // fill the buffer with data 60 | count = resStream.Read(buf, 0, buf.Length); 61 | 62 | // make sure we read some data 63 | if (count != 0) 64 | { 65 | // translate from bytes to ASCII text 66 | tempString = Encoding.ASCII.GetString(buf, 0, count); 67 | 68 | // continue building the string 69 | sb.Append(tempString); 70 | } 71 | } 72 | while (count > 0); // any more data to read? 73 | 74 | // print out page source 75 | return sb.ToString().Trim(); 76 | } 77 | catch 78 | { 79 | return null; 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /borderlands.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheLonerD/BorderlandsAdvancedConfig/acef59c308d33333a62866fda87dcfc429e90fb7/borderlands.ico --------------------------------------------------------------------------------