コード例 #1
1
ファイル: TableForm.xaml.cs プロジェクト: JPlenert/Pro1
		void AddColumn(int type, string headerText, string binding)
		{
			if (type == 0 || type == 1)
			{
				DataGridBoundColumn col = null;

				if (type == 0)
					col = new DataGridTextColumn();
				else
					col = new DataGridCheckBoxColumn();

				col.Header = headerText;
				col.Binding = new Binding(binding);
				dataGrid.Columns.Add(col);
			}
			else if (type == 2)
			{
				DataGridComboBoxColumn col = new DataGridComboBoxColumn();

				col.Header = headerText;
				//col.SelectedValueBinding = new Binding(binding);
				//col.SelectedValuePath = "Value";
				//col.DisplayMemberPath = "Value";
				col.TextBinding = new Binding(binding);
				col.ItemsSource = Enum.GetNames(typeof(ocNet.Lib.DBTable.TableFieldType));
				dataGrid.Columns.Add(col);
			}
		}
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.gdAccountsBodyUC = ((FusilControlLib.CustomGrid)(target));
                return;

            case 2:
                this.gbBody = ((FusilControlLib.CustomGroupBox)(target));
                return;

            case 3:
                this.wpBody = ((FusilControlLib.CustomWrapPanel)(target));
                return;

            case 4:
                this.dgBody = ((FusilControlLib.CustomDataGrid)(target));
                return;

            case 5:
                this.dgColumnTaxClass = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 6:
                this.dgColumnTaxRate = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 7:
                this.dgNarration = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\CriteriaPane.xaml"
                ((Sobiens.Connectors.Studio.UI.Controls.CriteriaPane)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.CriteriaGrid = ((System.Windows.Controls.DataGrid)(target));

            #line 9 "..\..\CriteriaPane.xaml"
                this.CriteriaGrid.CurrentCellChanged += new System.EventHandler <System.EventArgs>(this.CriteriaGrid_CurrentCellChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.SortTypeColumn = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.SortOrderColumn = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.BoresStackGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.BoresDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 3:
                this.flexListCbxCol = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.RedPointsTab = ((System.Windows.Controls.TabItem)(target));
                return;

            case 5:
                this.PlanningsDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

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

            case 7:
                this.BlackPointsDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.lblBillNum = ((System.Windows.Controls.Label)(target));
                return;

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

            case 3:
                this.lblCompany = ((System.Windows.Controls.Label)(target));
                return;

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

            case 5:
                this.cmbOperative = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 6:

            #line 22 "..\..\..\..\..\Forms\Bills\PreSaleInvoice\FrmBillOperative.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnRegister_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.txtTraining = ((System.Windows.Controls.TextBox)(target));
                return;

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

            case 3:
                this.datadrid1 = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 4:
                this.menteeCm = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.Hours = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\FrmLineItems.xaml"
                ((Complexe_Contol_Datagrid.FrmLineItems)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.dgLineItem = ((System.Windows.Controls.DataGrid)(target));

            #line 10 "..\..\FrmLineItems.xaml"
                this.dgLineItem.RowEditEnding += new System.EventHandler <System.Windows.Controls.DataGridRowEditEndingEventArgs>(this.dgLineItem_RowEditEnding);

            #line default
            #line hidden
                return;

            case 3:
                this.cmbProducten = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.NameUserControl = ((System.Windows.Controls.TextBox)(target));
                return;

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

            case 3:
                this.RoleUserControl = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.EmailUserControl = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.CategorComboBox1 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.lblHeaderCommodityCode = ((System.Windows.Controls.Label)(target));

            #line 7 "..\..\..\..\Forms\Goods\frmPriceList.xaml"
                this.lblHeaderCommodityCode.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.lblHeaderCommodityCode_PreviewTextInput);

            #line default
            #line hidden
                return;

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

            #line 8 "..\..\..\..\Forms\Goods\frmPriceList.xaml"
                this.lblHeaderCommodityCodeValue.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.lblHeaderCommodityCodeValue_PreviewTextInput);

            #line default
            #line hidden
                return;

            case 3:
                this.lblHeaderCommodityTitle = ((System.Windows.Controls.Label)(target));
                return;

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

            case 5:
                this.grdPriceLists = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 6:

            #line 14 "..\..\..\..\Forms\Goods\frmPriceList.xaml"
                ((System.Windows.Controls.MenuItem)(target)).PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.MenuItem_DeleteClick);

            #line default
            #line hidden
                return;

            case 7:
                this.cmbCustomerType = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 8:

            #line 25 "..\..\..\..\Forms\Goods\frmPriceList.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Student = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.gender = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

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

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

            #line default
            #line hidden
                return;

            case 4:
                this.listbox = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.DataGrid)(target));

            #line 16 "..\..\..\..\Class\Trajet\TrajetPage.xaml"
                this.grid.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.Edit);

            #line default
            #line hidden

            #line 16 "..\..\..\..\Class\Trajet\TrajetPage.xaml"
                this.grid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.depart = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 3:
                this.arrivee = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.Duree = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.Codepart = ((System.Windows.Controls.ComboBox)(target));
                return;

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

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

            case 9:
                this.Distance = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:

            #line 51 "..\..\..\..\Class\Trajet\TrajetPage.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Nouveau_trajet_click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\..\BuildSalarySheetWindow.xaml"
                ((HRMSys.UI.BuildSalarySheetWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.cmbYear = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 5:
                this.textBlock2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.cmbDept = ((System.Windows.Controls.ComboBox)(target));
                return;

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

            #line 11 "..\..\..\BuildSalarySheetWindow.xaml"
                this.btnCreateSalarySheet.Click += new System.Windows.RoutedEventHandler(this.btnCreateSalarySheet_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.datagridItems = ((System.Windows.Controls.DataGrid)(target));

            #line 12 "..\..\..\BuildSalarySheetWindow.xaml"
                this.datagridItems.RowEditEnding += new System.EventHandler <System.Windows.Controls.DataGridRowEditEndingEventArgs>(this.datagridItems_RowEditEnding);

            #line default
            #line hidden
                return;

            case 9:
                this.colEmployee = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #13
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.DataGrid)(target));

            #line 16 "..\..\..\..\Class\Client\ClientPage.xaml"
                this.grid.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.Edit);

            #line default
            #line hidden

            #line 16 "..\..\..\..\Class\Client\ClientPage.xaml"
                this.grid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.civilite = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.Nom = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.Prenom = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.Mail = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.Cocivilite = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 9:
                this.Fidelite = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.Password = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 11:

            #line 62 "..\..\..\..\Class\Client\ClientPage.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Nouveau_client_click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #14
0
ファイル: MainWindow.g.i.cs プロジェクト: Noskonwood/EcoLab
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.thisPage = ((EcoLab.MainWindow)(target));
                return;

            case 2:
                this.dbTabControl = ((System.Windows.Controls.TabControl)(target));
                return;

            case 3:
                this.dataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 4:
                this.cbCategories = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.cbBrands = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 6:
                this.cbQuantities = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 7:
                this.workmanGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 8:
                this.cbDays = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 9:
                this.cbMonthes = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 10:
                this.cbYears = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 11:
                this.cbPositions = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 12:
                this.cbSexes = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 13:
                this.cbMaritalStatuses = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #15
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dtgUsers = ((System.Windows.Controls.DataGrid)(target));

            #line 16 "..\..\SystemUser.xaml"
                this.dtgUsers.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dtgUsers_CellEditEnding);

            #line default
            #line hidden

            #line 17 "..\..\SystemUser.xaml"
                this.dtgUsers.CurrentCellChanged += new System.EventHandler <System.EventArgs>(this.dtgUsers_CurrentCellChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.cmbUserType = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

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

            #line 30 "..\..\SystemUser.xaml"
                this.btnUpdate.Click += new System.Windows.RoutedEventHandler(this.btnUpdate_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.wndUpdateUser = ((Xceed.Wpf.Toolkit.ChildWindow)(target));
                return;

            case 5:
                this.cmbUserName = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.txtPassword = ((System.Windows.Controls.PasswordBox)(target));
                return;

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

            #line 56 "..\..\SystemUser.xaml"
                this.btnReset.Click += new System.Windows.RoutedEventHandler(this.btnReset_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #16
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\IFCWindow.xaml"
                ((SolibriBatchSetup.IFCWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

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

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

            #line 71 "..\..\IFCWindow.xaml"
                this.buttonAddSolibri.Click += new System.Windows.RoutedEventHandler(this.buttonAddSolibri_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.dataGridIfc = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 5:
                this.DataGridColumnDiscipline = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

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

            #line 85 "..\..\IFCWindow.xaml"
                this.buttonCombine.Click += new System.Windows.RoutedEventHandler(this.buttonCombine_Click);

            #line default
            #line hidden
                return;

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

            #line 86 "..\..\IFCWindow.xaml"
                this.buttonCancel.Click += new System.Windows.RoutedEventHandler(this.buttonCancel_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #17
0
ファイル: MainWindow.g.i.cs プロジェクト: AlexKhangPHP/WPF
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

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

            #line default
            #line hidden
                return;

            case 2:
                this.gridViewData = ((System.Windows.Controls.DataGrid)(target));

            #line 12 "..\..\MainWindow.xaml"
                this.gridViewData.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.BubblingRoutedEvent_Click));

            #line default
            #line hidden
                return;

            case 3:
                this.ComboBoxState = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.buttonDisplay = ((System.Windows.Controls.Button)(target));

            #line 94 "..\..\MainWindow.xaml"
                this.buttonDisplay.Click += new System.Windows.RoutedEventHandler(this.buttonDisplay_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.comboBoxStates = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.textBoxKeyword = ((System.Windows.Controls.TextBox)(target));
                return;

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

            #line 103 "..\..\MainWindow.xaml"
                this.buttonSave.Click += new System.Windows.RoutedEventHandler(this.buttonSave_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #18
0
        private void AddTimeRangeColumn(string columnHeader, string bindingPath)
        {
            var comboBoxColumn = new DataGridComboBoxColumn();
            comboBoxColumn.ItemsSource = _roundSchedule.DefaultRange;
            comboBoxColumn.SelectedValueBinding = new Binding(bindingPath);
            comboBoxColumn.Header = columnHeader;
            comboBoxColumn.CanUserSort = false;

            this.RoundsGrid.Columns.Add(comboBoxColumn);
        }
コード例 #19
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.DataGrid)(target));

            #line 16 "..\..\..\..\Class\Maintenance\MaintenancePage.xaml"
                this.grid.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.Edit);

            #line default
            #line hidden

            #line 16 "..\..\..\..\Class\Maintenance\MaintenancePage.xaml"
                this.grid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.avion = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 3:
                this.aeroport = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.Avion = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.Date = ((System.Windows.Controls.TextBox)(target));
                return;

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

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

            case 9:

            #line 47 "..\..\..\..\Class\Maintenance\MaintenancePage.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Nouveau_maintenance_click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #20
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\..\..\Views\OutsoleRawMaterialWindow.xaml"
                ((MasterSchedule.Views.OutsoleRawMaterialWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.dgOutsoleMaterial = ((System.Windows.Controls.DataGrid)(target));

            #line 15 "..\..\..\..\Views\OutsoleRawMaterialWindow.xaml"
                this.dgOutsoleMaterial.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dgOutsoleMaterial_CellEditEnding);

            #line default
            #line hidden

            #line 16 "..\..\..\..\Views\OutsoleRawMaterialWindow.xaml"
                this.dgOutsoleMaterial.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.dgOutsoleMaterial_PreviewKeyDown);

            #line default
            #line hidden
                return;

            case 3:
                this.colSuppliers = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.btnAddMore = ((System.Windows.Controls.Button)(target));

            #line 29 "..\..\..\..\Views\OutsoleRawMaterialWindow.xaml"
                this.btnAddMore.Click += new System.Windows.RoutedEventHandler(this.btnAddMore_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnSave = ((System.Windows.Controls.Button)(target));

            #line 30 "..\..\..\..\Views\OutsoleRawMaterialWindow.xaml"
                this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #21
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml"
                ((MasterSchedule.Views.OutsoleInputMaterialWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.dgOutsoleMaterial = ((System.Windows.Controls.DataGrid)(target));

            #line 27 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml"
                this.dgOutsoleMaterial.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dgOutsoleMaterial_CellEditEnding);

            #line default
            #line hidden
                return;

            case 3:
                this.colSuppliers = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.colETD = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 5:
                this.colActualDate = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 6:
                this.colCompleted = ((System.Windows.Controls.DataGridTemplateColumn)(target));
                return;

            case 8:
                this.colAddRack = ((System.Windows.Controls.DataGridTemplateColumn)(target));
                return;

            case 10:
                this.btnSave = ((System.Windows.Controls.Button)(target));

            #line 55 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml"
                this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #22
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DG_Test = ((System.Windows.Controls.DataGrid)(target));

            #line 28 "..\..\MainWindow.xaml"
                this.DG_Test.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.DG_Test_CellEditEnding);

            #line default
            #line hidden
                return;

            case 2:
                this.DGCB_Location = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 3:
                this.DGCB_Climate = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.DGCB_LVTest = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.SP_UserControl = ((System.Windows.Controls.StackPanel)(target));
                return;

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

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

            #line default
            #line hidden
                return;

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

            case 8:
                this.CB_ShowClimate = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 9:
                this.CB_ShowColumns = ((System.Windows.Controls.CheckBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #23
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.WinConfigureImport = ((OpenRFA_WPF_CS.ConfigureImport)(target));
                return;

            case 2:
                this.gridParamCon = ((System.Windows.Controls.DataGrid)(target));

            #line 19 "..\..\ConfigureImport.xaml"
                this.gridParamCon.CurrentCellChanged += new System.EventHandler <System.EventArgs>(this.gridParamCon_CurrentCellChanged);

            #line default
            #line hidden

            #line 19 "..\..\ConfigureImport.xaml"
                this.gridParamCon.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.gridParamCon_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.AssignGroup = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.InstanceOrType = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.ButtonImport = ((System.Windows.Controls.Button)(target));

            #line 32 "..\..\ConfigureImport.xaml"
                this.ButtonImport.Click += new System.Windows.RoutedEventHandler(this.ButtonImport_Click);

            #line default
            #line hidden
                return;

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

            #line 33 "..\..\ConfigureImport.xaml"
                this.ButtonCancel.Click += new System.Windows.RoutedEventHandler(this.ButtonCancel_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dgStruct = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.dgcbcMaterial = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 4:
                this.dgAuxData = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 6:
                this.lbImages = ((System.Windows.Controls.ListBox)(target));
                return;

            case 7:
                this.svJsdShape3D = ((JsdEditor.ShapePreview3D)(target));
                return;

            case 8:
                this.puStructFlags = ((System.Windows.Controls.Primitives.Popup)(target));

            #line 152 "..\..\..\View\JsdFileView.xaml"
                this.puStructFlags.Closed += new System.EventHandler(this.puStructFlags_Closed);

            #line default
            #line hidden
                return;

            case 9:
                this.fevStruct = ((CommonWpfControls.FlagEditorView)(target));
                return;

            case 10:
                this.puAuxFlags = ((System.Windows.Controls.Primitives.Popup)(target));

            #line 165 "..\..\..\View\JsdFileView.xaml"
                this.puAuxFlags.Closed += new System.EventHandler(this.puAuxFlags_Closed);

            #line default
            #line hidden
                return;

            case 11:
                this.fevAux = ((CommonWpfControls.FlagEditorView)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #25
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.CustomGridLines = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.dg1 = ((System.Windows.Controls.DataGrid)(target));

            #line 95 "..\..\..\..\Accounts\Views\UndeliveredPurchaseOrdersDepositsView.xaml"
                this.dg1.GotFocus += new System.Windows.RoutedEventHandler(this.dg1_GotFocus);

            #line default
            #line hidden

            #line 95 "..\..\..\..\Accounts\Views\UndeliveredPurchaseOrdersDepositsView.xaml"
                this.dg1.LostKeyboardFocus += new System.Windows.Input.KeyboardFocusChangedEventHandler(this.dg1_LostKeyboardFocus);

            #line default
            #line hidden
                return;

            case 3:
                this.TxtSupplierName = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:
                this.TxtOrderNo = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 6:
                this.TxtOrderDate = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 7:
                this.TxtUndeliveredAmount = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 8:
                this.TxtDepositAmount = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 9:
                this.btnSave = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.btnClose = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #26
0
ファイル: MainWindow.g.cs プロジェクト: TwoQ4/temp
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.UserDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:

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

            #line default
            #line hidden
                return;

            case 3:
                this.BookDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 4:
                this.BookUserComboBox = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 5:

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

            #line default
            #line hidden
                return;

            case 6:
                this.TicketDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 7:
                this.TicketUserComboBox = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 8:

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

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.gdAccountsReport = ((FusilControlLib.CustomGrid)(target));
                return;

            case 2:
                this.tbFilter = ((FusilControlLib.CustomTextBox)(target));
                return;

            case 3:
                this.wpAccountReport = ((FusilControlLib.CustomWrapPanel)(target));
                return;

            case 4:
                this.dgAccountsReport = ((FusilControlLib.CustomDataGrid)(target));
                return;

            case 5:
                this.dgColumnSno = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 6:
                this.dgColumnName = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 7:
                this.dgColumnTaxClass = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;

            case 8:
                this.dgColumnCode = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 9:
                this.dgColumnDesc = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 10:
                this.dgColumnTaxRate = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;

            case 11:
                this.dgColumnNarration = ((FusilControlLib.CustomDataGridTextColumns)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #28
0
        /// <summary>Refreshes the contents of a cell in the column in response to a binding change.</summary>
        /// <param name="element">The cell to update.</param>
        /// <param name="propertyName">The name of the column property that has changed.</param>
        // Token: 0x060048B3 RID: 18611 RVA: 0x0014A240 File Offset: 0x00148440
        protected internal override void RefreshCellContent(FrameworkElement element, string propertyName)
        {
            DataGridCell dataGridCell = element as DataGridCell;

            if (dataGridCell == null)
            {
                base.RefreshCellContent(element, propertyName);
                return;
            }
            bool isEditing = dataGridCell.IsEditing;

            if ((string.Compare(propertyName, "ElementStyle", StringComparison.Ordinal) == 0 && !isEditing) || (string.Compare(propertyName, "EditingElementStyle", StringComparison.Ordinal) == 0 && isEditing))
            {
                dataGridCell.BuildVisualTree();
                return;
            }
            ComboBox comboBox = dataGridCell.Content as ComboBox;

            if (propertyName == "SelectedItemBinding")
            {
                DataGridComboBoxColumn.ApplyBinding(this.SelectedItemBinding, comboBox, Selector.SelectedItemProperty);
                return;
            }
            if (propertyName == "SelectedValueBinding")
            {
                DataGridComboBoxColumn.ApplyBinding(this.SelectedValueBinding, comboBox, Selector.SelectedValueProperty);
                return;
            }
            if (propertyName == "TextBinding")
            {
                DataGridComboBoxColumn.ApplyBinding(this.TextBinding, comboBox, ComboBox.TextProperty);
                return;
            }
            if (propertyName == "SelectedValuePath")
            {
                DataGridHelper.SyncColumnProperty(this, comboBox, Selector.SelectedValuePathProperty, DataGridComboBoxColumn.SelectedValuePathProperty);
                return;
            }
            if (propertyName == "DisplayMemberPath")
            {
                DataGridHelper.SyncColumnProperty(this, comboBox, ItemsControl.DisplayMemberPathProperty, DataGridComboBoxColumn.DisplayMemberPathProperty);
                return;
            }
            if (!(propertyName == "ItemsSource"))
            {
                base.RefreshCellContent(element, propertyName);
                return;
            }
            DataGridHelper.SyncColumnProperty(this, comboBox, ItemsControl.ItemsSourceProperty, DataGridComboBoxColumn.ItemsSourceProperty);
        }
コード例 #29
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.gridProdukty = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.NazwaMagazynu = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #30
0
ファイル: MainWindow.g.i.cs プロジェクト: rumcajs137/nauka
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dataGridOfPeople = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.ComboBoxColumnSex = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #31
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TransactionTableXAML = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 2:
                this.CategoryColumn = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #32
0
        // Token: 0x06004895 RID: 18581 RVA: 0x00149F18 File Offset: 0x00148118
        private static object OnCoerceSortMemberPath(DependencyObject d, object baseValue)
        {
            DataGridComboBoxColumn dataGridComboBoxColumn = (DataGridComboBoxColumn)d;
            string text = (string)baseValue;

            if (string.IsNullOrEmpty(text))
            {
                string pathFromBinding = DataGridHelper.GetPathFromBinding(dataGridComboBoxColumn.EffectiveBinding as Binding);
                if (!string.IsNullOrEmpty(pathFromBinding))
                {
                    text = pathFromBinding;
                }
            }
            return(text);
        }
コード例 #33
0
        /// <summary>
        /// Creates data grid column definition based on specified parameters
        /// </summary>
        /// <param name="dataGrid">Datagrid to modify</param>
        /// <param name="columnDefinitions">Column definitions</param>
        private void CreateDatagridColumns(DataGrid dataGrid, List<Utilities.ColumnDefinition> columnDefinitions)
        {
            dataGrid.Columns.Clear();

            if (columnDefinitions != null && columnDefinitions.Count == 0)
                return;

            foreach (Utilities.ColumnDefinition definition in columnDefinitions)
            {
                DataGridColumn column = null;

                switch (definition.Column)
                {
                    case Utilities.ColumnDefinition.ColumnType.TEXT:
                        column = new DataGridTextColumn();
                        ((DataGridTextColumn)column).Binding = new Binding(definition.PropertyName);
                        break;

                    // TODO: Not used now
                    case Utilities.ColumnDefinition.ColumnType.CHECKBOX:
                        column = new DataGridCheckBoxColumn();
                        ((DataGridCheckBoxColumn)column).Binding = new Binding(definition.PropertyName);
                        break;

                    // TODO: Not used now
                    case Utilities.ColumnDefinition.ColumnType.COMBOBOX:
                        column = new DataGridComboBoxColumn();
                        break;
                }

                if (column != null)
                {
                    column.Header = definition.Header;
                    column.IsReadOnly = true;
                    dataGrid.Columns.Add(column);
                }
            }

            // Set First column to fill the rest of datagrid width
            dataGrid.Columns[0].Width = new DataGridLength(1, DataGridLengthUnitType.Star);
        }
コード例 #34
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     return;
     case 3:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     return;
     case 4:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     return;
     case 5:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     return;
     case 6:
     this.dgPersonas = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 7:
     this.Precio = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #35
0
        void Bind(Type aType)
        {
            foreach (PropertyInfo pi in aType.GetProperties()) {
                DataGridColumn col = null;
                if (pi.PropertyType == typeof(int)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name);
                } else if (pi.PropertyType == typeof(float)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name);
                } else if (pi.PropertyType == typeof(bool)) {
                    col = new DataGridCheckBoxColumn();
                    ((DataGridCheckBoxColumn)col).Binding = new Binding(pi.Name);
                } else if (pi.PropertyType.IsEnum) {
                    col = new DataGridComboBoxColumn();
                    ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                    ((DataGridComboBoxColumn)col).ItemsSource = Enum.GetValues(pi.PropertyType);
                } else if (pi.PropertyType == typeof(Urho.MinMax)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name) { Converter = new MinMaxConverter() };
                    ((Binding)((DataGridTextColumn)col).Binding).ValidationRules.Add(new MinMaxValidator());
                } else if (pi.PropertyType == typeof(Urho.Vector2)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name) { Converter = new Vec2Converter() };
                    ((Binding)((DataGridTextColumn)col).Binding).ValidationRules.Add(new Vec2Validator());
                } else if (pi.PropertyType == typeof(Urho.Vector3)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name) { Converter = new Vec3Converter() };
                    ((Binding)((DataGridTextColumn)col).Binding).ValidationRules.Add(new Vec3Validator());
                } else if (pi.PropertyType == typeof(Urho.Vector4)) {
                    col = new DataGridTextColumn();
                    ((DataGridTextColumn)col).Binding = new Binding(pi.Name) { Converter = new Vec4Converter() };
                    ((Binding)((DataGridTextColumn)col).Binding).ValidationRules.Add(new Vec4Validator());
                } else if (pi.PropertyType == typeof(Urho.UColor)) {
                    DataGridTemplateColumn c = null;
                    col = c = new DataGridTemplateColumn();
                    DataGridTemplateColumn guidColumn = c as DataGridTemplateColumn;

                    Binding bind = new Binding(pi.Name);
                    bind.Converter = new ColorToColorConverter();
                    bind.Mode = BindingMode.TwoWay;

                    Binding colorBind = new Binding(pi.Name);
                    colorBind.Converter = new ColorToBrushConverter();
                    colorBind.Mode = BindingMode.OneWay;

                    Binding fgBind = new Binding(pi.Name);
                    fgBind.Converter = new ColorToInvertedBrushConverter();
                    fgBind.Mode = BindingMode.OneWay;

                    // Create the TextBlock
                    FrameworkElementFactory textFactory = new FrameworkElementFactory(typeof(TextBlock));
                    textFactory.SetBinding(TextBlock.TextProperty, bind);
                    textFactory.SetBinding(TextBlock.BackgroundProperty, colorBind);
                    textFactory.SetBinding(TextBlock.ForegroundProperty, fgBind);
                    DataTemplate textTemplate = new DataTemplate();
                    textTemplate.VisualTree = textFactory;

                    // Create the ComboBox
                    Binding comboBind = new Binding(pi.Name);

                    FrameworkElementFactory comboFactory = new FrameworkElementFactory(typeof(Xceed.Wpf.Toolkit.ColorPicker));
                    comboFactory.SetBinding(ColorPicker.SelectedColorProperty, bind);
                    comboFactory.SetValue(ColorPicker.ShowAdvancedButtonProperty, true);

                    DataTemplate comboTemplate = new DataTemplate();
                    comboTemplate.VisualTree = comboFactory;

                    // Set the Templates to the Column
                    guidColumn.CellTemplate = textTemplate;
                    guidColumn.CellEditingTemplate = comboTemplate;

                } else if (pi.PropertyType == typeof(string)) {
                    Urho.Resource res = pi.GetCustomAttribute<Urho.Resource>();
                    if (res == null)
                        res = pi.PropertyType.GetCustomAttribute<Urho.Resource>();
                    if (res == null && pi.Name.ToLower().Equals("name"))
                        res = aType.GetCustomAttribute<Urho.Resource>();
                    if (res == null) {
                        col = new DataGridTextColumn();
                        ((DataGridTextColumn)col).Binding = new Binding(pi.Name);
                    } else { //combo box
                        col = new DataGridComboBoxColumn();
                        if (res.Type == typeof(Urho.Material)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_MATERIALS, false);
                        } else if (res.Type == typeof(Urho.Technique)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_TECHNIQUES, false);
                        } else if (res.Type == typeof(Urho.BaseTexture)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_TEXTURES, true);
                        } else if (res.Type == typeof(Urho.Texture)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_TEXTURES, true);
                        } else if (res.Type == typeof(Urho.Shader)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_SHADERS, false);
                        } else if (res.Type == typeof(Urho.Sound)) {
                            ((DataGridComboBoxColumn)col).SelectedItemBinding = new Binding(pi.Name);
                            ((DataGridComboBoxColumn)col).ItemsSource = UrhoPaths.inst().GetList(UrhoPaths.PATH_SOUNDS, false);
                        }
                    }
                }
                if (col != null) {
                    col.Header = pi.Name;
                    grid.Columns.Add(col);
                }
            }
        }
