Esempio n. 1
0
        /// <summary>
        /// Closes the corresponding <see cref="DockWindow">DockWindow</see> instance.
        /// </summary>
        /// <param name="item"></param>
        protected internal override void OnTabCloseButtonClicked(TabStripItem item)
        {
            DockWindow window = item.TabPanel as DockWindow;

            if (window != null)
            {
                window.Close();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Performs the core action, depending on the clicked menu item.
        /// </summary>
        /// <param name="menuItem"></param>
        /// <param name="window"></param>
        protected virtual void PerformMenuItemAction(DockWindow window, RadMenuItemBase menuItem)
        {
            switch (menuItem.Name)
            {
            case ActivateWindow:
                this.DockManager.ActiveWindow = window;
                window.EnsureVisible();
                break;

            case DockStateAutoHide:
            case DockStateDocked:
            case DockStateFloating:
            case DockStateHidden:
            case DockStateTabbedDocument:
                this.DockManager.SetWindowState(window, (DockState)Enum.Parse(typeof(DockState), menuItem.Name));
                break;

            case CloseAll:
                this.CloseAllDocuments(null);
                break;

            case CloseAllButThis:
                this.CloseAllDocuments(window);
                break;

            case CloseWindow:
                window.Close();
                break;

            case NewHTabGroup:
                this.DockManager.AddDocument(window, window.TabStrip as DocumentTabStrip, DockPosition.Bottom);
                break;

            case NewVTabGroup:
                this.DockManager.AddDocument(window, window.TabStrip as DocumentTabStrip, DockPosition.Right);
                break;

            case MoveToPrevTabGroup:
                this.DockManager.MoveToPreviousDocumentTabStrip(window);
                break;

            case MoveToNextTabGroup:
                this.DockManager.MoveToNextDocumentTabStrip(window);
                break;
            }
        }
        public override void Print()
        {
            try
            {
                if (objMaster.Current == null || objMaster.Current.Id == 0)
                {
                    return;
                }
                long id = objMaster.Current.Id;

                rptfrmCustomerInvoice frm = new rptfrmCustomerInvoice(id);


                var list  = General.GetQueryable <vu_Invoice>(a => a.Id == id).ToList();
                int count = list.Count;

                frm.DataSource = list;


                frm.GenerateReport();


                Telerik.WinControls.UI.Docking.DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("rptfrmCustomerInvoice1");

                if (doc != null)
                {
                    doc.Close();
                }

                UI.MainMenuForm.MainMenuFrm.ShowForm(frm);
                //  MainMenuForm.MainMenuFrm.ShowForm(frm);
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
        }