Пример #1
0
        private void xtraTabControlMain_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
            XtraTabPage page             = (arg.Page as XtraTabPage);

            xtraTabControlMain.TabPages.Remove(page);
        }
Пример #2
0
        private void tcMainTabControl_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs closeArgs = (ClosePageButtonEventArgs)e;
            XtraTabPage page = (XtraTabPage)closeArgs.Page;

            tcMainTabControl.TabPages.Remove(page);
        }
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            DialogResult dr = XtraMessageBox.Show("您确认关闭【 " + xtraTabControl1.SelectedTabPage.Text + " 】吗!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.OK)
            {
                //System.Environment.Exit(0);
                ClosePageButtonEventArgs a = (ClosePageButtonEventArgs)e;
                string tabpagename         = a.Page.Text;
                foreach (Control xtp in xtraTabControl1.TabPages)
                {
                    if (xtp.Text == tabpagename)
                    {
                        xtp.Dispose();
                        return;
                    }
                }

                //xtraTabControl1.TabPages.Remove(xtraTabControl1.SelectedTabPage);
            }
            else
            {
                return;
            }
        }
Пример #4
0
 private void xtraTabControlPointSale_CloseButtonClick(object sender, EventArgs e)
 {
     try
     {
         ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
         XtraTabPage xtraTabPage      = (XtraTabPage)arg.Page;
         if (xtraTabPage.ImageOptions.Image != null)
         {
             DialogResult dialogResult = MessageBox.Show("هل متاكد انك تريد غلق النافذة بدون حفظ التعديلات؟", "تحذير", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
             if (dialogResult == DialogResult.Yes)
             {
                 xtraTabControlShipping.TabPages.Remove(arg.Page as XtraTabPage);
             }
             else if (dialogResult == DialogResult.No)
             {
             }
         }
         else
         {
             xtraTabControlShipping.TabPages.Remove(arg.Page as XtraTabPage);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #5
0
        private void xtraTabControlMainContainer_CloseButtonClick(object sender, EventArgs e)
        {
            try
            {
                ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
                XtraTabPage xtraTabPage = (XtraTabPage)arg.Page;
                if (!IsTabPageSave())
                {
                    DialogResult dialogResult = MessageBox.Show("There are unsave Pages To you wound close anyway?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (dialogResult == DialogResult.Yes)
                    {
                        xtraTabControlMainContainer.TabPages.Remove(arg.Page as XtraTabPage);
                        flag = false;
                    }
                    else if (dialogResult == DialogResult.No)
                    {

                    }
                }
                else
                {
                    xtraTabControlMainContainer.TabPages.Remove(arg.Page as XtraTabPage);
                    flag = false;
                }
             
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #6
0
 /// <summary>
 private void xtraTabControlStoresContent_CloseButtonClick(object sender, EventArgs e)
 {
     try
     {
         ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
         XtraTabPage xtraTabPage      = (XtraTabPage)arg.Page;
         if (xtraTabPage.ImageOptions.Image != null)
         {
             DialogResult dialogResult = MessageBox.Show("Are you sure you want to Close this page without save?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
             if (dialogResult == DialogResult.Yes)
             {
                 xtraTabControlStoresContent.TabPages.Remove(arg.Page as XtraTabPage);
             }
             else if (dialogResult == DialogResult.No)
             {
             }
         }
         else
         {
             xtraTabControlStoresContent.TabPages.Remove(arg.Page as XtraTabPage);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #7
0
        /// <summary>
        /// 关闭属性表标签页
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xtraTabControl_CloseButtonClick(object sender, EventArgs e)
        {
            XtraTabControl           tabControl = sender as XtraTabControl;
            ClosePageButtonEventArgs arg        = e as ClosePageButtonEventArgs;
            string indexstring = arg.Page.Tooltip;

            // 删除flayer_list中的图层
            for (int i = 0; i < flayer_list.Count; i++)
            {
                IDataLayer     datalayer = flayer_list[i] as IDataLayer;
                IWorkspaceName w_name    = ((IDatasetName)(datalayer.DataSourceName)).WorkspaceName;
                if (indexstring == w_name.PathName + "\\" + flayer_list[i].Name + "_" + flayer_list[i].DataSourceType)
                {
                    flayer_list.RemoveAt(i);
                }
            }
            // 删除gridview_list中的表格
            for (int i = 0; i < gridview_list.Count; i++)
            {
                if (indexstring == gridview_list[i].Tag.ToString())
                {
                    gridview_list.RemoveAt(i);
                }
            }
            tabControl.TabPages.Remove(arg.Page as XtraTabPage);
        }
        private void tabMain_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs args = (ClosePageButtonEventArgs)e;

            tabMain.SelectedTabPage = (XtraTabPage)args.Page;
            IControl control = GetControl(tabMain.SelectedTabPage);

            CloseTab(control.TabType, control.Id);
        }
Пример #9
0
        /// <summary>
        /// 关闭标签页
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
            XtraTabPage curPage          = (XtraTabPage)arg.Page;

            ///////// 清除页面追踪 ////////
            openedTabPage.Remove(curPage.Tag.ToString());
            curPage.Dispose();
        }
Пример #10
0
        private void xtraTabMain_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            (arg.Page as XtraTabPage).PageVisible = false;
            XtraTabControl t = sender as XtraTabControl;

            t.TabPages.Remove(arg.Page as XtraTabPage);
        }
Пример #11
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Etdiyiniz dəyişikliklər yadda qalmayacaq , davam etməyə razısınızmı?", "Diqqət !", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
                (arg.Page as XtraTabPage).PageVisible = false;
            }
        }
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            XtraTabControl           tabControl = (XtraTabControl)sender;
            ClosePageButtonEventArgs arg        = (ClosePageButtonEventArgs)e;

            if (MessageBox.Show(string.Format("Close {0}?", arg.Page.Text), "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                ((XtraTabPage)arg.Page).PageVisible = false;
            }
        }
Пример #13
0
        private void closeButtonClick(ClosePageButtonEventArgs e)
        {
            var closingTab = e.Page as XtraTabPage;

            if (closingTab == null)
            {
                return;
            }
            editAnalyzablePresenter.RemoveAnalysis(analysisPresenterFrom(closingTab));
        }
Пример #14
0
        private void xtraTabControl_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
            XtraTabPage page             = arg?.Page as XtraTabPage;

            if (page == null)
            {
                return;
            }
            ClosePage(page.Name);
        }
Пример #15
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs ea = (ClosePageButtonEventArgs)e;

            xtraTabControl1.TabPages.Remove((XtraTabPage)ea.Page);

            if (ea.PrevPage != null)
            {
                ((XtraTabPage)ea.PrevPage).Show();
            }
        }
Пример #16
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            int h = 0;

            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            if (xtraTabControl1.SelectedTabPage.Equals((arg.Page as XtraTabPage)))
            {
                h = xtraTabControl1.SelectedTabPageIndex;
            }
            xtraTabControl1.TabPages.Remove((arg.Page as XtraTabPage));
            xtraTabControl1.SelectedTabPageIndex = h - 1;
        }
Пример #17
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs closeArgs = (ClosePageButtonEventArgs)e;
            XtraTabPage page = (XtraTabPage)closeArgs.Page;
            var         obj  = (EntryObjectDTO)page.Tag;

            if (FMMessageBox.AskYesNo(ApplicationStrings.QAskForDeletingEntryObject, page.Text) == DialogResult.Yes)
            {
                day.Objects.Remove(obj);
                xtraTabControl1.TabPages.Remove(page);
                updateButtons();
            }
        }
Пример #18
0
 private void TabControlXuatBanLeOnCloseButtonClick(object sender, EventArgs eventArgs)
 {
     try
     {
         ClosePageButtonEventArgs obj = (ClosePageButtonEventArgs)eventArgs;
         XtraTabPage page             = (XtraTabPage)obj.Page;
         tabControlXuatBanLe.SelectedTabPageIndex = page.TabIndex - 1;
         tabControlXuatBanLe.TabPages.Remove(page);
     }
     catch (Exception) {
         MessageBox.Show("Không thể xóa tab!");
     }
 }
        protected override void OnCloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            if (pages.ContainsValue((XtraTabPage)arg.Page) == true)
            {
                Control control = GetControlFromPage((XtraTabPage)arg.Page);
                if (control != null && composer.SmartParts.Contains(control) == true)
                {
                    Close(control);
                }
            }
            base.OnCloseButtonClick(sender, e);
        }
Пример #20
0
        //在程序关闭之后 要释放窗体等资源
        void XtraTabControl1CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs a = (ClosePageButtonEventArgs)e;
            string tabpagename         = a.Page.Text;

            foreach (Control xtp in xtraTabControl1.TabPages)
            {
                if (xtp.Text == tabpagename)
                {
                    xtp.Dispose();
                    return;
                }
            }
        }
Пример #21
0
        private void xtabAccont_CloseButtonClick(object sender, EventArgs e)
        {
            LogNHelper.Info("关闭");
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            XtraTabPage page = (arg.Page as XtraTabPage);

            if (page.Text == "系统导航")
            {
                Msg.ShowInformation("禁止关闭");
                return;
            }

            LogNHelper.Info(page.Text);
        }
Пример #22
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            //DevExpress.XtraTab.XtraTabControl xtab = (DevExpress.XtraTab.XtraTabControl)sender;
            //int i = xtab.SelectedTabPageIndex;

            XtraTabControl           tabControl = sender as XtraTabControl;
            ClosePageButtonEventArgs arg        = e as ClosePageButtonEventArgs;
            XtraTabPage tabPage = arg.Page as XtraTabPage;
            int         i       = tabControl.SelectedTabPageIndex;

            if (tabControl.SelectedTabPage == tabPage)
            {
                tabControl.SelectedTabPageIndex = i - 1;
            }
            tabPage.PageVisible = false;
            //xtab.SelectedTabPageIndex = i - 1;
        }
Пример #23
0
        private void xtraTabControl1_CloseButtonClick(object sender, System.EventArgs e)
        {
            int h = 0;
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            if (xtraTabControl1.SelectedTabPage.Equals((arg.Page as XtraTabPage)))
            {
                h = xtraTabControl1.SelectedTabPageIndex;
            }
            if ((arg.Page as XtraTabPage).Text != "Bắt đầu")
            {
                xtraTabControl1.TabPages.Remove((arg.Page as XtraTabPage));

                xtraTabControl1.SelectedTabPageIndex = h - 1;
            }
            else
            {
                XtraMessageBox.Show("Bạn không thể tắt\nTab bắt đầu này !", "Thông báo");
            }
        }
Пример #24
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
            var page = arg.Page as XtraTabPage;

            if ((string)page.Tag != barButtonItem15.Caption)
            {
                (arg.Page as XtraTabPage).Dispose();
            }
            else
            {
                page.PageVisible = false;
            }
            //xtraTabControl1.SelectedTabPage.Dispose();
            //xtraTabControl1.TabPages.Remove(xtraTabControl1.SelectedTabPage);
            if (xtraTabControl1.TabPages.Count > 0)
            {
                xtraTabControl1.SelectedTabPage = xtraTabControl1.TabPages.Last();
            }
        }
Пример #25
0
        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs a = (ClosePageButtonEventArgs)e;
            string tabpagename         = a.Page.Text;

            foreach (Control xtp in xtraTabControl1.TabPages)
            {
                if (xtp.Text == tabpagename)
                {
                    foreach (Control frm in xtp.Controls)
                    {
                        Form f = (Form)frm;
                        f.Close();
                    }

                    xtp.Dispose();
                    xtraTabControl1.SelectedTabPageIndex = xtraTabControl1.TabPages.Count;
                    return;
                }
            }
        }
Пример #26
0
        // [Close Tab]
        private void tabcontrol_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            if ((arg.Page as XtraTabPage).Text == TitleTab[(int)E_FORM.HOME])
            {
                return;
            }
            for (int i = 0; i < SOFORM; i++) // Set IsOpen false
            {
                if ((arg.Page as XtraTabPage).Text == TitleTab[i])
                {
                    IsOpen[i] = false;
                    break;
                }
            }
            (arg.Page as XtraTabPage).Dispose();
            if (_tabindex > 0)
            {
                _tabindex--;
            }
        }
Пример #27
0
        //Metodo para poder cerrar las pestañas del XtraTabVentanas
        private void XtraTabVentanas_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs cerrar = e as ClosePageButtonEventArgs;

            if (cerrar.Page.Text == "Ajustes")
            {
                TabAjuste.PageVisible = false;
            }
            //aki inicia esto se puede comentarpero ahorita lo dejo asi victor le quito el else if de ventas para que no se podiera cerrar la pestaña del mismo
            else if (cerrar.Page.Text == "Ventas")
            {
                MessageBox.Show("No se puede cerrar  que no vez que es el principal wuey... LOSER!!!! :)");
            }
            //aki termina el else if de ventas
            else if (cerrar.Page.Text == "Productos")
            {
                tabProductos.PageVisible = false;
            }
            else if (cerrar.Page.Text == "Usuarios")
            {
                tabUsuarios.PageVisible = false;
            }
        }
Пример #28
0
        void xtraTabControl1_CloseButtonClick(object sender, System.EventArgs e)
        {
            ClosePageButtonEventArgs ea = e as ClosePageButtonEventArgs;

            ((IDisposable)ea.Page).Dispose();
        }
Пример #29
0
        private void xtraTabControl_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs E = (ClosePageButtonEventArgs)e;

            xtraTabControl.TabPages.Remove((XtraTabPage)E.Page);
        }
Пример #30
0
        private void TabHome_CloseButtonClick(object sender, EventArgs e)
        {
            ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;

            (arg.Page as XtraTabPage).PageVisible = false;
        }