Add products grid scaling setting
- Add Grid Scaling Settings - Add WinForms DPI migration to remove stored form sizes - Add textbox clear button
This commit is contained in:
parent
1fa415628f
commit
d1df10d060
32 changed files with 1043 additions and 427 deletions
|
|
@ -39,10 +39,9 @@ namespace LibationWinForms.Dialogs
|
|||
// knownDirectoryRb
|
||||
//
|
||||
knownDirectoryRb.AutoSize = true;
|
||||
knownDirectoryRb.Location = new System.Drawing.Point(6, 6);
|
||||
knownDirectoryRb.Margin = new System.Windows.Forms.Padding(6);
|
||||
knownDirectoryRb.Location = new System.Drawing.Point(3, 3);
|
||||
knownDirectoryRb.Name = "knownDirectoryRb";
|
||||
knownDirectoryRb.Size = new System.Drawing.Size(27, 26);
|
||||
knownDirectoryRb.Size = new System.Drawing.Size(14, 13);
|
||||
knownDirectoryRb.TabIndex = 0;
|
||||
knownDirectoryRb.UseVisualStyleBackColor = true;
|
||||
knownDirectoryRb.CheckedChanged += radioButton_CheckedChanged;
|
||||
|
|
@ -50,10 +49,9 @@ namespace LibationWinForms.Dialogs
|
|||
// customDirectoryRb
|
||||
//
|
||||
customDirectoryRb.AutoSize = true;
|
||||
customDirectoryRb.Location = new System.Drawing.Point(4, 124);
|
||||
customDirectoryRb.Margin = new System.Windows.Forms.Padding(6);
|
||||
customDirectoryRb.Location = new System.Drawing.Point(2, 62);
|
||||
customDirectoryRb.Name = "customDirectoryRb";
|
||||
customDirectoryRb.Size = new System.Drawing.Size(27, 26);
|
||||
customDirectoryRb.Size = new System.Drawing.Size(14, 13);
|
||||
customDirectoryRb.TabIndex = 2;
|
||||
customDirectoryRb.UseVisualStyleBackColor = true;
|
||||
customDirectoryRb.CheckedChanged += radioButton_CheckedChanged;
|
||||
|
|
@ -61,19 +59,17 @@ namespace LibationWinForms.Dialogs
|
|||
// customTb
|
||||
//
|
||||
customTb.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||
customTb.Location = new System.Drawing.Point(44, 116);
|
||||
customTb.Margin = new System.Windows.Forms.Padding(6);
|
||||
customTb.Location = new System.Drawing.Point(22, 58);
|
||||
customTb.Name = "customTb";
|
||||
customTb.Size = new System.Drawing.Size(1172, 39);
|
||||
customTb.Size = new System.Drawing.Size(588, 23);
|
||||
customTb.TabIndex = 3;
|
||||
//
|
||||
// customBtn
|
||||
//
|
||||
customBtn.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||
customBtn.Location = new System.Drawing.Point(1232, 116);
|
||||
customBtn.Margin = new System.Windows.Forms.Padding(6);
|
||||
customBtn.Location = new System.Drawing.Point(616, 58);
|
||||
customBtn.Name = "customBtn";
|
||||
customBtn.Size = new System.Drawing.Size(82, 54);
|
||||
customBtn.Size = new System.Drawing.Size(41, 27);
|
||||
customBtn.TabIndex = 4;
|
||||
customBtn.Text = "...";
|
||||
customBtn.UseVisualStyleBackColor = true;
|
||||
|
|
@ -83,24 +79,23 @@ namespace LibationWinForms.Dialogs
|
|||
//
|
||||
directorySelectControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||
directorySelectControl.AutoSize = true;
|
||||
directorySelectControl.Location = new System.Drawing.Point(46, 0);
|
||||
directorySelectControl.Margin = new System.Windows.Forms.Padding(12);
|
||||
directorySelectControl.Location = new System.Drawing.Point(23, 0);
|
||||
directorySelectControl.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
directorySelectControl.Name = "directorySelectControl";
|
||||
directorySelectControl.Size = new System.Drawing.Size(1270, 104);
|
||||
directorySelectControl.Size = new System.Drawing.Size(635, 55);
|
||||
directorySelectControl.TabIndex = 5;
|
||||
//
|
||||
// DirectoryOrCustomSelectControl
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
Controls.Add(directorySelectControl);
|
||||
Controls.Add(customBtn);
|
||||
Controls.Add(customTb);
|
||||
Controls.Add(customDirectoryRb);
|
||||
Controls.Add(knownDirectoryRb);
|
||||
Margin = new System.Windows.Forms.Padding(6);
|
||||
Name = "DirectoryOrCustomSelectControl";
|
||||
Size = new System.Drawing.Size(1320, 176);
|
||||
Size = new System.Drawing.Size(660, 88);
|
||||
Load += DirectoryOrCustomSelectControl_Load;
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ namespace LibationWinForms.Dialogs
|
|||
if (directory != Configuration.KnownDirectories.None)
|
||||
selectDir(directory, null);
|
||||
}
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
//For some reason anchors don't work when the parent form scales up, even with AutoScale
|
||||
directorySelectControl.Width = customTb.Width = Width;
|
||||
}
|
||||
|
||||
/// <summary>set selection</summary>
|
||||
public void SelectDirectory(string directory)
|
||||
|
|
|
|||
|
|
@ -39,32 +39,29 @@ namespace LibationWinForms.Dialogs
|
|||
directoryComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
directoryComboBox.FormattingEnabled = true;
|
||||
directoryComboBox.Location = new System.Drawing.Point(0, 0);
|
||||
directoryComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
directoryComboBox.Name = "directoryComboBox";
|
||||
directoryComboBox.Size = new System.Drawing.Size(810, 40);
|
||||
directoryComboBox.Size = new System.Drawing.Size(814, 23);
|
||||
directoryComboBox.TabIndex = 0;
|
||||
directoryComboBox.SelectedIndexChanged += directoryComboBox_SelectedIndexChanged;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
textBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||
textBox1.Location = new System.Drawing.Point(0, 58);
|
||||
textBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
textBox1.Location = new System.Drawing.Point(0, 29);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.ReadOnly = true;
|
||||
textBox1.Size = new System.Drawing.Size(810, 39);
|
||||
textBox1.Size = new System.Drawing.Size(814, 23);
|
||||
textBox1.TabIndex = 1;
|
||||
//
|
||||
// DirectorySelectControl
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
Controls.Add(textBox1);
|
||||
Controls.Add(directoryComboBox);
|
||||
Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
Name = "DirectorySelectControl";
|
||||
Size = new System.Drawing.Size(814, 104);
|
||||
Size = new System.Drawing.Size(814, 55);
|
||||
Load += DirectorySelectControl_Load;
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ namespace LibationWinForms.Dialogs
|
|||
|
||||
return path;
|
||||
}
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
//For some reason anchors don't work when the parent form scales up, even with AutoScale
|
||||
directoryComboBox.Width = textBox1.Width = Width;
|
||||
}
|
||||
|
||||
private DirectoryComboBoxItem selectedItem => (DirectoryComboBoxItem)this.directoryComboBox.SelectedItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@
|
|||
// libationFilesDescLbl
|
||||
//
|
||||
libationFilesDescLbl.AutoSize = true;
|
||||
libationFilesDescLbl.Location = new System.Drawing.Point(28, 20);
|
||||
libationFilesDescLbl.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
|
||||
libationFilesDescLbl.Location = new System.Drawing.Point(14, 10);
|
||||
libationFilesDescLbl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
libationFilesDescLbl.Name = "libationFilesDescLbl";
|
||||
libationFilesDescLbl.Size = new System.Drawing.Size(76, 32);
|
||||
libationFilesDescLbl.Size = new System.Drawing.Size(39, 15);
|
||||
libationFilesDescLbl.TabIndex = 0;
|
||||
libationFilesDescLbl.Text = "[desc]";
|
||||
//
|
||||
|
|
@ -48,10 +48,10 @@
|
|||
//
|
||||
cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
cancelBtn.Location = new System.Drawing.Point(1664, 236);
|
||||
cancelBtn.Margin = new System.Windows.Forms.Padding(8, 6, 8, 6);
|
||||
cancelBtn.Location = new System.Drawing.Point(832, 118);
|
||||
cancelBtn.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
cancelBtn.Name = "cancelBtn";
|
||||
cancelBtn.Size = new System.Drawing.Size(176, 54);
|
||||
cancelBtn.Size = new System.Drawing.Size(88, 27);
|
||||
cancelBtn.TabIndex = 3;
|
||||
cancelBtn.Text = "Cancel";
|
||||
cancelBtn.UseVisualStyleBackColor = true;
|
||||
|
|
@ -60,10 +60,10 @@
|
|||
// saveBtn
|
||||
//
|
||||
saveBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
saveBtn.Location = new System.Drawing.Point(1428, 236);
|
||||
saveBtn.Margin = new System.Windows.Forms.Padding(8, 6, 8, 6);
|
||||
saveBtn.Location = new System.Drawing.Point(714, 118);
|
||||
saveBtn.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
saveBtn.Name = "saveBtn";
|
||||
saveBtn.Size = new System.Drawing.Size(176, 54);
|
||||
saveBtn.Size = new System.Drawing.Size(88, 27);
|
||||
saveBtn.TabIndex = 2;
|
||||
saveBtn.Text = "Save";
|
||||
saveBtn.UseVisualStyleBackColor = true;
|
||||
|
|
@ -72,24 +72,24 @@
|
|||
// libationFilesSelectControl
|
||||
//
|
||||
libationFilesSelectControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||
libationFilesSelectControl.Location = new System.Drawing.Point(28, 56);
|
||||
libationFilesSelectControl.Margin = new System.Windows.Forms.Padding(12);
|
||||
libationFilesSelectControl.Location = new System.Drawing.Point(14, 28);
|
||||
libationFilesSelectControl.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
libationFilesSelectControl.Name = "libationFilesSelectControl";
|
||||
libationFilesSelectControl.Size = new System.Drawing.Size(1818, 176);
|
||||
libationFilesSelectControl.Size = new System.Drawing.Size(906, 88);
|
||||
libationFilesSelectControl.TabIndex = 1;
|
||||
//
|
||||
// LibationFilesDialog
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
ClientSize = new System.Drawing.Size(1866, 328);
|
||||
ClientSize = new System.Drawing.Size(933, 164);
|
||||
Controls.Add(libationFilesSelectControl);
|
||||
Controls.Add(cancelBtn);
|
||||
Controls.Add(saveBtn);
|
||||
Controls.Add(libationFilesDescLbl);
|
||||
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
Margin = new System.Windows.Forms.Padding(8, 6, 8, 6);
|
||||
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
Name = "LibationFilesDialog";
|
||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
Text = "Libation Files location";
|
||||
|
|
|
|||
|
|
@ -51,7 +51,12 @@
|
|||
loggingLevelCb = new System.Windows.Forms.ComboBox();
|
||||
tabControl = new System.Windows.Forms.TabControl();
|
||||
tab1ImportantSettings = new System.Windows.Forms.TabPage();
|
||||
betaOptInCbox = new System.Windows.Forms.CheckBox();
|
||||
groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
applyDisplaySettingsBtn = new System.Windows.Forms.Button();
|
||||
gridScaleFactorLbl = new System.Windows.Forms.Label();
|
||||
gridScaleFactorTbar = new System.Windows.Forms.TrackBar();
|
||||
gridFontScaleFactorLbl = new System.Windows.Forms.Label();
|
||||
gridFontScaleFactorTbar = new System.Windows.Forms.TrackBar();
|
||||
booksGb = new System.Windows.Forms.GroupBox();
|
||||
lastWriteTimeCb = new System.Windows.Forms.ComboBox();
|
||||
creationTimeCb = new System.Windows.Forms.ComboBox();
|
||||
|
|
@ -131,6 +136,9 @@
|
|||
badBookGb.SuspendLayout();
|
||||
tabControl.SuspendLayout();
|
||||
tab1ImportantSettings.SuspendLayout();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)gridScaleFactorTbar).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)gridFontScaleFactorTbar).BeginInit();
|
||||
booksGb.SuspendLayout();
|
||||
tab2ImportLibrary.SuspendLayout();
|
||||
tab3DownloadDecrypt.SuspendLayout();
|
||||
|
|
@ -340,7 +348,7 @@
|
|||
//
|
||||
// logsBtn
|
||||
//
|
||||
logsBtn.Location = new System.Drawing.Point(256, 261);
|
||||
logsBtn.Location = new System.Drawing.Point(256, 424);
|
||||
logsBtn.Name = "logsBtn";
|
||||
logsBtn.Size = new System.Drawing.Size(132, 23);
|
||||
logsBtn.TabIndex = 5;
|
||||
|
|
@ -351,6 +359,7 @@
|
|||
// booksSelectControl
|
||||
//
|
||||
booksSelectControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||
booksSelectControl.AutoSize = true;
|
||||
booksSelectControl.Location = new System.Drawing.Point(7, 23);
|
||||
booksSelectControl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
booksSelectControl.Name = "booksSelectControl";
|
||||
|
|
@ -360,7 +369,7 @@
|
|||
// loggingLevelLbl
|
||||
//
|
||||
loggingLevelLbl.AutoSize = true;
|
||||
loggingLevelLbl.Location = new System.Drawing.Point(6, 264);
|
||||
loggingLevelLbl.Location = new System.Drawing.Point(6, 427);
|
||||
loggingLevelLbl.Name = "loggingLevelLbl";
|
||||
loggingLevelLbl.Size = new System.Drawing.Size(78, 15);
|
||||
loggingLevelLbl.TabIndex = 3;
|
||||
|
|
@ -370,7 +379,7 @@
|
|||
//
|
||||
loggingLevelCb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
loggingLevelCb.FormattingEnabled = true;
|
||||
loggingLevelCb.Location = new System.Drawing.Point(90, 261);
|
||||
loggingLevelCb.Location = new System.Drawing.Point(90, 424);
|
||||
loggingLevelCb.Name = "loggingLevelCb";
|
||||
loggingLevelCb.Size = new System.Drawing.Size(129, 23);
|
||||
loggingLevelCb.TabIndex = 4;
|
||||
|
|
@ -390,30 +399,84 @@
|
|||
//
|
||||
// tab1ImportantSettings
|
||||
//
|
||||
tab1ImportantSettings.Controls.Add(betaOptInCbox);
|
||||
tab1ImportantSettings.Controls.Add(groupBox1);
|
||||
tab1ImportantSettings.Controls.Add(booksGb);
|
||||
tab1ImportantSettings.Controls.Add(logsBtn);
|
||||
tab1ImportantSettings.Controls.Add(loggingLevelCb);
|
||||
tab1ImportantSettings.Controls.Add(loggingLevelLbl);
|
||||
tab1ImportantSettings.Location = new System.Drawing.Point(4, 24);
|
||||
tab1ImportantSettings.Name = "tab1ImportantSettings";
|
||||
tab1ImportantSettings.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
tab1ImportantSettings.Padding = new System.Windows.Forms.Padding(3);
|
||||
tab1ImportantSettings.Size = new System.Drawing.Size(856, 453);
|
||||
tab1ImportantSettings.TabIndex = 0;
|
||||
tab1ImportantSettings.Text = "Important settings";
|
||||
tab1ImportantSettings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// betaOptInCbox
|
||||
// groupBox1
|
||||
//
|
||||
betaOptInCbox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
|
||||
betaOptInCbox.AutoSize = true;
|
||||
betaOptInCbox.Enabled = false;
|
||||
betaOptInCbox.Location = new System.Drawing.Point(13, 421);
|
||||
betaOptInCbox.Name = "betaOptInCbox";
|
||||
betaOptInCbox.Size = new System.Drawing.Size(107, 19);
|
||||
betaOptInCbox.TabIndex = 6;
|
||||
betaOptInCbox.Text = "[Opt in to Beta]";
|
||||
betaOptInCbox.UseVisualStyleBackColor = true;
|
||||
groupBox1.Controls.Add(applyDisplaySettingsBtn);
|
||||
groupBox1.Controls.Add(gridScaleFactorLbl);
|
||||
groupBox1.Controls.Add(gridScaleFactorTbar);
|
||||
groupBox1.Controls.Add(gridFontScaleFactorLbl);
|
||||
groupBox1.Controls.Add(gridFontScaleFactorTbar);
|
||||
groupBox1.Location = new System.Drawing.Point(6, 261);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new System.Drawing.Size(844, 83);
|
||||
groupBox1.TabIndex = 9;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = "Display Settings";
|
||||
//
|
||||
// applyDisplaySettingsBtn
|
||||
//
|
||||
applyDisplaySettingsBtn.Location = new System.Drawing.Point(698, 34);
|
||||
applyDisplaySettingsBtn.Name = "applyDisplaySettingsBtn";
|
||||
applyDisplaySettingsBtn.Size = new System.Drawing.Size(140, 23);
|
||||
applyDisplaySettingsBtn.TabIndex = 9;
|
||||
applyDisplaySettingsBtn.Text = "Apply Display Settings";
|
||||
applyDisplaySettingsBtn.UseVisualStyleBackColor = true;
|
||||
applyDisplaySettingsBtn.Click += applyDisplaySettingsBtn_Click;
|
||||
//
|
||||
// gridScaleFactorLbl
|
||||
//
|
||||
gridScaleFactorLbl.AutoSize = true;
|
||||
gridScaleFactorLbl.Location = new System.Drawing.Point(6, 36);
|
||||
gridScaleFactorLbl.Name = "gridScaleFactorLbl";
|
||||
gridScaleFactorLbl.Size = new System.Drawing.Size(124, 15);
|
||||
gridScaleFactorLbl.TabIndex = 8;
|
||||
gridScaleFactorLbl.Text = "[GridScaleFactor desc]";
|
||||
//
|
||||
// gridScaleFactorTbar
|
||||
//
|
||||
gridScaleFactorTbar.AutoSize = false;
|
||||
gridScaleFactorTbar.LargeChange = 25;
|
||||
gridScaleFactorTbar.Location = new System.Drawing.Point(136, 36);
|
||||
gridScaleFactorTbar.Maximum = 100;
|
||||
gridScaleFactorTbar.Minimum = -100;
|
||||
gridScaleFactorTbar.Name = "gridScaleFactorTbar";
|
||||
gridScaleFactorTbar.Size = new System.Drawing.Size(160, 20);
|
||||
gridScaleFactorTbar.TabIndex = 7;
|
||||
gridScaleFactorTbar.TickFrequency = 25;
|
||||
//
|
||||
// gridFontScaleFactorLbl
|
||||
//
|
||||
gridFontScaleFactorLbl.AutoSize = true;
|
||||
gridFontScaleFactorLbl.Location = new System.Drawing.Point(320, 36);
|
||||
gridFontScaleFactorLbl.Name = "gridFontScaleFactorLbl";
|
||||
gridFontScaleFactorLbl.Size = new System.Drawing.Size(124, 15);
|
||||
gridFontScaleFactorLbl.TabIndex = 8;
|
||||
gridFontScaleFactorLbl.Text = "[GridScaleFactor desc]";
|
||||
//
|
||||
// gridFontScaleFactorTbar
|
||||
//
|
||||
gridFontScaleFactorTbar.AutoSize = false;
|
||||
gridFontScaleFactorTbar.LargeChange = 25;
|
||||
gridFontScaleFactorTbar.Location = new System.Drawing.Point(450, 36);
|
||||
gridFontScaleFactorTbar.Maximum = 100;
|
||||
gridFontScaleFactorTbar.Minimum = -100;
|
||||
gridFontScaleFactorTbar.Name = "gridFontScaleFactorTbar";
|
||||
gridFontScaleFactorTbar.Size = new System.Drawing.Size(160, 20);
|
||||
gridFontScaleFactorTbar.TabIndex = 7;
|
||||
gridFontScaleFactorTbar.TickFrequency = 25;
|
||||
//
|
||||
// booksGb
|
||||
//
|
||||
|
|
@ -500,7 +563,7 @@
|
|||
tab2ImportLibrary.Controls.Add(downloadEpisodesCb);
|
||||
tab2ImportLibrary.Location = new System.Drawing.Point(4, 24);
|
||||
tab2ImportLibrary.Name = "tab2ImportLibrary";
|
||||
tab2ImportLibrary.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
tab2ImportLibrary.Padding = new System.Windows.Forms.Padding(3);
|
||||
tab2ImportLibrary.Size = new System.Drawing.Size(856, 453);
|
||||
tab2ImportLibrary.TabIndex = 1;
|
||||
tab2ImportLibrary.Text = "Import library";
|
||||
|
|
@ -545,7 +608,7 @@
|
|||
tab3DownloadDecrypt.Controls.Add(badBookGb);
|
||||
tab3DownloadDecrypt.Location = new System.Drawing.Point(4, 24);
|
||||
tab3DownloadDecrypt.Name = "tab3DownloadDecrypt";
|
||||
tab3DownloadDecrypt.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
tab3DownloadDecrypt.Padding = new System.Windows.Forms.Padding(3);
|
||||
tab3DownloadDecrypt.Size = new System.Drawing.Size(856, 453);
|
||||
tab3DownloadDecrypt.TabIndex = 2;
|
||||
tab3DownloadDecrypt.Text = "Download/Decrypt";
|
||||
|
|
@ -718,7 +781,7 @@
|
|||
tab4AudioFileOptions.Controls.Add(allowLibationFixupCbox);
|
||||
tab4AudioFileOptions.Location = new System.Drawing.Point(4, 24);
|
||||
tab4AudioFileOptions.Name = "tab4AudioFileOptions";
|
||||
tab4AudioFileOptions.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
tab4AudioFileOptions.Padding = new System.Windows.Forms.Padding(3);
|
||||
tab4AudioFileOptions.Size = new System.Drawing.Size(856, 453);
|
||||
tab4AudioFileOptions.TabIndex = 3;
|
||||
tab4AudioFileOptions.Text = "Audio File Options";
|
||||
|
|
@ -1273,6 +1336,10 @@
|
|||
tabControl.ResumeLayout(false);
|
||||
tab1ImportantSettings.ResumeLayout(false);
|
||||
tab1ImportantSettings.PerformLayout();
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)gridScaleFactorTbar).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)gridFontScaleFactorTbar).EndInit();
|
||||
booksGb.ResumeLayout(false);
|
||||
booksGb.PerformLayout();
|
||||
tab2ImportLibrary.ResumeLayout(false);
|
||||
|
|
@ -1385,7 +1452,6 @@
|
|||
private System.Windows.Forms.Button editCharreplacementBtn;
|
||||
private System.Windows.Forms.CheckBox mergeOpeningEndCreditsCbox;
|
||||
private System.Windows.Forms.GroupBox audiobookFixupsGb;
|
||||
private System.Windows.Forms.CheckBox betaOptInCbox;
|
||||
private System.Windows.Forms.CheckBox useCoverAsFolderIconCb;
|
||||
private System.Windows.Forms.ComboBox clipsBookmarksFormatCb;
|
||||
private System.Windows.Forms.CheckBox downloadClipsBookmarksCbox;
|
||||
|
|
@ -1403,5 +1469,11 @@
|
|||
private System.Windows.Forms.Label fileDownloadQualityLbl;
|
||||
private System.Windows.Forms.CheckBox combineNestedChapterTitlesCbox;
|
||||
private System.Windows.Forms.CheckBox saveMetadataToFileCbox;
|
||||
private System.Windows.Forms.TrackBar gridScaleFactorTbar;
|
||||
private System.Windows.Forms.TrackBar gridFontScaleFactorTbar;
|
||||
private System.Windows.Forms.Label gridScaleFactorLbl;
|
||||
private System.Windows.Forms.Label gridFontScaleFactorLbl;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Button applyDisplaySettingsBtn;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,11 +23,12 @@ namespace LibationWinForms.Dialogs
|
|||
}
|
||||
|
||||
booksLocationDescLbl.Text = desc(nameof(config.Books));
|
||||
betaOptInCbox.Text = desc(nameof(config.BetaOptIn));
|
||||
saveEpisodesToSeriesFolderCbox.Text = desc(nameof(config.SavePodcastsToParentFolder));
|
||||
overwriteExistingCbox.Text = desc(nameof(config.OverwriteExisting));
|
||||
creationTimeLbl.Text = desc(nameof(config.CreationTime));
|
||||
lastWriteTimeLbl.Text = desc(nameof(config.LastWriteTime));
|
||||
gridScaleFactorLbl.Text = desc(nameof(config.GridScaleFactor));
|
||||
gridFontScaleFactorLbl.Text = desc(nameof(config.GridFontScaleFactor));
|
||||
|
||||
var dateTimeSources = Enum.GetValues<Configuration.DateTimeSource>().Select(v => new EnumDiaplay<Configuration.DateTimeSource>(v)).ToArray();
|
||||
creationTimeCb.Items.AddRange(dateTimeSources);
|
||||
|
|
@ -51,11 +52,8 @@ namespace LibationWinForms.Dialogs
|
|||
|
||||
saveEpisodesToSeriesFolderCbox.Checked = config.SavePodcastsToParentFolder;
|
||||
overwriteExistingCbox.Checked = config.OverwriteExisting;
|
||||
|
||||
betaOptInCbox.Checked = config.BetaOptIn;
|
||||
|
||||
if (!betaOptInCbox.Checked)
|
||||
betaOptInCbox.CheckedChanged += betaOptInCbox_CheckedChanged;
|
||||
gridScaleFactorTbar.Value = scaleFactorToLinearRange(config.GridScaleFactor);
|
||||
gridFontScaleFactorTbar.Value = scaleFactorToLinearRange(config.GridFontScaleFactor);
|
||||
}
|
||||
|
||||
private void Save_Important(Configuration config)
|
||||
|
|
@ -92,39 +90,20 @@ namespace LibationWinForms.Dialogs
|
|||
config.SavePodcastsToParentFolder = saveEpisodesToSeriesFolderCbox.Checked;
|
||||
config.OverwriteExisting = overwriteExistingCbox.Checked;
|
||||
|
||||
config.BetaOptIn = betaOptInCbox.Checked;
|
||||
|
||||
|
||||
config.CreationTime = ((EnumDiaplay<Configuration.DateTimeSource>)creationTimeCb.SelectedItem).Value;
|
||||
config.LastWriteTime = ((EnumDiaplay<Configuration.DateTimeSource>)lastWriteTimeCb.SelectedItem).Value;
|
||||
|
||||
}
|
||||
|
||||
private static int scaleFactorToLinearRange(float scaleFactor)
|
||||
=> (int)float.Round(100 * MathF.Log2(scaleFactor));
|
||||
private static float linearRangeToScaleFactor(int value)
|
||||
=> MathF.Pow(2, value / 100f);
|
||||
|
||||
private void betaOptInCbox_CheckedChanged(object sender, EventArgs e)
|
||||
private void applyDisplaySettingsBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!betaOptInCbox.Checked)
|
||||
return;
|
||||
|
||||
var result = MessageBox.Show(this, @"
|
||||
|
||||
|
||||
You've chosen to opt-in to Libation's beta releases. Thank you! We need all the testers we can get.
|
||||
|
||||
These features are works in progress and potentially very buggy. Libation may crash unexpectedly, and your library database may even be corruted. We suggest you back up your LibationContext.db file before proceding.
|
||||
|
||||
If bad/weird things happen, please report them at getlibation.com.
|
||||
|
||||
".Trim(), "A word of warning...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
|
||||
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
betaOptInCbox.CheckedChanged -= betaOptInCbox_CheckedChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
betaOptInCbox.Checked = false;
|
||||
}
|
||||
config.GridFontScaleFactor = linearRangeToScaleFactor(gridFontScaleFactorTbar.Value);
|
||||
config.GridScaleFactor = linearRangeToScaleFactor(gridScaleFactorTbar.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue