Ejemplo n.º 1
0
        public MyGridControl07()
        {
            InitializeComponent();
            DevExpress.XtraEditors.Repository.RepositoryItemDateEdit riteTextEditColumn = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit();

            riteTextEditColumn.Mask.EditMask = "####-##-##"; // 0000-00-00
            riteTextEditColumn.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple;
            //riteTextEditColumn.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
            riteTextEditColumn.Mask.UseMaskAsDisplayFormat = true;
            riteTextEditColumn.BeforePopup += riteTextEditColumn_BeforePopup;



            this.gridView1.Columns.Add(new DevExpress.XtraGrid.Columns.GridColumn()
            {
                FieldName = "DateString", Caption = "DateString", Visible = true, ColumnEdit = riteTextEditColumn
            });
            this.gridView1.FocusedRowChanged += gridView1_FocusedRowChanged;
            gridControl1.DataSource           = CreateTable(50);


            WindowsUIButtonImageOptions windowsUIButtonImageOptions1 = new WindowsUIButtonImageOptions();
            ComponentResourceManager    resources = new ComponentResourceManager(typeof(MyGridControl07));

            //windowsUIButtonImageOptions1.Image = ((System.Drawing.Image)(resources.GetObject("windowsUIButtonImageOptions1.Image")));
            windowsUIButtonImageOptions1.Image = DevExpress.Images.ImageResourceCache.Default.GetImage("grayscale/actions/add_32x32.png");
            WindowsUIButton btn1 = new WindowsUIButton("Btn1", true, windowsUIButtonImageOptions1);
            WindowsUIButton btn2 = new WindowsUIButton("Btn2", true, windowsUIButtonImageOptions1);

            //this.windowsUIButtonPanel1.Buttons.AddRange(new DevExpress.XtraEditors.ButtonPanel.IBaseButton[] {
            //new DevExpress.XtraBars.Docking2010.WindowsUIButton("Btn1", DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton),
            //new DevExpress.XtraBars.Docking2010.WindowsUIButton("Btn2", DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton)});

            this.windowsUIButtonPanel1.Buttons.AddRange(new DevExpress.XtraEditors.ButtonPanel.IBaseButton[] { btn1, btn2 });
        }
Ejemplo n.º 2
0
        private void iniMytool()
        {
            WindowsUISeparator sp = new WindowsUISeparator();

            sp.IsLeft = false;
            this.Bar_Tool.Buttons.Add(sp);


            WindowsUIButton             download;
            WindowsUIButtonImageOptions imgdownload = new WindowsUIButtonImageOptions();

            imgdownload.Image = Common.getImageByLocal("download.png");
            download          = new WindowsUIButton("下载设备", true, imgdownload);
            download.IsLeft   = false;
            download.Click   += Download_Click;
            this.Bar_Tool.Buttons.Add(download);

            WindowsUIButton             setting;
            WindowsUIButtonImageOptions imgsetting = new WindowsUIButtonImageOptions();

            imgsetting.Image = Common.getImageByLocal("DbSetting.png");
            setting          = new WindowsUIButton("设置服务", true, imgsetting);
            setting.IsLeft   = false;
            setting.Click   += Setting_Click;

            this.Bar_Tool.Buttons.Add(setting);
        }
Ejemplo n.º 3
0
        private void iniMytool()
        {
            WindowsUISeparator sp = new WindowsUISeparator();

            sp.IsLeft = false;
            this.Bar_Tool.Buttons.Add(sp);


            WindowsUIButton             newtask;
            WindowsUIButtonImageOptions imgaddtask = new WindowsUIButtonImageOptions();

            imgaddtask.Image = Common.getImageByLocal("new_task.png");
            newtask          = new WindowsUIButton("新建任务", true, imgaddtask);
            newtask.IsLeft   = false;
            newtask.Click   += Newtask_Click;
            this.Bar_Tool.Buttons.Add(newtask);

            WindowsUIButtonImageOptions imgdelte = new WindowsUIButtonImageOptions();

            imgdelte.Image = Common.getImageByLocal("delete_task.png");
            WindowsUIButton deleteTask = new WindowsUIButton("删除任务", true, imgdelte);

            deleteTask.Click += DeleteTask_Click;
            deleteTask.IsLeft = false;
            this.Bar_Tool.Buttons.Add(deleteTask);

            WindowsUISeparator sp1 = new WindowsUISeparator();

            sp1.IsLeft = false;
            this.Bar_Tool.Buttons.Add(sp1);

            WindowsUIButton             adddevice;
            WindowsUIButtonImageOptions addDevice = new WindowsUIButtonImageOptions();

            addDevice.Image  = Common.getImageByLocal("add_device.png");
            adddevice        = new WindowsUIButton("添加设备", true, addDevice);
            adddevice.IsLeft = false;
            adddevice.Click += Adddevice_Click;
            this.Bar_Tool.Buttons.Add(adddevice);

            //WindowsUIButtonImageOptions deleteDevice = new WindowsUIButtonImageOptions();
            //deleteDevice.Image = Common.getImageByLocal("delete_device.png");
            //WindowsUIButton deltete = new WindowsUIButton("删除设备",true, deleteDevice);
            //deltete.IsLeft = false;
            //deltete.Click += Deltete_Click;
            //this.Bar_Tool.Buttons.Add(deltete);

            WindowsUISeparator sp2 = new WindowsUISeparator();

            sp2.IsLeft = false;
            this.Bar_Tool.Buttons.Add(sp2);


            WindowsUIButton             setting;
            WindowsUIButtonImageOptions imgsetting = new WindowsUIButtonImageOptions();

            imgsetting.Image = Common.getImageByLocal("DbSetting.png");
            setting          = new WindowsUIButton("设置空间", true, imgsetting);
            setting.IsLeft   = false;
            setting.Click   += Setting_Click;
            this.Bar_Tool.Buttons.Add(setting);
            //
            DevExpress.XtraEditors.SimpleButton simpleButton1 = new DevExpress.XtraEditors.SimpleButton();


            simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));

            simpleButton1.Location = new System.Drawing.Point(-50, 20);
            simpleButton1.Name     = "simpleButton1";
            simpleButton1.Size     = new System.Drawing.Size(75, 35);
            simpleButton1.TabIndex = 0;
            simpleButton1.Text     = "开始采集";
            this.Bar_Tool.Controls.Add(simpleButton1);
        }