コード例 #36
0
        private void dgWeight_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            DataGridComboBoxColumn comboBoxColumn = new DataGridComboBoxColumn();
            comboBoxColumn.Header = e.PropertyName;

            Binding binding = new Binding();
            // 需要绑定的列
            binding.Path = new PropertyPath(e.PropertyName);
            binding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            comboBoxColumn.SelectedValueBinding = binding;
            Binding itemsSourceBinding = new Binding();
            itemsSourceBinding.Source = this;
            itemsSourceBinding.Path = new PropertyPath("MatrixGrade");
            BindingOperations.SetBinding(comboBoxColumn, DataGridComboBoxColumn.ItemsSourceProperty, itemsSourceBinding);
            //居中样式
            Style styleCenter = new Style(typeof(ComboBox));
            Setter setHorizonalCenter = new Setter(ComboBox.HorizontalContentAlignmentProperty, HorizontalAlignment.Center);
            Setter setVerticalCenter = new Setter(ComboBox.VerticalContentAlignmentProperty, VerticalAlignment.Center);
            styleCenter.Setters.Add(setHorizonalCenter);
            styleCenter.Setters.Add(setVerticalCenter);
            comboBoxColumn.ElementStyle = styleCenter;
            comboBoxColumn.EditingElementStyle = styleCenter;
            e.Column = comboBoxColumn;
        }
