示例#1
0
        private void _Close()
        {
            var services = ExBuilder.GetServices();

            foreach (var service in services)
            {
                service.Stop();
            }
        }
        public static void ExecutedCommand(Control source, object parameter)
        {
            var extender = ExBuilder.CreateExtender((String)parameter);

            if (extender != null)
            {
                extender.Width  = 600;
                extender.Height = 400;
                extender.Top    = Window.GetWindow(source).Top + 100;
                extender.Left   = Window.GetWindow(source).Left + 100;

                extender.ShowDialog();
            }
        }
示例#3
0
        public void BuildWorkarea()
        {
            var contents = ExBuilder.CreateContents("/Shell/Workareas");

            foreach (var content in contents)
            {
                var document = content as LayoutDocument;

                if (document != null)
                {
                    document.CanClose = false;

                    workareaPane.Children.Add(content);
                }
            }
        }
示例#4
0
        public void BuildMainMenu()
        {
            var menus = ExBuilder.CreateMenu("/Shell/MainMenu");

            foreach (var menu in menus)
            {
                menu.Background = Brushes.Transparent;
                menu.Style      = this.FindResource("MainMenuStyle") as Style;

                mainMenu.Items.Add(menu);
            }

            menus = ExBuilder.CreateMenu("/Shell/ThemeMenu");

            foreach (var menu in menus)
            {
                themeMenu.Items.Add(menu);
            }
        }
示例#5
0
        private void Initialize()
        {
            Dictionary <string, string> theme = new Dictionary <string, string>();

            theme.Add("Accent", "");
            theme.Add("Theme", "");
            ExContext.Instance.Configuration.Add("Style", theme);

            ExContext.Instance.Configuration.CollectionChanged += Application_CollectionChanged;


            var services = ExBuilder.GetServices();

            foreach (var service in services)
            {
                try
                {
                    service.Start();
                }
                catch
                {
                }
            }
        }