Add libation icon to forms
This commit is contained in:
parent
04665fea36
commit
81c152ddcb
@ -19,6 +19,7 @@ namespace LibationWinForms.BookLiberation.BaseForms
|
||||
//If this is the first form created, it will not exist until after execution
|
||||
//reaches inside the constructor (after base class has been initialized).
|
||||
Invoker = new SynchronizeInvoker();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
public void RegisterFileLiberator(Streamable streamable, LogMe logMe = null)
|
||||
|
||||
@ -28,6 +28,7 @@ namespace LibationWinForms.Dialogs
|
||||
populateDropDown();
|
||||
|
||||
populateGridValues();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private void populateDropDown()
|
||||
|
||||
@ -205,7 +205,6 @@
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "BookDetailsDialog";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Book Details";
|
||||
|
||||
@ -27,6 +27,7 @@ namespace LibationWinForms.Dialogs
|
||||
public BookDetailsDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
public BookDetailsDialog(LibraryBook libraryBook) : this()
|
||||
{
|
||||
|
||||
@ -26,6 +26,7 @@ namespace LibationWinForms.Dialogs
|
||||
dataGridView1.Columns[COL_Filter].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
|
||||
populateGridValues();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private void populateGridValues()
|
||||
|
||||
@ -170,8 +170,10 @@
|
||||
this.Controls.Add(this.templateTb);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.saveBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditTemplateDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Template";
|
||||
|
||||
@ -28,7 +28,11 @@ namespace LibationWinForms.Dialogs
|
||||
private Templates template { get; }
|
||||
private string inputTemplateText { get; }
|
||||
|
||||
public EditTemplateDialog() => InitializeComponent();
|
||||
public EditTemplateDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
public EditTemplateDialog(Templates template, string inputTemplateText) : this()
|
||||
{
|
||||
this.template = ArgumentValidator.EnsureNotNull(template, nameof(template));
|
||||
|
||||
@ -164,7 +164,7 @@ namespace LibationWinForms.Dialogs
|
||||
this.Controls.Add(this.btnRemoveBooks);
|
||||
this.Controls.Add(this._dataGridView);
|
||||
this.Name = "RemoveBooksDialog";
|
||||
this.Text = "RemoveBooksDialog";
|
||||
this.Text = "Remove Books from Libation's Database";
|
||||
this.Shown += new System.EventHandler(this.RemoveBooksDialog_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this._dataGridView)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).EndInit();
|
||||
|
||||
@ -48,6 +48,7 @@ namespace LibationWinForms.Dialogs
|
||||
gridEntryBindingSource.DataSource = _removableGridEntries;
|
||||
|
||||
_dataGridView.Enabled = false;
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private void _dataGridView_BindingContextChanged(object sender, EventArgs e)
|
||||
|
||||
@ -17,6 +17,7 @@ namespace LibationWinForms.Dialogs
|
||||
_parent = parent;
|
||||
|
||||
InitializeComponent();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private class listItem
|
||||
|
||||
@ -113,7 +113,6 @@
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SearchSyntaxDialog";
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Filter options";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@ -14,6 +14,7 @@ namespace LibationWinForms.Dialogs
|
||||
label3.Text += "\r\n\r\n" + string.Join("\r\n", LibationSearchEngine.SearchEngine.GetSearchNumberFields());
|
||||
label4.Text += "\r\n\r\n" + string.Join("\r\n", LibationSearchEngine.SearchEngine.GetSearchBoolFields());
|
||||
label5.Text += "\r\n\r\n" + string.Join("\r\n", LibationSearchEngine.SearchEngine.GetSearchIdFields());
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private void CloseBtn_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
@ -944,8 +944,10 @@
|
||||
this.Controls.Add(this.tabControl);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.saveBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SettingsDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Settings";
|
||||
|
||||
@ -13,7 +13,11 @@ namespace LibationWinForms.Dialogs
|
||||
private Configuration config { get; } = Configuration.Instance;
|
||||
private Func<string, string> desc { get; } = Configuration.GetDescription;
|
||||
|
||||
public SettingsDialog() => InitializeComponent();
|
||||
public SettingsDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.SetLibationIcon();
|
||||
}
|
||||
|
||||
private void SettingsDialog_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@ -7,6 +7,18 @@ namespace LibationWinForms
|
||||
{
|
||||
public static class FormSaveExtension
|
||||
{
|
||||
static readonly Icon libationIcon;
|
||||
static FormSaveExtension()
|
||||
{
|
||||
var resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
libationIcon = (Icon)resources.GetObject("$this.Icon");
|
||||
}
|
||||
|
||||
public static void SetLibationIcon(this Form form)
|
||||
{
|
||||
form.Icon = libationIcon;
|
||||
}
|
||||
|
||||
public static void RestoreSizeAndLocation(this Form form, Configuration config)
|
||||
{
|
||||
FormSizeAndPosition savedState = config.GetNonString<FormSizeAndPosition>(form.Name);
|
||||
@ -77,6 +89,7 @@ namespace LibationWinForms
|
||||
|
||||
config.SetObject(form.Name, saveState);
|
||||
}
|
||||
|
||||
}
|
||||
class FormSizeAndPosition
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user