private void gridView1_SetRowCellColorStyle(object sender, GOLDSOFT.QDJJ.CTRL.GridViewEx.CellColorArgs e)
        {
            DataRow info = (e.RowObject as DataRow);

            if (e.Column.FieldName == "SCDJ")
            {
                if (info == null)
                {
                    return;
                }
                if (!info["SCDJ"].Equals(info["DEDJ"]))
                {
                    //获取特殊样式绑定颜色
                    _SpecialStyleInfo style = e.SchemeColor.SpecialStyle.Get("市场单价修改");
                    if (style != null)
                    {
                        e.Appearance.Font = new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, style.Font);
                        //字体颜色
                        e.Appearance.ForeColor = style.ForeColor.IsEmpty ? e.Appearance.ForeColor : style.ForeColor;
                        //背景颜色
                        e.Appearance.BackColor = style.BColor.IsEmpty ? e.Appearance.BackColor : style.BColor;

                        e.Appearance.BackColor2 = style.BColor2.IsEmpty ? e.Appearance.BackColor2 : style.BColor2;
                    }
                }
            }
        }
Beispiel #2
0
        private void CheckedChanged(object sender, EventArgs e)
        {
            if (this.bindingSource3.Current != null)
            {
                FontStyle fs = FontStyle.Regular;
                if (this.S_Font_B.Checked)
                {
                    fs |= FontStyle.Bold;
                }
                if (this.S_Font_I.Checked)
                {
                    fs |= FontStyle.Italic;
                }
                if (this.S_Font_U.Checked)
                {
                    fs |= FontStyle.Underline;
                }
                _SpecialStyleInfo info = this.bindingSource3.Current as _SpecialStyleInfo;
                info.Font = fs;

                Font f = new Font(this.S_SL.Font.FontFamily, this.S_SL.Font.Size, fs);

                this.S_SL.Font = f;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 当默认配色执行完毕后调用特殊配色方案
        /// </summary>
        /// <param name="e"></param>
        private void SetRowColor(int rowHandle, DevExpress.Utils.AppearanceObject appearance)
        {
            //类别颜色配置

            object oRowObject = this.GetRow(rowHandle);

            System.Data.DataRowView info = (oRowObject as System.Data.DataRowView);
            if (info != null)
            {
                //取类别

                if (this.m_SchemeColor != null)
                {
                    appearance.BeginUpdate();
                    _SpecialStyleInfo style = this.m_SchemeColor.SpecialStyle.Get(info["LB"].ToString());
                    if (style != null)
                    {
                        appearance.Font = new Font(appearance.Font.FontFamily, appearance.Font.Size, style.Font);
                        //字体颜色
                        appearance.ForeColor = style.ForeColor.IsEmpty ? appearance.ForeColor : style.ForeColor;
                        //背景颜色
                        appearance.BackColor = style.BColor.IsEmpty ? appearance.BackColor : style.BColor;

                        appearance.BackColor2 = style.BColor2.IsEmpty ? appearance.BackColor2 : style.BColor2;

                        this.OnSetRowColor(oRowObject, this.m_SchemeColor, appearance);
                        appearance.EndUpdate();
                    }
                }
            }
        }
Beispiel #4
0
        /// <summary>
        /// 背景色1事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemColorEdit3_ColorChanged(object sender, EventArgs e)
        {
            ColorEdit c = sender as ColorEdit;

            this.S_SL.ForeColor = c.Color;
            _SpecialStyleInfo info = this.bindingSource3.Current as _SpecialStyleInfo;

            info.ForeColor = c.Color;
        }
Beispiel #5
0
        /// <summary>
        /// 背景色1事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemColorEdit2_ColorChanged(object sender, EventArgs e)
        {
            ColorEdit c = sender as ColorEdit;

            this.S_SL.Appearance.BackColor2 = c.Color;
            _SpecialStyleInfo info = this.bindingSource3.Current as _SpecialStyleInfo;

            info.BColor2 = c.Color;
        }
Beispiel #6
0
 /// <summary>
 /// 其他项目 措施项目 汇总分析 树节点配色
 /// </summary>
 /// <param name="e"></param>
 private void RaiseGetCustomNodeCellStyleEx(DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e)
 {
     if (this.m_SchemeColor != null)
     {
         //类别颜色配置
         _SpecialStyleInfo style = null;
         string            str   = string.Format("一级[{0}]", this.ModelName);
         //string str =string.Format("T{0}",e.Node.Level);
         if (e.Node.Level == 0)
         {
             str = string.Format("一级[{0}]", this.ModelName);
         }
         if (e.Node.Level == 1)
         {
             str = string.Format("二级[{0}]", this.ModelName);
         }
         if (e.Node.Level == 2)
         {
             str = string.Format("三级[{0}]", this.ModelName);
         }
         if (e.Node.Level == 3)
         {
             str = string.Format("四级[{0}]", this.ModelName);
         }
         if (e.Node.Level == 4)
         {
             str = string.Format("五级[{0}]", this.ModelName);
         }
         style = this.m_SchemeColor.SpecialStyle.Get(str);
         if (style != null)
         {
             //e.Appearance.Font = new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, style.Font);
             //字体颜色
             e.Appearance.ForeColor = style.ForeColor;
             //背景颜色
             e.Appearance.BackColor = style.BColor;
             //扩展色
             //e.Appearance.BackColor2 = style.BColor2;
         }
         ///特殊配色时候自定义处理
         OnSetRowColor(this.GetDataRecordByNode(e.Node), this.m_SchemeColor, e.Appearance);
     }
     //
 }
Beispiel #7
0
        private void gridView1_SetRowColorChange(object p_RowObject, _SchemeColor p_SchemeColor, DevExpress.Utils.AppearanceObject appearance)
        {
            _ObjectQuantityUnitInfo info = (p_RowObject as _ObjectQuantityUnitInfo);

            if (info.YSBH == info.BH && info.YSDW == info.DW && info.YSMC == info.MC && info.SCDJ != info.DEDJ)
            {
                //获取特殊样式绑定颜色
                _SpecialStyleInfo style = p_SchemeColor.SpecialStyle.Get("市场单价修改");
                if (style != null)
                {
                    appearance.Font = new Font(appearance.Font.FontFamily, appearance.Font.Size, style.Font);
                    //字体颜色
                    appearance.ForeColor = style.ForeColor.IsEmpty ? appearance.ForeColor : style.ForeColor;
                    //背景颜色
                    appearance.BackColor = style.BColor.IsEmpty ? appearance.BackColor : style.BColor;

                    appearance.BackColor2 = style.BColor2.IsEmpty ? appearance.BackColor2 : style.BColor2;
                }
            }
        }
Beispiel #8
0
        private void gridView1_SetRowColorChange(object p_RowObject, _SchemeColor p_SchemeColor, DevExpress.Utils.AppearanceObject appearance)
        {
            DataRowView info = (p_RowObject as DataRowView);

            if (info["YSBH"] == info["BH"] && info["YSDW"] == info["DW"] && info["YSMC"] == info["MC"] && !info["SCDJ"].Equals(info["DEDJ"]))
            {
                //获取特殊样式绑定颜色
                _SpecialStyleInfo style = p_SchemeColor.SpecialStyle.Get("市场单价修改");
                if (style != null)
                {
                    appearance.Font = new Font(appearance.Font.FontFamily, appearance.Font.Size, style.Font);
                    //字体颜色
                    appearance.ForeColor = style.ForeColor.IsEmpty ? appearance.ForeColor : style.ForeColor;
                    //背景颜色
                    appearance.BackColor = style.BColor.IsEmpty ? appearance.BackColor : style.BColor;

                    appearance.BackColor2 = style.BColor2.IsEmpty ? appearance.BackColor2 : style.BColor2;
                }
            }
        }
Beispiel #9
0
        private void bindingSource3_PositionChanged(object sender, EventArgs e)
        {
            //return;
            if (this.bindingSource3.Current != null)
            {
                _SpecialStyleInfo info = this.bindingSource3.Current as _SpecialStyleInfo;
                FontStyle         c    = info.Font;
                this.S_Font_B.Checked = ((c & FontStyle.Bold) != 0);
                this.S_Font_I.Checked = ((c & FontStyle.Italic) != 0);
                this.S_Font_U.Checked = ((c & FontStyle.Underline) != 0);

                this.S_SL.Appearance.BackColor  = info.BColor;
                this.S_SL.Appearance.BackColor2 = info.BColor2;
                this.S_SL.ForeColor             = info.ForeColor;


                Font f = new Font(this.S_SL.Font.FontFamily, this.S_SL.Font.Size, c);

                this.S_SL.Font = f;
            }
        }
Beispiel #10
0
        /// <summary>
        /// 当默认配色执行完毕后调用特殊配色方案(各个模块调用特殊配色)
        /// </summary>
        /// <param name="e"></param>
        private void RaiseGetCustomNodeCellStyleEx(DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e, string p_FileName)
        {
            if (this.m_SchemeColor != null)
            {
                //类别颜色配置
                object obj = e.Node.GetValue(p_FileName);
                if (obj != null)
                {
                    string            str   = obj.ToString();
                    _SpecialStyleInfo style = null;
                    if (str == string.Empty)
                    {
                        style = this.m_SchemeColor.SpecialStyle.Get("单位工程");
                    }
                    else
                    {
                        //找不到按照层级处理
                        style = this.m_SchemeColor.SpecialStyle.Get(str);
                    }

                    if (style != null)
                    {
                        //e.Appearance.Font = new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, style.Font);
                        //字体颜色
                        e.Appearance.ForeColor = style.ForeColor;
                        //背景颜色
                        e.Appearance.BackColor = style.BColor;
                        //扩展色
                        //e.Appearance.BackColor2 = style.BColor2;
                    }

                    ///特殊配色时候自定义处理
                    OnSetRowColor(this.GetDataRecordByNode(e.Node), this.m_SchemeColor, e.Appearance);
                }
            }
            //
        }