Exemple #1
0
        private void myRibbon_RibbonTabItemSelected(object sender, Infragistics.Windows.Ribbon.Events.RibbonTabItemSelectedEventArgs e)
        {
            if (root != null)
            {
                root.Content = null;

                if (e.NewSelectedRibbonTabItem.Name == "HomeTab")
                {
                    if (UIContext.License != null)
                    {
                        ProjectForm projectForm = new ProjectForm();
                        projectForm.License = UIContext.License;
                        root.Content = projectForm;
                    }
                    else
                    {
                        WelcomeScreenForm welcomeScreenForm = new WelcomeScreenForm();
                        root.Content = welcomeScreenForm;
                    }
                }
                else if (e.NewSelectedRibbonTabItem.Name == "ProductsTab")
                {
                    ProductsScreen productsScreen = new ProductsScreen();
                    root.Content = productsScreen;
                }
                else if (e.NewSelectedRibbonTabItem.Name == "ServicesTab")
                {

                }
            }
        }
		public void Initalize()
		{
			RefreshData();

			root.Content = null;
			
			if (UIContext.License == null)
			{
				root.Content = null;
				//ribbon.ContextualGroups[0].Visibility = Visibility.Collapsed;
				var tab = ribbon.Tabs.Where(x => x.Name == "projectTabItem").FirstOrDefault();
				tab.Visibility = Visibility.Collapsed;
				ribbon.SelectedTabItem = tab;
			}
			else
			{
				//ribbon.ContextualGroups[0].Visibility = Visibility.Visible;
				var tab = ribbon.Tabs.Where(x => x.Name == "projectTabItem").FirstOrDefault();
				tab.Visibility = Visibility.Visible;
				ribbon.SelectedTabItem = tab;

				ProjectForm projectForm = new ProjectForm();
				projectForm.License = UIContext.License;
				root.Content = projectForm;
			}
		}
Exemple #3
0
        public void Initalize()
        {
            RefreshData();

            root.Content = null;

            if (UIContext.License == null)
            {
                root.Content = null;
            }
            else
            {
                ProjectForm projectForm = new ProjectForm();
                projectForm.License = UIContext.License;
                root.Content = projectForm;
            }
        }
		private void ribbon_SelectedTabChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
		{
			if (e.AddedItems != null && e.AddedItems.Count == 1)
			{
				if (((RibbonTabItem)e.AddedItems[0]).Name == "homeTabItem")
				{
					WelcomeScreenForm welcomeScreenForm = new WelcomeScreenForm();
					root.Content = welcomeScreenForm;
				}
				else if (((RibbonTabItem)e.AddedItems[0]).Name == "productsTabItem")
				{
					if (_productsScreen == null)
						_productsScreen = new ProductsScreen();

					root.Content = _productsScreen;
				}
				else if (((RibbonTabItem)e.AddedItems[0]).Name == "servicesTabItem")
				{
					if (_servicesScreen == null)
						_servicesScreen = new ServicesScreen();

					root.Content = _servicesScreen;
				}

				else if (((RibbonTabItem)e.AddedItems[0]).Name == "projectTabItem")
				{
					if (UIContext.License != null)
					{
						ProjectForm projectForm = new ProjectForm();
						projectForm.License = UIContext.License;
						root.Content = projectForm;
					}
				}
			}
		}