Beispiel #1
0
 /// <summary>
 /// Sets the concrete type registration for all contained ManagedObjectCollections
 /// </summary>
 /// <param name="concreteType"></param>
 /// <param name="registerAs"></param>
 public void RegisterType <TConcrete, TRegisterAs>()
 {
     WorkItems.RegisterType <TConcrete, TRegisterAs>();
     Items.RegisterType <TConcrete, TRegisterAs>();
     SmartParts.RegisterType <TConcrete, TRegisterAs>();
     Workspaces.RegisterType <TConcrete, TRegisterAs>();
     Services.RegisterType <TConcrete, TRegisterAs>();
 }
Beispiel #2
0
 /// <summary>
 /// Sets the concrete type registration for all contained ManagedObjectCollections
 /// </summary>
 /// <param name="concreteType"></param>
 /// <param name="registerAs"></param>
 public void RegisterType(Type concreteType, Type registerAs)
 {
     WorkItems.RegisterType(concreteType, registerAs);
     Items.RegisterType(concreteType, registerAs);
     SmartParts.RegisterType(concreteType, registerAs);
     Workspaces.RegisterType(concreteType, registerAs);
     Services.RegisterType(concreteType, registerAs);
 }
Beispiel #3
0
        private void ControlDisposed(object sender, EventArgs e)
        {
            Control control = sender as Control;

            if (control != null && SmartParts.Contains(sender))
            {
                CloseInternal(control);
            }
        }
        /// <summary>
        /// Usage sample for the CABDevExpress.Extension Kit DockManagerWorkspace
        /// </summary>
        /// <param name="dockWorkspace"></param>
        public void Show(IWorkspace dockWorkspace)
        {
            var info = new DockManagerSmartPartInfo {
                Name = "Statistics", Dock = DockingStyle.Right
            };

            SmartParts.AddNew <StatisticsBarView>(DockableStatisticsView);
            dockWorkspace.Show(SmartParts[DockableStatisticsView], info);
        }
Beispiel #5
0
 private void ControlDisposed(object sender, EventArgs e)
 {
     Control control = sender as Control;
     if (control != null && SmartParts.Contains(sender))
     {
         CloseInternal(control);
         dockPanels[control].Close();
         dockPanels.Remove(control);
     }
 }
        private void AddShowNavBarGroups(IWorkspace navbarWorkspace)
        {
            SmartParts.AddNew <UserInfoView>("UserInfo");               //named because it will be used in a placeholder
            var customerView      = SmartParts.AddNew <CustomerView>();
            var statisticsBarView = SmartParts.AddNew <StatisticsBarView>(SmartPartNames.Statistics);

            var customerInfo = new XtraNavBarGroupSmartPartInfo
            {
                Title      = "Customers",
                LargeImage = Resources.customersLarge,
                SmallImage = Resources.customersSmall
            };

            var statsInfo = new XtraNavBarGroupSmartPartInfo
            {
                Title      = "Statistics",
                LargeImage = Resources.statsLarge,
                SmallImage = Resources.statsSmall
            };

            navbarWorkspace.Show(customerView, customerInfo);
            navbarWorkspace.Show(statisticsBarView, statsInfo);
        }
        /// <summary>
        /// Usage sample for the CABDevExpress.Extension Kit XtraWindowWorkspace and XtraWindowSmartPartInfo
        /// the example shows an 'About Dialog'
        /// </summary>
        private void ShowHelpAbout()
        {
            if (!SmartParts.Contains(SmartPartNames.HelpAbout))
            {
                SmartParts.AddNew <AboutBankTellerView>(SmartPartNames.HelpAbout);
            }

            var smartPartInfo = new XtraWindowSmartPartInfo
            {
                Modal           = true,
                StartPosition   = FormStartPosition.CenterParent,
                FormBorderStyle = FormBorderStyle.FixedDialog,
                MinimizeBox     = false,
                MaximizeBox     = false,
                Height          = 150,
                Width           = 350,
                Title           = "About"
            };

            // the two properties added by CABDevExpress.ExtensionKit's XtraWindowSmartPartInfo
            var xtraWindow = new XtraWindowWorkspace();

            xtraWindow.Show(SmartParts[SmartPartNames.HelpAbout], smartPartInfo);
        }