private static void imageHistoryForm_FormClosed(object sender, FormClosedEventArgs e) { ImageHistoryForm imageHistoryForm = sender as ImageHistoryForm; Program.Settings.ImageHistoryViewMode = imageHistoryForm.ViewMode; Program.Settings.ImageHistoryThumbnailSize = imageHistoryForm.ThumbnailSize; Program.Settings.ImageHistoryMaxItemCount = imageHistoryForm.MaxItemCount; }
public static void OpenImageHistory() { ImageHistoryForm imageHistoryForm = new ImageHistoryForm(Program.HistoryFilePath, Program.Settings.ImageHistoryViewMode, Program.Settings.ImageHistoryThumbnailSize, Program.Settings.ImageHistoryMaxItemCount); Program.Settings.ImageHistoryWindowState.AutoHandleFormState(imageHistoryForm); imageHistoryForm.FormClosed += imageHistoryForm_FormClosed; imageHistoryForm.Show(); }
private void tsbImageHistory_Click(object sender, EventArgs e) { ImageHistoryForm imageHistoryForm = new ImageHistoryForm(Program.HistoryFilePath, Program.Settings.ImageHistoryViewMode, Program.Settings.ImageHistoryThumbnailSize, Program.Settings.ImageHistoryMaxItemCount); Program.Settings.ImageHistoryWindowState.AutoHandleFormState(imageHistoryForm); imageHistoryForm.Text = "ShareX - Image history: " + Program.HistoryFilePath; imageHistoryForm.FormClosed += imageHistoryForm_FormClosed; imageHistoryForm.Show(); }