private void pictureBox1_DoubleClick(object sender, EventArgs e) { pictureBox1.MouseMove += pictureBox1_MouseMove; labelIconLUImage.Image = Resources.unlock_x20; ImageStatusBox.Clear(); ImageStatusBoxMSG(res_man.GetString("MainForm_label_ImageStatusUnlocked", cul)); }
private void MainForm_Load(object sender, EventArgs e) { #region LoadSettings ImageStatusBox.Clear(); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextLocked", cul)); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextUnlocked", cul)); if (Properties.Settings.Default.SaveProfiles == true) { LoadProfiles(); } if (Properties.Settings.Default.LogoBinOpenSave == true) { if (Properties.Settings.Default.LogoBinOpen == "") { Properties.Settings.Default.LogoWasSaved = false; Properties.Settings.Default.LogoBinOpen = ""; Properties.Settings.Default.Save(); } else { this.Show(); DialogResult answer = MessageBox.Show(res_man.GetString("MainForm_LoadPreviousLogo", cul), "Moto_Boot_Logo_Maker", MessageBoxButtons.YesNo, MessageBoxIcon.Information); switch (answer) { case DialogResult.Yes: this.Text = res_man.GetString("MainForm_OpenLogoMemoryTitle", cul) + " " + Properties.Settings.Default.LogoBinOpen + " " + res_man.GetString("MainForm_OpenLogoMemoryTitle2", cul); OpenFile(Properties.Settings.Default.LogoBinOpen); txtComments.Enabled = true; cboMoto.Enabled = true; groupBoxLogoFormat.Enabled = true; groupBoxLogoResolution.Enabled = true; groupBoxLogoImageOption.Enabled = true; groupBoxLogoImageOrientation.Enabled = true; DisableControls(); this.Text = Properties.Settings.Default.ToolTitle; break; case DialogResult.No: Properties.Settings.Default.LogoWasSaved = false; Properties.Settings.Default.LogoBinOpen = ""; Properties.Settings.Default.Save(); break; } } } #endregion LoadSettings }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { #region OpenNewLogo var openfilename = Properties.Settings.Default.LogoBinOpen; if (Properties.Settings.Default.LogoBinOpen.EndsWith(".bin") && Properties.Settings.Default.LogoWasSaved == false) { DialogResult dialogResult = MessageBox.Show(res_man.GetString("MainForm_ExitLogoWasntSave1", cul) + "\n\n" + openfilename + "\n\n" + res_man.GetString("MainForm_ExitLogoWasntSave2", cul), "Moto_Boot_Logo_Maker", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dialogResult == DialogResult.Yes) { ImageStatusBox.Clear(); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextLocked", cul)); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextUnlocked", cul)); Properties.Settings.Default.LogoBinOpen = ""; Properties.Settings.Default.Save(); buttonAppend.Enabled = true; buttonDelete.Enabled = true; buttonExtract.Enabled = true; IniUITool(); } else if (dialogResult == DialogResult.No) { try { return; } catch (Exception ex) { Logs.DebugErrorLogs(ex); MessageBox.Show(ex.ToString(), @"Moto_Boot_Logo_Maker: " + Logs.GetClassName(ex) + " " + Logs.GetLineNumber(ex), MessageBoxButtons.OK, MessageBoxIcon.Error); } } } else { ImageStatusBox.Clear(); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextLocked", cul)); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextUnlocked", cul)); Properties.Settings.Default.LogoBinOpen = ""; Properties.Settings.Default.Save(); buttonAppend.Enabled = true; buttonDelete.Enabled = true; buttonExtract.Enabled = true; IniUITool(); } #endregion OpenNewLogo }
private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { try { if (pictureBox1.Image == null) { labelIconLUImage.Image = null; ImageStatusBox.Clear(); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextLocked", cul)); ImageStatusBoxMSG(res_man.GetString("MainForm_ImageStatus_TextUnlocked", cul)); return; } else { UpdateZoomedImage(e); } } catch (Exception ex) { Logs.DebugErrorLogs(ex); MessageBox.Show(ex.ToString(), @"Moto_Boot_Logo_Maker: " + Logs.GetClassName(ex) + " " + Logs.GetLineNumber(ex), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }