| | |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Columns; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace Gs.DevApp.DevFrm.Sys |
| | |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnLayoutClick += ToolBarMenu1_btnLayoutClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | |
| | | txt_isSpilit.CheckedChanged += (s, e) => { DoPreviewCode(); }; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | { |
| | | getPageList(1); |
| | | } |
| | | |
| | | private void ToolBarMenu1_btnLayoutClick(object sender, EventArgs e) |
| | | { |
| | | string _formNamespace=this.GetType().FullName; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gridView1); |
| | | Gs.DevApp.UserControl.showLayOut DevFrm = new showLayOut(_formNamespace, gvList); |
| | | DevFrm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 反审核 |
| | | /// </summary> |
| | |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | |
| | | txxtItem3.Text = "<" + _ary[2]; |
| | | if (_ary.Length > 3) |
| | | txxtItem4.Text = "<" + _ary[3]; |
| | | if (_ary.Length >4) |
| | | if (_ary.Length > 4) |
| | | txxtItem5.Text = "<" + _ary[4]; |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = panelControl1.Enabled = false; |
| | | } |
| | |
| | | txt_docCode.Properties.ValueMember = "docCode"; // 实际值的列 |
| | | txt_docCode.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; |
| | | } |
| | | |
| | | |
| | | private void DoPreviewCode() |
| | | { |
| | | if (txt_docCode.Enabled == false |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | this.btnLayout.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.globalcolorscheme_16x16; |
| | | this.btnLayout.ImageOptions.LargeImage = global::Gs.DevApp.Properties.Resources.globalcolorscheme_32x32; |
| | | this.btnLayout.Name = "btnLayout"; |
| | | this.btnLayout.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | // |
| | | // barDockControlTop |
| | | // |
| | |
| | | // |
| | | this.barDockControlBottom.CausesValidation = false; |
| | | this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; |
| | | this.barDockControlBottom.Location = new System.Drawing.Point(0, 70); |
| | | this.barDockControlBottom.Location = new System.Drawing.Point(0, 66); |
| | | this.barDockControlBottom.Manager = this.barManager1; |
| | | this.barDockControlBottom.Size = new System.Drawing.Size(1543, 0); |
| | | // |
| | |
| | | this.Controls.Add(this.barDockControlBottom); |
| | | this.Controls.Add(this.barDockControlTop); |
| | | this.Name = "UcToolBarMenu"; |
| | | this.Size = new System.Drawing.Size(1543, 70); |
| | | this.Size = new System.Drawing.Size(1543, 66); |
| | | ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit(); |
| | | this.ResumeLayout(false); |
| | | this.PerformLayout(); |
| | |
| | | |
| | | private void BtnLayout_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | var _formNamespace = ""; |
| | | Control parentControl = this; |
| | | while (parentControl.Parent != null) |
| | | { |
| | | if (parentControl.Parent is Form parentForm) |
| | | { |
| | | var formType = parentForm.GetType(); |
| | | _formNamespace = formType.FullName; |
| | | break; |
| | | } |
| | | parentControl = parentControl.Parent; |
| | | } |
| | | Gs.DevApp.UserControl.showLayOut DevFrm = new showLayOut(_formNamespace); |
| | | DevFrm.ShowDialog(); |
| | | if (btnLayoutClick != null) btnLayoutClick(this, e); |
| | | } |
| | | private void _enabledBtn(List<string> lstBtn) |
| | | { |
| | |
| | | //默认启用的按钮 |
| | | _enabledList.Add(btnLoad.Name); |
| | | _enabledList.Add(btnHelp.Name); |
| | | _enabledList.Add(btnLayout.Name); |
| | | _enabledBtn(_enabledList); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | public event EventHandler btnWgClick; |
| | | |
| | | |
| | | public event EventHandler btnLayoutClick; |
| | | |
| | | #endregion |
| | | |
| | | #region 公共属性 |
| | |
| | | this.btnSave.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat; |
| | | this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand; |
| | | this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image"))); |
| | | this.btnSave.Location = new System.Drawing.Point(25, 126); |
| | | this.btnSave.Location = new System.Drawing.Point(28, 126); |
| | | this.btnSave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
| | | this.btnSave.Name = "btnSave"; |
| | | this.btnSave.Size = new System.Drawing.Size(98, 37); |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Columns; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.UserControl |
| | |
| | | public partial class showLayOut : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string formNamespace = ""; |
| | | public showLayOut(string _formNamespace) |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | public showLayOut(string _formNamespace, List<GridView> _gridViews) |
| | | { |
| | | formNamespace= _formNamespace; |
| | | formNamespace = _formNamespace; |
| | | gridViews = _gridViews; |
| | | InitializeComponent(); |
| | | this.btnCancel.Click += BtnCancel_Click; |
| | | this.btnSave.Click += BtnSave_Click; |
| | |
| | | |
| | | private void BtnSave_Click(object sender, EventArgs e) |
| | | { |
| | | // --col1,100,101,102,103,104,105,1,title&col2,100,101,102,103,104,105,1,title |
| | | if (txt_layOut.SelectedIndex <= 0) |
| | | { |
| | | MsgHelper.Warning("请选择适用范围!"); |
| | | return; |
| | | } |
| | | GridView gridView1 = gridViews[0]; |
| | | System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
| | | foreach (GridColumn column in gridView1.Columns) |
| | | { |
| | | string controlId = column.Name; |
| | | int controlPosX = 0; |
| | | int controlPosY = 0; |
| | | int controlWidth = 0; |
| | | int controlMinWidth = column.MinWidth; |
| | | int controlMaxWidth = column.MaxWidth; |
| | | int controlHeight = 0; |
| | | int controlVisible = column.Visible == true ? 1 : 0; |
| | | string controlTitle = string.IsNullOrEmpty(column.Caption.Trim()) ? "未定义" : column.Caption.Trim(); |
| | | int controlIdx = column.VisibleIndex; |
| | | if (sb.Length > 0) |
| | | sb.Append("&"); |
| | | sb.Append(controlId); |
| | | sb.Append(","); |
| | | sb.Append(controlPosX); |
| | | sb.Append(","); |
| | | sb.Append(controlPosY); |
| | | sb.Append(","); |
| | | sb.Append(controlWidth); |
| | | sb.Append(","); |
| | | sb.Append(controlMinWidth); |
| | | sb.Append(","); |
| | | sb.Append(controlMaxWidth); |
| | | sb.Append(","); |
| | | sb.Append(controlHeight); |
| | | sb.Append(","); |
| | | sb.Append(controlVisible); |
| | | sb.Append(","); |
| | | sb.Append(controlTitle); |
| | | sb.Append(","); |
| | | sb.Append(controlIdx); |
| | | } |
| | | MessageBox.Show(sb.ToString()); |
| | | var _obj = new |
| | | { |
| | | applyUserGuid = txt_layOut.SelectedIndex, |
| | | layoutLst= "col1,100,101,102,103,104,105,1,title&gridview1=col2,100,101,102,103,104,105,1,title", |
| | | layoutLst = sb.ToString(), |
| | | formPath = formNamespace |
| | | }; |
| | | try |