Exemplo n.º 1
0
        /// <summary>
        /// The btn batch process click.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void BtnBatchProcessClick(object sender, EventArgs e)
        {
            if (this.batchProcessState == 0)
            {
                if (this.batchProcess != null && !this.batchProcess.IsDisposed)
                {
                    return;
                }

                this.batchProcess = new BatchProcess(this.provider)
                {
                    MdiParent = this, WindowState = FormWindowState.Maximized
                };
                this.batchProcess.Show();
                this.ActivateMdiChild(null);
                this.ActivateMdiChild(this.batchProcess);
                this.batchProcess.BringToFront();
                this.batchProcessState = 1;
                this.batchProcessToolStripMenuItem.Checked = true;
                if (this.create != null && (this.create != null || !this.create.IsDisposed))
                {
                    this.create.Close();
                }

                this.createState = 0;
                this.createToolStripMenuItem.Checked = false;
                if (this.search != null && (this.search != null || !this.search.IsDisposed))
                {
                    this.search.Close();
                }

                this.searchState = 0;
                this.searchToolStripMenuItem.Checked = false;
            }
            else
            {
                this.batchProcess.Close();
                this.batchProcessState = 0;
                this.batchProcessToolStripMenuItem.Checked = false;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The btn batch process click.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void BtnBatchProcessClick(object sender, EventArgs e)
        {
            if (this.batchProcessState == 0)
            {
                if (this.batchProcess != null && !this.batchProcess.IsDisposed)
                {
                    return;
                }

                this.batchProcess = new BatchProcess(this.provider)
                    {
                        MdiParent = this, WindowState = FormWindowState.Maximized
                    };
                this.batchProcess.Show();
                this.ActivateMdiChild(null);
                this.ActivateMdiChild(this.batchProcess);
                this.batchProcess.BringToFront();
                this.batchProcessState = 1;
                this.batchProcessToolStripMenuItem.Checked = true;
                if (this.create != null && (this.create != null || !this.create.IsDisposed))
                {
                    this.create.Close();
                }

                this.createState = 0;
                this.createToolStripMenuItem.Checked = false;
                if (this.search != null && (this.search != null || !this.search.IsDisposed))
                {
                    this.search.Close();
                }

                this.searchState = 0;
                this.searchToolStripMenuItem.Checked = false;
            }
            else
            {
                this.batchProcess.Close();
                this.batchProcessState = 0;
                this.batchProcessToolStripMenuItem.Checked = false;
            }
        }