Skip to content

Commit

Permalink
Fixed issue where GetSales dialog is in Minimized state if launched f…
Browse files Browse the repository at this point in the history
…rom Maximized main window.
  • Loading branch information
ravibpatel committed Jun 3, 2017
1 parent a0bee99 commit 26ee752
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Sales Manager/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public partial class FormMain : Form

public FormMain()
{
#if DEBUG
var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "RBSoft",
"Sales Manager", "database.smdb");
if (File.Exists(databasePath))
{
File.Delete(databasePath);
}
#endif
//#if DEBUG
// var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "RBSoft",
// "Sales Manager", "database.smdb");
// if (File.Exists(databasePath))
// {
// File.Delete(databasePath);
// }
//#endif

InitializeComponent();
dateTimePickerFrom.Value = new DateTime(dateTimePickerTo.Value.Year, dateTimePickerTo.Value.Month, 1, 0, 0,
Expand Down Expand Up @@ -661,7 +661,7 @@ private void toolStripButtonUpdate_Click(object sender, EventArgs e)
{
var totalTransactions = objectListViewTransactions.Items.Count;
_loadingForm = new GetSales(dateTimePickerFrom.Value, dateTimePickerTo.Value,
(Account)comboBoxAccounts.SelectedItem, WindowState != FormWindowState.Normal);
(Account)comboBoxAccounts.SelectedItem, WindowState == FormWindowState.Minimized);
if (_loadingForm.ShowDialog(this).Equals(DialogResult.OK))
{
toolStripButtonEdit.Enabled = false;
Expand All @@ -678,7 +678,7 @@ private void toolStripButtonUpdate_Click(object sender, EventArgs e)
}
else
{
if (WindowState == FormWindowState.Normal)
if (WindowState != FormWindowState.Minimized)
{
MessageBox.Show(Resources.noInternetErrorMsg, Resources.noInternetErrorCaption,
MessageBoxButtons.OK,
Expand Down

0 comments on commit 26ee752

Please sign in to comment.