Ejemplo n.º 1
0
        private Microsoft.Windows.Controls.DataGridTemplateColumn CreateTemplateColumn(int i)
        {
            try
            {
                Microsoft.Windows.Controls.DataGridTemplateColumn column = new Microsoft.Windows.Controls.DataGridTemplateColumn();
                column.Header = "sub-value";

                object o = XamlReader.Load(new XmlTextReader(CreateColumnTemplate(i))); //display template
                column.CellTemplate = (DataTemplate)o;
                return(column);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.Write(ex.Message);
                return(null);
            }
        }
Ejemplo n.º 2
0
        private void FillGrid(List <ROMAttrData> table)
        {
            grid.ItemsSource = null;
            grid.Columns.Clear();

            Microsoft.Windows.Controls.DataGridTextColumn attrCol = CreateTextColumn("attr", "attr");
            attrCol.Binding = new System.Windows.Data.Binding("Attribute");
            grid.Columns.Add(attrCol);
            Microsoft.Windows.Controls.DataGridTextColumn valueCol = CreateTextColumn("value", "value");
            valueCol.Binding = new System.Windows.Data.Binding("Value");
            grid.Columns.Add(valueCol);

            int AdditionalCols = 0;

            foreach (ROMAttrData row in table)
            {
                int cnt = 0;
                if (row.SubValues != null)
                {
                    foreach (string s in row.SubValues)
                    {
                        cnt++;
                        if (cnt > AdditionalCols)
                        {
                            AdditionalCols = cnt;
                        }
                    }
                }
            }

            for (int i = 0; i < AdditionalCols; i++)
            {
                Microsoft.Windows.Controls.DataGridTemplateColumn col = CreateTemplateColumn(i);
                if (col != null)
                {
                    grid.Columns.Add(col);
                }
            }

            grid.ItemsSource = table;
        }
Ejemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 6 "..\..\..\UserControls\DataUserControl.xaml"
                ((Pointel.Interactions.Email.UserControls.DataUserControl)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);

            #line default
            #line hidden
                return;

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

            #line 17 "..\..\..\UserControls\DataUserControl.xaml"
                this.tabDataUC.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabDataUC_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.tbItemCaseData = ((System.Windows.Controls.TabItem)(target));
                return;

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

            #line 32 "..\..\..\UserControls\DataUserControl.xaml"
                this.btnAddCaseData.Click += new System.Windows.RoutedEventHandler(this.btnAddCaseData_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.imgAddCase = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.DGCaseDataInfo = ((Microsoft.Windows.Controls.DataGrid)(target));

            #line 55 "..\..\..\UserControls\DataUserControl.xaml"
                this.DGCaseDataInfo.BeginningEdit += new System.EventHandler <Microsoft.Windows.Controls.DataGridBeginningEditEventArgs>(this.DGCaseDataInfo_BeginningEdit);

            #line default
            #line hidden

            #line 55 "..\..\..\UserControls\DataUserControl.xaml"
                this.DGCaseDataInfo.PreparingCellForEdit += new System.EventHandler <Microsoft.Windows.Controls.DataGridPreparingCellForEditEventArgs>(this.DGCaseDataInfo_PreparingCellForEdit);

            #line default
            #line hidden

            #line 55 "..\..\..\UserControls\DataUserControl.xaml"
                this.DGCaseDataInfo.RowEditEnding += new System.EventHandler <Microsoft.Windows.Controls.DataGridRowEditEndingEventArgs>(this.DGCaseDataInfo_RowEditEnding);

            #line default
            #line hidden

            #line 56 "..\..\..\UserControls\DataUserControl.xaml"
                this.DGCaseDataInfo.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.DGCaseDataInfo_PreviewKeyDown);

            #line default
            #line hidden

            #line 56 "..\..\..\UserControls\DataUserControl.xaml"
                this.DGCaseDataInfo.KeyUp += new System.Windows.Input.KeyEventHandler(this.txtValue_KeyUp);

            #line default
            #line hidden
                return;

            case 7:
                this.Copy = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 8:
                this.cdValue = ((Microsoft.Windows.Controls.DataGridTemplateColumn)(target));
                return;

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

            case 12:
                this.tabitemDisposition = ((System.Windows.Controls.TabItem)(target));
                return;

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

            case 14:
                this.tbItemNotes = ((System.Windows.Controls.TabItem)(target));
                return;

            case 15:
                this.txtNotes = ((System.Windows.Controls.TextBox)(target));

            #line 175 "..\..\..\UserControls\DataUserControl.xaml"
                this.txtNotes.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtNotes_TextChanged);

            #line default
            #line hidden
                return;

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

            #line 177 "..\..\..\UserControls\DataUserControl.xaml"
                this.btnSaveNote.Click += new System.Windows.RoutedEventHandler(this.btnSaveNote_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.tbDate = ((System.Windows.Controls.Label)(target));
     return;
     case 2:
     this.tbRunHours = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 3:
     this.tbDowntime = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 4:
     this.tbAvailability = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 5:
     this.dkDowntime = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 6:
     this.BreakdownGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 7:
     this.btnBreakdown = ((System.Windows.Controls.Button)(target));
     return;
     case 8:
     this.tbBreakdown = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.QualityGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 10:
     this.btnQuality = ((System.Windows.Controls.Button)(target));
     return;
     case 11:
     this.tbQuality = ((System.Windows.Controls.TextBox)(target));
     return;
     case 12:
     this.PSGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 13:
     this.btnPS = ((System.Windows.Controls.Button)(target));
     return;
     case 14:
     this.tbPS = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.LineStatsGrid = ((Microsoft.Windows.Controls.DataGrid)(target));
     return;
     case 16:
     this.availabilityIndicatorCol = ((Microsoft.Windows.Controls.DataGridTemplateColumn)(target));
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 5
0
        private static void OnTemplateColumnSortMemberPathChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataGridTemplateColumn column = (DataGridTemplateColumn)d;

            column.CoerceValue(CanUserSortProperty);
        }
Ejemplo n.º 6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.CallDataWin = ((Agent.Interaction.Desktop.CallDataPopup)(target));

            #line 7 "..\..\CallDataPopup.xaml"
                this.CallDataWin.Activated += new System.EventHandler(this.Window_Activated);

            #line default
            #line hidden

            #line 8 "..\..\CallDataPopup.xaml"
                this.CallDataWin.Deactivated += new System.EventHandler(this.Window_Deactivated);

            #line default
            #line hidden

            #line 8 "..\..\CallDataPopup.xaml"
                this.CallDataWin.Loaded += new System.Windows.RoutedEventHandler(this.CallDataWin_Loaded);

            #line default
            #line hidden

            #line 8 "..\..\CallDataPopup.xaml"
                this.CallDataWin.StateChanged += new System.EventHandler(this.CallDataWin_StateChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.MainBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 3:
                this.RightSideRect = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 4:
                this.RightbottomSideRect = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 5:
                this.BottomSideRect = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 6:

            #line 42 "..\..\CallDataPopup.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 7:
                this.imgSoftIcon = ((System.Windows.Controls.Image)(target));
                return;

            case 8:
                this.lblTitleStatus = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            #line 59 "..\..\CallDataPopup.xaml"
                this.btnPin.MouseEnter += new System.Windows.Input.MouseEventHandler(this.btnPin_MouseEnter);

            #line default
            #line hidden

            #line 59 "..\..\CallDataPopup.xaml"
                this.btnPin.MouseLeave += new System.Windows.Input.MouseEventHandler(this.btnPin_MouseLeave);

            #line default
            #line hidden

            #line 59 "..\..\CallDataPopup.xaml"
                this.btnPin.Click += new System.Windows.RoutedEventHandler(this.btnPin_Click);

            #line default
            #line hidden
                return;

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

            #line 60 "..\..\CallDataPopup.xaml"
                this.btnMinimize.Click += new System.Windows.RoutedEventHandler(this.btnMinimize_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.btnExit = ((System.Windows.Controls.Button)(target));

            #line 61 "..\..\CallDataPopup.xaml"
                this.btnExit.Click += new System.Windows.RoutedEventHandler(this.btnExit_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.grupBorder = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 13:

            #line 78 "..\..\CallDataPopup.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Himss_Click);

            #line default
            #line hidden
                return;

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

            #line 84 "..\..\CallDataPopup.xaml"
                this.btnAddCallData.Click += new System.Windows.RoutedEventHandler(this.btnAddCallData_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.txtAttachDataInfo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.DGAttachData = ((Microsoft.Windows.Controls.DataGrid)(target));

            #line 107 "..\..\CallDataPopup.xaml"
                this.DGAttachData.BeginningEdit += new System.EventHandler <Microsoft.Windows.Controls.DataGridBeginningEditEventArgs>(this.DGAttachData_BeginningEdit);

            #line default
            #line hidden

            #line 107 "..\..\CallDataPopup.xaml"
                this.DGAttachData.PreparingCellForEdit += new System.EventHandler <Microsoft.Windows.Controls.DataGridPreparingCellForEditEventArgs>(this.DGAttachData_PreparingCellForEdit);

            #line default
            #line hidden

            #line 107 "..\..\CallDataPopup.xaml"
                this.DGAttachData.RowEditEnding += new System.EventHandler <Microsoft.Windows.Controls.DataGridRowEditEndingEventArgs>(this.DGAttachData_RowEditEnding);

            #line default
            #line hidden

            #line 107 "..\..\CallDataPopup.xaml"
                this.DGAttachData.KeyUp += new System.Windows.Input.KeyEventHandler(this.DGAttachData_KeyUp);

            #line default
            #line hidden
                return;

            case 17:
                this.cdValue = ((Microsoft.Windows.Controls.DataGridTemplateColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 7
0
        private Microsoft.Windows.Controls.DataGridTemplateColumn CreateTemplateColumn(int i)
        {
            try
            {
                Microsoft.Windows.Controls.DataGridTemplateColumn column = new Microsoft.Windows.Controls.DataGridTemplateColumn();
                column.Header = "sub-value";

                object o = XamlReader.Load(new XmlTextReader(CreateColumnTemplate(i))); //display template
                column.CellTemplate = (DataTemplate)o;
                return column;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.Write(ex.Message);
                return null;
            }
        }