• 大小: 3.69MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-11
  • 语言: 其他
  • 标签: DevExpress  

资源简介

本文件包括自己精心制作的十个DevExpress实例。供想学习DevExpress的学者使用,望我们共同进步! 本实例包括DevExpress中比较重要的几种控件!愿大家共同进步!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraNavBar;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender EventArgs e)
        {
            checkedComboBoxEdit1.SelectedText = checkedComboBoxEdit1.Properties.Items[1].ToString();
            checkedComboBoxEdit1.Text = checkedComboBoxEdit1.Properties.Items[0].ToString();
            //GridControl
            DataTable dataTable = new DataTable();
            dataTable.Columns.Add(“ID“ typeof(int));
            dataTable.Columns.Add(“Name“ typeof(string));
            dataTable.Columns.Add(“Sex“ typeof(string));
            dataTable.Rows.Add(new object[] { 1 “张三“ “男“ });
            dataTable.Rows.Add(new object[] { 2 “李四“ “男“ });
            gridControl1.DataSource = dataTable;
            //gridView1.DataSource = dataTable;//这个是错误的
            dataTable.Columns[0].Caption = “序号“;
            //gridControl1.DefaultView.PopulateColumns();
            dataTable.Rows[1][1] = “王二麻子“;
            for (int i = 0; i < dataTable.Columns.Count; i++)
            {
                dataTable.Columns[i].ReadOnly = true;
            }
            dateEdit1.EditValue = DateTime.Now;
            timeEdit1.EditValue = DateTime.Now;
        }

        private void simpleButton2_Click(object sender EventArgs e)
        {
            Application.Exit();
        }

        private void buttonEdit1_Buttonclick(object sender DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            MessageBox.Show(“Test“);
        }

        private void checkEdit1_CheckedChanged(object sender EventArgs e)
        {
            simpleButton1.Visible = !(bool)checkEdit1.Checked;
        }

        private void colorEdit1_EditValueChanged(object sender EventArgs e)
        {
            labelControl1.BackColor = (Color)colorEdit1.EditValue;
        }

        private void simpleButton3_Click(object sender EventArgs e)
        {
            if (textEdit1.Text.Length == 0)
            {
                MessageBox.Show(“Nothing“);
                return;
            }
            comboBoxEdit1.Properties.Items.Add(textEdit1.Text);
            comboBoxEdit1.Text = textEdit1.Text;
            textEdit1.Text = null;
            //string s = string.Format(textEdit1.Text 3);
            //MessageBox.Show(s);
        }

        private void simpleButton4_Click(object sender EventArgs e)
        {
            SimpleButton button = sender as SimpleButton;
            if (button.Name == “simpleButton4“)
            {
                NavBarGroup group = new NavBarGroup(“Large links“);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      60416  2013-10-07 22:36  TestDevexpressionControl\bin\Debug\Localization.dll

     文件      89600  2013-10-07 22:36  TestDevexpressionControl\bin\Debug\Localization.pdb

     文件      20707  2009-10-12 18:05  TestDevexpressionControl\bin\Debug\LocalizationRes.zh-CHS.resx

     文件      26602  2010-08-13 16:44  TestDevexpressionControl\bin\Debug\LocalizationRes.zh-CN.resx

     文件      26905  2009-10-28 16:59  TestDevexpressionControl\bin\Debug\LocalizationRes.zh-TW.resx

     文件    2718208  2013-10-07 22:36  TestDevexpressionControl\bin\Debug\WindowsFormsApplication1.exe

     文件     251392  2013-10-07 22:36  TestDevexpressionControl\bin\Debug\WindowsFormsApplication1.pdb

     文件      14328  2013-10-09 09:03  TestDevexpressionControl\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        490  2009-06-11 05:14  TestDevexpressionControl\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       4147  2013-10-05 12:18  TestDevexpressionControl\Form1.cs

     文件      22384  2013-02-23 22:05  TestDevexpressionControl\Form1.Designer.cs

     文件       5814  2013-02-23 22:05  TestDevexpressionControl\Form1.resx

     文件        374  2013-10-07 14:34  TestDevexpressionControl\Form2.cs

     文件       3890  2013-10-07 14:34  TestDevexpressionControl\Form2.Designer.cs

     文件       8388  2013-10-07 14:34  TestDevexpressionControl\Form2.resx

     文件       2111  2013-02-23 22:09  TestDevexpressionControl\Form3.cs

     文件      12941  2013-02-23 22:08  TestDevexpressionControl\Form3.Designer.cs

     文件      10995  2013-02-23 22:08  TestDevexpressionControl\Form3.resx

     文件     188778  2013-03-01 09:12  TestDevexpressionControl\NorthwindDataSet.Designer.cs

     文件          3  2013-02-28 09:46  TestDevexpressionControl\NorthwindDataSet.xsc

     文件      52291  2013-02-28 09:46  TestDevexpressionControl\NorthwindDataSet.xsd

     文件          3  2013-02-28 09:46  TestDevexpressionControl\NorthwindDataSet.xss

     文件     230703  2013-10-07 22:36  TestDevexpressionControl\obj\Debug\ResolveAssemblyReference.cache

     文件      86016  2013-03-01 09:12  TestDevexpressionControl\obj\Debug\TempPE\NorthwindDataSet.Designer.cs.dll

     文件      86016  2013-02-28 09:25  TestDevexpressionControl\obj\Debug\TempPE\NorthwindDataSet1.Designer.cs.dll

     文件       5120  2013-10-05 10:34  TestDevexpressionControl\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       6398  2013-10-09 09:03  TestDevexpressionControl\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件       1584  2013-10-07 20:10  TestDevexpressionControl\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache

     文件    2718208  2013-10-07 22:36  TestDevexpressionControl\obj\Debug\WindowsFormsApplication1.exe

     文件       2293  2013-10-07 22:36  TestDevexpressionControl\obj\Debug\windowsformsapplication1.exe.licenses

............此处省略67个文件信息

评论

共有 条评论