Пример #1
0
        PactComboBox pcb = null;//= new PactComboBox() { FeatureID=1 };
        /// <summary>
        ///     Creates the visual tree for text based cells.
        /// </summary>
        protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
        {
            //if (pcb == null)
            pcb = new PactComboBox()
            {
                FeatureID = this.FeatureID
            };


            //   SyncProperties(pcb);

            //ApplyStyle(/* isEditing = */ true, /* defaultToElementStyle = */ false, textBox);
            ApplyBinding(pcb, PactComboBox.TextProperty);
            DataGridComboBoxColumn.ApplyBinding(SelectedValueBinding, pcb, PactComboBox.SelectedValueProperty);
            pcb.SelectedValue = ((System.Data.DataRowView)(cell.RowDataItem)).Row[((System.Windows.Data.Binding)(SelectedValueBinding)).Path.Path].ToString();

            if (pcb.SelectedValue.ToString().Length == 0)
            {
                pcb.SelectedValue = null;
            }
            return(pcb);
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ComboBox_Table = ((System.Windows.Controls.ComboBox)(target));

            #line 25 "..\..\ImportData.xaml"
                this.ComboBox_Table.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_Table_SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.TextBox_File = ((System.Windows.Controls.TextBox)(target));

            #line 28 "..\..\ImportData.xaml"
                this.TextBox_File.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.TextBox_File_MouseDoubleClick);

            #line default
            #line hidden
                return;

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

            #line 29 "..\..\ImportData.xaml"
                this.Button_Browse.Click += new System.Windows.RoutedEventHandler(this.Button_Browse_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.ComboBox_Sheet = ((System.Windows.Controls.ComboBox)(target));

            #line 32 "..\..\ImportData.xaml"
                this.ComboBox_Sheet.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_Sheet_SelectionChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.Expander_2 = ((System.Windows.Controls.Expander)(target));
                return;

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

            #line 38 "..\..\ImportData.xaml"
                this.Button_Load.Click += new System.Windows.RoutedEventHandler(this.Button_Load_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.Button_Save = ((System.Windows.Controls.Button)(target));

            #line 39 "..\..\ImportData.xaml"
                this.Button_Save.Click += new System.Windows.RoutedEventHandler(this.Button_Save_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.DataGrid_Fields = ((Microsoft.Windows.Controls.DataGrid)(target));
                return;

            case 9:
                this.DataGridComboBoxColumn_Columns = ((Microsoft.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 10:
                this.StackPanel_SheetInfo = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 11:
                this.TextBox_HeaderRow = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.TextBox_FromRow = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.TextBox_ToRow = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.Button_Read = ((System.Windows.Controls.Button)(target));

            #line 76 "..\..\ImportData.xaml"
                this.Button_Read.Click += new System.Windows.RoutedEventHandler(this.Button_Read_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.Button_Match = ((System.Windows.Controls.Button)(target));
                return;

            case 16:
                this.Button_Preview = ((System.Windows.Controls.Button)(target));

            #line 80 "..\..\ImportData.xaml"
                this.Button_Preview.Click += new System.Windows.RoutedEventHandler(this.Button_Preview_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.Button_DeleteData = ((System.Windows.Controls.Button)(target));
                return;

            case 18:
                this.Button_StepImport = ((System.Windows.Controls.Button)(target));
                return;

            case 19:
                this.PagingNavigator_Step3 = ((ImportData.Helpers.Control.PagingNavigator.PagingNavigator)(target));
                return;

            case 20:
                this.DataGrid_Columns = ((Microsoft.Windows.Controls.DataGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }