public frm_loadInfo(Form form) { mainForm = form as frm_prompt; InitializeComponent(); LoadAcceptedFormats(); ep_img.SetError(txt_imgLoc, "An image file is required. Supported formats are: .bmp, .jpg, .png"); ep_text.SetError(txt_textLoc, "A text file is required. Supported formats are: .txt"); ep_dest.SetError(txt_destLoc, "An output path is required"); if (mainForm.encryptChosen == false) { lbl_textLoc.Text = "Password File:"; this.Text = "Imgrypt - Decrypt"; btn_go.Text = "Decrypt"; } if (mainForm.encryptChosen == true) { imgDefaultFolder = Properties.Settings.Default.encImgDefault; textDefaultFolder = Properties.Settings.Default.encMsgDefault; } else { imgDefaultFolder = Properties.Settings.Default.decImgDefault; textDefaultFolder = Properties.Settings.Default.decPassDefault; } }
public frm_settings(Form form) { // Initialize components InitializeComponent(); mainForm = form as frm_prompt; // Setup split container sc_settings.SplitterDistance = pnl_settings.Height - btn_back.Height; // Load settings txt_encImg.Text = Properties.Settings.Default.encImgDefault; txt_encMsg.Text = Properties.Settings.Default.encMsgDefault; txt_decImg.Text = Properties.Settings.Default.decImgDefault; LoadOutputFormat(gb_imgOutput, Properties.Settings.Default.encImgOutputFormat); LoadOutputFormat(gb_msgOutput, Properties.Settings.Default.decMsgOutputFormat); txt_imgOutput.Text = Properties.Settings.Default.encImgOutputName; txt_msgOutput.Text = Properties.Settings.Default.decMsgOutputName; }