Пример #1
0
        private void ControlsUpdateView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.UpdateView(i_View);

            if (this._ConfigLayoutControl.Parent != null)
            {
                this._ConfigLayoutControl.UpdateView(i_View);

                (i_View as Views.MatrixGroupView).WidthEnable = true;
            }

            if (this._ConfigHeadersControl.Parent != null)
            {
                this._ConfigHeadersControl.UpdateView(i_View);
            }

            if (this._ConfigMatrixInfo.Parent != null)
            {
                this._ConfigMatrixInfo.UpdateView(i_View);
            }

            if (this._ConfigGridInfo.Parent != null)
            {
                this._ConfigGridInfo.UpdateView(i_View);
            }
        }
Пример #2
0
        private void ControlsSetView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.SetView(i_View);

            this._ConfigLayoutControl.SetView(i_View);

            this._ConfigHeadersControl.SetView(i_View);             //2008-8-28 9:59:30@simon
        }
Пример #3
0
        private void ControlsUpdateView(Views.ExControlView i_View)
        {
            this._ConfigHorizonGroup.UpdateView(i_View);

            if (C_FieldAjustSize.Parent != null)
            {
                this.C_FieldAjustSize.UpdateView(i_View);
            }
        }
Пример #4
0
        private void ControlsSetView(Views.ExControlView i_View)
        {
            this.C_GridControlSetting.SetView(i_View);

            this.C_FieldAjustSize.SetView(i_View);

            this.C_GroupInfoSetting.SetView(i_View);

            this._ConfigHeadersControl.SetView(i_View);             //2008-8-28 9:59:30@simon
        }
        private void CreateStatControlView(DataTable m_Table, Views.ExControlView i_View)
        {
            i_View.UpdateView();

            this.SetColumnRow(i_View);

            this.CreateTableColumnStyle(m_Table, i_View);

            this.dataGrid1.Font = (i_View as Views.StatControlView).Styles.RowStyle.Font;               //07-02-2008@Scott
        }
Пример #6
0
        private void ControlsUpdateView(Views.ExControlView i_View)
        {
            if (this._ConfigMaskedText.Parent != null)
            {
                this._ConfigMaskedText.UpdateView(i_View);
            }

            if (this._ConfigGroupingLayout.Parent != null)
            {
                this._ConfigGroupingLayout.UpdateView(i_View);
            }
        }
Пример #7
0
        private void ControlsUpdateView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.UpdateView(i_View);

            if (this._ConfigLayoutControl.Parent != null)
            {
                this._ConfigLayoutControl.UpdateView(i_View);
            }
            if (this._ConfigHeadersControl.Parent != null)
            {
                this._ConfigHeadersControl.UpdateView(i_View);
            }
        }
        private void CreateTableColumnStyle(DataTable m_Table, Views.ExControlView i_View)
        {
            //Columns width
            WebbTable i_PrintTable = i_View.PrintingTable;

            if (i_PrintTable == null)
            {
                return;
            }

            DataGridColumnStyle m_ColStyle = null;

            this.dataGrid1.TableStyles.Clear();

            DataGridTableStyle m_TableStyle = new DataGridTableStyle();

            m_TableStyle.AllowSorting = false;

            m_TableStyle.MappingName = m_Table.TableName;

            int m_cols = i_PrintTable.GetColumns();

            int m_rows = i_PrintTable.GetRows();

            //System.Diagnostics.Debug.Assert(m_Table.Rows.Count == m_rows && m_Table.Columns.Count == m_cols);

            for (int m_col = 0; m_col < m_cols; m_col++)
            {
                m_ColStyle = new DataGridTextBoxColumn();

                WebbTableCell cell = i_PrintTable.GetCell(0, m_col) as WebbTableCell;

                if (cell != null)                       //Modified at 2008-11-11 11:09:29@Scott
                {
                    m_ColStyle.Width = i_PrintTable.GetCell(0, m_col).CellStyle.Width;

                    m_ColStyle.MappingName = m_Table.Columns[m_col].ColumnName;

                    m_ColStyle.HeaderText = string.Empty;

                    m_TableStyle.GridColumnStyles.Add(m_ColStyle);
                }
            }

            this.dataGrid1.TableStyles.Add(m_TableStyle);
        }