コード例 #37
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     
     #line 32 "..\..\..\Pages\RecetasPage.xaml"
     this.btnNuevo.Click += new System.Windows.RoutedEventHandler(this.btnNuevo_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     
     #line 44 "..\..\..\Pages\RecetasPage.xaml"
     this.btnEditar.Click += new System.Windows.RoutedEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     
     #line 56 "..\..\..\Pages\RecetasPage.xaml"
     this.btnEliminar.Click += new System.Windows.RoutedEventHandler(this.btnEliminar_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     
     #line 68 "..\..\..\Pages\RecetasPage.xaml"
     this.btnGuardar.Click += new System.Windows.RoutedEventHandler(this.btnGuardar_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     
     #line 80 "..\..\..\Pages\RecetasPage.xaml"
     this.btnCancelar.Click += new System.Windows.RoutedEventHandler(this.btnCancelar_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txtNombre = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.cbProfesor = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 8:
     this.dgProductos = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 9:
     this.dgcbcMedidas = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 10:
     this.btnAgregar = ((System.Windows.Controls.Button)(target));
     
     #line 120 "..\..\..\Pages\RecetasPage.xaml"
     this.btnAgregar.Click += new System.Windows.RoutedEventHandler(this.btnAgregar_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     this.btnEliminar1 = ((System.Windows.Controls.Button)(target));
     
     #line 123 "..\..\..\Pages\RecetasPage.xaml"
     this.btnEliminar1.Click += new System.Windows.RoutedEventHandler(this.btnEliminar1_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.dgRecetas = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 13:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     
     #line 154 "..\..\..\Pages\RecetasPage.xaml"
     this.txtBusqueda.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBusqueda_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #38
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     
     #line 33 "..\..\..\Pages\ProductosPage.xaml"
     this.btnNuevo.Click += new System.Windows.RoutedEventHandler(this.btnNuevo_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     
     #line 45 "..\..\..\Pages\ProductosPage.xaml"
     this.btnEditar.Click += new System.Windows.RoutedEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     
     #line 57 "..\..\..\Pages\ProductosPage.xaml"
     this.btnEliminar.Click += new System.Windows.RoutedEventHandler(this.btnEliminar_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     
     #line 69 "..\..\..\Pages\ProductosPage.xaml"
     this.btnGuardar.Click += new System.Windows.RoutedEventHandler(this.btnGuardar_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     
     #line 81 "..\..\..\Pages\ProductosPage.xaml"
     this.btnCancelar.Click += new System.Windows.RoutedEventHandler(this.btnCancelar_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txtDescripcion = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.cbUnidad = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 8:
     this.cbCategoria = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 9:
     this.cbTipoProducto = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 10:
     this.nudStockMinimo = ((MahApps.Metro.Controls.NumericUpDown)(target));
     return;
     case 11:
     this.nudPrecioReferencial = ((MahApps.Metro.Controls.NumericUpDown)(target));
     return;
     case 12:
     this.cbPresentación = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 13:
     this.txtObservacion = ((System.Windows.Controls.TextBox)(target));
     return;
     case 14:
     this.txtUbicacionFisica = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.cbTipoExistencia = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 16:
     this.dgProductos = ((System.Windows.Controls.DataGrid)(target));
     
     #line 136 "..\..\..\Pages\ProductosPage.xaml"
     this.dgProductos.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.dgcbcTiposProductos = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 18:
     this.dgcbcMedidas = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 19:
     this.dgcbcPresentaciones = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 20:
     this.dgcbcCategorias = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 22:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     
     #line 158 "..\..\..\Pages\ProductosPage.xaml"
     this.txtBusqueda.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBusqueda_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #39
0
        public void 查詢區域賦值(string browsetype, int no, DataGridComboBoxColumn 欄位Column, DataGridComboBoxColumn 運算子Column)
        {
            下方查詢list.Clear();
            DataTable 自訂條件欄位 = 查詢LCL所在位置("LCL自訂條件欄位");
            DataTable 運算子 = 查詢LCL所在位置("LCL運算子");
            DataTable 原始 = 查詢LCL所在位置("LCL原始自訂條件");
            if (欄位編號列表 == null && 運算子編號列表 == null)
            {
                DataRow[] drs = 自訂條件欄位.Select("瀏覽類別 = '" + browsetype + "'");
                if (drs.Count() != 0)
                {
                    欄位編號列表 = new ObservableCollection<欄位編號ViewModel>(DataTableToList<欄位編號ViewModel>.ConvertToModel(drs.CopyToDataTable()));
                }
                else
                {
                    string model = "Model." + 資料表名稱[0].Substring(0, 1).ToUpper() + 資料表名稱[0].Substring(1).ToLower() + "Model";
                    List<欄位編號ViewModel> 欄位編號列表list = new List<欄位編號ViewModel>();
                    Assembly.Load("Model");
                    Assembly[] AssembliesLoaded = AppDomain.CurrentDomain.GetAssemblies();
                    Type trgType = AssembliesLoaded.Select(assembly => assembly.GetType(model))
                        .Where(type => type != null)
                        .FirstOrDefault();
                    PropertyInfo[] pis = trgType.GetProperties();
                    for (int i = 0; i < pis.Count(); i++)
                    {
                        欄位編號ViewModel m = new 欄位編號ViewModel();
                        m.欄位編號 = i + 1;
                        m.欄位說明 = pis[i].Name;
                        欄位編號列表list.Add(m);
                    }
                    欄位編號列表 = new ObservableCollection<欄位編號ViewModel>(欄位編號列表list);
                }
                運算子編號列表 = new ObservableCollection<運算子編號ViewModel>(DataTableToList<運算子編號ViewModel>.ConvertToModel(運算子));
                欄位Column.ItemsSource = 欄位編號列表;
                運算子Column.ItemsSource = 運算子編號列表;
                //ItemSource只能設定一次不然會前面的筆數會出錯
            }
            if (條件編號 != null)
            {
                DataRow[] 原始編號 = 原始.Select("編號 = '" + 條件編號[no] + "'");
                for (int i = 0; i < 原始編號.Count(); i++)
                {
                    DataRow[] rows自訂條件欄位 = 自訂條件欄位.Select("瀏覽類別 = '" + browsetype + "' and 欄位編號 = '" + 原始編號[i]["欄位編號"] + "'");
                    string 欄位說明 = rows自訂條件欄位.FirstOrDefault()["欄位說明"].ToString();
                    DataRow[] rows運算子 = 運算子.Select("運算子編號 = '" + 原始編號[i]["運算子編號"] + "'");
                    string 運算子說明 = rows運算子.FirstOrDefault()["運算子說明"].ToString();
                    string 欄位type = 尋找欄位type(欄位說明);

                    下方查詢ViewModel browse = new 下方查詢ViewModel();
                    browse.序號 = (i + 1).ToString();
                    browse.欄位編號 = 原始編號[i]["欄位編號"].ToString();
                    browse.欄位說明 = 欄位說明;
                    browse.運算子編號 = 原始編號[i]["運算子編號"].ToString();
                    browse.運算子說明 = 運算子說明;
                    browse.起始值 = 原始編號[i]["值1"].ToString();
                    browse.截止值 = 原始編號[i]["值2"].ToString();
                    browse.欄位TYPE = 欄位type;
                    下方查詢list.Add(browse);
                }
            }
            else
            {
                for (int i = 0; i < 5; i++)
                {
                    下方查詢ViewModel browse = new 下方查詢ViewModel();
                    browse.序號 = (i + 1).ToString();
                    browse.欄位編號 = 欄位編號列表[0].欄位編號.ToString();
                    browse.欄位說明 = 欄位編號列表[0].欄位說明;
                    browse.運算子編號 = 運算子編號列表[2].運算子編號;
                    browse.運算子說明 = 運算子編號列表[2].運算子說明;
                    browse.起始值 = "QWERT";
                    browse.截止值 = "";
                    browse.欄位TYPE = 尋找欄位type(欄位編號列表[0].欄位說明);
                    下方查詢list.Add(browse);
                }
            }
        }
コード例 #40
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.lvSongListings = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 2:
     this.dgCB = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #41
0
ファイル: Events.g.i.cs プロジェクト: thefakir/Emanuel
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.dgMeetings = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 2:
     this.dgcbc = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 4:
     this.btnGoBack = ((System.Windows.Controls.Button)(target));
     
     #line 26 "..\..\..\View\Events.xaml"
     this.btnGoBack.Click += new System.Windows.RoutedEventHandler(this.btnGoBack_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #42
0
ファイル: MainWindow.g.i.cs プロジェクト: sgccarey/EFNinjas
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 10 "..\..\MainWindow.xaml"
     ((WpfApplication.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.nameTextBox = ((System.Windows.Controls.TextBox)(target));
     
     #line 55 "..\..\MainWindow.xaml"
     this.nameTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.nameTextBox_TextChanged);
     
     #line default
     #line hidden
     return;
     case 4:
     this.clanComboBox = ((System.Windows.Controls.ComboBox)(target));
     
     #line 65 "..\..\MainWindow.xaml"
     this.clanComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.clanComboBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 5:
     this.dateOfBirthDatePicker = ((System.Windows.Controls.DatePicker)(target));
     
     #line 70 "..\..\MainWindow.xaml"
     this.dateOfBirthDatePicker.SelectedDateChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.dateOfBirthDatePicker_SelectedDateChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.servedInOniwabanCheckBox = ((System.Windows.Controls.CheckBox)(target));
     
     #line 72 "..\..\MainWindow.xaml"
     this.servedInOniwabanCheckBox.Checked += new System.Windows.RoutedEventHandler(this.servedInOniwabanCheckBox_Checked);
     
     #line default
     #line hidden
     
     #line 72 "..\..\MainWindow.xaml"
     this.servedInOniwabanCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.servedInOniwabanCheckBox_Unchecked);
     
     #line default
     #line hidden
     return;
     case 7:
     this.ninjaListBox = ((System.Windows.Controls.ListBox)(target));
     
     #line 74 "..\..\MainWindow.xaml"
     this.ninjaListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ninjaListBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 8:
     this.btnNewNinja = ((System.Windows.Controls.Button)(target));
     
     #line 75 "..\..\MainWindow.xaml"
     this.btnNewNinja.Click += new System.Windows.RoutedEventHandler(this.btnNewNinja_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.equipmentOwnedDataGrid = ((System.Windows.Controls.DataGrid)(target));
     
     #line 79 "..\..\MainWindow.xaml"
     this.equipmentOwnedDataGrid.CellEditEnding += new System.EventHandler<System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.equipmentOwnedDataGrid_CellEditEnding);
     
     #line default
     #line hidden
     return;
     case 10:
     this.idColumn = ((System.Windows.Controls.DataGridTextColumn)(target));
     return;
     case 11:
     this.nameColumn = ((System.Windows.Controls.DataGridTextColumn)(target));
     return;
     case 12:
     this.equipTypeColumn = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 13:
     this.BtnSave = ((System.Windows.Controls.Button)(target));
     
     #line 103 "..\..\MainWindow.xaml"
     this.BtnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #43
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     
     #line 32 "..\..\..\Pages\GruposPage.xaml"
     this.btnNuevo.Click += new System.Windows.RoutedEventHandler(this.btnNuevo_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     
     #line 44 "..\..\..\Pages\GruposPage.xaml"
     this.btnEditar.Click += new System.Windows.RoutedEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     
     #line 56 "..\..\..\Pages\GruposPage.xaml"
     this.btnEliminar.Click += new System.Windows.RoutedEventHandler(this.btnEliminar_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     
     #line 68 "..\..\..\Pages\GruposPage.xaml"
     this.btnGuardar.Click += new System.Windows.RoutedEventHandler(this.btnGuardar_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     
     #line 80 "..\..\..\Pages\GruposPage.xaml"
     this.btnCancelar.Click += new System.Windows.RoutedEventHandler(this.btnCancelar_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txtNombre = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.txtCodigo = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.cbCursos = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 9:
     this.cbAreas = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 10:
     this.nudCupos = ((MahApps.Metro.Controls.NumericUpDown)(target));
     return;
     case 11:
     this.nudSubGrupos = ((MahApps.Metro.Controls.NumericUpDown)(target));
     return;
     case 12:
     this.cbPeriodos = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 13:
     this.cbProfesores = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 14:
     this.dgGrupos = ((System.Windows.Controls.DataGrid)(target));
     
     #line 131 "..\..\..\Pages\GruposPage.xaml"
     this.dgGrupos.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.dgcbcCursos = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 16:
     this.dgcbcPeriodos = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 17:
     this.dgcbcProfesores = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 18:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     
     #line 146 "..\..\..\Pages\GruposPage.xaml"
     this.txtBusqueda.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBusqueda_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #44
0
        private void ColumnGeneration(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            //Change to a fixed width font
            myDataGrid.FontFamily = new FontFamily("Lucida Console");

            /*
             * Comboboxes
             */
            //Charges
            if (e.PropertyType == typeof(RainbowLib.BCM.Charge))
            {
                var col = new DataGridComboBoxColumn();
                col.ItemsSource = App.OpenedFiles.BCMFile.Charges;
                col.SelectedItemBinding = new Binding(e.PropertyName);
                col.DisplayMemberPath = "Name";
                col.Header = "Charge";
                e.Column = col;
            }
            //CancelLists
            if (e.PropertyType == typeof(RainbowLib.BCM.CancelList))
            {
                var col = new DataGridComboBoxColumn();
                col.ItemsSource = App.OpenedFiles.BCMFile.CancelLists;
                col.SelectedItemBinding = new Binding(e.PropertyName);
                col.DisplayMemberPath = "Name";
                col.Header = "Cancel";
                e.Column = col;
            }
            //InputMotions
            if (e.PropertyType == typeof(RainbowLib.BCM.InputMotion))
            {
                var col = new DataGridComboBoxColumn();
                col.ItemsSource = App.OpenedFiles.BCMFile.InputMotions;
                col.SelectedItemBinding = new Binding(e.PropertyName);
                col.DisplayMemberPath = "Name";
                col.Header = "InputMotion";
                e.Column = col;
            }
            //HitBoxDataset
            if (e.PropertyType == typeof(RainbowLib.BAC.HitBoxDataset))
            {
                var col = new DataGridComboBoxColumn();
                col.ItemsSource = App.OpenedFiles.BACFile.HitboxTable;
                col.SelectedItemBinding = new Binding(e.PropertyName);
                col.Header = "HitboxData";
                e.Column = col;
            }
            //Scripts
            if (e.PropertyType == typeof(RainbowLib.BAC.Script))
            {
                if (RawCheckbox.IsChecked.Value)
                {
                    var col = new DataGridTextColumn();
                    //col.ItemsSource = Enum.GetValues(e.PropertyType);
                    var b = new Binding(e.PropertyName); // + ".Index"
                    col.Binding = b;
                    //b.StringFormat = "X";
                    b.Converter = new ScriptConverter();
                    //col.DisplayMemberPath = "Name";
                    col.Header = e.PropertyName;
                    col.Header = "Script";
                    e.Column = col;
                }
                else
                {
                    var col = new DataGridComboBoxColumn();
                    col.ItemsSource = App.OpenedFiles.BACFile.Scripts;
                    col.SelectedItemBinding = new Binding(e.PropertyName);
                    col.DisplayMemberPath = "Name";
                    col.Header = "Script";
                    e.Column = col;
                }
            }
            //Hex display and entry of Unknown params
            if (e.PropertyName.Contains("Unknown") && e.PropertyType != typeof(float))
            {
                var col = new DataGridTextColumn();
                //col.ItemsSource = Enum.GetValues(e.PropertyType);
                var b = new Binding(e.PropertyName);
                col.Binding = b;
                b.Converter = new HexConverter();
                //col.DisplayMemberPath = "Name";
                col.Header = e.PropertyName.Replace("Unknown", "Unk");
                e.Column = col;
            }
            //Raw Enum Display
            if (e.PropertyType.BaseType == typeof(Enum) && RawCheckbox.IsChecked.Value)
            {
                var col = new DataGridTextColumn();
                //col.ItemsSource = Enum.GetValues(e.PropertyType);
                var b = new Binding(e.PropertyName);
                col.Binding = b;

                Type type = typeof(EnumHexConverter<>).MakeGenericType(e.PropertyType);
                b.Converter = Activator.CreateInstance(type) as IValueConverter;

                //col.DisplayMemberPath = "Name";
                col.Header = e.PropertyName;
                e.Column = col;
            }
            //Enum Dispaly (ComboBox)
            else
                if (e.PropertyType.BaseType == typeof(Enum) && !Attribute.IsDefined(e.PropertyType, typeof(FlagsAttribute)))
                {
                    var col = new DataGridComboBoxColumn();
                    col.ItemsSource = Enum.GetValues(e.PropertyType);
                    col.SelectedItemBinding = new Binding(e.PropertyName);
                    col.Header = e.PropertyName;
                    e.Column = col;
                }// Enum Display (Checkboxes) for flags
                else if (e.PropertyType.BaseType == typeof(Enum))
                {
                    var col = new DataGridTemplateColumn();
                    col.CellTemplateSelector = new EnumTemplateGenerator(e.PropertyType, e.PropertyName, false);
                    col.CellEditingTemplateSelector = new EnumTemplateGenerator(e.PropertyType, e.PropertyName, true);
                    col.Header = e.PropertyName;
                    e.Column = col;
                }
            if (e.PropertyName == "Raw" || e.PropertyName == "ScriptIndex"||(e.Column.IsReadOnly && e.PropertyName != "Name"))
                e.Cancel = true;
            if (e.PropertyName == "StartFrame")
            {
                e.Column.Header = "S";
                e.Column.DisplayIndex = 0;
            }
            if (e.PropertyName == "EndFrame")
            {
                e.Column.Header = "E";
                e.Column.DisplayIndex = 1;
            }
            if (e.PropertyName == "Animation" && !RawCheckbox.IsChecked.Value)
            {
                var column = new DataGridTemplateColumn();
                column.CellTemplate = App.Current.Resources["AnimationViewTemplate"] as DataTemplate;
                column.CellEditingTemplate = App.Current.Resources["AnimationEditTemplate"] as DataTemplate;
                column.Header = e.PropertyName;
                e.Column = column;

            }
            if (e.PropertyName == "HitGFX" && !RawCheckbox.IsChecked.Value)
            {
                var c = new DataGridComboBoxColumn();
                var b = new Binding(e.PropertyName);

                b.Converter = new IndexReferenceTypeConverter();
                var data = RainbowLib.ResourceManager.Load("VFX2");
                b.ConverterParameter = data;
                c.ItemsSource = data.Values;
                c.Header = e.PropertyName;
                //c.SelectedValuePath = "Value";
                c.DisplayMemberPath = "Name";
                c.SelectedValueBinding = b;
                e.Column = c;
            }
            if (e.PropertyName == "ShortParam" && !RawCheckbox.IsChecked.Value)
            {
                var column = new DataGridTemplateColumn();
                column.CellTemplateSelector = new EtcTemplateSelector(false);
                column.CellEditingTemplateSelector = new EtcTemplateSelector(true);
                column.Header = e.PropertyName;
                e.Column = column;
            }
            // start anotak
            if (e.PropertyName == "RawString")
            {
                // this hurt my braaaaaaiinnnsss
                var col = new DataGridTextColumn();
                var b = new Binding(e.PropertyName);
                col.Binding = b;
                col.EditingElementStyle = (Style)Application.Current.Resources["RawStringBox"];
                if (col.EditingElementStyle == null)
                    throw new Exception("rawstring style problem");
                col.Header = "RawString";
                e.Column = col;
            }
            // end anotak
        }
コード例 #45
0
ファイル: AddWindow.g.cs プロジェクト: ChuGer/Recipe-CookBook
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.grid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 3:
     this.label5 = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.addRecipeButton = ((System.Windows.Controls.Button)(target));
     
     #line 10 "..\..\..\AddWindow.xaml"
     this.addRecipeButton.Click += new System.Windows.RoutedEventHandler(this.AddRecipeClick);
     
     #line default
     #line hidden
     return;
     case 5:
     this.label6 = ((System.Windows.Controls.Label)(target));
     return;
     case 6:
     this.recipeName = ((PixelLab.Wpf.InfoTextBox)(target));
     
     #line 25 "..\..\..\AddWindow.xaml"
     this.recipeName.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.RecipeNameTextChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.recipeType = ((System.Windows.Controls.ComboBox)(target));
     
     #line 26 "..\..\..\AddWindow.xaml"
     this.recipeType.GotFocus += new System.Windows.RoutedEventHandler(this.RecipeTypeGotFocus);
     
     #line default
     #line hidden
     return;
     case 8:
     this.addRowButton = ((System.Windows.Controls.Button)(target));
     
     #line 27 "..\..\..\AddWindow.xaml"
     this.addRowButton.Click += new System.Windows.RoutedEventHandler(this.AddRowClick);
     
     #line default
     #line hidden
     return;
     case 9:
     this.dataGrid1 = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 10:
     this.dgCombo2 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 11:
     this.recipeText = ((PixelLab.Wpf.InfoTextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #46
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 5 "..\..\MainWindow.xaml"
     ((HarvestUtilities.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed);
     
     #line default
     #line hidden
     return;
     case 2:
     this.miOptions = ((System.Windows.Controls.MenuItem)(target));
     
     #line 93 "..\..\MainWindow.xaml"
     this.miOptions.Click += new System.Windows.RoutedEventHandler(this.miOptions_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.miChangeUser = ((System.Windows.Controls.MenuItem)(target));
     
     #line 94 "..\..\MainWindow.xaml"
     this.miChangeUser.Click += new System.Windows.RoutedEventHandler(this.miChangeUser_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.cbPackageName = ((System.Windows.Controls.ComboBox)(target));
     
     #line 112 "..\..\MainWindow.xaml"
     this.cbPackageName.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbPackageName_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 5:
     this.txbReleaseDate = ((System.Windows.Controls.DatePicker)(target));
     
     #line 116 "..\..\MainWindow.xaml"
     this.txbReleaseDate.SelectedDateChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.txbReleaseDate_SelectedDateChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txbDevComplete = ((System.Windows.Controls.DatePicker)(target));
     
     #line 119 "..\..\MainWindow.xaml"
     this.txbDevComplete.SelectedDateChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.txbDevComplete_SelectedDateChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.cbBackport = ((System.Windows.Controls.ComboBox)(target));
     
     #line 122 "..\..\MainWindow.xaml"
     this.cbBackport.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbBackport_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 8:
     this.dgSpecialIns = ((System.Windows.Controls.DataGrid)(target));
     
     #line 129 "..\..\MainWindow.xaml"
     this.dgSpecialIns.CurrentCellChanged += new System.EventHandler<System.EventArgs>(this.dgSpecialIns_CurrentCellChanged);
     
     #line default
     #line hidden
     return;
     case 9:
     this.Instruction = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 10:
     this.dgDependencies = ((System.Windows.Controls.DataGrid)(target));
     
     #line 156 "..\..\MainWindow.xaml"
     this.dgDependencies.CurrentCellChanged += new System.EventHandler<System.EventArgs>(this.dgDependency_CurrentCellChanged);
     
     #line default
     #line hidden
     return;
     case 11:
     this.HarvestId = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 12:
     this.cbFileTypes = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 13:
     this.txbFilePath = ((System.Windows.Controls.TextBox)(target));
     
     #line 196 "..\..\MainWindow.xaml"
     this.txbFilePath.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.txbFilePath_MouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 14:
     this.btnAddFile = ((System.Windows.Controls.Button)(target));
     
     #line 197 "..\..\MainWindow.xaml"
     this.btnAddFile.Click += new System.Windows.RoutedEventHandler(this.btnAddFile_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.txbComments = ((System.Windows.Controls.TextBox)(target));
     return;
     case 16:
     this.dgFiles = ((System.Windows.Controls.DataGrid)(target));
     
     #line 202 "..\..\MainWindow.xaml"
     this.dgFiles.CurrentCellChanged += new System.EventHandler<System.EventArgs>(this.dgFiles_CurrentCellChanged);
     
     #line default
     #line hidden
     
     #line 202 "..\..\MainWindow.xaml"
     this.dgFiles.BeginningEdit += new System.EventHandler<System.Windows.Controls.DataGridBeginningEditEventArgs>(this.dgFiles_BeginningEdit);
     
     #line default
     #line hidden
     
     #line 202 "..\..\MainWindow.xaml"
     this.dgFiles.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.dgFiles_MouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 17:
     this.xmlTree = ((System.Windows.Controls.TreeView)(target));
     return;
     case 18:
     this.btnSubmit = ((System.Windows.Controls.Button)(target));
     
     #line 256 "..\..\MainWindow.xaml"
     this.btnSubmit.Click += new System.Windows.RoutedEventHandler(this.btnSubmit_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.btnCopy = ((System.Windows.Controls.Button)(target));
     
     #line 257 "..\..\MainWindow.xaml"
     this.btnCopy.Click += new System.Windows.RoutedEventHandler(this.btnCopy_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #47
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnAceptar = ((System.Windows.Controls.Button)(target));
     
     #line 18 "..\..\..\Windows\ProductosWindow.xaml"
     this.btnAceptar.Click += new System.Windows.RoutedEventHandler(this.btnAceptar_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnSalir = ((System.Windows.Controls.Button)(target));
     
     #line 19 "..\..\..\Windows\ProductosWindow.xaml"
     this.btnSalir.Click += new System.Windows.RoutedEventHandler(this.btnSalir_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.dgProductos = ((System.Windows.Controls.DataGrid)(target));
     
     #line 20 "..\..\..\Windows\ProductosWindow.xaml"
     this.dgProductos.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.btnAceptar_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.dgcbcTiposProductos = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 5:
     this.dgcbcMedidas = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 6:
     this.dgcbcPresentaciones = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 7:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     
     #line 35 "..\..\..\Windows\ProductosWindow.xaml"
     this.txtBusqueda.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBusqueda_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #48
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     
     #line 20 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnNuevo.Click += new System.Windows.RoutedEventHandler(this.btnNuevo_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     
     #line 21 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnEditar.Click += new System.Windows.RoutedEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     
     #line 22 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnGuardar.Click += new System.Windows.RoutedEventHandler(this.btnGuardar_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     
     #line 23 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnCancelar.Click += new System.Windows.RoutedEventHandler(this.btnCancelar_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.dgMedidasSecundarias = ((System.Windows.Controls.DataGrid)(target));
     
     #line 24 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.dgMedidasSecundarias.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.btnEditar_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.dgcbcMedidas = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 7:
     this.txtAbreviatura = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.txtDescripcion = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.nudEquivalenciaUnidadesBase = ((MahApps.Metro.Controls.NumericUpDown)(target));
     return;
     case 10:
     this.txtEquivalencia = ((System.Windows.Controls.TextBox)(target));
     return;
     case 11:
     this.btnSalir = ((System.Windows.Controls.Button)(target));
     
     #line 42 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnSalir.Click += new System.Windows.RoutedEventHandler(this.btnSalir_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     
     #line 43 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.btnEliminar.Click += new System.Windows.RoutedEventHandler(this.btnEliminar_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     
     #line 48 "..\..\..\Windows\MedidasSecundariasWindow.xaml"
     this.txtBusqueda.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBusqueda_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #49
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.btnNuevo = ((System.Windows.Controls.Button)(target));
     return;
     case 2:
     this.btnEditar = ((System.Windows.Controls.Button)(target));
     return;
     case 3:
     this.btnEliminar = ((System.Windows.Controls.Button)(target));
     return;
     case 4:
     this.btnGuardar = ((System.Windows.Controls.Button)(target));
     return;
     case 5:
     this.btnCancelar = ((System.Windows.Controls.Button)(target));
     return;
     case 6:
     this.txtRuc = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.btnBusquedaRuc = ((System.Windows.Controls.Button)(target));
     
     #line 112 "..\..\..\Pages\ProveedoresPage.xaml"
     this.btnBusquedaRuc.Click += new System.Windows.RoutedEventHandler(this.btnBusquedaRuc_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.txtNombre = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.txtTelefono = ((System.Windows.Controls.TextBox)(target));
     return;
     case 10:
     this.txtDireccion = ((System.Windows.Controls.TextBox)(target));
     return;
     case 11:
     this.dgPersonas = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 12:
     this.dgcbcTipoDocumento = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 13:
     this.dgcbcTipoUsuario = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 14:
     this.txtBusqueda = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #50
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 5 "..\..\Inv.xaml"
     ((InvM.Inv)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded_1);
     
     #line default
     #line hidden
     return;
     case 2:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.cOMPANYComboBox = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 4:
     this.dg = ((System.Windows.Controls.DataGrid)(target));
     
     #line 29 "..\..\Inv.xaml"
     this.dg.CellEditEnding += new System.EventHandler<System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dg_CellEditEnding_1);
     
     #line default
     #line hidden
     return;
     case 5:
     this.CB = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 6:
     this.qTYColumn = ((System.Windows.Controls.DataGridTextColumn)(target));
     return;
     case 7:
     this.pRICEColumn = ((System.Windows.Controls.DataGridTextColumn)(target));
     return;
     case 8:
     this.total = ((System.Windows.Controls.DataGridTextColumn)(target));
     return;
     case 9:
     
     #line 40 "..\..\Inv.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);
     
     #line default
     #line hidden
     return;
     case 10:
     this.GT = ((System.Windows.Controls.TextBox)(target));
     return;
     case 11:
     this.DU = ((System.Windows.Controls.TextBox)(target));
     return;
     case 12:
     this.DO = ((System.Windows.Controls.TextBox)(target));
     return;
     case 13:
     this.Cat = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 14:
     
     #line 52 "..\..\Inv.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);
     
     #line default
     #line hidden
     return;
     case 15:
     this.DP = ((System.Windows.Controls.DatePicker)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #51
0
ファイル: COM.g.i.cs プロジェクト: miaozhendaoren/SRS-Maker
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ComboBox_CanNum = ((System.Windows.Controls.ComboBox)(target));
     
     #line 29 "..\..\..\View\COM.xaml"
     this.ComboBox_CanNum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.ComboBox_CanClock = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 3:
     this.DataGrid_CAN = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 4:
     this.DataGridComboBoxColumn_NewDriver = ((System.Windows.Controls.DataGridTemplateColumn)(target));
     return;
     case 7:
     this.DataGridComboBoxColumn_IC = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 8:
     this.DataGridComboBoxColumn_Tx = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 9:
     this.DataGridComboBoxColumn_Rx = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 10:
     this.DataGridComboBoxColumn_Err = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 11:
     this.DataGridComboBoxColumn_Control = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 12:
     this.DataGridComboBoxColumn_EN = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 13:
     this.DataGridComboBoxColumn_STN = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 14:
     this.DataGridComboBoxColumn_NM = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 15:
     this.DataGridComboBoxColumn_CanRate = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 16:
     this.DataGridComboBoxColumn_NBT = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 17:
     this.DataGridComboBoxColumn_SP = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 18:
     this.DataGridComboBoxColumn_SJW = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 19:
     this.ComboBox_AscNum = ((System.Windows.Controls.ComboBox)(target));
     
     #line 176 "..\..\..\View\COM.xaml"
     this.ComboBox_AscNum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox_Asc_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 20:
     this.DataGrid_ASC = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 21:
     this.DataGridComboBoxColumn_AscDriverIndex = ((System.Windows.Controls.DataGridTemplateColumn)(target));
     return;
     case 22:
     this.DataGridComboBoxColumn_AscPhy = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 23:
     this.DataGridComboBoxColumn_AscUsage = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 24:
     this.DataGridComboBoxColumn_AscLinRate = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 25:
     this.DataGridComboBoxColumn_AscLinEnPin = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 26:
     this.DataGridComboBoxColumn_AscLinWakeupPin = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 27:
     this.ComboBox_SpiNum = ((System.Windows.Controls.ComboBox)(target));
     
     #line 242 "..\..\..\View\COM.xaml"
     this.ComboBox_SpiNum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 28:
     this.DataGrid_SPI = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 29:
     this.DataGridComboBoxColumn_SpiDriverIndex = ((System.Windows.Controls.DataGridTemplateColumn)(target));
     return;
     case 30:
     this.DataGridComboBoxColumn_SpiPhy = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 31:
     this.DataGridComboBoxColumn_AscUsage1 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 32:
     this.DataGridComboBoxColumn_AscLinRate1 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 33:
     this.DataGridComboBoxColumn_AscLinEnPin1 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 34:
     this.DataGridComboBoxColumn_AscLinWakeupPin1 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #52
0
 // Event which runs as columns in the main grid are auto-generated
 private void StudentLearningExperiences_DataGrid_OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     // don't show the ID column
     if (e.PropertyName == "ID") {
         e.Cancel = true;
     // Use ComboBox instead of text for Semester
     } else if (e.PropertyName == "Semester") {
         DataGridComboBoxColumn Combo = new DataGridComboBoxColumn();
         Combo.TextBinding = new Binding(e.PropertyName);
         Combo.ItemsSource = semesters;
         Combo.Header = "Semester";
         e.Column = Combo;
     // Use ComboBox instead of text for Type of Learning
     } else if (e.PropertyName == "TypeofLearning") {
         DataGridComboBoxColumn Combo = new DataGridComboBoxColumn();
         Combo.TextBinding = new Binding(e.PropertyName);
         Combo.ItemsSource = servicelearningtype;
         Combo.Header = "Type of Learning";
         e.Column = Combo;
     }
     #if Demo
     if (e.PropertyName == "Student_ID") e.Cancel = true;
     #endif
 }
コード例 #53
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 4 "..\..\..\MainWindow.xaml"
     ((DevicesSimulationApp.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.cmdSelectAll = ((System.Windows.Controls.CheckBox)(target));
     
     #line 40 "..\..\..\MainWindow.xaml"
     this.cmdSelectAll.Checked += new System.Windows.RoutedEventHandler(this.cmdSelectAll_Checked);
     
     #line default
     #line hidden
     
     #line 40 "..\..\..\MainWindow.xaml"
     this.cmdSelectAll.Unchecked += new System.Windows.RoutedEventHandler(this.cmdSelectAll_Unchecked);
     
     #line default
     #line hidden
     return;
     case 3:
     this.cmdPause = ((System.Windows.Controls.Button)(target));
     return;
     case 4:
     this.cmdStop = ((System.Windows.Controls.Button)(target));
     
     #line 48 "..\..\..\MainWindow.xaml"
     this.cmdStop.Click += new System.Windows.RoutedEventHandler(this.cmdStop_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.cmdStart = ((System.Windows.Controls.Button)(target));
     
     #line 53 "..\..\..\MainWindow.xaml"
     this.cmdStart.Click += new System.Windows.RoutedEventHandler(this.cmdStart_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.cmdAdd = ((System.Windows.Controls.Button)(target));
     
     #line 60 "..\..\..\MainWindow.xaml"
     this.cmdAdd.Click += new System.Windows.RoutedEventHandler(this.cmdAdd_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.cmdDelete = ((System.Windows.Controls.Button)(target));
     
     #line 65 "..\..\..\MainWindow.xaml"
     this.cmdDelete.Click += new System.Windows.RoutedEventHandler(this.cmdDelete_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.gridDevices = ((System.Windows.Controls.DataGrid)(target));
     
     #line 78 "..\..\..\MainWindow.xaml"
     this.gridDevices.CellEditEnding += new System.EventHandler<System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dataGrid_CellEditEnding);
     
     #line default
     #line hidden
     
     #line 78 "..\..\..\MainWindow.xaml"
     this.gridDevices.CurrentCellChanged += new System.EventHandler<System.EventArgs>(this.dataGrid_CurrentCellChanged);
     
     #line default
     #line hidden
     
     #line 79 "..\..\..\MainWindow.xaml"
     this.gridDevices.SourceUpdated += new System.EventHandler<System.Windows.Data.DataTransferEventArgs>(this.dataGrid_SourceUpdated);
     
     #line default
     #line hidden
     return;
     case 9:
     this.gridComboStatus = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #54
0
ファイル: DataGridColumn.cs プロジェクト: JianwenSun/cc
        /// <summary>
        /// Helper Method which creates a default DataGridColumn object for the specified property type.
        /// </summary>
        /// <param name="itemProperty"></param>
        /// <returns></returns>
        internal static DataGridColumn CreateDefaultColumn(ItemPropertyInfo itemProperty)
        {
            Debug.Assert(itemProperty != null && itemProperty.PropertyType != null, "itemProperty and/or its PropertyType member cannot be null");

            DataGridColumn dataGridColumn = null;
            DataGridComboBoxColumn comboBoxColumn = null;
            Type propertyType = itemProperty.PropertyType;

            // determine the type of column to be created and create one
            if (propertyType.IsEnum)
            {
                comboBoxColumn = new DataGridComboBoxColumn();
                comboBoxColumn.ItemsSource = Enum.GetValues(propertyType);
                dataGridColumn = comboBoxColumn;
            }
            else if (typeof(string).IsAssignableFrom(propertyType))
            {
                dataGridColumn = new DataGridTextColumn();
            }
            else if (typeof(bool).IsAssignableFrom(propertyType))
            {
                dataGridColumn = new DataGridCheckBoxColumn();
            }
            else if (typeof(Uri).IsAssignableFrom(propertyType))
            {
                dataGridColumn = new DataGridHyperlinkColumn();
            }
            else
            {
                dataGridColumn = new DataGridTextColumn();
            }

            // determine if the datagrid can sort on the column or not
            if (!typeof(IComparable).IsAssignableFrom(propertyType))
            {
                dataGridColumn.CanUserSort = false;
            }

            dataGridColumn.Header = itemProperty.Name;

            // Set the data field binding for such created columns and
            // choose the BindingMode based on editability of the property.
            DataGridBoundColumn boundColumn = dataGridColumn as DataGridBoundColumn;
            if (boundColumn != null || comboBoxColumn != null)
            {
                Binding binding = new Binding(itemProperty.Name);
                if (comboBoxColumn != null)
                {
                    comboBoxColumn.SelectedItemBinding = binding;
                }
                else
                {
                    boundColumn.Binding = binding;
                }

                PropertyDescriptor pd = itemProperty.Descriptor as PropertyDescriptor;
                if (pd != null)
                {
                    if (pd.IsReadOnly)
                    {
                        binding.Mode = BindingMode.OneWay;
                        dataGridColumn.IsReadOnly = true;
                    }
                }
                else
                {
                    PropertyInfo pi = itemProperty.Descriptor as PropertyInfo;
                    if (pi != null)
                    {
                        if (!pi.CanWrite)
                        {
                            binding.Mode = BindingMode.OneWay;
                            dataGridColumn.IsReadOnly = true;
                        }
                    }
                }
            }

            return dataGridColumn;
        }
コード例 #55
0
ファイル: ScheduleView.g.i.cs プロジェクト: renhualu/tsccui32
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 15 "..\..\..\..\Pages\Schedules\ScheduleView.xaml"
     ((tscui.Pages.Schedules.ScheduleView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);
     
     #line default
     #line hidden
     
     #line 15 "..\..\..\..\Pages\Schedules\ScheduleView.xaml"
     ((tscui.Pages.Schedules.ScheduleView)(target)).Unloaded += new System.Windows.RoutedEventHandler(this.UserControl_Unloaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.scheduleViewModel = ((tscui.Pages.Schedules.ScheduleViewModel)(target));
     return;
     case 3:
     this.scheduleDataGrid = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 4:
     this.cbxucCtrl = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 5:
     this.ucTimePatternId = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 6:
     this.sldScheduleId = ((System.Windows.Controls.Slider)(target));
     
     #line 60 "..\..\..\..\Pages\Schedules\ScheduleView.xaml"
     this.sldScheduleId.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.sldScheduleId_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.tbkScheduleId = ((System.Windows.Controls.TextBlock)(target));
     
     #line 61 "..\..\..\..\Pages\Schedules\ScheduleView.xaml"
     this.tbkScheduleId.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tbkScheduleId_MouseDown);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 62 "..\..\..\..\Pages\Schedules\ScheduleView.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }