コード例 #1
0
        /* void UpdateCurrentRecord() {
         *   FeedItem current = gridView1.GetRow(gridView1.FocusedRowHandle) as FeedItem;
         *   if(current != null)
         *       ucMailViewer1.ShowFeed(current, true);
         *   else ucMailViewer1.ClearInfo();
         * }*/

        private void gridView1_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            if (!gridView1.OptionsView.ShowViewCaption)
            {
                e.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
                e.Appearance.TextOptions.WordWrap   = WordWrap.Wrap;
                StringPainter.Default.DrawString(e.Cache, e.Appearance, string.Format(Properties.Resources.FeedError, CurrentUrl), e.Bounds);
            }
        }
コード例 #2
0
 private void gridView_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     if (this.gridView.RowCount == 0)
     {
         string    str = "无数据,请调整检索条件后重新查询。";
         Font      f   = new Font("宋体", 10, FontStyle.Bold);
         Rectangle r   = new Rectangle(e.Bounds.Left + 5, e.Bounds.Top + 5, e.Bounds.Width - 5, e.Bounds.Height - 5);
         e.Graphics.DrawString(str, f, Brushes.Black, r);
     }
 }
コード例 #3
0
        private void licensePlateListView_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            var dataSource = licensePlateListView.DataSource;

            var s = "未找到满足条件的车牌,请重新搜索";
            var r = new Rectangle(e.Bounds.Left + 5, e.Bounds.Top + 5, e.Bounds.Width - 5,
                                  e.Bounds.Height - 5);

            e.Graphics.DrawString(s, e.Appearance.Font, e.Appearance.GetForeBrush(e.Cache), r);
        }
コード例 #4
0
 /// <summary>
 /// 显示自定义字符事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void gridViewInpatientFail_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     try
     {
         DS_Common.CustomDrawEmptyDataSource("没有查询到您想要的数据", new Font("宋体", 10, FontStyle.Bold), Brushes.Red, e);
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
コード例 #5
0
ファイル: ucRealHistory.cs プロジェクト: jlhfut/SmokingDetect
        private void gridView1_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView gv = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            DataView bindingSource = gv.DataSource as DataView;

            if (bindingSource != null & bindingSource.Count == 0)
            {
                Font      f = new Font("宋体", 9, FontStyle.Bold);
                Rectangle r = new Rectangle(gv.GridControl.Width / 2 - 100, gv.GridControl.Height / 2, e.Bounds.Right - 5, e.Bounds.Height - 5);
                e.Graphics.DrawString("没有查询到数据!", f, Brushes.Red, r);
            }
        }
コード例 #6
0
ファイル: Statistical.cs プロジェクト: yiningzeng/spc
        private void GridView_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            GridView gridView = sender as GridView;

            if (gridView.RowCount == 0)
            {
                                string    str = "暂未查找到匹配的数据!";
                                Font      f   = new Font("微软雅黑", 16);
                                Rectangle r   = new Rectangle(gridView.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
                                e.Graphics.DrawString(str, f, Brushes.Gray, r);
            }
        }
コード例 #7
0
        private void gridViewUpnpServers_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            if (view.RowCount != 0)
            {
                return;
            }
            StringFormat drawFormat = new StringFormat();

            drawFormat.Alignment = drawFormat.LineAlignment = StringAlignment.Center;
            e.Graphics.DrawString(_upnpEmptyRowstext, e.Appearance.Font, SystemBrushes.ControlDark, new RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height), drawFormat);
        }
コード例 #8
0
        private void gridTer_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            DataTable dt = this.gridTer.DataSource as DataTable;

            if (dt == null || dt.Rows.Count == 0)
            {
                string    str = "没有终端信息,请配置!";
                Font      f   = new Font("宋体", 10, FontStyle.Bold);
                Rectangle r   = new Rectangle(e.Bounds.Top - 5, e.Bounds.Left + 200, e.Bounds.Right - 3, e.Bounds.Height - 3);
                e.Graphics.DrawString(str, f, Brushes.Black, r);
            }
        }
コード例 #9
0
 private void gridView1_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     if (gridView1.RowCount == 0)
     {
         //文本
         string str = "暂未查找到匹配的数据!";
         //字体
         Font f = new Font("微软雅黑", 16);
         //显示位置
         Rectangle r = new Rectangle(gridControl1.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
         //显示颜色
         e.Graphics.DrawString(str, f, Brushes.Gray, r);
     }
 }
コード例 #10
0
ファイル: Utils.cs プロジェクト: erkanmaras/B2CPackageCollect
        public static void DrawRecordNotFoundToForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            if (((GridView)sender).GridControl.DataSource is DataTable table)
            {
                if (table.Rows.Count == 0)
                {
                    DrawRecordNotFoundToForeground(e);
                }
            }

            if (((GridView)sender).GridControl.DataSource is IList list)
            {
                if (list.Count == 0)
                {
                    DrawRecordNotFoundToForeground(e);
                }
            }
        }
コード例 #11
0
ファイル: PageUpControl.cs プロジェクト: genganpeng/zhglzxt
        public void gv_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            string s = "";

            if (PageRow == 0)
            {
                s = "当前查询没有返回结果.";
                nvgtDataPager.Buttons.CustomButtons[0].Enabled = false;
                nvgtDataPager.Buttons.CustomButtons[1].Enabled = false;
                nvgtDataPager.Buttons.CustomButtons[2].Enabled = false;
                nvgtDataPager.Buttons.CustomButtons[3].Enabled = false;
                nvgtDataPager.TextStringFormat = string.Format("");
            }

            Font      font = new Font("Tahoma", 10, FontStyle.Bold);
            Rectangle r    = new Rectangle(e.Bounds.Left + 5, e.Bounds.Top + 5, e.Bounds.Width - 5,
                                           e.Bounds.Height - 5);

            e.Graphics.DrawString(s, font, Brushes.Black, r);
        }
コード例 #12
0
        private void gridView1_CustomDrawEmptyForeground(object sender,
                                                         DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
        {
            string s = string.Empty;

            DevExpress.XtraGrid.Views.Base.ColumnView view = sender as DevExpress.XtraGrid.Views.Base.ColumnView;
            BindingSource dataSource = view.DataSource as BindingSource;

            if (dataSource == null)
            {
                s = "没有数据 QAQ";
            }
            else if (dataSource.Count == 0)
            {
                s = "没有找到符合条件的数据 QAQ";
            }
            Font      font = new Font("微软雅黑", 10, FontStyle.Bold);
            Rectangle r    = new Rectangle(e.Bounds.Left + 5, e.Bounds.Top + 5, e.Bounds.Width - 5, e.Bounds.Height - 5);

            e.Graphics.DrawString(s, font, Brushes.Black, r);
        }
コード例 #13
0
ファイル: Utils.cs プロジェクト: erkanmaras/B2CPackageCollect
 public static void DrawRecordNotFoundToForeground(DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     DrawTextCenter(e.Graphics, "Sipariş Bulunamadı!", e.Bounds, true);
 }
コード例 #14
0
 /*已选课程清单为空*/
 private void courseSelectedEmpty(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
 }
コード例 #15
0
ファイル: UserManageView.cs プロジェクト: whuacn/CJia
 private void gvwUser_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
     Tools.Help.GridViewDrawEmptyForeground(gvwUser, sender, e);
 }
コード例 #16
0
 private void GridView1_CustomDrawGroupPanel(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
 {
 }