Пример #9
0
        private void ControlsSetView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.SetView(i_View);

            this._ConfigLayoutControl.SetView(i_View);

            this._ConfigMatrixInfo.SetView(i_View);

            this._ConfigHeadersControl.SetView(i_View);             //2008-8-28 9:59:30@simon

            if ((i_View as Views.MatrixGroupView).MatrixDisplay == Views.ComputedStyle.Group)
            {
                this.C_GridSetting.Visible = false;
            }
            else
            {
                this.C_GridSetting.Visible = true;

                this._ConfigGridInfo.SetView(i_View);                 //2008-8-28 9:59:30@simon
            }
        }
Пример #10
0
        private void ControlsUpdateView(Views.ExControlView i_View)
        {
            if (C_GridControlSetting != null)
            {
                this.C_GridControlSetting.UpdateView(i_View);
            }

            if (C_GroupInfoSetting != null && this.C_GroupInfoSetting.Parent != null)
            {
                this.C_GroupInfoSetting.UpdateView(i_View);
            }

            if (C_FieldAjustSize != null && this.C_FieldAjustSize.Parent != null)
            {
                this.C_FieldAjustSize.UpdateView(i_View);                                                                       //06-30-2008@Scott
            }
            if (this._ConfigHeadersControl.Parent != null)
            {
                this._ConfigHeadersControl.UpdateView(i_View);
            }
        }
        private void ControlsSetView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.SetView(i_View);

            this._ConfigLayoutControl.SetView(i_View);

            this._ConfigHeadersControl.SetView(i_View); //2008-8-28 9:59:30@simon

            bool Matrix = (i_View as Views.CompactGroupView).Matrix;

            if (Matrix)
            {
                this.C_Matrix.Visible = true;

                this.C_GroupingSetting.Text = "Outter Group Setting";

                this._ConfigMatrixInfo.SetView(i_View);

                if ((i_View as Views.CompactGroupView).MatrixDisplay == Views.ComputedStyle.Group)
                {
                    this.C_GridSetting.Visible = false;
                }
                else
                {
                    this.C_GridSetting.Visible = true;

                    this._ConfigGridInfo.SetView(i_View);                     //2008-8-28 9:59:30@simon
                }
            }
            else
            {
                this.C_GroupingSetting.Text = "Group Setting";

                this.C_Matrix.Visible = false;

                this.C_GridSetting.Visible = false;
            }
        }
        private void CreateTableRowStyle(DataTable m_Table, Views.ExControlView i_View)
        {
            //Rows height
            Type m_GridType = this.dataGrid1.GetType();

            PropertyInfo m_PropertyInfo = m_GridType.GetProperty("DataGridRows", BindingFlags.NonPublic | BindingFlags.Instance);

            Array m_GridRows = m_PropertyInfo.GetValue(this.dataGrid1, null) as Array;

            if (m_GridRows == null || m_GridRows.Length <= 0)
            {
                return;
            }

            Type m_GridRowType = null;

            m_PropertyInfo = null;

            int count = Math.Min(m_GridRows.Length, this.RowsHeight.Count);

            for (int index = 0; index < count; index++)
            {
                object m_GridRow = m_GridRows.GetValue(index);

                if (m_GridRowType == null)
                {
                    m_GridRowType = m_GridRow.GetType();
                }

                if (m_PropertyInfo == null)
                {
                    m_PropertyInfo = m_GridRowType.GetProperty("Height");
                }

                m_PropertyInfo.SetValue(m_GridRow, this.RowsHeight[index], null);
            }
        }
Пример #13
0
 private void ControlsUpdateView(Views.ExControlView i_View)
 {
     this._ConfigStatInfo.UpdateView(i_View);
     this._ConfigLayOut.UpdateView(i_View);
 }
Пример #14
0
 private void ControlsSetView(Views.ExControlView i_View)
 {
     this._ConfigStatInfo.SetView(i_View);
     this._ConfigLayOut.SetView(i_View);
 }
Пример #15
0
        //public void SetHeaders(WebbTable table,ref int nRow)
        //{
        //    int cols=table.GetColumns();
        //    if(cols<=0)return;
        //    for(int i=0;i<this.RowCount;i++)
        //    {
        //        for(int j=0;j<this._ColCount;j++)
        //        {
        //            if(i>=table.GetRows()||j>=cols)continue;
        //            HeaderCell hc=GetCell(i,j);
        //              IWebbTableCell tablecell=table.GetCell(i+nRow,j);
        //            if(hc.MergerdCount>0)
        //            {
        //                int StartIndex=j;
        //                int EndIndex=j+hc.MergerdCount-1;
        //                if(EndIndex>=cols)EndIndex=cols-1;
        //                if(EndIndex>StartIndex)
        //                {
        //                    table.MergeCells(i,i,StartIndex,EndIndex);
        //                }
        //                if(hc.Text!="")tablecell.Text=hc.Text;
        //                j=EndIndex;
        //            }
        //            else
        //            {
        //                if(hc.Text!="")tablecell.Text=hc.Text;
        //            }

        //        }

        //    }
        //    nRow+=this.RowCount;
        //}
        #endregion


        public void SetHeaders(WebbTable table, ref int nRow, Views.ExControlView i_View)
        {
            int totalColumnsInTable = table.GetColumns();

            if (totalColumnsInTable <= 0)
            {
                return;
            }

            for (int i = 0; i < this.RowCount; i++)
            {
                for (int j = 0; j < this._ColCount; j++)
                {
                    if (i >= table.GetRows() || j >= totalColumnsInTable)
                    {
                        continue;
                    }

                    HeaderCell hc = GetCell(i, j);

                    IWebbTableCell tablecell = table.GetCell(i + nRow, j);

                    if (hc == null || tablecell == null)
                    {
                        continue;
                    }

                    string strHeaderText = hc.Text;

                    strHeaderText = strHeaderText.Replace("[onevalue]", i_View.OneValueScFilter.FilterName);

                    strHeaderText = strHeaderText.Replace("[repeat]", i_View.RepeatFilter.FilterName);

                    strHeaderText = strHeaderText.Replace("[ONEVALUE]", i_View.OneValueScFilter.FilterName);

                    strHeaderText = strHeaderText.Replace("[REPEAT]", i_View.RepeatFilter.FilterName);

                    if (hc.MergerdCount > 0)
                    {
                        int StartIndex = j;

                        int EndIndex = j + hc.MergerdCount - 1;

                        if (EndIndex >= totalColumnsInTable)
                        {
                            EndIndex = totalColumnsInTable - 1;
                        }

                        if (EndIndex > StartIndex)
                        {
                            table.MergeCells(i, i, StartIndex, EndIndex);
                        }

                        tablecell.Text = strHeaderText;

                        j = EndIndex;
                    }
                    else
                    {
                        tablecell.MergeType = MergeTypes.None;

                        tablecell.Text = strHeaderText;
                    }
                }
            }
            nRow += this.RowCount;
        }
Пример #16
0
 private void ControlsSetView(Views.ExControlView i_View)
 {
     this._ConfigMaskedText.SetView(i_View);
 }
Пример #17
0
 private void ControlsSetView(Views.ExControlView i_View)
 {
     this._ConfigHorizonGroup.SetView(i_View);
 }
Пример #18
0
        private void ControlsSetView(Views.ExControlView i_View)
        {
            this._ConfigGroupControl.SetView(i_View);

            this._ConfigLayoutControl.SetView(i_View);
        }
        private void UpdateColumnRow(Views.ExControlView i_View)
        {
            if (i_View is Views.GroupView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.GroupView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.GroupView).RowsHight);
            }
            if (i_View is Views.GradingView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.GradingView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.GradingView).RowsHight);
            }
            if (i_View is Views.SimpleGroupView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.SimpleGroupView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.SimpleGroupView).RowsHight);
            }
            if (i_View is Views.GridView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.GridView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.GridView).RowsHight);
            }
            if (i_View is Views.HorizontalGridView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.HorizontalGridView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.HorizontalGridView).RowsHight);
            }
            if (i_View is Views.CompactGroupView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.CompactGroupView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.CompactGroupView).RowsHight);
            }
            if (i_View is Views.MatrixGroupView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.MatrixGroupView).ColumnsWidth);
                this.RowsHeight.CopyTo((i_View as Views.MatrixGroupView).RowsHight);
            }
            if (i_View is Views.StatControlView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.StatControlView).ColumnsWidth);
            }
            if (i_View is Views.HorizonGroupView)
            {
                this.ColumnsWidth.CopyTo((i_View as Views.HorizonGroupView).ColumnsWidth);

                this.RowsHeight.CopyTo((i_View as Views.HorizonGroupView).RowsHight);
            }
            if (i_View is Views.MaskedTextControlView)
            {
                if ((i_View as Views.MaskedTextControlView).ColumnsWidth == null)
                {
                    (i_View as Views.MaskedTextControlView).ColumnsWidth = new Int32Collection();
                }

                this.ColumnsWidth.CopyTo((i_View as Views.MaskedTextControlView).ColumnsWidth);


                if ((i_View as Views.MaskedTextControlView).RowsHight == null)
                {
                    (i_View as Views.MaskedTextControlView).RowsHight = new Int32Collection();
                }

                this.RowsHeight.CopyTo((i_View as Views.MaskedTextControlView).RowsHight);
            }
        }
        private void SetColumnRow(Views.ExControlView i_View)
        {
            if (i_View is Views.GroupView)
            {
                (i_View as Views.GroupView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.GroupView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.GradingView)
            {
                (i_View as Views.GradingView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.GradingView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.SimpleGroupView)
            {
                (i_View as Views.SimpleGroupView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.SimpleGroupView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.GridView)
            {
                (i_View as Views.GridView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.GridView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.HorizontalGridView)
            {
                (i_View as Views.HorizontalGridView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.HorizontalGridView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.CompactGroupView)
            {
                (i_View as Views.CompactGroupView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.CompactGroupView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.MatrixGroupView)
            {
                (i_View as Views.MatrixGroupView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.MatrixGroupView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.HorizonGroupView)    //simon 2010-05-06
            {
                (i_View as Views.HorizonGroupView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                (i_View as Views.HorizonGroupView).RowsHight.CopyTo(this.RowsHeight);
            }
            if (i_View is Views.MaskedTextControlView)    //simon 2010-05-06
            {
                if ((i_View as Views.MaskedTextControlView).ColumnsWidth != null)
                {
                    (i_View as Views.MaskedTextControlView).ColumnsWidth.CopyTo(this.ColumnsWidth);
                }
                if ((i_View as Views.MaskedTextControlView).RowsHight != null)
                {
                    (i_View as Views.MaskedTextControlView).RowsHight.CopyTo(this.RowsHeight);
                }
            }

            #region Modifed at 2011-5-31 12:27:39@simon
            if (this.RowsHeight.Count == 0 || i_View.PrintingTable != null)
            {
                this.RowsHeight = i_View.PrintingTable.ResolveRowsHeight();
            }
            #endregion

            if (i_View is Views.StatControlView)
            {
                (i_View as Views.StatControlView).ColumnsWidth.CopyTo(this.ColumnsWidth);
            }
        }