mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-03-03 16:11:45 +00:00
Made the number of file backups configurable
This commit is contained in:
parent
ed3b687284
commit
9acf74041c
6 changed files with 1987 additions and 1923 deletions
|
@ -813,6 +813,7 @@ gzshowvisualvertices = true;
|
|||
gzvertexscale3d = 1f;
|
||||
gzmarkextrafloors = true;
|
||||
maxrecentfiles = 8;
|
||||
maxbackups = 3;
|
||||
autoclearsidetextures = true;
|
||||
storeselectededittab = true;
|
||||
rendercomments = true;
|
||||
|
|
|
@ -114,6 +114,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private int maxRecentFiles;
|
||||
private bool autoClearSideTextures;
|
||||
private bool storeSelectedEditTab;
|
||||
private int maxbackups;
|
||||
private bool checkforupdates;
|
||||
private bool rendercomments;
|
||||
private bool rendergrid;
|
||||
|
@ -204,6 +205,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public int MaxRecentFiles { get { return maxRecentFiles; } internal set { maxRecentFiles = General.Clamp(value, 8, 25); } }
|
||||
public bool AutoClearSidedefTextures { get { return autoClearSideTextures; } internal set { autoClearSideTextures = value; } }
|
||||
public bool StoreSelectedEditTab { get { return storeSelectedEditTab; } internal set { storeSelectedEditTab = value; } }
|
||||
internal int MaxBackups { get { return maxbackups; } set { maxbackups = value; } }
|
||||
internal bool CheckForUpdates { get { return checkforupdates; } set { checkforupdates = value; } } //mxd
|
||||
public bool RenderComments { get { return rendercomments; } internal set { rendercomments = value; } } //mxd
|
||||
public bool RenderGrid { get { return rendergrid; } internal set { rendergrid = value; } } //mxd
|
||||
|
@ -317,6 +319,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
maxRecentFiles = cfg.ReadSetting("maxrecentfiles", 8);
|
||||
autoClearSideTextures = cfg.ReadSetting("autoclearsidetextures", true);
|
||||
storeSelectedEditTab = cfg.ReadSetting("storeselectededittab", true);
|
||||
maxbackups = cfg.ReadSetting("maxbackups", 3);
|
||||
checkforupdates = cfg.ReadSetting("checkforupdates", false); //mxd
|
||||
rendercomments = cfg.ReadSetting("rendercomments", true); //mxd
|
||||
rendergrid = cfg.ReadSetting("rendergrid", true); //mxd
|
||||
|
@ -414,6 +417,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
cfg.WriteSetting("maxrecentfiles", maxRecentFiles);
|
||||
cfg.WriteSetting("autoclearsidetextures", autoClearSideTextures);
|
||||
cfg.WriteSetting("storeselectededittab", storeSelectedEditTab);
|
||||
cfg.WriteSetting("maxbackups", maxbackups);
|
||||
cfg.WriteSetting("checkforupdates", checkforupdates); //mxd
|
||||
cfg.WriteSetting("rendercomments", rendercomments); //mxd
|
||||
cfg.WriteSetting("rendergrid", rendergrid); //mxd
|
||||
|
|
|
@ -828,11 +828,17 @@ namespace CodeImp.DoomBuilder
|
|||
}
|
||||
}
|
||||
|
||||
int backups = General.Settings.MaxBackups;
|
||||
if (backups > 0)
|
||||
{
|
||||
// Backup existing file, if any
|
||||
if(File.Exists(newfilepathname + ".backup3")) File.Delete(newfilepathname + ".backup3");
|
||||
if(File.Exists(newfilepathname + ".backup2")) File.Move(newfilepathname + ".backup2", newfilepathname + ".backup3");
|
||||
if(File.Exists(newfilepathname + ".backup1")) File.Move(newfilepathname + ".backup1", newfilepathname + ".backup2");
|
||||
if (File.Exists(newfilepathname + ".backup" + backups)) File.Delete(newfilepathname + ".backup" + backups);
|
||||
for (int i = backups - 1; i >= 1; i--)
|
||||
{
|
||||
if (File.Exists(newfilepathname + ".backup" + i)) File.Move(newfilepathname + ".backup" + i, newfilepathname + ".backup" + (i+1));
|
||||
}
|
||||
File.Copy(newfilepathname, newfilepathname + ".backup1");
|
||||
}
|
||||
}
|
||||
|
||||
// Except when saving INTO another file,
|
||||
|
|
105
Source/Core/Windows/PreferencesForm.Designer.cs
generated
105
Source/Core/Windows/PreferencesForm.Designer.cs
generated
|
@ -125,8 +125,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tbFilterActions = new System.Windows.Forms.TextBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.listactions = new System.Windows.Forms.ListView();
|
||||
this.columncontrolaction = new System.Windows.Forms.ColumnHeader();
|
||||
this.columncontrolkey = new System.Windows.Forms.ColumnHeader();
|
||||
this.columncontrolaction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columncontrolkey = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.actioncontrolpanel = new System.Windows.Forms.GroupBox();
|
||||
this.actiondescription = new System.Windows.Forms.TextBox();
|
||||
this.keyusedlist = new System.Windows.Forms.ListBox();
|
||||
|
@ -175,6 +175,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.maxBackups = new System.Windows.Forms.TrackBar();
|
||||
this.labelBackups = new System.Windows.Forms.Label();
|
||||
this.label27 = new System.Windows.Forms.Label();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
|
@ -212,6 +215,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit();
|
||||
this.colorsgroup3.SuspendLayout();
|
||||
this.tabpasting.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxBackups)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label7
|
||||
|
@ -243,6 +247,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(this.maxBackups);
|
||||
groupBox1.Controls.Add(this.labelBackups);
|
||||
groupBox1.Controls.Add(this.label27);
|
||||
groupBox1.Controls.Add(this.checkforupdates);
|
||||
groupBox1.Controls.Add(this.cbStoreEditTab);
|
||||
groupBox1.Controls.Add(this.locatetexturegroup);
|
||||
|
@ -268,7 +275,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
groupBox1.Controls.Add(this.defaultviewmode);
|
||||
groupBox1.Location = new System.Drawing.Point(8, 8);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new System.Drawing.Size(331, 438);
|
||||
groupBox1.Size = new System.Drawing.Size(331, 465);
|
||||
groupBox1.TabIndex = 0;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = " Options ";
|
||||
|
@ -276,7 +283,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// checkforupdates
|
||||
//
|
||||
this.checkforupdates.AutoSize = true;
|
||||
this.checkforupdates.Location = new System.Drawing.Point(32, 392);
|
||||
this.checkforupdates.Location = new System.Drawing.Point(32, 440);
|
||||
this.checkforupdates.Name = "checkforupdates";
|
||||
this.checkforupdates.Size = new System.Drawing.Size(160, 17);
|
||||
this.checkforupdates.TabIndex = 51;
|
||||
|
@ -287,7 +294,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// cbStoreEditTab
|
||||
//
|
||||
this.cbStoreEditTab.AutoSize = true;
|
||||
this.cbStoreEditTab.Location = new System.Drawing.Point(32, 371);
|
||||
this.cbStoreEditTab.Location = new System.Drawing.Point(32, 419);
|
||||
this.cbStoreEditTab.Name = "cbStoreEditTab";
|
||||
this.cbStoreEditTab.Size = new System.Drawing.Size(203, 17);
|
||||
this.cbStoreEditTab.TabIndex = 50;
|
||||
|
@ -297,7 +304,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// locatetexturegroup
|
||||
//
|
||||
this.locatetexturegroup.AutoSize = true;
|
||||
this.locatetexturegroup.Location = new System.Drawing.Point(32, 329);
|
||||
this.locatetexturegroup.Location = new System.Drawing.Point(32, 377);
|
||||
this.locatetexturegroup.Name = "locatetexturegroup";
|
||||
this.locatetexturegroup.Size = new System.Drawing.Size(267, 17);
|
||||
this.locatetexturegroup.TabIndex = 49;
|
||||
|
@ -374,7 +381,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// cbSynchCameras
|
||||
//
|
||||
this.cbSynchCameras.AutoSize = true;
|
||||
this.cbSynchCameras.Location = new System.Drawing.Point(32, 350);
|
||||
this.cbSynchCameras.Location = new System.Drawing.Point(32, 398);
|
||||
this.cbSynchCameras.Name = "cbSynchCameras";
|
||||
this.cbSynchCameras.Size = new System.Drawing.Size(260, 17);
|
||||
this.cbSynchCameras.TabIndex = 42;
|
||||
|
@ -384,7 +391,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// showtexturesizes
|
||||
//
|
||||
this.showtexturesizes.AutoSize = true;
|
||||
this.showtexturesizes.Location = new System.Drawing.Point(32, 308);
|
||||
this.showtexturesizes.Location = new System.Drawing.Point(32, 356);
|
||||
this.showtexturesizes.Name = "showtexturesizes";
|
||||
this.showtexturesizes.Size = new System.Drawing.Size(208, 17);
|
||||
this.showtexturesizes.TabIndex = 41;
|
||||
|
@ -394,7 +401,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// scriptontop
|
||||
//
|
||||
this.scriptontop.AutoSize = true;
|
||||
this.scriptontop.Location = new System.Drawing.Point(32, 287);
|
||||
this.scriptontop.Location = new System.Drawing.Point(32, 335);
|
||||
this.scriptontop.Name = "scriptontop";
|
||||
this.scriptontop.Size = new System.Drawing.Size(227, 17);
|
||||
this.scriptontop.TabIndex = 40;
|
||||
|
@ -588,7 +595,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorsgroup1.Controls.Add(this.colorlinedefs);
|
||||
this.colorsgroup1.Location = new System.Drawing.Point(8, 8);
|
||||
this.colorsgroup1.Name = "colorsgroup1";
|
||||
this.colorsgroup1.Size = new System.Drawing.Size(203, 493);
|
||||
this.colorsgroup1.Size = new System.Drawing.Size(203, 516);
|
||||
this.colorsgroup1.TabIndex = 0;
|
||||
this.colorsgroup1.TabStop = false;
|
||||
this.colorsgroup1.Text = " Display ";
|
||||
|
@ -771,7 +778,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancel.Location = new System.Drawing.Point(587, 557);
|
||||
this.cancel.Location = new System.Drawing.Point(587, 580);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(112, 25);
|
||||
this.cancel.TabIndex = 2;
|
||||
|
@ -782,7 +789,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// apply
|
||||
//
|
||||
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.apply.Location = new System.Drawing.Point(469, 557);
|
||||
this.apply.Location = new System.Drawing.Point(469, 580);
|
||||
this.apply.Name = "apply";
|
||||
this.apply.Size = new System.Drawing.Size(112, 25);
|
||||
this.apply.TabIndex = 1;
|
||||
|
@ -804,7 +811,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabs.Name = "tabs";
|
||||
this.tabs.Padding = new System.Drawing.Point(24, 3);
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(690, 536);
|
||||
this.tabs.Size = new System.Drawing.Size(690, 559);
|
||||
this.tabs.TabIndex = 0;
|
||||
this.tabs.SelectedIndexChanged += new System.EventHandler(this.tabs_SelectedIndexChanged);
|
||||
//
|
||||
|
@ -816,10 +823,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabinterface.Controls.Add(this.groupBox2);
|
||||
this.tabinterface.Controls.Add(groupBox1);
|
||||
this.tabinterface.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabinterface.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabinterface.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabinterface.Name = "tabinterface";
|
||||
this.tabinterface.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabinterface.Size = new System.Drawing.Size(682, 509);
|
||||
this.tabinterface.Size = new System.Drawing.Size(682, 533);
|
||||
this.tabinterface.TabIndex = 0;
|
||||
this.tabinterface.Text = "Interface";
|
||||
this.tabinterface.UseVisualStyleBackColor = true;
|
||||
|
@ -829,7 +836,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.groupBox3.Controls.Add(this.resetscreenshotsdir);
|
||||
this.groupBox3.Controls.Add(this.browsescreenshotsdir);
|
||||
this.groupBox3.Controls.Add(this.screenshotsfolderpath);
|
||||
this.groupBox3.Location = new System.Drawing.Point(345, 449);
|
||||
this.groupBox3.Location = new System.Drawing.Point(345, 479);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(331, 48);
|
||||
this.groupBox3.TabIndex = 5;
|
||||
|
@ -879,7 +886,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.groupBox5.Controls.Add(this.toolbar_script);
|
||||
this.groupBox5.Location = new System.Drawing.Point(345, 321);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(331, 125);
|
||||
this.groupBox5.Size = new System.Drawing.Size(331, 152);
|
||||
this.groupBox5.TabIndex = 4;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = " Toolbar Buttons ";
|
||||
|
@ -989,7 +996,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.groupBox4.Controls.Add(this.collapsedockers);
|
||||
this.groupBox4.Controls.Add(this.dockersposition);
|
||||
this.groupBox4.Controls.Add(this.label17);
|
||||
this.groupBox4.Location = new System.Drawing.Point(8, 449);
|
||||
this.groupBox4.Location = new System.Drawing.Point(8, 479);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(331, 48);
|
||||
this.groupBox4.TabIndex = 3;
|
||||
|
@ -1231,10 +1238,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabkeys.Controls.Add(this.listactions);
|
||||
this.tabkeys.Controls.Add(this.actioncontrolpanel);
|
||||
this.tabkeys.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabkeys.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabkeys.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabkeys.Name = "tabkeys";
|
||||
this.tabkeys.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabkeys.Size = new System.Drawing.Size(682, 509);
|
||||
this.tabkeys.Size = new System.Drawing.Size(682, 533);
|
||||
this.tabkeys.TabIndex = 1;
|
||||
this.tabkeys.Text = "Controls";
|
||||
this.tabkeys.UseVisualStyleBackColor = true;
|
||||
|
@ -1283,15 +1290,15 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.listactions.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
|
||||
this.listactions.MultiSelect = false;
|
||||
this.listactions.Name = "listactions";
|
||||
this.listactions.Size = new System.Drawing.Size(352, 458);
|
||||
this.listactions.Size = new System.Drawing.Size(352, 481);
|
||||
this.listactions.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||
this.listactions.TabIndex = 0;
|
||||
this.listactions.TabStop = false;
|
||||
this.listactions.UseCompatibleStateImageBehavior = false;
|
||||
this.listactions.View = System.Windows.Forms.View.Details;
|
||||
this.listactions.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listactions_MouseUp);
|
||||
this.listactions.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listactions_ItemSelectionChanged);
|
||||
this.listactions.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listactions_KeyUp);
|
||||
this.listactions.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listactions_MouseUp);
|
||||
//
|
||||
// columncontrolaction
|
||||
//
|
||||
|
@ -1322,7 +1329,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.actioncontrolpanel.Location = new System.Drawing.Point(377, 12);
|
||||
this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.actioncontrolpanel.Name = "actioncontrolpanel";
|
||||
this.actioncontrolpanel.Size = new System.Drawing.Size(282, 488);
|
||||
this.actioncontrolpanel.Size = new System.Drawing.Size(282, 511);
|
||||
this.actioncontrolpanel.TabIndex = 9;
|
||||
this.actioncontrolpanel.TabStop = false;
|
||||
this.actioncontrolpanel.Text = " Action control ";
|
||||
|
@ -1413,10 +1420,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabcolors.Controls.Add(this.colorsgroup3);
|
||||
this.tabcolors.Controls.Add(this.colorsgroup1);
|
||||
this.tabcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabcolors.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabcolors.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabcolors.Name = "tabcolors";
|
||||
this.tabcolors.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabcolors.Size = new System.Drawing.Size(682, 509);
|
||||
this.tabcolors.Size = new System.Drawing.Size(682, 533);
|
||||
this.tabcolors.TabIndex = 2;
|
||||
this.tabcolors.Text = "Appearance";
|
||||
this.tabcolors.UseVisualStyleBackColor = true;
|
||||
|
@ -1449,7 +1456,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.appearancegroup1.Controls.Add(this.imagebrightness);
|
||||
this.appearancegroup1.Location = new System.Drawing.Point(217, 224);
|
||||
this.appearancegroup1.Name = "appearancegroup1";
|
||||
this.appearancegroup1.Size = new System.Drawing.Size(457, 277);
|
||||
this.appearancegroup1.Size = new System.Drawing.Size(457, 300);
|
||||
this.appearancegroup1.TabIndex = 24;
|
||||
this.appearancegroup1.TabStop = false;
|
||||
this.appearancegroup1.Text = " Additional Options ";
|
||||
|
@ -1866,10 +1873,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabpasting.Controls.Add(this.label16);
|
||||
this.tabpasting.Controls.Add(this.pasteoptions);
|
||||
this.tabpasting.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabpasting.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabpasting.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabpasting.Name = "tabpasting";
|
||||
this.tabpasting.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabpasting.Size = new System.Drawing.Size(682, 509);
|
||||
this.tabpasting.Size = new System.Drawing.Size(682, 533);
|
||||
this.tabpasting.TabIndex = 3;
|
||||
this.tabpasting.Text = "Pasting ";
|
||||
this.tabpasting.UseVisualStyleBackColor = true;
|
||||
|
@ -1893,20 +1900,52 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pasteoptions.Location = new System.Drawing.Point(8, 53);
|
||||
this.pasteoptions.Name = "pasteoptions";
|
||||
this.pasteoptions.Size = new System.Drawing.Size(666, 427);
|
||||
this.pasteoptions.Size = new System.Drawing.Size(666, 450);
|
||||
this.pasteoptions.TabIndex = 0;
|
||||
//
|
||||
// browseScreenshotsFolderDialog
|
||||
//
|
||||
this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into";
|
||||
//
|
||||
// maxBackups
|
||||
//
|
||||
this.maxBackups.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.maxBackups.LargeChange = 1;
|
||||
this.maxBackups.Location = new System.Drawing.Point(127, 280);
|
||||
this.maxBackups.Maximum = 20;
|
||||
this.maxBackups.Name = "maxBackups";
|
||||
this.maxBackups.Size = new System.Drawing.Size(116, 45);
|
||||
this.maxBackups.TabIndex = 53;
|
||||
this.maxBackups.TickStyle = System.Windows.Forms.TickStyle.Both;
|
||||
this.maxBackups.Value = 3;
|
||||
this.maxBackups.ValueChanged += new System.EventHandler(this.maxBackups_ValueChanged);
|
||||
//
|
||||
// labelBackups
|
||||
//
|
||||
this.labelBackups.AutoSize = true;
|
||||
this.labelBackups.Location = new System.Drawing.Point(249, 292);
|
||||
this.labelBackups.Name = "labelBackups";
|
||||
this.labelBackups.Size = new System.Drawing.Size(13, 13);
|
||||
this.labelBackups.TabIndex = 55;
|
||||
this.labelBackups.Text = "3";
|
||||
//
|
||||
// label27
|
||||
//
|
||||
this.label27.AutoSize = true;
|
||||
this.label27.Location = new System.Drawing.Point(41, 294);
|
||||
this.label27.Name = "label27";
|
||||
this.label27.Size = new System.Drawing.Size(77, 13);
|
||||
this.label27.TabIndex = 54;
|
||||
this.label27.Text = "Max. backups:";
|
||||
this.toolTip1.SetToolTip(this.label27, "Controls how many backups \r\nare made when a map is saved.");
|
||||
//
|
||||
// PreferencesForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.CancelButton = this.cancel;
|
||||
this.ClientSize = new System.Drawing.Size(711, 594);
|
||||
this.ClientSize = new System.Drawing.Size(711, 617);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.tabs);
|
||||
|
@ -1915,7 +1954,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "PreferencesForm";
|
||||
this.Opacity = 1;
|
||||
this.Opacity = 1D;
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
|
@ -1960,6 +1999,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorsgroup3.ResumeLayout(false);
|
||||
this.colorsgroup3.PerformLayout();
|
||||
this.tabpasting.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxBackups)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -2102,5 +2142,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.CheckBox locatetexturegroup;
|
||||
private System.Windows.Forms.CheckBox cbStoreEditTab;
|
||||
private System.Windows.Forms.CheckBox checkforupdates;
|
||||
private System.Windows.Forms.TrackBar maxBackups;
|
||||
private System.Windows.Forms.Label labelBackups;
|
||||
private System.Windows.Forms.Label label27;
|
||||
}
|
||||
}
|
|
@ -108,6 +108,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
vertexScaleLabel.Text = vertexScale.Value * 100 + "%" + (vertexScale.Value == 1 ? " (default)" : "");
|
||||
cbMarkExtraFloors.Checked = General.Settings.GZMarkExtraFloors;
|
||||
recentFiles.Value = General.Settings.MaxRecentFiles;
|
||||
maxBackups.Value = General.Settings.MaxBackups;
|
||||
screenshotsfolderpath.Text = General.Settings.ScreenshotsPath;
|
||||
if(Directory.Exists(General.Settings.ScreenshotsPath))
|
||||
browseScreenshotsFolderDialog.SelectedPath = General.Settings.ScreenshotsPath;
|
||||
|
@ -264,6 +265,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
General.Settings.CheckForUpdates = checkforupdates.Checked; //mxd
|
||||
General.Settings.LocateTextureGroup = locatetexturegroup.Checked; //mxd
|
||||
General.Settings.MaxRecentFiles = recentFiles.Value; //mxd
|
||||
General.Settings.MaxBackups = maxBackups.Value;
|
||||
General.Settings.ScreenshotsPath = screenshotsfolderpath.Text.Trim(); //mxd
|
||||
|
||||
// Script font size
|
||||
|
@ -440,6 +442,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
labelRecentFiles.Text = recentFiles.Value.ToString();
|
||||
}
|
||||
|
||||
private void maxBackups_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
labelBackups.Text = maxBackups.Value.ToString();
|
||||
}
|
||||
|
||||
// This updates the script font preview label
|
||||
private void UpdateScriptFontPreview()
|
||||
{
|
||||
|
|
|
@ -144,6 +144,9 @@
|
|||
<metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="snippetsallmanstyle.ToolTip" xml:space="preserve">
|
||||
<value>When enabled, the opening brace
|
||||
will be placed on a new line.
|
||||
|
|
Loading…
Reference in a new issue