Пример #1
0
        public /*override*/ void ShowDetail(object val)
        {
            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(val);
            var col = new WPG.Themes.TypeEditors.CollectionEditorControl();

            col.MyProperty = new WPG.Data.Property(val, properties["Paths"]);
            //col.MyProperty. IsReadOnly = false;
            //col.NumerableType = typeof(PathViewModel);
            col.NumerableType  = val.GetType();
            col.NumerableValue = ((BackupItemViewModel)val).Paths;
            var pg = new WPG.TypeEditors.CollectionEditorWindow(col);

            pg.ShowDialog();
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.collEdt = ((WPG.TypeEditors.CollectionEditorWindow)(target));
                return;

            case 2:
                this.cmdAdd = ((System.Windows.Controls.Button)(target));

            #line 25 "..\..\..\TypeEditors\CollectionEditorWindow.xaml"
                this.cmdAdd.Click += new System.Windows.RoutedEventHandler(this.cmdAdd_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.cmdRemove = ((System.Windows.Controls.Button)(target));

            #line 26 "..\..\..\TypeEditors\CollectionEditorWindow.xaml"
                this.cmdRemove.Click += new System.Windows.RoutedEventHandler(this.cmdRemove_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.myLst = ((System.Windows.Controls.ListBox)(target));

            #line 29 "..\..\..\TypeEditors\CollectionEditorWindow.xaml"
                this.myLst.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.myLst_SelectionChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.myGrid = ((WPG.PropertyGrid)(target));
                return;

            case 6:
                this.cmdOk = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\..\TypeEditors\CollectionEditorWindow.xaml"
                this.cmdOk.Click += new System.Windows.RoutedEventHandler(this.cmdOk_Click);

            #line default
            #line hidden
                return;

            case 7:

            #line 38 "..\..\..\TypeEditors\CollectionEditorWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }