Example #1
0
        private void tsbNewFile_Click(object sender, EventArgs e)
        {
            try
            {
                if (queryModified && ControlManager.Confirm("Do you want to save change?"))
                {
                    tsbSaveFile_Click(sender, e);
                    if (queryModified)
                    {
                        return;                         // TODO: need to confirm action: user click abort??
                    }
                }

                txtQuery.Clear();
                queryFilename = string.Empty;
                queryModified = false;
            }
            catch (Exception ex)
            {
                FormUtil.WinException(ex);
            }
        }