//Convert wird für die Konvertierung in das Display-Format verwendet
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ObservableCollection<RibbonTabItem> tabItems = new ObservableCollection<RibbonTabItem>();

            IEnumerable<ITixMenuTabItem> menuItem = value as IEnumerable<ITixMenuTabItem>;
            if (menuItem != null)
            {
                foreach (var tab in menuItem)
                {
                    RibbonTabItem tabItem = new RibbonTabItem();
                    tabItem.Header = tab.Header;
                    foreach (var group in tab.Groups)
                    {
                        RibbonGroupBox groupBox = new RibbonGroupBox();
                        groupBox.Header = group.Header;
                        foreach (var button in group.Buttons)
                        {
                            Button fluentButton = new Button();
                            fluentButton.Header = button.Header;
                            fluentButton.Command = button.Command;
                            groupBox.Items.Add(fluentButton);
                        }
                        tabItem.Groups.Add(groupBox);
                    }
                    tabItems.Add(tabItem);
                }
            }
            return tabItems;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.PrintButton = ((Fluent.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 3
0
        public Fluent.Button CreateRibbonButton()
        {
            Fluent.Button button = new Fluent.Button();
            FooCommand1 fooCommand1 = new FooCommand1();
            button.Command = fooCommand1.ItemCommand;

            button.Header = "Foo";

            this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
            return button;
        }
Esempio n. 4
0
        private static Button AddRibbonButton(this Ribbon ribbon, Action action)
        {
            Argument.IsNotNull(() => ribbon);

            Log.Debug("Adding button to ribbon");

            var ribbonButton = new Button();
            ribbonButton.Size = RibbonControlSize.Small;

            if (action != null)
            {
                ribbonButton.Click += (sender, e) => action();
            }

            ribbon.ToolBarItems.Add(ribbonButton);

            return ribbonButton;
        }
Esempio n. 5
0
    void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
    {
        switch (connectionId)
        {
        case 1:
            this.CancelButton = ((Fluent.Button)(target));
            return;

        case 2:
            this.OKButton = ((Fluent.Button)(target));
            return;

        case 3:
            this.ListBox1 = ((System.Windows.Controls.ListBox)(target));
            return;
        }
        this._contentLoaded = true;
    }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.btnAdd = ((Fluent.Button)(target));
                return;

            case 2:
                this.btnEdit = ((Fluent.Button)(target));
                return;

            case 3:
                this.btnDelete = ((Fluent.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 7
0
        /// <summary>
        /// 初始化顶部菜单,内容多少由取决于<see cref="MenuItems"/>
        /// </summary>
        private void initTopContentControl()
        {
            TopContentControl = new Ribbon()
            {
                IsMinimized = true,
                AutomaticStateManagement       = false,
                CanCustomizeQuickAccessToolBar = false,
            };
            foreach (var menuitem in this.MenuItems)
            {
                try
                {
                    //大tab
                    RibbonTabItem ribbonTabItem = new RibbonTabItem();
                    ribbonTabItem.Header = menuitem.Header;
                    TopContentControl.Tabs.Add(ribbonTabItem);

                    //每个tab
                    RibbonGroupBox ribbonGroupBox = new RibbonGroupBox();
                    ribbonTabItem.Groups.Add(ribbonGroupBox);
                    ribbonGroupBox.Header = menuitem.Header.ToString();

                    //tab里面的内容
                    foreach (var menuItemChild in menuitem.Items)
                    {
                        Fluent.Button button       = new Fluent.Button();
                        TreeViewItem  treeViewItem = menuItemChild as TreeViewItem;
                        var           solutionTreeViewItemChild = treeViewItem.Tag as MenuModule;

                        button.Header  = treeViewItem.Header;
                        button.ToolTip = treeViewItem.ToolTip;
                        MenuModule module = treeViewItem.Tag as MenuModule;
                        button.Command          = this.MenuCommand;
                        button.CommandParameter = menuItemChild;
                        button.LargeIcon        = module.Icon ?? @"pack://application:,,,/Solution.Desktop.Resource;component/Images/logo_32X32.ico";
                        ribbonGroupBox.Items.Add(button);
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.Error("初始化顶部菜单时错误。", ex);
                }
            }
        }
Esempio n. 8
0
        private BackstageTabItem GetNewMapBackstageTabItem()
        {
            var button = new Fluent.Button()
            {
                Content      = "空白地图",
                IsDefinitive = true,
                Icon         = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/File128.png", UriKind.RelativeOrAbsolute))
            };

            button.Click += NewMap;
            BackstageTabItem backstageTabItem = new BackstageTabItem()
            {
                Header  = "新建",
                Icon    = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/New32.png", UriKind.RelativeOrAbsolute)),
                Content = button
            };

            return(backstageTabItem);
        }
        // Change Themes
        private void ChangeTheme_Click(object sender, EventArgs e)
        {
            Fluent.Button button    = (Fluent.Button)sender;
            string        style_str = button.Content.ToString();

            Resources.MergedDictionaries.Clear();
            string otherStyle_UrlStr = "pack://application:,,,/Demo1;component/Style/" + style_str + ".xaml";

            Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri(otherStyle_UrlStr, UriKind.RelativeOrAbsolute)
            });

            x_HomePage.Resources.MergedDictionaries.Clear();
            x_HomePage.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri(otherStyle_UrlStr, UriKind.RelativeOrAbsolute)
            });
        }
Esempio n. 10
0
        private object GetOpenMapBackstageTabItem()
        {
            var button = new Fluent.Button()
            {
                Content      = "浏览",
                IsDefinitive = true,
                Icon         = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/Folder16.png", UriKind.RelativeOrAbsolute)),
                LargeIcon    = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/Folder32.png", UriKind.RelativeOrAbsolute))
            };

            button.Click += OpenMap;
            BackstageTabItem backstageTabItem = new BackstageTabItem()
            {
                Header  = "打开",
                Icon    = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/Open32.png", UriKind.RelativeOrAbsolute)),
                Content = button
            };

            return(backstageTabItem);
        }
Esempio n. 11
0
        /// <summary>
        /// 获取按钮
        /// </summary>
        /// <param name="header">标题</param>
        /// <param name="command">命令</param>
        /// <param name="iconPath">图标地址</param>
        /// <param name="largeIconPath">大图标地址</param>
        /// <param name="toolTip">提示</param>
        /// <param name="size">控件大小</param>
        /// <returns></returns>
        public static Fluent.Button GetFluentButton(object header, ICommand command, string iconPath, string largeIconPath, object toolTip = null, Fluent.RibbonControlSize size = Fluent.RibbonControlSize.Large)
        {
            var button = new Fluent.Button()
            {
                Header  = header,
                ToolTip = toolTip,
                Size    = size,
                Command = command
            };

            if (!string.IsNullOrEmpty(iconPath))
            {
                button.Icon = new BitmapImage(new Uri(iconPath, UriKind.RelativeOrAbsolute));
            }
            if (!string.IsNullOrEmpty(largeIconPath))
            {
                button.LargeIcon = new BitmapImage(new Uri(largeIconPath, UriKind.RelativeOrAbsolute));
            }
            return(button);
        }
Esempio n. 12
0
        private object GetRightContent()
        {
            TextBlock textBlock = new TextBlock()
            {
                Text     = "欢迎,现在开始您的易图世界!",
                FontSize = 14
            };

            Fluent.Button button = new Fluent.Button()
            {
                Header       = "进入",
                Content      = "进入",
                FontSize     = 14,
                IsDefinitive = true
            };
            StackPanel stackPanel = new StackPanel();

            stackPanel.Children.Add(textBlock);
            stackPanel.Children.Add(button);
            return(stackPanel);
        }
Esempio n. 13
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.SaveButton = ((Fluent.Button)(target));
                return;

            case 2:
                this.SaveAndCloseButton = ((Fluent.Button)(target));
                return;

            case 3:
                this.DeleteButton = ((Fluent.Button)(target));
                return;

            case 4:
                this.EntityContent = ((System.Windows.Controls.ContentPresenter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 14
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.SaveButton = ((Fluent.Button)(target));
                return;

            case 2:
                this.DeleteButton = ((Fluent.Button)(target));
                return;

            case 3:
                this.CancelButton = ((Fluent.Button)(target));
                return;

            case 4:
                this.DetailsButton = ((Fluent.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 15
0
    void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
    {
        switch (connectionId)
        {
        case 1:
            this.StackPanel1 = ((System.Windows.Controls.StackPanel)(target));
            return;

        case 2:
            this.O_Button = ((Fluent.RadioButton)(target));
            return;

        case 3:
            this.O_RadioButton = ((Fluent.RadioButton)(target));
            return;

        case 4:
            this.O_CheckBox = ((Fluent.RadioButton)(target));
            return;

        case 5:
            this.O_TextBlock = ((Fluent.RadioButton)(target));
            return;

        case 6:
            this.CancelButton = ((Fluent.Button)(target));
            return;

        case 7:
            this.OKButton = ((Fluent.Button)(target));
            return;

        case 8:
            this.Button1 = ((Fluent.Button)(target));
            return;
        }
        this._contentLoaded = true;
    }
Esempio n. 16
0
    void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
    {
        switch (connectionId)
        {
        case 1:
            this.CancelButton = ((Fluent.Button)(target));
            return;

        case 2:
            this.OKButton = ((Fluent.Button)(target));
            return;

        case 3:
            this.Grid1 = ((System.Windows.Controls.Grid)(target));
            return;

        case 4:
            this.FromBox = ((Fluent.ComboBox)(target));
            return;

        case 5:
            this.ToBox = ((Fluent.ComboBox)(target));
            return;

        case 6:
            this.TranslateButton = ((Fluent.Button)(target));
            return;

        case 7:
            this.Label3 = ((System.Windows.Controls.Label)(target));
            return;

        case 8:
            this.TranslatedText = ((System.Windows.Controls.Label)(target));
            return;
        }
        this._contentLoaded = true;
    }
Esempio n. 17
0
    void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
    {
        switch (connectionId)
        {
        case 1:
            this.SaveFileDialog = ((SaveFileDialog)(target));
            return;

        case 2:
            this.Label1 = ((System.Windows.Controls.Label)(target));
            return;

        case 3:
            this.Grid1 = ((System.Windows.Controls.Grid)(target));
            return;

        case 4:
            this.Label2 = ((System.Windows.Controls.Label)(target));
            return;

        case 5:
            this.RichTextBox1 = ((System.Windows.Controls.RichTextBox)(target));
            return;

        case 6:
            this.YesButton = ((Fluent.Button)(target));
            return;

        case 7:
            this.NoButton = ((Fluent.Button)(target));
            return;

        case 8:
            this.CancelButton = ((Fluent.Button)(target));
            return;
        }
        this._contentLoaded = true;
    }
        private void ChangeStyle_ButtonClick(object sender, EventArgs e)
        {
            Fluent.Button button    = (Fluent.Button)sender;
            string        style_str = button.Content.ToString();

            // Acccording to the v6.1 source code opened using Blend, the current address is
            // Source="pack://application:,,,/Fluent;component/Themes/Accents/<ColorName>.Xaml"
            // This seems different in previous versions.
            Resources.MergedDictionaries.Clear();
            string fluentStyle_UrlStr = "pack://application:,,,/Fluent;component/Themes/Accents/" + style_str + ".xaml";

            //string otherStyle_UrlStr = "pack://application:,,,/Demo1;component/Style/" + style_str + ".xaml";
            ThemeChange(sender, e);

            if (style_str.Equals("Generic"))
            {
                fluentStyle_UrlStr = "pack://application:,,,/Fluent;component/Themes/" + style_str + ".xaml";
            }
            Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri(fluentStyle_UrlStr, UriKind.RelativeOrAbsolute)
            });
            //Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri(otherStyle_UrlStr, UriKind.RelativeOrAbsolute) });
        }
Esempio n. 19
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\MainWindow.xaml"
                ((jg.Editor.MainWindow)(target)).KeyUp += new System.Windows.Input.KeyEventHandler(this.RibbonWindow_KeyUp);

            #line default
            #line hidden

            #line 12 "..\..\..\MainWindow.xaml"
                ((jg.Editor.MainWindow)(target)).PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.RibbonWindow_PreviewMouseDown);

            #line default
            #line hidden

            #line 14 "..\..\..\MainWindow.xaml"
                ((jg.Editor.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 15 "..\..\..\MainWindow.xaml"
                ((jg.Editor.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden

            #line 18 "..\..\..\MainWindow.xaml"
                ((jg.Editor.MainWindow)(target)).Deactivated += new System.EventHandler(this.RibbonWindow_Deactivated);

            #line default
            #line hidden
                return;

            case 12:

            #line 325 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 325 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 13:

            #line 326 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 326 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 14:

            #line 327 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 327 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 15:

            #line 328 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 328 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 16:

            #line 329 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 329 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 17:

            #line 330 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 330 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 18:

            #line 331 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 331 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 19:

            #line 332 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

            #line default
            #line hidden

            #line 332 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

            #line default
            #line hidden
                return;

            case 20:
                this.col1 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 21:
                this.col5 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 22:
                this.rowStage = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 23:
                this.row4 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 24:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 25:
                this.btnCreate = ((Fluent.Button)(target));

            #line 377 "..\..\..\MainWindow.xaml"
                this.btnCreate.Click += new System.Windows.RoutedEventHandler(this.btnCreate_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.btnLoad = ((Fluent.Button)(target));

            #line 380 "..\..\..\MainWindow.xaml"
                this.btnLoad.Click += new System.Windows.RoutedEventHandler(this.btnLoad_Click);

            #line default
            #line hidden
                return;

            case 27:

            #line 383 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_8);

            #line default
            #line hidden
                return;

            case 28:

            #line 387 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_7);

            #line default
            #line hidden
                return;

            case 29:

            #line 421 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnAddKey_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.FileName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 31:
                this.UpdateTime = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 32:
                this.CreateTime = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.txtWidth = ((System.Windows.Controls.TextBox)(target));

            #line 478 "..\..\..\MainWindow.xaml"
                this.txtWidth.LostFocus += new System.Windows.RoutedEventHandler(this.TextBox_LostFocus);

            #line default
            #line hidden

            #line 478 "..\..\..\MainWindow.xaml"
                this.txtWidth.TextInput += new System.Windows.Input.TextCompositionEventHandler(this.TextBox_TextInput);

            #line default
            #line hidden
                return;

            case 34:
                this.txtHeight = ((System.Windows.Controls.TextBox)(target));

            #line 482 "..\..\..\MainWindow.xaml"
                this.txtHeight.LostFocus += new System.Windows.RoutedEventHandler(this.TextBox_LostFocus);

            #line default
            #line hidden

            #line 482 "..\..\..\MainWindow.xaml"
                this.txtHeight.TextInput += new System.Windows.Input.TextCompositionEventHandler(this.TextBox_TextInput);

            #line default
            #line hidden
                return;

            case 35:
                this.colorPicker = ((Xceed.Wpf.Toolkit.ColorPicker)(target));
                return;

            case 36:
                this.UpdateUser = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 37:
                this.CreateUser = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 38:

            #line 571 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Closed);

            #line default
            #line hidden
                return;

            case 39:
                this.tabItem1 = ((Fluent.RibbonTabItem)(target));
                return;

            case 40:
                this.OperationGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 41:
                this.btnPageAdd = ((Fluent.Button)(target));

            #line 601 "..\..\..\MainWindow.xaml"
                this.btnPageAdd.Click += new System.Windows.RoutedEventHandler(this.btnPageAdd_Click);

            #line default
            #line hidden
                return;

            case 42:

            #line 607 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click);

            #line default
            #line hidden
                return;

            case 43:

            #line 608 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click);

            #line default
            #line hidden
                return;

            case 44:
                this.btnPageDel = ((Fluent.Button)(target));

            #line 634 "..\..\..\MainWindow.xaml"
                this.btnPageDel.Click += new System.Windows.RoutedEventHandler(this.btnPageDel_Click);

            #line default
            #line hidden
                return;

            case 45:
                this.btnUndo = ((Fluent.Button)(target));

            #line 650 "..\..\..\MainWindow.xaml"
                this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.btnUndo_Click);

            #line default
            #line hidden
                return;

            case 46:
                this.btnRedo = ((Fluent.Button)(target));

            #line 665 "..\..\..\MainWindow.xaml"
                this.btnRedo.Click += new System.Windows.RoutedEventHandler(this.btnRedo_Click);

            #line default
            #line hidden
                return;

            case 47:
                this.toggleButton1 = ((Fluent.SplitButton)(target));
                return;

            case 48:

            #line 689 "..\..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.AlignButton_Click);

            #line default
            #line hidden
                return;

            case 49:

            #line 690 "..\..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.AlignButton_Click);

            #line default
            #line hidden
                return;

            case 50:

            #line 691 "..\..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.AlignButton_Click);

            #line default
            #line hidden
                return;

            case 51:

            #line 692 "..\..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.AlignButton_Click);

            #line default
            #line hidden
                return;

            case 52:
                this.q = ((Fluent.RibbonGroupBox)(target));
                return;

            case 53:
                this.btnCut = ((Fluent.Button)(target));

            #line 708 "..\..\..\MainWindow.xaml"
                this.btnCut.Click += new System.Windows.RoutedEventHandler(this.btnCut_Click);

            #line default
            #line hidden
                return;

            case 54:
                this.btnCopy = ((Fluent.Button)(target));

            #line 725 "..\..\..\MainWindow.xaml"
                this.btnCopy.Click += new System.Windows.RoutedEventHandler(this.btnCopy_Click);

            #line default
            #line hidden
                return;

            case 55:
                this.btnPaste = ((Fluent.Button)(target));

            #line 740 "..\..\..\MainWindow.xaml"
                this.btnPaste.Click += new System.Windows.RoutedEventHandler(this.btnPaste_Click);

            #line default
            #line hidden
                return;

            case 56:
                this.ViewGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 57:
                this.Preview = ((Fluent.Button)(target));

            #line 757 "..\..\..\MainWindow.xaml"
                this.Preview.Click += new System.Windows.RoutedEventHandler(this.Preview_Click);

            #line default
            #line hidden
                return;

            case 58:
                this.btnPublish = ((Fluent.Button)(target));

            #line 775 "..\..\..\MainWindow.xaml"
                this.btnPublish.Click += new System.Windows.RoutedEventHandler(this.btnPublish_Click);

            #line default
            #line hidden
                return;

            case 59:
                this.tabItem2 = ((Fluent.RibbonTabItem)(target));
                return;

            case 60:
                this.ResourcesRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 61:

            #line 909 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SplitButton_Click);

            #line default
            #line hidden
                return;

            case 62:

            #line 924 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SplitButton_Click);

            #line default
            #line hidden
                return;

            case 63:

            #line 938 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SplitButton_Click);

            #line default
            #line hidden
                return;

            case 64:

            #line 967 "..\..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SplitButton_Click);

            #line default
            #line hidden
                return;

            case 65:
                this.tabItem6 = ((Fluent.RibbonTabItem)(target));
                return;

            case 66:
                this.btnHelp = ((Fluent.Button)(target));

            #line 1257 "..\..\..\MainWindow.xaml"
                this.btnHelp.Click += new System.Windows.RoutedEventHandler(this.btnHelp_Click);

            #line default
            #line hidden
                return;

            case 67:
                this.btnfeedback = ((Fluent.Button)(target));

            #line 1267 "..\..\..\MainWindow.xaml"
                this.btnfeedback.Click += new System.Windows.RoutedEventHandler(this.Button_Click_6);

            #line default
            #line hidden
                return;

            case 68:
                this.treeViewControl1 = ((System.Windows.Controls.TreeView)(target));

            #line 1315 "..\..\..\MainWindow.xaml"
                this.treeViewControl1.PreviewDragEnter += new System.Windows.DragEventHandler(this.TextBlock_PreviewDragEnter);

            #line default
            #line hidden

            #line 1316 "..\..\..\MainWindow.xaml"
                this.treeViewControl1.PreviewDragLeave += new System.Windows.DragEventHandler(this.TextBlock_PreviewDragLeave);

            #line default
            #line hidden

            #line 1317 "..\..\..\MainWindow.xaml"
                this.treeViewControl1.PreviewDragOver += new System.Windows.DragEventHandler(this.treeViewControl1_PreviewDragOver);

            #line default
            #line hidden

            #line 1318 "..\..\..\MainWindow.xaml"
                this.treeViewControl1.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.treeViewControl1_SelectedItemChanged);

            #line default
            #line hidden

            #line 1321 "..\..\..\MainWindow.xaml"
                this.treeViewControl1.Drop += new System.Windows.DragEventHandler(this.PubDropTreeAndBlockEvent);

            #line default
            #line hidden
                return;

            case 69:
                this.scrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 70:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 71:
                this.scaleTransform = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 72:
                this.propertyManage1 = ((jg.Editor.Library.Property.PropertyManage)(target));
                return;

            case 73:
                this.controlTimeLine = ((jg.Editor.Library.ControlTimeLine)(target));
                return;

            case 74:
                this.zoomSlider = ((System.Windows.Controls.Slider)(target));

            #line 1428 "..\..\..\MainWindow.xaml"
                this.zoomSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.zoomSlider_ValueChanged);

            #line default
            #line hidden
                return;

            case 75:
                this.ShowNewWin = ((System.Windows.Controls.Grid)(target));
                return;

            case 76:
                this.ProgressEditBusyName = ((jg.Editor.Library.Control.ProgressEditBusy)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 20
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.btnLoad = ((Fluent.Button)(target));

            #line 30 "..\..\MainWindow.xaml"
                this.btnLoad.Click += new System.Windows.RoutedEventHandler(this.btnLoad_click);

            #line default
            #line hidden
                return;

            case 2:
                this.btnNewInstance = ((Fluent.Button)(target));

            #line 31 "..\..\MainWindow.xaml"
                this.btnNewInstance.Click += new System.Windows.RoutedEventHandler(this.btnNewInstance_click);

            #line default
            #line hidden
                return;

            case 3:
                this.btnSave = ((Fluent.Button)(target));

            #line 34 "..\..\MainWindow.xaml"
                this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_click);

            #line default
            #line hidden
                return;

            case 4:
                this.btnSaveAs = ((Fluent.Button)(target));

            #line 35 "..\..\MainWindow.xaml"
                this.btnSaveAs.Click += new System.Windows.RoutedEventHandler(this.btnSaveAs_click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnUndo = ((Fluent.Button)(target));

            #line 36 "..\..\MainWindow.xaml"
                this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.btnSaveAs_click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnRedo = ((Fluent.Button)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.btnRedo.Click += new System.Windows.RoutedEventHandler(this.btnSaveAs_click);

            #line default
            #line hidden
                return;

            case 7:
                this.btnDisplay = ((Fluent.Button)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.btnDisplay.Click += new System.Windows.RoutedEventHandler(this.btnDisplay_click);

            #line default
            #line hidden
                return;

            case 8:
                this.btn_bold = ((Fluent.Button)(target));

            #line 44 "..\..\MainWindow.xaml"
                this.btn_bold.Click += new System.Windows.RoutedEventHandler(this.btnBold_click);

            #line default
            #line hidden
                return;

            case 9:
                this.btn_italic = ((Fluent.Button)(target));

            #line 45 "..\..\MainWindow.xaml"
                this.btn_italic.Click += new System.Windows.RoutedEventHandler(this.btnItalic_click);

            #line default
            #line hidden
                return;

            case 10:
                this.btn_mark_code = ((Fluent.Button)(target));

            #line 48 "..\..\MainWindow.xaml"
                this.btn_mark_code.Click += new System.Windows.RoutedEventHandler(this.btnCode_click);

            #line default
            #line hidden
                return;

            case 11:
                this.btn_list = ((Fluent.Button)(target));

            #line 51 "..\..\MainWindow.xaml"
                this.btn_list.Click += new System.Windows.RoutedEventHandler(this.btnList_click);

            #line default
            #line hidden
                return;

            case 12:
                this.btn_numberd_list = ((Fluent.Button)(target));

            #line 52 "..\..\MainWindow.xaml"
                this.btn_numberd_list.Click += new System.Windows.RoutedEventHandler(this.btnNumberedList_click);

            #line default
            #line hidden
                return;

            case 13:
                this.btn_seperator = ((Fluent.Button)(target));

            #line 57 "..\..\MainWindow.xaml"
                this.btn_seperator.Click += new System.Windows.RoutedEventHandler(this.btnSeparator_click);

            #line default
            #line hidden
                return;

            case 14:
                this.btn_linebreak = ((Fluent.Button)(target));

            #line 58 "..\..\MainWindow.xaml"
                this.btn_linebreak.Click += new System.Windows.RoutedEventHandler(this.btnLineBreak_click);

            #line default
            #line hidden
                return;

            case 15:
                this.btn_paragraph = ((Fluent.Button)(target));

            #line 59 "..\..\MainWindow.xaml"
                this.btn_paragraph.Click += new System.Windows.RoutedEventHandler(this.btnParagraph_click);

            #line default
            #line hidden
                return;

            case 16:
                this.ddbtn_Heading = ((Fluent.DropDownButton)(target));
                return;

            case 17:

            #line 64 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading1Level);

            #line default
            #line hidden
                return;

            case 18:

            #line 65 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading2Level);

            #line default
            #line hidden
                return;

            case 19:

            #line 66 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading3Level);

            #line default
            #line hidden
                return;

            case 20:

            #line 67 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading4Level);

            #line default
            #line hidden
                return;

            case 21:

            #line 68 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading5Level);

            #line default
            #line hidden
                return;

            case 22:

            #line 69 "..\..\MainWindow.xaml"
                ((Fluent.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClickHeading6Level);

            #line default
            #line hidden
                return;

            case 23:
                this.btn_quote = ((Fluent.Button)(target));

            #line 74 "..\..\MainWindow.xaml"
                this.btn_quote.Click += new System.Windows.RoutedEventHandler(this.btnQuote_click);

            #line default
            #line hidden
                return;

            case 24:
                this.btn_unquote = ((Fluent.Button)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.btn_unquote.Click += new System.Windows.RoutedEventHandler(this.btnUnQuote_click);

            #line default
            #line hidden
                return;

            case 25:
                this.btn_insert_photo = ((Fluent.Button)(target));

            #line 80 "..\..\MainWindow.xaml"
                this.btn_insert_photo.Click += new System.Windows.RoutedEventHandler(this.btnInsertPhoto_click);

            #line default
            #line hidden
                return;

            case 26:
                this.btn_insert_hyperlink = ((Fluent.Button)(target));

            #line 83 "..\..\MainWindow.xaml"
                this.btn_insert_hyperlink.Click += new System.Windows.RoutedEventHandler(this.btnInsertHyperlink_click);

            #line default
            #line hidden
                return;

            case 27:
                this.btn_insert_table = ((Fluent.Button)(target));

            #line 84 "..\..\MainWindow.xaml"
                this.btn_insert_table.Click += new System.Windows.RoutedEventHandler(this.btnInsertTable_click);

            #line default
            #line hidden
                return;

            case 28:
                this.rtbMainText = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 29:
                this.webBrowser = ((System.Windows.Controls.WebBrowser)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public Button CreateRibbonButton()
        {
            var fooCommand1 = new TestRoutedCommand();

            var button = new Button
            {
                Command = fooCommand1.ItemCommand,
                Header = "Foo",
                Icon = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Fluent.Ribbon.Showcase;component/Images/GreenLarge.png", UriKind.Absolute)),
            };

            this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
            return button;
        }
        /// <summary>
        /// Create ribbon menus.
        /// </summary>
        /// <param name="ribbonMenu"></param>
        public override void CreateRibbonMenu(Ribbon ribbonMenu)
        {
            base.CreateRibbonMenu(ribbonMenu);

            // in case the tab group is used for multiple vms, prevent multiple tabs beeing created
            foreach (Fluent.RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
            {
                if (t.Name == "tabGroupExamplePlugin")
                {
                    exampleTabGroup = t;
                    return;
                }
            }

            // contextual tab, which should only be visible when the example diagram surface is active
            exampleTabGroup             = new RibbonContextualTabGroup();
            exampleTabGroup.Header      = "Example Tab Group";
            exampleTabGroup.BorderBrush = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Background  = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Name        = "tabGroupExamplePlugin";

            // create ribbon bar and associate it with the contextual group
            RibbonTabItem exampleTab = new RibbonTabItem();

            exampleTab.Header = "Example View Operations";
            exampleTab.Group  = exampleTabGroup;

            // Analyze group
            RibbonGroupBox analyzeGroup = new RibbonGroupBox();

            analyzeGroup.Header = "Analyze";
            exampleTab.Groups.Add(analyzeGroup);

            Fluent.Button buttonAnalyze = new Fluent.Button();
            buttonAnalyze.Text      = "Analyze";
            buttonAnalyze.Command   = this.command;
            buttonAnalyze.Size      = RibbonControlSize.Large;
            buttonAnalyze.LargeIcon = GetImage("prepare_32.png");
            analyzeGroup.Items.Add(buttonAnalyze);

            // View group
            RibbonGroupBox viewGroup = new RibbonGroupBox();

            viewGroup.Header = "View";
            exampleTab.Groups.Add(viewGroup);

            Fluent.ToggleButton buttonTree = new Fluent.ToggleButton();
            buttonTree.Text      = "Tree";
            buttonTree.LargeIcon = GetImage("tree-32.png");
            viewGroup.Items.Add(buttonTree);

            Fluent.ToggleButton buttonTable = new Fluent.ToggleButton();
            buttonTable.Text      = "Table";
            buttonTable.LargeIcon = GetImage("table-32.png");
            viewGroup.Items.Add(buttonTable);

            // Export group
            RibbonGroupBox exportGroup = new RibbonGroupBox();

            exportGroup.Header = "Export";
            exampleTab.Groups.Add(exportGroup);

            Fluent.Button buttonExportCSV = new Fluent.Button();
            buttonExportCSV.Text      = "Export as CSV-File";
            buttonExportCSV.Size      = RibbonControlSize.Large;
            buttonExportCSV.LargeIcon = GetImage("csv_32x32.png");
            buttonExportCSV.Command   = this.command;
            exportGroup.Items.Add(buttonExportCSV);

            Fluent.Button buttonExportHTML = new Fluent.Button();
            buttonExportHTML.Text      = "Export as HTML Website";
            buttonExportHTML.Size      = RibbonControlSize.Large;
            buttonExportHTML.LargeIcon = GetImage("html_32x32.png");
            buttonExportHTML.Command   = this.command;
            exportGroup.Items.Add(buttonExportHTML);

            Fluent.Button buttonExportPDF = new Fluent.Button();
            buttonExportPDF.Text      = "Export as PDF Document";
            buttonExportPDF.Size      = RibbonControlSize.Large;
            buttonExportPDF.LargeIcon = GetImage("pdf_32x32.png");
            buttonExportPDF.Command   = this.command;
            exportGroup.Items.Add(buttonExportPDF);

            ribbonMenu.ContextualGroups.Add(exampleTabGroup);
            ribbonMenu.Tabs.Add(exampleTab);
        }
        /// <summary>
        /// Create ribbon menus.
        /// </summary>
        /// <param name="ribbonMenu"></param>
        public override void CreateRibbonMenu(Ribbon ribbonMenu)
        {
            base.CreateRibbonMenu(ribbonMenu);

            // in case the tab group is used for multiple vms, prevent multiple tabs beeing created
            foreach (Fluent.RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
                if (t.Name == "tabGroupExamplePlugin")
                {
                    exampleTabGroup = t;
                    return;
                }

            // contextual tab, which should only be visible when the example diagram surface is active
            exampleTabGroup = new RibbonContextualTabGroup();
            exampleTabGroup.Header = "Example Tab Group";
            exampleTabGroup.BorderBrush = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Background = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Name = "tabGroupExamplePlugin";

            // create ribbon bar and associate it with the contextual group
            RibbonTabItem exampleTab = new RibbonTabItem();
            exampleTab.Header = "Example View Operations";
            exampleTab.Group = exampleTabGroup;

            // Analyze group
            RibbonGroupBox analyzeGroup = new RibbonGroupBox();
            analyzeGroup.Header = "Analyze";
            exampleTab.Groups.Add(analyzeGroup);

            Fluent.Button buttonAnalyze = new Fluent.Button();
            buttonAnalyze.Text = "Analyze";
            buttonAnalyze.Command = this.command;
            buttonAnalyze.Size = RibbonControlSize.Large;
            buttonAnalyze.LargeIcon = GetImage("prepare_32.png");
            analyzeGroup.Items.Add(buttonAnalyze);

            // View group
            RibbonGroupBox viewGroup = new RibbonGroupBox();
            viewGroup.Header = "View";
            exampleTab.Groups.Add(viewGroup);

            Fluent.ToggleButton buttonTree = new Fluent.ToggleButton();
            buttonTree.Text = "Tree";
            buttonTree.LargeIcon = GetImage("tree-32.png");
            viewGroup.Items.Add(buttonTree);

            Fluent.ToggleButton buttonTable = new Fluent.ToggleButton();
            buttonTable.Text = "Table";
            buttonTable.LargeIcon = GetImage("table-32.png");
            viewGroup.Items.Add(buttonTable);

            // Export group
            RibbonGroupBox exportGroup = new RibbonGroupBox();
            exportGroup.Header = "Export";
            exampleTab.Groups.Add(exportGroup);

            Fluent.Button buttonExportCSV = new Fluent.Button();
            buttonExportCSV.Text = "Export as CSV-File";
            buttonExportCSV.Size = RibbonControlSize.Large;
            buttonExportCSV.LargeIcon = GetImage("csv_32x32.png");
            buttonExportCSV.Command = this.command;
            exportGroup.Items.Add(buttonExportCSV);

            Fluent.Button buttonExportHTML = new Fluent.Button();
            buttonExportHTML.Text = "Export as HTML Website";
            buttonExportHTML.Size = RibbonControlSize.Large;
            buttonExportHTML.LargeIcon = GetImage("html_32x32.png");
            buttonExportHTML.Command = this.command;
            exportGroup.Items.Add(buttonExportHTML);

            Fluent.Button buttonExportPDF = new Fluent.Button();
            buttonExportPDF.Text = "Export as PDF Document";
            buttonExportPDF.Size = RibbonControlSize.Large;
            buttonExportPDF.LargeIcon = GetImage("pdf_32x32.png");
            buttonExportPDF.Command = this.command;
            exportGroup.Items.Add(buttonExportPDF);

            ribbonMenu.ContextualGroups.Add(exampleTabGroup);
            ribbonMenu.Tabs.Add(exampleTab);
        }
Esempio n. 24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 2:
                this.homeTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 3:
                this.themesGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 4:
                this.silverThemeBtn = ((Fluent.Button)(target));

            #line 60 "..\..\MainWindowContent.xaml"
                this.silverThemeBtn.Click += new System.Windows.RoutedEventHandler(this.silverThemeBtn_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.blackThemeBtn = ((Fluent.Button)(target));

            #line 63 "..\..\MainWindowContent.xaml"
                this.blackThemeBtn.Click += new System.Windows.RoutedEventHandler(this.blackThemeBtn_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.blueThemeBtn = ((Fluent.Button)(target));

            #line 66 "..\..\MainWindowContent.xaml"
                this.blueThemeBtn.Click += new System.Windows.RoutedEventHandler(this.blueThemeBtn_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.DontUseDwm = ((Fluent.CheckBox)(target));

            #line 67 "..\..\MainWindowContent.xaml"
                this.DontUseDwm.Click += new System.Windows.RoutedEventHandler(this.DontUseDwm_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.memoryGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 9:
                this.releaseSelfMmryBtn = ((Fluent.Button)(target));
                return;

            case 10:
                this.releaseAllMmryBtn = ((Fluent.Button)(target));
                return;

            case 11:
                this.ViewTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 12:
                this.displayRangeGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 13:
                this.imageGallery = ((Hywire.ImageProcessing.ImageDisplayer.View.ImageGallery)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 25
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.fmMain = ((LEDX.MWin)(target));
     return;
     case 2:
     this.ribbon = ((Fluent.Ribbon)(target));
     
     #line 57 "..\..\MainWindow.xaml"
     this.ribbon.SelectedTabChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Ribbon_SelectedTabChanged);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btNewProj = ((Fluent.Button)(target));
     return;
     case 4:
     this.btOpenProj = ((Fluent.Button)(target));
     return;
     case 5:
     this.btSaveProj = ((Fluent.Button)(target));
     return;
     case 6:
     this.tbEdit = ((Fluent.RibbonTabItem)(target));
     return;
     case 7:
     this.btUndo = ((Fluent.SplitButton)(target));
     return;
     case 8:
     this.btPasteFram = ((Fluent.SplitButton)(target));
     return;
     case 9:
     this.rgbContrProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 10:
     this.spAddNew = ((Fluent.SplitButton)(target));
     return;
     case 11:
     this.btDel = ((Fluent.MenuItem)(target));
     return;
     case 12:
     this.tbConName = ((Fluent.TextBox)(target));
     return;
     case 13:
     this.tbConNumb = ((Fluent.Spinner)(target));
     return;
     case 14:
     this.tbConButt = ((Fluent.Spinner)(target));
     return;
     case 15:
     this.rgbFrameProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 16:
     this.spTime = ((Fluent.Spinner)(target));
     return;
     case 17:
     this.btCopyFram = ((Fluent.Button)(target));
     return;
     case 18:
     this.btCutFram = ((Fluent.Button)(target));
     return;
     case 19:
     this.btDelFram = ((Fluent.Button)(target));
     return;
     case 20:
     this.btToSample = ((Fluent.Button)(target));
     return;
     case 21:
     this.spbtFSet = ((Fluent.SplitButton)(target));
     
     #line 179 "..\..\MainWindow.xaml"
     this.spbtFSet.DropDownClosed += new System.EventHandler(this.SpbtFSet_DropDownClosed);
     
     #line default
     #line hidden
     return;
     case 22:
     this.rgbColorProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 23:
     this.btBegColor = ((Fluent.Button)(target));
     return;
     case 24:
     this.rctBegClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 25:
     this.btCopyColor = ((Fluent.Button)(target));
     return;
     case 26:
     this.btGetColor = ((Fluent.Button)(target));
     return;
     case 27:
     this.btEndColor = ((Fluent.Button)(target));
     return;
     case 28:
     this.rctEndClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 29:
     this.btCopy = ((Fluent.Button)(target));
     return;
     case 30:
     this.grSampl = ((Fluent.InRibbonGallery)(target));
     return;
     case 31:
     this.tbPalyer = ((Fluent.RibbonTabItem)(target));
     return;
     case 32:
     this.rgbPropLayer = ((Fluent.RibbonGroupBox)(target));
     return;
     case 33:
     this.btLayerDown = ((Fluent.Button)(target));
     return;
     case 34:
     this.btLayerTop = ((Fluent.Button)(target));
     return;
     case 35:
     this.btDelLay = ((Fluent.Button)(target));
     return;
     case 36:
     this.rgbPropPng = ((Fluent.RibbonGroupBox)(target));
     return;
     case 37:
     this.cbController = ((Fluent.ComboBox)(target));
     return;
     case 38:
     this.lgWidth = ((Fluent.TextBox)(target));
     return;
     case 39:
     this.lgHeight = ((Fluent.TextBox)(target));
     return;
     case 40:
     this.rgbPropText = ((Fluent.RibbonGroupBox)(target));
     return;
     case 41:
     this.lbtemTest = ((System.Windows.Controls.Label)(target));
     return;
     case 42:
     this.temTest = ((LEDX.Components.MultiLineTextEditor)(target));
     return;
     case 43:
     this.spTextSize = ((Fluent.Spinner)(target));
     return;
     case 44:
     this.cbFontFamaly = ((Fluent.ComboBox)(target));
     return;
     case 45:
     this.rctTextClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 46:
     this.tbFlash = ((Fluent.RibbonTabItem)(target));
     return;
     case 47:
     this.lbPort = ((System.Windows.Controls.Label)(target));
     return;
     case 48:
     this.cbComName = ((Fluent.ComboBox)(target));
     return;
     case 49:
     this.lbSpeed = ((System.Windows.Controls.Label)(target));
     return;
     case 50:
     this.cbComRate = ((Fluent.ComboBox)(target));
     return;
     case 51:
     this.btRefrPorts = ((Fluent.Button)(target));
     return;
     case 52:
     this.tbSync = ((Fluent.ToggleButton)(target));
     return;
     case 53:
     this.tgbShowLog = ((Fluent.ToggleButton)(target));
     return;
     case 54:
     this.spProgress = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 55:
     this.uiScaleSlider = ((System.Windows.Controls.Slider)(target));
     
     #line 531 "..\..\MainWindow.xaml"
     this.uiScaleSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.uiScaleSlider_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 56:
     this.uiMan = ((LEDX.Components.PlayScale)(target));
     return;
     case 57:
     this.svSearch = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 58:
     this.sldTime = ((LEDX.Components.TimeSlider)(target));
     
     #line 561 "..\..\MainWindow.xaml"
     this.sldTime.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.sld_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 59:
     this.scroll = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 60:
     this.icContr = ((System.Windows.Controls.ItemsControl)(target));
     return;
     case 61:
     this.svTracks = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 62:
     this.icTrack = ((System.Windows.Controls.ItemsControl)(target));
     return;
     case 63:
     this.iCanv = ((LEDX.Components.IncRender)(target));
     
     #line 598 "..\..\MainWindow.xaml"
     this.iCanv.SelectionChanged += new System.EventHandler(this.iCanv_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 64:
     this.mainScroller = ((System.Windows.Controls.ScrollViewer)(target));
     
     #line 607 "..\..\MainWindow.xaml"
     this.mainScroller.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.mainScroller_ScrollChanged);
     
     #line default
     #line hidden
     return;
     case 65:
     this.svLog = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 66:
     this.tbLog = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 26
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 11 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Image)(target)).ImageFailed += new System.EventHandler <System.Windows.ExceptionRoutedEventArgs>(this.Image_ImageFailed);

            #line default
            #line hidden
                return;

            case 2:
                this.CreatNewWork = ((Fluent.Button)(target));

            #line 96 "..\..\..\MainWindow.xaml"
                this.CreatNewWork.Click += new System.Windows.RoutedEventHandler(this.CreatNewWork_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.loadformdatabase = ((Fluent.Button)(target));

            #line 98 "..\..\..\MainWindow.xaml"
                this.loadformdatabase.Click += new System.Windows.RoutedEventHandler(this.loadformdatabase_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.loadformSourceZip = ((Fluent.Button)(target));

            #line 100 "..\..\..\MainWindow.xaml"
                this.loadformSourceZip.Click += new System.Windows.RoutedEventHandler(this.loadformSourceZip_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.loadformOpZip = ((Fluent.Button)(target));

            #line 102 "..\..\..\MainWindow.xaml"
                this.loadformOpZip.Click += new System.Windows.RoutedEventHandler(this.loadformOpZip_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.SaveSourcedata = ((Fluent.Button)(target));

            #line 106 "..\..\..\MainWindow.xaml"
                this.SaveSourcedata.Click += new System.Windows.RoutedEventHandler(this.SaveSourcedata_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.SaveOpdata = ((Fluent.Button)(target));

            #line 108 "..\..\..\MainWindow.xaml"
                this.SaveOpdata.Click += new System.Windows.RoutedEventHandler(this.SaveOpdata_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.openpdfile = ((Fluent.Button)(target));

            #line 114 "..\..\..\MainWindow.xaml"
                this.openpdfile.Click += new System.Windows.RoutedEventHandler(this.openpdfile_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.openqxfile = ((Fluent.Button)(target));

            #line 115 "..\..\..\MainWindow.xaml"
                this.openqxfile.Click += new System.Windows.RoutedEventHandler(this.openqxfile_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.openbjfile = ((Fluent.Button)(target));

            #line 116 "..\..\..\MainWindow.xaml"
                this.openbjfile.Click += new System.Windows.RoutedEventHandler(this.openbjfile_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.checkdatasign = ((Fluent.Button)(target));

            #line 119 "..\..\..\MainWindow.xaml"
                this.checkdatasign.Click += new System.Windows.RoutedEventHandler(this.checkdatasign_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.checklogic = ((Fluent.Button)(target));

            #line 120 "..\..\..\MainWindow.xaml"
                this.checklogic.Click += new System.Windows.RoutedEventHandler(this.checklogic_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.opentemppdfile = ((Fluent.Button)(target));

            #line 123 "..\..\..\MainWindow.xaml"
                this.opentemppdfile.Click += new System.Windows.RoutedEventHandler(this.opentemppdfile_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.opentempqxfile = ((Fluent.Button)(target));

            #line 124 "..\..\..\MainWindow.xaml"
                this.opentempqxfile.Click += new System.Windows.RoutedEventHandler(this.opentempqxfile_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.opentempbjfile = ((Fluent.Button)(target));

            #line 125 "..\..\..\MainWindow.xaml"
                this.opentempbjfile.Click += new System.Windows.RoutedEventHandler(this.opentempbjfile_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.changeS = ((Fluent.Button)(target));

            #line 130 "..\..\..\MainWindow.xaml"
                this.changeS.Click += new System.Windows.RoutedEventHandler(this.changeS_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.changeX = ((Fluent.Button)(target));

            #line 131 "..\..\..\MainWindow.xaml"
                this.changeX.Click += new System.Windows.RoutedEventHandler(this.changeX_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.changeSX = ((Fluent.Button)(target));

            #line 132 "..\..\..\MainWindow.xaml"
                this.changeSX.Click += new System.Windows.RoutedEventHandler(this.changeSX_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.changemerge = ((Fluent.Button)(target));

            #line 135 "..\..\..\MainWindow.xaml"
                this.changemerge.Click += new System.Windows.RoutedEventHandler(this.changemerge_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.infoboxpanel = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 21:
                this.statugrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 22:
                this.ProcessLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TestContentControl = ((FluentTest.TestContent)(target));
                return;

            case 3:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 4:
                this.tabGroup1 = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 5:
                this.tabGroup2 = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 6:
                this.invisibleTabGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 7:
                this.startScreen = ((Fluent.StartScreen)(target));
                return;

            case 8:

            #line 155 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.HandleSaveAsClick);

            #line default
            #line hidden
                return;

            case 9:

            #line 255 "TestContent.xaml"
                ((Fluent.Spinner)(target)).ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.OnSpinnerValueChanged);

            #line default
            #line hidden
                return;

            case 10:

            #line 284 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnHelpClick);

            #line default
            #line hidden
                return;

            case 11:
                this.Clipboard = ((Fluent.RibbonGroupBox)(target));

            #line 328 "TestContent.xaml"
                this.Clipboard.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 12:
                this.saveButton = ((Fluent.Button)(target));

            #line 337 "TestContent.xaml"
                this.saveButton.Click += new System.Windows.RoutedEventHandler(this.OnSaveButtonClick);

            #line default
            #line hidden
                return;

            case 13:
                this.buttonWatermark = ((Fluent.DropDownButton)(target));
                return;

            case 14:
                this.WatermarkGallery = ((Fluent.Gallery)(target));
                return;

            case 15:

            #line 360 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Suit_Button_Click);

            #line default
            #line hidden
                return;

            case 16:

            #line 374 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Sequence_Button_Click);

            #line default
            #line hidden
                return;

            case 17:

            #line 389 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Step_Button_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.addChildren = ((Fluent.DropDownButton)(target));
                return;

            case 19:
                this.ChildrenGallery = ((Fluent.Gallery)(target));
                return;

            case 20:

            #line 422 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_App_Button_Click);

            #line default
            #line hidden
                return;

            case 21:

            #line 434 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_DataSource_Button_Click);

            #line default
            #line hidden
                return;

            case 22:

            #line 447 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Variable_Button_Click);

            #line default
            #line hidden
                return;

            case 23:

            #line 460 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Variable_Button_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.cutButton = ((Fluent.Button)(target));
                return;

            case 25:
                this.copyButton = ((Fluent.Button)(target));
                return;

            case 26:
                this.pasteButton = ((Fluent.Button)(target));

            #line 508 "TestContent.xaml"
                this.pasteButton.Click += new System.Windows.RoutedEventHandler(this.OnFormatPainterClick);

            #line default
            #line hidden
                return;

            case 27:
                this.FunctionsGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 28:
                this.galleryFunctionsInRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 29:
                this.functionsFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 30:
                this.Font = ((Fluent.RibbonGroupBox)(target));

            #line 537 "TestContent.xaml"
                this.Font.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 31:
                this.comboBoxFontName = ((Fluent.ComboBox)(target));
                return;

            case 32:
                this.segoeFont = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.comboBoxFontSize = ((Fluent.ComboBox)(target));
                return;

            case 34:
                this.buttonGrowFont = ((Fluent.Button)(target));
                return;

            case 35:
                this.buttonShrinkFont = ((Fluent.Button)(target));
                return;

            case 36:
                this.buttonChangeCase = ((Fluent.DropDownButton)(target));
                return;

            case 37:
                this.buttonClearFormatting = ((Fluent.Button)(target));
                return;

            case 38:
                this.buttonBold = ((Fluent.ToggleButton)(target));
                return;

            case 39:
                this.buttonItalic = ((Fluent.ToggleButton)(target));
                return;

            case 40:
                this.buttonUnderline = ((Fluent.DropDownButton)(target));
                return;

            case 41:
                this.buttonStrikethrough = ((Fluent.Button)(target));
                return;

            case 42:
                this.buttonSubscript = ((Fluent.Button)(target));
                return;

            case 43:
                this.buttonSuperscript = ((Fluent.Button)(target));
                return;

            case 44:
                this.buttonTextEffects = ((Fluent.DropDownButton)(target));
                return;

            case 45:
                this.buttonTextHighlightColor = ((Fluent.DropDownButton)(target));
                return;

            case 46:
                this.buttonFontColor = ((Fluent.DropDownButton)(target));
                return;

            case 47:
                this.Group = ((Fluent.RibbonGroupBox)(target));
                return;

            case 48:
                this.spinner = ((Fluent.Spinner)(target));
                return;

            case 49:
                this.buttonGreen = ((Fluent.Button)(target));
                return;

            case 50:
                this.buttonGray = ((Fluent.Button)(target));
                return;

            case 51:
                this.buttonYellow = ((Fluent.Button)(target));
                return;

            case 52:
                this.buttonBrown = ((Fluent.Button)(target));
                return;

            case 53:
                this.B = ((Fluent.RibbonGroupBox)(target));

            #line 889 "TestContent.xaml"
                this.B.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 54:
                this.groupLL = ((Fluent.RibbonGroupBox)(target));
                return;

            case 55:

            #line 951 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.HandleAddItemToFontsClick);

            #line default
            #line hidden
                return;

            case 56:
                this.InRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 57:

            #line 1383 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnEnlargeClick);

            #line default
            #line hidden
                return;

            case 58:

            #line 1388 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnReduceClick);

            #line default
            #line hidden
                return;

            case 59:
                this.UndoButton = ((Fluent.SplitButton)(target));
                return;

            case 60:
                this.ShowDetailButton = ((Fluent.ToggleButton)(target));
                return;

            case 61:
                this.ShowMoreButton = ((Fluent.ToggleButton)(target));
                return;

            case 62:
                this.FirstGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 63:
                this.dropDownGreen = ((Fluent.DropDownButton)(target));
                return;

            case 64:
                this.SecondGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 65:
                this.gallerySampleInRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 66:
                this.galleryFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 67:
                this.A = ((Fluent.RibbonGroupBox)(target));

            #line 1798 "TestContent.xaml"
                this.A.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 68:
                this.GalleryFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 69:

            #line 1850 "TestContent.xaml"
                ((Fluent.SplitButton)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSplitClick);

            #line default
            #line hidden
                return;

            case 70:
                this.Default = ((Fluent.RibbonGroupBox)(target));
                return;

            case 71:
                this.Large = ((Fluent.RibbonGroupBox)(target));
                return;

            case 72:
                this.Other = ((Fluent.RibbonGroupBox)(target));
                return;

            case 73:
                this.ZC = ((Fluent.RibbonGroupBox)(target));
                return;

            case 74:
                this.xxx = ((Fluent.RibbonGroupBox)(target));

            #line 2317 "TestContent.xaml"
                this.xxx.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 75:
                this.zoomSlider = ((System.Windows.Controls.Slider)(target));

            #line 2628 "TestContent.xaml"
                this.zoomSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.ZoomSlider_OnValueChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.toolsGroup = ((Fluent.RibbonContextualTabGroup)(target));
     return;
     case 2:
     this.buttonLoad = ((Fluent.Button)(target));
     
     #line 20 "..\..\..\MainWindow.xaml"
     this.buttonLoad.Click += new System.Windows.RoutedEventHandler(this.bookLoadButton_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.buttonSetting = ((Fluent.Button)(target));
     
     #line 22 "..\..\..\MainWindow.xaml"
     this.buttonSetting.Click += new System.Windows.RoutedEventHandler(this.buttonSetting_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.explorerLoad = ((Fluent.Button)(target));
     
     #line 23 "..\..\..\MainWindow.xaml"
     this.explorerLoad.Click += new System.Windows.RoutedEventHandler(this.explorerLoad_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.AddNewInstBtn_ = ((Fluent.Button)(target));
     
     #line 24 "..\..\..\MainWindow.xaml"
     this.AddNewInstBtn_.Click += new System.Windows.RoutedEventHandler(this.AddNewInstBtn__Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.BatchControlBtn_ = ((Fluent.Button)(target));
     
     #line 25 "..\..\..\MainWindow.xaml"
     this.BatchControlBtn_.Click += new System.Windows.RoutedEventHandler(this.BatchControlBtn_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.MROPositionLoadBtn_ = ((Fluent.Button)(target));
     
     #line 26 "..\..\..\MainWindow.xaml"
     this.MROPositionLoadBtn_.Click += new System.Windows.RoutedEventHandler(this.MROPositionLoadBtn_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.DeltaHedgeMonitorBtn_ = ((Fluent.Button)(target));
     
     #line 27 "..\..\..\MainWindow.xaml"
     this.DeltaHedgeMonitorBtn_.Click += new System.Windows.RoutedEventHandler(this.DeltaHedgeMonitorBtn_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.ResualtDocking = ((AvalonDock.DockingManager)(target));
     return;
     case 10:
     this.DocumentPaneGroup_ = ((AvalonDock.Layout.LayoutDocumentPaneGroup)(target));
     return;
     case 11:
     this.DocumentPane_ = ((AvalonDock.Layout.LayoutDocumentPane)(target));
     return;
     case 12:
     this.StartDocument_ = ((AvalonDock.Layout.LayoutDocument)(target));
     return;
     case 13:
     this.ouputPane_ = ((AvalonDock.Layout.LayoutDocumentPane)(target));
     return;
     case 14:
     this.ExplorerPaneGroup = ((AvalonDock.Layout.LayoutAnchorablePaneGroup)(target));
     return;
     case 15:
     this.ExplorerPortfolio_ = ((AvalonDock.Layout.LayoutAnchorablePane)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 29
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((WpfQuery.MainWindow)(target));

            #line 13 "..\..\MainWindow.xaml"
                this.window.Closed += new System.EventHandler(this.window_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 3:

            #line 31 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnExitSystem);

            #line default
            #line hidden
                return;

            case 4:
                this.btnLogin = ((Fluent.Button)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.btnLogin.Click += new System.Windows.RoutedEventHandler(this.Login);

            #line default
            #line hidden
                return;

            case 5:

            #line 41 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Setting);

            #line default
            #line hidden
                return;

            case 6:

            #line 42 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.About);

            #line default
            #line hidden
                return;

            case 7:
                this.btnSkin = ((Fluent.Button)(target));

            #line 45 "..\..\MainWindow.xaml"
                this.btnSkin.Click += new System.Windows.RoutedEventHandler(this.SkinClick);

            #line default
            #line hidden
                return;

            case 8:

            #line 46 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnExitSystem);

            #line default
            #line hidden
                return;

            case 9:

            #line 53 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.IncludeQuery);

            #line default
            #line hidden
                return;

            case 10:

            #line 54 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.RankQuery);

            #line default
            #line hidden
                return;

            case 11:

            #line 55 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.TitleQuery);

            #line default
            #line hidden
                return;

            case 12:

            #line 56 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.RankStat);

            #line default
            #line hidden
                return;

            case 13:

            #line 59 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.PlatformQuery);

            #line default
            #line hidden
                return;

            case 14:

            #line 60 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ConditionQuery);

            #line default
            #line hidden
                return;

            case 15:

            #line 61 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.KeyCover);

            #line default
            #line hidden
                return;

            case 16:

            #line 64 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BasicInfo);

            #line default
            #line hidden
                return;

            case 17:

            #line 65 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.LogParser);

            #line default
            #line hidden
                return;

            case 18:

            #line 68 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.KeyDig);

            #line default
            #line hidden
                return;

            case 19:

            #line 69 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SentenceSplit);

            #line default
            #line hidden
                return;

            case 20:

            #line 70 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Post);

            #line default
            #line hidden
                return;

            case 21:

            #line 71 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Gather);

            #line default
            #line hidden
                return;

            case 22:

            #line 72 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DownloadWeb);

            #line default
            #line hidden
                return;

            case 23:

            #line 73 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Downword);

            #line default
            #line hidden
                return;

            case 24:

            #line 74 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.RelatedSearch);

            #line default
            #line hidden
                return;

            case 25:

            #line 80 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BaiduIndex);

            #line default
            #line hidden
                return;

            case 26:

            #line 81 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.KeywordAnalyze);

            #line default
            #line hidden
                return;

            case 27:

            #line 87 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.IISConfig);

            #line default
            #line hidden
                return;

            case 28:

            #line 88 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Ping);

            #line default
            #line hidden
                return;

            case 29:

            #line 94 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BaiduAccount);

            #line default
            #line hidden
                return;

            case 30:

            #line 97 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BDKeywordRecommend);

            #line default
            #line hidden
                return;

            case 31:

            #line 98 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CreativeCollection);

            #line default
            #line hidden
                return;

            case 32:

            #line 101 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BDWMInterest);

            #line default
            #line hidden
                return;

            case 33:

            #line 104 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SogouAccount);

            #line default
            #line hidden
                return;

            case 34:

            #line 105 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SogouKRService);

            #line default
            #line hidden
                return;

            case 35:
                this.dockManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target));
                return;

            case 36:
                this.defaultBrowser = ((System.Windows.Controls.WebBrowser)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 30
0
        override public void GenerateUI(CompositeRemoteCommand command)
        {
            try
            {
                Argument.IsNotNull(() => command.UIData);
                string uiType = command.UIType;
                if (string.IsNullOrEmpty(command.UIType))
                {
                    uiType = typeof(RibbonButtonUIData).Name;
                    _log.Warning("Command Type is not valid, but generate UI for Command:" + command.ID + "using command type RibbonButtonUIData");
                }

                if (typeof(RibbonButtonUIData).Name.Equals(uiType))
                {
                    RibbonUIPositionRibbonTab ribbonTabData;
                    RibbonButtonUIData        ribbonUiData;
                    command.DeserializedUIData = ribbonUiData = RibbonButtonUIData.Deserialize(command.UIData);
                    ribbonTabData = ribbonUiData.UiPosition.RibbonTab;
                    var groupBox = GetUiPosition(command);
                    if (groupBox == null)
                    {
                        return;
                    }
                    var button = new Fluent.Button();
                    button.Name = command.ID;
                    if (!string.IsNullOrEmpty(ribbonUiData.ShortCutKeys))
                    {
                        button.SetValue(KeyTip.KeysProperty, ribbonUiData.ShortCutKeys);
                    }
                    if (!string.IsNullOrEmpty(ribbonUiData.LocalizedHeader))
                    {
                        button.BindToLoc(Fluent.Button.HeaderProperty, ribbonUiData.LocalizedHeader);
                    }
                    else
                    {
                        button.Header = command.ID;
                    }
                    if (string.IsNullOrEmpty(ribbonUiData.IconURI))
                    {
                        button.Icon = new BitmapImage(new Uri("pack://application:,,,/Metaseed.ShellBase;component/Resources/Images/No.png",
                                                              UriKind.RelativeOrAbsolute));
                        button.LargeIcon = new BitmapImage(new Uri("pack://application:,,,/Metaseed.ShellBase;component/Resources/Images/No.png",
                                                                   UriKind.RelativeOrAbsolute));
                    }
                    else
                    {
                        button.Icon      = GetBitmap(ribbonUiData.IconURI);
                        button.LargeIcon = GetBitmap(ribbonUiData.IconURI);
                    }

                    RibbonControlSize size;
                    button.SetValue(Fluent.Button.SizeProperty,
                                    RibbonControlSize.TryParse(ribbonUiData.Size, out size) ? size : RibbonControlSize.Large);

                    var toolTip = new Fluent.ScreenTip();
                    toolTip.BindToLoc(ScreenTip.TitleProperty, ribbonUiData.ScreenTip.LocalizedTitle);
                    toolTip.BindToLoc(ScreenTip.TextProperty, ribbonUiData.ScreenTip.LocalizedText);
                    toolTip.Image =
                        string.IsNullOrEmpty(ribbonUiData.ScreenTip.IconURI) ?
                        new BitmapImage(new Uri("pack://application:,,,/Metaseed.ShellBase;component/Resources/Images/No.png", UriKind.RelativeOrAbsolute)) :
                        GetBitmap(ribbonUiData.ScreenTip.IconURI);
                    //toolTip.HelpTopic = "FunctionBlock_CreatNewDoc";
                    toolTip.BindToLoc(ScreenTip.DisableReasonProperty, ribbonUiData.ScreenTip.LocalizedDisableReason);
                    button.ToolTip = toolTip;
                    groupBox.Items.Add(button);
                    var binding = new Binding()
                    {
                        Source = command
                    };
                    button.SetBinding(ButtonBase.CommandProperty, binding);
                }
            }
            catch (Exception e)
            {
                System.Windows.MessageBox.Show("Can not parse the command config data: " + e.Messages());
                return;
            }
        }
Esempio n. 31
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.OpenCommand = ((System.Windows.Input.CommandBinding)(target));
     
     #line 28 "..\..\..\MainWindow.xaml"
     this.OpenCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.OpenCommandCanExecute);
     
     #line default
     #line hidden
     
     #line 28 "..\..\..\MainWindow.xaml"
     this.OpenCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenCommandExecuted);
     
     #line default
     #line hidden
     return;
     case 2:
     this.NewCommand = ((System.Windows.Input.CommandBinding)(target));
     
     #line 29 "..\..\..\MainWindow.xaml"
     this.NewCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.NewCommandCanExecute);
     
     #line default
     #line hidden
     
     #line 29 "..\..\..\MainWindow.xaml"
     this.NewCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NewCommandExecuted);
     
     #line default
     #line hidden
     return;
     case 3:
     this.SaveCommand = ((System.Windows.Input.CommandBinding)(target));
     
     #line 30 "..\..\..\MainWindow.xaml"
     this.SaveCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.SaveCommandCanExecute);
     
     #line default
     #line hidden
     
     #line 30 "..\..\..\MainWindow.xaml"
     this.SaveCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveCommandExecuted);
     
     #line default
     #line hidden
     return;
     case 4:
     this.SaveAsCommand = ((System.Windows.Input.CommandBinding)(target));
     
     #line 31 "..\..\..\MainWindow.xaml"
     this.SaveAsCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.SaveAsCommandCanExecute);
     
     #line default
     #line hidden
     
     #line 31 "..\..\..\MainWindow.xaml"
     this.SaveAsCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveAsCommandExecuted);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 32 "..\..\..\MainWindow.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RecentObjectSelected);
     
     #line default
     #line hidden
     return;
     case 6:
     this.AddDivisionCommand = ((System.Windows.Input.CommandBinding)(target));
     
     #line 34 "..\..\..\MainWindow.xaml"
     this.AddDivisionCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.AddDivisionCommandCanExecute);
     
     #line default
     #line hidden
     
     #line 34 "..\..\..\MainWindow.xaml"
     this.AddDivisionCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.AddDivisionCommandExecuted);
     
     #line default
     #line hidden
     return;
     case 7:
     this.ApplicationRibbon = ((Fluent.Ribbon)(target));
     return;
     case 8:
     this.FileMenu = ((Fluent.Backstage)(target));
     return;
     case 9:
     this.MenuRecentItem = ((Fluent.BackstageTabItem)(target));
     return;
     case 10:
     this.MenuContextHeaderDivisible = ((Fluent.RibbonContextualTabGroup)(target));
     return;
     case 11:
     this.MenuContextFillable = ((Fluent.RibbonContextualTabGroup)(target));
     return;
     case 12:
     this.TabHome = ((Fluent.RibbonTabItem)(target));
     return;
     case 13:
     this.ButtonPaste = ((Fluent.SplitButton)(target));
     return;
     case 14:
     this.ButtonCut = ((Fluent.Button)(target));
     return;
     case 15:
     this.ButtonCopy = ((Fluent.Button)(target));
     return;
     case 16:
     this.TabDivision = ((Fluent.RibbonTabItem)(target));
     return;
     case 17:
     this.GroupDivision = ((Fluent.RibbonGroupBox)(target));
     return;
     case 18:
     this.ButtonNoDivision = ((Fluent.Button)(target));
     return;
     case 19:
     this.ButtonFess = ((Fluent.Button)(target));
     return;
     case 20:
     this.ButtonPale = ((Fluent.Button)(target));
     return;
     case 21:
     this.ButtonBend = ((Fluent.Button)(target));
     return;
     case 22:
     this.ButtonBendSinister = ((Fluent.Button)(target));
     return;
     case 23:
     this.GroupAdvancedDivision = ((Fluent.RibbonGroupBox)(target));
     return;
     case 24:
     this.ButtonSaltire = ((Fluent.Button)(target));
     return;
     case 25:
     this.ButtonPartyCross = ((Fluent.Button)(target));
     return;
     case 26:
     this.ButtonPall = ((Fluent.Button)(target));
     return;
     case 27:
     this.ButtonTiercedBend = ((Fluent.Button)(target));
     return;
     case 28:
     this.ButtonTiercedBendSinister = ((Fluent.Button)(target));
     return;
     case 29:
     this.ButtonTiercedPale = ((Fluent.Button)(target));
     return;
     case 30:
     this.ButtonTiercedFess = ((Fluent.Button)(target));
     return;
     case 31:
     this.TabOrdinaries = ((Fluent.RibbonTabItem)(target));
     return;
     case 32:
     this.GroupHonourableOrdinaries = ((Fluent.RibbonGroupBox)(target));
     return;
     case 33:
     this.GroupSubOrdinaries = ((Fluent.RibbonGroupBox)(target));
     return;
     case 34:
     this.TabTinctures = ((Fluent.RibbonTabItem)(target));
     return;
     case 35:
     this.GroupLabelBasicTinctures = ((Fluent.RibbonGroupBox)(target));
     return;
     case 36:
     this.ButtonOr = ((Fluent.Button)(target));
     return;
     case 37:
     this.ButtonArgent = ((Fluent.Button)(target));
     return;
     case 38:
     this.ButtonAzure = ((Fluent.Button)(target));
     return;
     case 39:
     this.ButtonVert = ((Fluent.Button)(target));
     return;
     case 40:
     this.ButtonGules = ((Fluent.Button)(target));
     return;
     case 41:
     this.ButtonSable = ((Fluent.Button)(target));
     return;
     case 42:
     this.GroupLabelModernTinctures = ((Fluent.RibbonGroupBox)(target));
     return;
     case 43:
     this.GroupLabelFurs = ((Fluent.RibbonGroupBox)(target));
     return;
     case 44:
     this.GroupLabelCustomTinctures = ((Fluent.RibbonGroupBox)(target));
     return;
     case 45:
     this.StatusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 46:
     this.MainFrame = ((GBlason.Control.Aggregate.CustomGUI)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 32
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((DoAn.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.importFromExcel = ((Fluent.Button)(target));

            #line 17 "..\..\MainWindow.xaml"
                this.importFromExcel.Click += new System.Windows.RoutedEventHandler(this.importFromExcel_click);

            #line default
            #line hidden
                return;

            case 3:
                this.importCSV = ((Fluent.Button)(target));
                return;

            case 4:
                this.addProduct = ((Fluent.Button)(target));
                return;

            case 5:
                this.deleteProduct = ((Fluent.Button)(target));
                return;

            case 6:
                this.editProduct = ((Fluent.Button)(target));
                return;

            case 7:
                this.categoriesComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 48 "..\..\MainWindow.xaml"
                this.categoriesComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.categoriesCombobox_change);

            #line default
            #line hidden
                return;

            case 8:
                this.searchProductTextBox = ((System.Windows.Controls.TextBox)(target));

            #line 57 "..\..\MainWindow.xaml"
                this.searchProductTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.searchProductTextBox_change);

            #line default
            #line hidden
                return;

            case 9:
                this.pagingComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 60 "..\..\MainWindow.xaml"
                this.pagingComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.pagingComboBox_change);

            #line default
            #line hidden
                return;

            case 10:
                this.productDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// When overridden in a derived class, is invoked 
        /// whenever application code or internal processes call ApplyTemplate
        /// </summary>
        public override void OnApplyTemplate()
        {
            if (button != null) button.Click -= OnButtonClick;
            button = GetTemplateChild("PART_Button") as Button;
            if(button!=null)
            {
                Binding binding = new Binding("Command");
                binding.Source = this;
                binding.Mode = BindingMode.OneTime;
                button.SetBinding(CommandProperty, binding);

                binding = new Binding("CommandTarget");
                binding.Source = this;
                binding.Mode = BindingMode.OneTime;
                button.SetBinding(CommandTargetProperty, binding);
                
                binding = new Binding("CommandParameter");
                binding.Source = this;
                binding.Mode = BindingMode.OneTime;
                button.SetBinding(CommandParameterProperty, binding);
                button.Click += OnButtonClick;
            }
        }
            /// <summary>
            /// Creates the ribbon menu bar for the html editor.
            /// </summary>
            /// <param name="ribbonMenu">Main ribbon menu.</param>
            public override void CreateRibbonMenuBar(Fluent.Ribbon ribbonMenu)
            {
                foreach (RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
                    if (t.Name == "tabGroupHtml")
                        return;

                // add contextual items for the html editor
                RibbonContextualTabGroup contextualTG = new RibbonContextualTabGroup();
                contextualTG.Name = "tabGroupHtml";
                contextualTG.BorderBrush = new SolidColorBrush(Colors.Orange);
                contextualTG.Background = new SolidColorBrush(Colors.OrangeRed);
                contextualTG.Header = "Html-Editor";

                Binding visibilityBinding = new Binding("ActiveViewModel.SelectedEditorViewModel.IsHtmlEditorViewModelVisible");
                visibilityBinding.Converter = new BooleanToVisibilityConverter();
                visibilityBinding.Mode = BindingMode.OneWay;
                contextualTG.SetBinding(RibbonContextualTabGroup.VisibilityProperty, visibilityBinding);

                // add the html editor tab item
                RibbonTabItem tab = new RibbonTabItem();
                tab.Group = contextualTG;
                tab.Header = "Design";

                // font group box
                RibbonGroupBox fontGP = new RibbonGroupBox();
                fontGP.Header = "Font";
                tab.Groups.Add(fontGP);

                #region Button Bold
                Fluent.ToggleButton btnBold = new Fluent.ToggleButton();
                btnBold.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnBold.SizeDefinition = "Large";
                btnBold.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-bold-32.png"));
                btnBold.Text = "Bold";

                Binding btnBoldCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleBoldCommand");
                btnBoldCmdn.Mode = BindingMode.OneWay;
                btnBold.SetBinding(Fluent.ToggleButton.CommandProperty, btnBoldCmdn);

                Binding btnBoldIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextBold");
                btnBoldIsChecked.Mode = BindingMode.TwoWay;
                btnBold.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnBoldIsChecked);

                fontGP.Items.Add(btnBold);
                #endregion

                #region Button Italic
                Fluent.ToggleButton btnItalic = new Fluent.ToggleButton();
                btnItalic.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnItalic.SizeDefinition = "Large";
                btnItalic.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-italic-32.png"));
                btnItalic.Text = "Italic";

                Binding btnItalicCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleItalicCommand");
                btnItalicCmdn.Mode = BindingMode.OneWay;
                btnItalic.SetBinding(Fluent.ToggleButton.CommandProperty, btnItalicCmdn);

                Binding btnItalicIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextItalic");
                btnItalicIsChecked.Mode = BindingMode.TwoWay;
                btnItalic.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnItalicIsChecked);

                fontGP.Items.Add(btnItalic);
                #endregion

                #region Button Underline
                Fluent.ToggleButton btnUnderline = new Fluent.ToggleButton();
                btnUnderline.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnUnderline.SizeDefinition = "Large";
                btnUnderline.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-underline-32.png"));
                btnUnderline.Text = "Underline";

                Binding btnUnderlineCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleUnderlineCommand");
                btnUnderlineCmdn.Mode = BindingMode.OneWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.CommandProperty, btnUnderlineCmdn);

                Binding btnUnderlineIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextUnderlined");
                btnUnderlineIsChecked.Mode = BindingMode.TwoWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnUnderlineIsChecked);

                fontGP.Items.Add(btnUnderline);
                #endregion

                // format group box
                RibbonGroupBox formatGP = new RibbonGroupBox();
                formatGP.Header = "Format";
                tab.Groups.Add(formatGP);

                #region Button Decrease Indent
                Fluent.Button btnDecIndent = new Fluent.Button();
                btnDecIndent.SizeDefinition = "Large";
                btnDecIndent.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-less-32.png"));
                btnDecIndent.Text = "Decrease Indent";

                Binding btnDecIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentLessCommand");
                btnDecIndentCmdn.Mode = BindingMode.OneWay;
                btnDecIndent.SetBinding(Fluent.Button.CommandProperty, btnDecIndentCmdn);

                formatGP.Items.Add(btnDecIndent);
                #endregion

                #region Button Increase Indent
                Fluent.Button btnIncIndent = new Fluent.Button();
                btnIncIndent.SizeDefinition = "Large";
                btnIncIndent.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-more-32.png"));
                btnIncIndent.Text = "Increase Indent";

                Binding btnIncIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentMoreCommand");
                btnIncIndentCmdn.Mode = BindingMode.OneWay;
                btnIncIndent.SetBinding(Fluent.Button.CommandProperty, btnIncIndentCmdn);

                formatGP.Items.Add(btnIncIndent);
                #endregion

                // alignment group box
                RibbonGroupBox alignGP = new RibbonGroupBox();
                alignGP.Header = "Alignment";
                tab.Groups.Add(alignGP);

                #region Button Align Left
                Fluent.ToggleButton btnLeft = new Fluent.ToggleButton();
                btnLeft.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnLeft.SizeDefinition = "Large";
                btnLeft.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-left-32.png"));
                btnLeft.Text = "Left";

                Binding btnLeftCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignLeftCommand");
                btnLeftCmdn.Mode = BindingMode.OneWay;
                btnLeft.SetBinding(Fluent.ToggleButton.CommandProperty, btnLeftCmdn);

                Binding btnLeftIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedLeft");
                btnLeftIsChecked.Mode = BindingMode.TwoWay;
                btnLeft.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnLeftIsChecked);

                alignGP.Items.Add(btnLeft);
                #endregion

                #region Button Align Center
                Fluent.ToggleButton btnCenter = new Fluent.ToggleButton();
                btnCenter.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnCenter.SizeDefinition = "Large";
                btnCenter.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-center-32.png"));
                btnCenter.Text = "Center";

                Binding btnCenterCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignCenterCommand");
                btnCenterCmdn.Mode = BindingMode.OneWay;
                btnCenter.SetBinding(Fluent.ToggleButton.CommandProperty, btnCenterCmdn);

                Binding btnCenterIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedCenter");
                btnCenterIsChecked.Mode = BindingMode.TwoWay;
                btnCenter.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnCenterIsChecked);

                alignGP.Items.Add(btnCenter);
                #endregion

                #region Button Align Right
                Fluent.ToggleButton btnRight = new Fluent.ToggleButton();
                btnRight.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnRight.SizeDefinition = "Large";
                btnRight.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-right-32.png"));
                btnRight.Text = "Right";

                Binding btnRightCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignRightCommand");
                btnRightCmdn.Mode = BindingMode.OneWay;
                btnRight.SetBinding(Fluent.ToggleButton.CommandProperty, btnRightCmdn);

                Binding btnRightIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedRight");
                btnRightIsChecked.Mode = BindingMode.TwoWay;
                btnRight.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnRightIsChecked);

                alignGP.Items.Add(btnRight);
                #endregion

                #region Button Align Justify
                Fluent.ToggleButton btnJustify = new Fluent.ToggleButton();
                btnJustify.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnJustify.SizeDefinition = "Large";
                btnJustify.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-fill-32.png"));
                btnJustify.Text = "Justify";

                Binding btnJustifyCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignJustifyCommand");
                btnJustifyCmdn.Mode = BindingMode.OneWay;
                btnJustify.SetBinding(Fluent.ToggleButton.CommandProperty, btnJustifyCmdn);

                Binding btnJustifyIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedJustified");
                btnJustifyIsChecked.Mode = BindingMode.TwoWay;
                btnJustify.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnJustifyIsChecked);

                alignGP.Items.Add(btnJustify);
                #endregion

                // insert group box
                RibbonGroupBox insertGP = new RibbonGroupBox();
                insertGP.Header = "Insert";
                tab.Groups.Add(insertGP);

                #region Button Hyperlink
                Fluent.Button btnHyperlink = new Fluent.Button();
                btnHyperlink.SizeDefinition = "Large";
                btnHyperlink.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/Hyperlink.ico"));
                btnHyperlink.Text = "Hyperlink";

                Binding btnHyperlinkCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertHyperlinkCommand");
                btnHyperlinkCmdn.Mode = BindingMode.OneWay;
                btnHyperlink.SetBinding(Fluent.Button.CommandProperty, btnHyperlinkCmdn);

                insertGP.Items.Add(btnHyperlink);
                #endregion

                #region Button Image
                Fluent.Button btnImage = new Fluent.Button();
                btnImage.SizeDefinition = "Large";
                btnImage.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/insert-image-32.png"));
                btnImage.Text = "Image";

                Binding btnImageCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertImageCommand");
                btnImageCmdn.Mode = BindingMode.OneWay;
                btnImage.SetBinding(Fluent.Button.CommandProperty, btnImageCmdn);

                insertGP.Items.Add(btnImage);
                #endregion

                #region Button List
                Fluent.SplitButton btnList = new SplitButton();
                btnList.SizeDefinition = "Large";
                btnList.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/list-32.png"));
                btnList.Text = "List";
                insertGP.Items.Add(btnList);

                Fluent.Button btnBulletedList = new Fluent.Button();
                btnBulletedList.SizeDefinition = "Middle";
                btnBulletedList.Icon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_BulletsHS.png"));
                btnBulletedList.Text = "Bulleted List";

                Binding btnBulletedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertBulletListCommand");
                btnBulletedListCmdn.Mode = BindingMode.OneWay;
                btnBulletedList.SetBinding(Fluent.Button.CommandProperty, btnBulletedListCmdn);

                btnList.Items.Add(btnBulletedList);

                Fluent.Button btnNumberedList = new Fluent.Button();
                btnNumberedList.SizeDefinition = "Middle";
                btnNumberedList.Icon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_NumberedHS.png"));
                btnNumberedList.Text = "Numbered List";

                Binding btnNumberedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertNumberListCommand");
                btnNumberedListCmdn.Mode = BindingMode.OneWay;
                btnNumberedList.SetBinding(Fluent.Button.CommandProperty, btnNumberedListCmdn);

                btnList.Items.Add(btnNumberedList);
                #endregion

                #region Button Table
                Fluent.Button btnTable = new Fluent.Button();
                btnTable.SizeDefinition = "Large";
                btnTable.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/table-32.png"));
                btnTable.Text = "Table";

                Binding btnTableCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertTableCommand");
                btnTableCmdn.Mode = BindingMode.OneWay;
                btnTable.SetBinding(Fluent.Button.CommandProperty, btnTableCmdn);

                insertGP.Items.Add(btnTable);
                #endregion

                ribbonMenu.ContextualGroups.Add(contextualTG);
                ribbonMenu.Tabs.Add(tab);

                /*
                <fluent:RibbonGroupBox Header="Font">
                        <fluent:ToggleButton Text="Bold" Command="{Binding Path=HtmlToggleBoldCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-bold-32.png" IsChecked="{Binding Path=IsSelectionTextBold, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Italic" Command="{Binding Path=HtmlToggleItalicCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-italic-32.png" IsChecked="{Binding Path=IsSelectionTextItalic, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Underline" Command="{Binding Path=HtmlToggleUnderlineCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-underline-32.png" IsChecked="{Binding Path=IsSelectionTextUnderlined, Mode=TwoWay}" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Format">
                        <fluent:Button Text="Decrease Indent" Command="{Binding Path=HtmlIndentLessCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-less-32.png"  SizeDefinition="Large"/>
                        <fluent:Button Text="Increase Indent" Command="{Binding Path=HtmlIndentMoreCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-more-32.png" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Font">
                        <fluent:ToggleButton Text="Left" Command="{Binding Path=HtmlAlignLeftCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-left-32.png" IsChecked="{Binding Path=IsSelectionAlignedLeft, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Center" Command="{Binding Path=HtmlAlignCenterCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-center-32.png" IsChecked="{Binding Path=IsSelectionAlignedCenter, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Right" Command="{Binding Path=HtmlAlignRightCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-right-32.png" IsChecked="{Binding Path=IsSelectionAlignedRight, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Justify" Command="{Binding Path=HtmlAlignJustifyCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-fill-32.png" IsChecked="{Binding Path=IsSelectionAlignedJustified, Mode=TwoWay}" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Insert">
                        <fluent:Button Text="Hyperlink" Command="{Binding Path=HtmlInsertHyperlinkCommand}" LargeIcon="/Resources/Images/Ico/Hyperlink.ico"  SizeDefinition="Large"/>
                        <fluent:Button Text="Image" Command="{Binding Path=HtmlInsertImageCommand}" LargeIcon="/Resources/Images/HtmlEditor/insert-image-32.png" SizeDefinition="Large"/>
                        <fluent:SplitButton Text="List" LargeIcon="/Resources/Images/HtmlEditor/list-32.png" SizeDefinition="Large">
                            <fluent:Button Text="Bulleted List" Command="{Binding Path=HtmlInsertBulletListCommand}" Icon="/Resources/Images/HtmlEditor/List_BulletsHS.png" SizeDefinition="Middle"/>
                            <fluent:Button Text="Numbered List" Command="{Binding Path=HtmlInsertNumberListCommand}" Icon="/Resources/Images/HtmlEditor/List_NumberedHS.png" SizeDefinition="Middle"/>
                        </fluent:SplitButton>
                        <fluent:Button Text="Table" Command="{Binding Path=HtmlInsertTableCommand}" LargeIcon="/Resources/Images/HtmlEditor/table-32.png" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>
                */
            }
Esempio n. 35
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\MainWindow.xaml"
                ((QLBanSach.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 3:
                this.btnAdd = ((Fluent.Button)(target));
                return;

            case 4:
                this.btnEdit = ((Fluent.Button)(target));
                return;

            case 5:
                this.btnDelete = ((Fluent.Button)(target));
                return;

            case 6:
                this.btnAddp = ((Fluent.Button)(target));
                return;

            case 7:
                this.btnEditp = ((Fluent.Button)(target));
                return;

            case 8:
                this.btnDeletep = ((Fluent.Button)(target));
                return;

            case 9:
                this.btnAddt = ((Fluent.Button)(target));
                return;

            case 10:
                this.btnEditt = ((Fluent.Button)(target));
                return;

            case 11:
                this.btnDeletet = ((Fluent.Button)(target));
                return;

            case 12:
                this.btnStatistics = ((Fluent.Button)(target));

            #line 48 "..\..\MainWindow.xaml"
                this.btnStatistics.Click += new System.Windows.RoutedEventHandler(this.btnStatistics_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.tabs = ((System.Windows.Controls.TabControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 36
0
 /// <summary>
 /// Gets control which represents shortcut item.
 /// This item MUST be syncronized with the original 
 /// and send command to original one control.
 /// </summary>
 /// <returns>Control which represents shortcut item</returns>
 public override FrameworkElement CreateQuickAccessItem()
 {
     Button button = new Button();
     BindQuickAccessItem(button);
     return button;
 }
Esempio n. 37
0
    void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
    {
        switch (connectionId)
        {
        case 1:
            this.OptionsDialog = ((OptionsDialog)(target));
            return;

        case 2:
            this.CancelButton = ((Fluent.Button)(target));
            return;

        case 3:
            this.OKButton = ((Fluent.Button)(target));
            return;

        case 4:
            this.ResetButton = ((Fluent.Button)(target));
            return;

        case 5:
            this.TabCell = ((System.Windows.Controls.TabControl)(target));
            return;

        case 6:
            this.GeneralTabItem = ((System.Windows.Controls.TabItem)(target));
            return;

        case 7:
            this.StartupGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 8:
            this.StartUpComboBox = ((Fluent.ComboBox)(target));
            return;

        case 9:
            this.ShowStartupDialogCheckBox = ((Fluent.CheckBox)(target));
            return;

        case 10:
            this.ThemeGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 11:
            this.ThemeComboBox = ((Fluent.ComboBox)(target));
            return;

        case 12:
            this.EnableGlassCheckBox = ((Fluent.CheckBox)(target));
            return;

        case 13:
            this.TextToSpeechGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 14:
            this.TTSComboBox = ((Fluent.ComboBox)(target));
            return;

        case 15:
            this.TTSSlider = ((Fluent.Spinner)(target));
            return;

        case 16:
            this.RecentDocumentsGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 17:
            this.ClearRecentButton = ((Fluent.Button)(target));
            return;

        case 18:
            this.RecentDocumentsCheckBox = ((Fluent.CheckBox)(target));
            return;

        case 19:
            this.RulerMeasurementComboBox = ((Fluent.ComboBox)(target));
            return;

        case 20:
            this.GroupBox3 = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 21:
            this.Label3 = ((System.Windows.Controls.Label)(target));
            return;

        case 22:
            this.ComboBox1 = ((System.Windows.Controls.ComboBox)(target));
            return;

        case 23:
            this.CloseButtonGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 24:
            this.CloseButtonComboBox = ((Fluent.ComboBox)(target));
            return;

        case 25:
            this.SpellCheckGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 26:
            this.SpellCheckBox = ((Fluent.CheckBox)(target));
            return;

        case 27:
            this.DefaultFontGroupBox = ((System.Windows.Controls.GroupBox)(target));
            return;

        case 28:
            this.FontFaceComboBox = ((Fluent.ComboBox)(target));
            return;

        case 29:
            this.FontSizeTextBox = ((Fluent.Spinner)(target));
            return;

        case 30:
            this.TabPlacementComboBox = ((Fluent.ComboBox)(target));
            return;

        case 31:
            this.TemplatesListBox = ((System.Windows.Controls.ListBox)(target));
            return;

        case 32:
            this.AddTemplateButton = ((Fluent.Button)(target));
            return;

        case 33:
            this.RemoveTemplateButton = ((Fluent.Button)(target));
            return;

        case 34:
            this.TemplatesFolderButton = ((Fluent.Button)(target));
            return;

        case 35:
            this.PluginsListBox = ((System.Windows.Controls.ListBox)(target));
            return;

        case 36:
            this.PluginAddButton = ((Fluent.Button)(target));
            return;

        case 37:
            this.PluginRemoveButton = ((Fluent.Button)(target));
            return;

        case 38:
            this.PluginsCheckBox = ((Fluent.CheckBox)(target));
            return;

        case 39:
            this.PluginsFolderButton = ((Fluent.Button)(target));
            return;

        case 40:
            this.Label6 = ((System.Windows.Controls.Label)(target));
            return;
        }
        this._contentLoaded = true;
    }
Esempio n. 38
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Ribbon_control = ((Fluent.Ribbon)(target));

            #line 17 "..\..\..\MainWindow.xaml"
                this.Ribbon_control.IsMinimizedChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.Ribbon_control_IsMinimizedChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.backstage = ((Fluent.Backstage)(target));
                return;

            case 3:
                this.bsi_help = ((Fluent.BackstageTabItem)(target));
                return;

            case 4:
                this.grid_help = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.bsi_settings = ((Fluent.BackstageTabItem)(target));
                return;

            case 6:
                this.grid_settings = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.bsi_close = ((Fluent.BackstageTabItem)(target));

            #line 34 "..\..\..\MainWindow.xaml"
                this.bsi_close.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.bsi_close_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 8:
                this.bt_search = ((Fluent.Button)(target));

            #line 47 "..\..\..\MainWindow.xaml"
                this.bt_search.Click += new System.Windows.RoutedEventHandler(this.bt_geraetSuchen);

            #line default
            #line hidden
                return;

            case 9:
                this.bt_geraetEdit = ((Fluent.Button)(target));

            #line 50 "..\..\..\MainWindow.xaml"
                this.bt_geraetEdit.Click += new System.Windows.RoutedEventHandler(this.bt_geraetBearbeiten);

            #line default
            #line hidden
                return;

            case 10:
                this.bt_abfrage = ((Fluent.Button)(target));

            #line 53 "..\..\..\MainWindow.xaml"
                this.bt_abfrage.Click += new System.Windows.RoutedEventHandler(this.bt_abfrageStarten);

            #line default
            #line hidden
                return;

            case 11:
                this.tbl_info = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.logo = ((System.Windows.Controls.Image)(target));
                return;

            case 13:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 14:
                this.grid_additionalThings = ((System.Windows.Controls.Grid)(target));
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.buttonGreen = ((Fluent.Button)(target));
     return;
     case 2:
     this.buttonGray = ((Fluent.Button)(target));
     return;
     case 3:
     this.buttonCopy = ((Fluent.Button)(target));
     return;
     case 4:
     this.buttonPaste = ((Fluent.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnAperturaCaja = ((Fluent.Button)(target));
     return;
     case 2:
     this.btnArqueoCaja = ((Fluent.Button)(target));
     return;
     case 3:
     this.btnCierreCaja = ((Fluent.Button)(target));
     return;
     case 4:
     this.btnEntradaDinero = ((Fluent.Button)(target));
     return;
     case 5:
     this.btnClientes = ((Fluent.Button)(target));
     return;
     case 6:
     this.btnAbonoFactura = ((Fluent.Button)(target));
     return;
     case 7:
     this.btnApartados = ((Fluent.Button)(target));
     return;
     case 8:
     this.btnCotizacion = ((Fluent.Button)(target));
     return;
     case 9:
     this.btnFacturacion = ((Fluent.Button)(target));
     return;
     case 10:
     this.btnNotaCreditoF = ((Fluent.Button)(target));
     return;
     case 11:
     this.btnNotaDebitoF = ((Fluent.Button)(target));
     return;
     case 12:
     this.btnAjusteInventario = ((Fluent.Button)(target));
     return;
     case 13:
     this.btnBodegas = ((Fluent.Button)(target));
     return;
     case 14:
     this.btninventario = ((Fluent.Button)(target));
     return;
     case 15:
     this.btnfamilias = ((Fluent.Button)(target));
     return;
     case 16:
     this.btnMarcas = ((Fluent.Button)(target));
     return;
     case 17:
     this.btnPresentaciones = ((Fluent.Button)(target));
     return;
     case 18:
     this.btnTraslados = ((Fluent.Button)(target));
     return;
     case 19:
     this.btnTomaFisica = ((Fluent.Button)(target));
     return;
     case 20:
     this.btnUbicaciones = ((Fluent.Button)(target));
     return;
     case 21:
     this.btnProveedores = ((Fluent.Button)(target));
     return;
     case 22:
     this.btnCompras = ((Fluent.Button)(target));
     return;
     case 23:
     this.btnOrdenCompraM = ((Fluent.Button)(target));
     return;
     case 24:
     this.btnNotaCreditoC = ((Fluent.Button)(target));
     return;
     case 25:
     this.btnNotaDebitoC = ((Fluent.Button)(target));
     return;
     case 26:
     this.btnAbonoCuenta = ((Fluent.Button)(target));
     return;
     case 27:
     this.btnSalidaDinero = ((Fluent.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 41
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnUsuarios = ((Fluent.Button)(target));
     
     #line 17 "..\..\..\..\Principal\MainWindow.xaml"
     this.btnUsuarios.Click += new System.Windows.RoutedEventHandler(this.btnUsuarios_Click_1);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnUsuaris = ((Fluent.Button)(target));
     
     #line 19 "..\..\..\..\Principal\MainWindow.xaml"
     this.btnUsuaris.Click += new System.Windows.RoutedEventHandler(this.btnUsuarios_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btnAperturaCaja = ((Fluent.Button)(target));
     return;
     case 4:
     this.btnArqueoCaja = ((Fluent.Button)(target));
     return;
     case 5:
     this.btnCierreCaja = ((Fluent.Button)(target));
     return;
     case 6:
     this.btnEntradaDinero = ((Fluent.Button)(target));
     return;
     case 7:
     this.btnClientes = ((Fluent.Button)(target));
     return;
     case 8:
     this.btnAbonoFactura = ((Fluent.Button)(target));
     return;
     case 9:
     this.btnApartados = ((Fluent.Button)(target));
     return;
     case 10:
     this.btnCotizacion = ((Fluent.Button)(target));
     return;
     case 11:
     this.btnFacturacion = ((Fluent.Button)(target));
     return;
     case 12:
     this.btnNotaCreditoF = ((Fluent.Button)(target));
     return;
     case 13:
     this.btnNotaDebitoF = ((Fluent.Button)(target));
     return;
     case 14:
     this.btnAjusteInventario = ((Fluent.Button)(target));
     return;
     case 15:
     this.btnBodegas = ((Fluent.Button)(target));
     return;
     case 16:
     this.btninventario = ((Fluent.Button)(target));
     return;
     case 17:
     this.btnfamilias = ((Fluent.Button)(target));
     return;
     case 18:
     this.btnMarcas = ((Fluent.Button)(target));
     return;
     case 19:
     this.btnPresentaciones = ((Fluent.Button)(target));
     return;
     case 20:
     this.btnTraslados = ((Fluent.Button)(target));
     return;
     case 21:
     this.btnTomaFisica = ((Fluent.Button)(target));
     return;
     case 22:
     this.btnUbicaciones = ((Fluent.Button)(target));
     return;
     case 23:
     this.btnProveedores = ((Fluent.Button)(target));
     return;
     case 24:
     this.btnCompras = ((Fluent.Button)(target));
     return;
     case 25:
     this.btnOrdenCompraM = ((Fluent.Button)(target));
     return;
     case 26:
     this.btnNotaCreditoC = ((Fluent.Button)(target));
     return;
     case 27:
     this.btnNotaDebitoC = ((Fluent.Button)(target));
     return;
     case 28:
     this.btnAbonoCuenta = ((Fluent.Button)(target));
     return;
     case 29:
     this.btnSalidaDinero = ((Fluent.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 42
0
        public Button CreateRibbonButton()
        {
            var fooCommand1 = new TestRoutedCommand();

            var button = new Button
            {
                Command = fooCommand1.ItemCommand,
                Header = "Foo",
                Icon = new BitmapImage(new Uri(@"Images\Green.png", UriKind.Relative)),
                LargeIcon = new BitmapImage(new Uri(@"Images\GreenLarge.png", UriKind.Relative)),
            };

            this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
            return button;
        }
Esempio n. 43
0
 /// <summary>
 /// Gets control which represents shortcut item.
 /// This item MUST be synchronized with the original 
 /// and send command to original one control.
 /// </summary>
 /// <returns>Control which represents shortcut item</returns>
 public virtual FrameworkElement CreateQuickAccessItem()
 {
     Button button = new Button();
     button.Click += ((sender, e) => RaiseEvent(e));
     RibbonControl.BindQuickAccessItem(this, button);
     return button;
 }
Esempio n. 44
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.groupL = ((Fluent.RibbonGroupBox)(target));
                return;

            case 2:
                this.select = ((Fluent.Button)(target));

            #line 52 "..\..\MainWindow.xaml"
                this.select.Click += new System.Windows.RoutedEventHandler(this.SelectButton_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.cobFF = ((Fluent.ComboBox)(target));
                return;

            case 4:
                this.cobFS = ((Fluent.ComboBox)(target));
                return;

            case 5:
                this.cobFC = ((Fluent.ComboBox)(target));
                return;

            case 6:
                this.colorGallery = ((Fluent.ColorGallery)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.colorGallery.SelectedColorChanged += new System.Windows.RoutedEventHandler(this.ColorGallery_SelectedColorChanged);

            #line default
            #line hidden
                return;

            case 7:

            #line 92 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.EraserButton_Click);

            #line default
            #line hidden
                return;

            case 8:

            #line 93 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ArrowButton_Click);

            #line default
            #line hidden
                return;

            case 9:

            #line 94 "..\..\MainWindow.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.PenButton_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.Tools = ((Fluent.RibbonGroupBox)(target));
                return;

            case 11:
                this.toolsGallery = ((Fluent.InRibbonGallery)(target));

            #line 123 "..\..\MainWindow.xaml"
                this.toolsGallery.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.InRibbonGallery_SelectionChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.gro = ((Fluent.RibbonGroupBox)(target));
                return;

            case 13:
                this.IsCheckBox14 = ((Fluent.CheckBox)(target));
                return;

            case 14:
                this.IsCheckBox15 = ((Fluent.CheckBox)(target));
                return;

            case 15:
                this.IsCheckBox16 = ((Fluent.CheckBox)(target));
                return;

            case 16:
                this.canvas = ((System.Windows.Controls.InkCanvas)(target));

            #line 174 "..\..\MainWindow.xaml"
                this.canvas.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.ink_MouseWheel);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 12 "..\..\MenuPrincipal.xaml"
     ((capaVista.MenuPrincipal)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MetroWindow_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.MDI = ((System.Windows.VisualStateGroup)(target));
     return;
     case 3:
     this.Defecto = ((System.Windows.VisualState)(target));
     return;
     case 4:
     this.Nuevo = ((System.Windows.VisualState)(target));
     return;
     case 5:
     this.Ubicaciones = ((System.Windows.VisualState)(target));
     return;
     case 6:
     this.VisualState = ((System.Windows.VisualState)(target));
     return;
     case 7:
     this.btNuevoCliente = ((Fluent.Button)(target));
     return;
     case 8:
     this.btUbicaciones = ((Fluent.Button)(target));
     return;
     case 9:
     this.but = ((Fluent.Button)(target));
     return;
     case 10:
     this.but2 = ((Fluent.Button)(target));
     return;
     case 11:
     this.tabItem = ((System.Windows.Controls.TabItem)(target));
     return;
     case 12:
     this.asApellidoTextBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 13:
     this.asCedulaTextBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 14:
     this.asNombreTextBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.fkUbicacionIDTextBox = ((System.Windows.Controls.TextBox)(target));
     
     #line 84 "..\..\MenuPrincipal.xaml"
     this.fkUbicacionIDTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.fkUbicacionIDTextBox_TextChanged);
     
     #line default
     #line hidden
     return;
     case 16:
     this.btSave = ((System.Windows.Controls.Button)(target));
     
     #line 85 "..\..\MenuPrincipal.xaml"
     this.btSave.Click += new System.Windows.RoutedEventHandler(this.btSave_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.btNext = ((System.Windows.Controls.Button)(target));
     
     #line 88 "..\..\MenuPrincipal.xaml"
     this.btNext.Click += new System.Windows.RoutedEventHandler(this.btNext_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.btPrevious = ((System.Windows.Controls.Button)(target));
     
     #line 91 "..\..\MenuPrincipal.xaml"
     this.btPrevious.Click += new System.Windows.RoutedEventHandler(this.btPrevious_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.btUpdate = ((System.Windows.Controls.Button)(target));
     
     #line 94 "..\..\MenuPrincipal.xaml"
     this.btUpdate.Click += new System.Windows.RoutedEventHandler(this.btUpdate_Click);
     
     #line default
     #line hidden
     return;
     case 20:
     this.btNew = ((System.Windows.Controls.Button)(target));
     
     #line 97 "..\..\MenuPrincipal.xaml"
     this.btNew.Click += new System.Windows.RoutedEventHandler(this.btNew_Click);
     
     #line default
     #line hidden
     return;
     case 21:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 22:
     this.asCiudadesComboBox = ((System.Windows.Controls.ComboBox)(target));
     
     #line 109 "..\..\MenuPrincipal.xaml"
     this.asCiudadesComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.asCiudadesComboBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 23:
     this.pkUbicacionIDTextBox = ((System.Windows.Controls.TextBox)(target));
     
     #line 116 "..\..\MenuPrincipal.xaml"
     this.pkUbicacionIDTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.pkUbicacionIDTextBox_TextChanged_1);
     
     #line default
     #line hidden
     return;
     case 24:
     this.pkUsuariosIDTextBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 25:
     this.tabItem1 = ((System.Windows.Controls.TabItem)(target));
     return;
     case 26:
     this.grid2 = ((System.Windows.Controls.Grid)(target));
     return;
     case 27:
     this.asCiudadesTextBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 28:
     this.btSaveU = ((System.Windows.Controls.Button)(target));
     
     #line 136 "..\..\MenuPrincipal.xaml"
     this.btSaveU.Click += new System.Windows.RoutedEventHandler(this.btSaveU_Click);
     
     #line default
     #line hidden
     return;
     case 29:
     this.btNextU = ((System.Windows.Controls.Button)(target));
     
     #line 139 "..\..\MenuPrincipal.xaml"
     this.btNextU.Click += new System.Windows.RoutedEventHandler(this.btNextU_Click);
     
     #line default
     #line hidden
     return;
     case 30:
     this.btPreviousU = ((System.Windows.Controls.Button)(target));
     
     #line 142 "..\..\MenuPrincipal.xaml"
     this.btPreviousU.Click += new System.Windows.RoutedEventHandler(this.btPreviousU_Click);
     
     #line default
     #line hidden
     return;
     case 31:
     this.btUpdateU = ((System.Windows.Controls.Button)(target));
     
     #line 145 "..\..\MenuPrincipal.xaml"
     this.btUpdateU.Click += new System.Windows.RoutedEventHandler(this.btUpdateU_Click);
     
     #line default
     #line hidden
     return;
     case 32:
     this.btNewU = ((System.Windows.Controls.Button)(target));
     
     #line 148 "..\..\MenuPrincipal.xaml"
     this.btNewU.Click += new System.Windows.RoutedEventHandler(this.btNewU_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
        private static FrameworkElement GetRibbonButton(MainWindow window, Func <string, ImageSource> getImage, ButtonDefinition button, RibbonGroupBox ribbonGroup, IMainWindowButton mainWindowButton)
        {
            Assert.ArgumentNotNull(button, nameof(button));
            Assert.ArgumentNotNull(ribbonGroup, nameof(ribbonGroup));

            var header = button.Label;

            var clickHandler = GetClickHandler(mainWindowButton);

            if (button.Buttons == null || button.Buttons.Length == 0 || button.Buttons.All(x => x == null))
            {
                // create Ribbon Button
                var imageSource  = getImage(button.Image);
                var fluentButton = new Fluent.Button
                {
                    Icon      = imageSource,
                    LargeIcon = imageSource,
                    Header    = header
                };
                fluentButton.Click += clickHandler;
                ribbonGroup.Items.Add(fluentButton);
                return(fluentButton);
            }

            // create Ribbon Button
            var splitButton = ribbonGroup.Items.OfType <SplitButton>().SingleOrDefault(x => x.Header.ToString().Trim().EqualsIgnoreCase(header.Trim()));

            if (splitButton == null)
            {
                var imageSource = getImage(button.Image);
                splitButton = new Fluent.SplitButton
                {
                    Icon      = imageSource,
                    LargeIcon = imageSource,
                    Header    = header
                };

                if (mainWindowButton != null)
                {
                    splitButton.Click += clickHandler;
                }
                else
                {
                    var childrenButtons = new List <KeyValuePair <string, IMainWindowButton> >();
                    splitButton.Tag    = childrenButtons;
                    splitButton.Click += (sender, args) => splitButton.IsDropDownOpen = true;
                }

                ribbonGroup.Items.Add(splitButton);
            }

            var items = splitButton.Items;

            Assert.IsNotNull(items, nameof(items));

            foreach (var menuItem in button.Buttons)
            {
                if (menuItem == null)
                {
                    continue;
                }

                try
                {
                    var menuHeader = menuItem.Label;
                    if (string.IsNullOrEmpty(menuHeader))
                    {
                        items.Add(new Separator());
                        continue;
                    }

                    var largeImage  = menuItem.Image;
                    var menuIcon    = string.IsNullOrEmpty(largeImage) ? null : getImage(largeImage);
                    var menuHandler = menuItem.Handler;

                    var childrenButtons = splitButton.Tag as ICollection <KeyValuePair <string, IMainWindowButton> >;
                    if (childrenButtons != null)
                    {
                        childrenButtons.Add(new KeyValuePair <string, IMainWindowButton>(menuHeader, menuHandler));
                    }

                    var menuButton = new Fluent.MenuItem()
                    {
                        Header    = menuHeader,
                        IsEnabled = menuHandler?.IsEnabled(window, SelectedInstance) ?? true
                    };

                    if (menuIcon != null)
                    {
                        menuButton.Icon = menuIcon;
                    }

                    if (menuHandler != null)
                    {
                        // bind IsEnabled event
                        SetIsEnabledProperty(menuButton, menuHandler);

                        menuButton.Click += delegate
                        {
                            try
                            {
                                if (menuHandler.IsEnabled(MainWindow.Instance, SelectedInstance))
                                {
                                    menuHandler.OnClick(MainWindow.Instance, SelectedInstance);
                                    RefreshInstances();
                                }
                            }
                            catch (Exception ex)
                            {
                                WindowHelper.HandleError($"Error during handling menu button click: {menuHandler.GetType().FullName}", true, ex);
                            }
                        };
                    }

                    items.Add(menuButton);
                }
                catch (Exception ex)
                {
                    WindowHelper.HandleError($"Error during initializing ribbon button: {menuItem.Label}", true, ex);
                }
            }

            return(splitButton);
        }
        private static FrameworkElement GetRibbonButton(MainWindow window, Func <string, ImageSource> getImage, XmlElement button, RibbonGroupBox ribbonGroup, IMainWindowButton mainWindowButton)
        {
            var header = button.GetNonEmptyAttribute("label");

            var clickHandler = GetClickHandler(mainWindowButton);

            if (button.ChildNodes.Count == 0)
            {
                // create Ribbon Button
                var imageSource  = getImage(button.GetNonEmptyAttribute("largeImage"));
                var fluentButton = new Fluent.Button
                {
                    Icon      = imageSource,
                    LargeIcon = imageSource,
                    Header    = header
                };
                fluentButton.Click += clickHandler;
                ribbonGroup.Items.Add(fluentButton);
                return(fluentButton);
            }

            // create Ribbon Button
            var splitButton = ribbonGroup.Items.OfType <SplitButton>().SingleOrDefault(x => Extensions.EqualsIgnoreCase(x.Header.ToString().Trim(), header.Trim()));

            if (splitButton == null)
            {
                var imageSource = getImage(button.GetNonEmptyAttribute("largeImage"));
                splitButton = new Fluent.SplitButton
                {
                    Icon      = imageSource,
                    LargeIcon = imageSource,
                    Header    = header
                };

                if (mainWindowButton != null)
                {
                    splitButton.Click += clickHandler;
                }
                else
                {
                    var childrenButtons = new List <KeyValuePair <string, IMainWindowButton> >();
                    splitButton.Tag    = childrenButtons;
                    splitButton.Click += (sender, args) => splitButton.IsDropDownOpen = true;
                }

                ribbonGroup.Items.Add(splitButton);
            }

            var items = splitButton.Items;

            Assert.IsNotNull(items, nameof(items));

            foreach (var menuItem in button.ChildNodes.OfType <XmlElement>())
            {
                if (menuItem == null)
                {
                    continue;
                }

                try
                {
                    var name = menuItem.Name;
                    if (name.EqualsIgnoreCase("separator"))
                    {
                        items.Add(new Separator());
                        continue;
                    }

                    if (!name.EqualsIgnoreCase("button"))
                    {
                        Log.Error($"This element is not supported as SplitButton element: {menuItem.OuterXml}");
                        continue;
                    }

                    var menuHeader  = menuItem.GetAttribute("label");
                    var largeImage  = menuItem.GetAttribute("largeImage");
                    var menuIcon    = string.IsNullOrEmpty(largeImage) ? null : getImage(largeImage);
                    var menuHandler = (IMainWindowButton)Plugin.CreateInstance(menuItem);
                    Assert.IsNotNull(menuHandler, nameof(menuHandler));

                    var childrenButtons = splitButton.Tag as ICollection <KeyValuePair <string, IMainWindowButton> >;
                    if (childrenButtons != null)
                    {
                        childrenButtons.Add(new KeyValuePair <string, IMainWindowButton>(menuHeader, menuHandler));
                    }

                    var menuButton = new Fluent.MenuItem()
                    {
                        Header    = menuHeader,
                        IsEnabled = menuHandler.IsEnabled(window, SelectedInstance)
                    };

                    if (menuIcon != null)
                    {
                        menuButton.Icon = menuIcon;
                    }

                    // bind IsEnabled event
                    SetIsEnabledProperty(menuButton, menuHandler);

                    menuButton.Click += delegate
                    {
                        try
                        {
                            if (menuHandler.IsEnabled(MainWindow.Instance, SelectedInstance))
                            {
                                menuHandler.OnClick(MainWindow.Instance, SelectedInstance);
                                MainWindowHelper.RefreshInstances();
                            }
                        }
                        catch (Exception ex)
                        {
                            WindowHelper.HandleError("Error during handling menu button click: " + menuHandler.GetType().FullName, true, ex);
                        }
                    };

                    items.Add(menuButton);
                }
                catch (Exception ex)
                {
                    WindowHelper.HandleError("Error during initializing ribbon button: " + menuItem.OuterXml, true, ex);
                }
            }

            return(splitButton);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.toolsGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 2:
                this.buttonLoad = ((Fluent.Button)(target));

            #line 20 "..\..\..\MainWindow.xaml"
                this.buttonLoad.Click += new System.Windows.RoutedEventHandler(this.bookLoadButton_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.buttonSetting = ((Fluent.Button)(target));

            #line 22 "..\..\..\MainWindow.xaml"
                this.buttonSetting.Click += new System.Windows.RoutedEventHandler(this.buttonSetting_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.explorerLoad = ((Fluent.Button)(target));

            #line 23 "..\..\..\MainWindow.xaml"
                this.explorerLoad.Click += new System.Windows.RoutedEventHandler(this.explorerLoad_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.AddNewInstBtn_ = ((Fluent.Button)(target));

            #line 24 "..\..\..\MainWindow.xaml"
                this.AddNewInstBtn_.Click += new System.Windows.RoutedEventHandler(this.AddNewInstBtn__Click);

            #line default
            #line hidden
                return;

            case 6:
                this.BatchControlBtn_ = ((Fluent.Button)(target));

            #line 25 "..\..\..\MainWindow.xaml"
                this.BatchControlBtn_.Click += new System.Windows.RoutedEventHandler(this.BatchControlBtn_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.MROPositionLoadBtn_ = ((Fluent.Button)(target));

            #line 26 "..\..\..\MainWindow.xaml"
                this.MROPositionLoadBtn_.Click += new System.Windows.RoutedEventHandler(this.MROPositionLoadBtn_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.DeltaHedgeMonitorBtn_ = ((Fluent.Button)(target));

            #line 27 "..\..\..\MainWindow.xaml"
                this.DeltaHedgeMonitorBtn_.Click += new System.Windows.RoutedEventHandler(this.DeltaHedgeMonitorBtn_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.ResualtDocking = ((AvalonDock.DockingManager)(target));
                return;

            case 10:
                this.DocumentPaneGroup_ = ((AvalonDock.Layout.LayoutDocumentPaneGroup)(target));
                return;

            case 11:
                this.DocumentPane_ = ((AvalonDock.Layout.LayoutDocumentPane)(target));
                return;

            case 12:
                this.StartDocument_ = ((AvalonDock.Layout.LayoutDocument)(target));
                return;

            case 13:
                this.ouputPane_ = ((AvalonDock.Layout.LayoutDocumentPane)(target));
                return;

            case 14:
                this.ExplorerPaneGroup = ((AvalonDock.Layout.LayoutAnchorablePaneGroup)(target));
                return;

            case 15:
                this.ExplorerPortfolio_ = ((AvalonDock.Layout.LayoutAnchorablePane)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private void InitActions()
        {
            AddActionDropDownGallery.Items.Clear();

            foreach (var action in this.addInManager.Actions)
            {
                var rb = new Fluent.Button();
                rb.Click += new RoutedEventHandler(addActionCommand_Click);
                rb.Header = action.Name;
                rb.Tag = action.Id;
                if (action.IconResourceStream == null)
                    rb.LargeIcon = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Images/findmore.png", UriKind.RelativeOrAbsolute));
            AddActionDropDownGallery.Items.Add(button);
        }