What is the current directory when settings are loaded? Debug this by adding a statement to Setting_Load():
private void Setting_Load(object sender, EventArgs e)
{
var currentFolder = Directory.GetCurrentDirectory();
txtPassword.Text = Properties.Settings.Default.AppPassword;
txtEmailId.Text = Properties.Settings.Default.EmailID;
cmbInterval.SelectedItem = Properties.Settings.Default.Interval.ToString();
cmbMailAttachments.SelectedItem = Properties.Settings.Default.MailAttachments.ToString();
chkSendMail.Checked = Properties.Settings.Default.SendMail;
txtOutputPath.Text = Properties.Settings.Default.OutputPath;
}
What is the value of the currentFolder variable when the app starts up by you launching it from Explorer? What is the value of the currentFolder variable when the app starts up from the Startup menu? Are these values the same?
No comments:
Post a Comment