예제 #1
0
 /// <summary>
 /// 移除显示项
 /// </summary>
 private void RemoveItem()
 {
     if (this.fpSpread1.ActiveSheet.RowCount > 0)
     {
         Row    row = this.fpSpread1.ActiveSheet.ActiveRow;
         String Msg = "是否删除所选显示项吗?";
         if (DialogResult.Yes == MessageBox.Show(Msg, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information))
         {
             JZCustomView view = row.Tag as JZCustomView;
             if (view != null)
             {
                 views.Remove(view);
                 LoadCustomView();
             }
         }
     }
 }
예제 #2
0
        private void fpSpread1_CellDoubleClick(object sender, CellClickEventArgs e)
        {
            Row row = this.fpSpread1.ActiveSheet.ActiveRow;

            if (row.Tag != null)
            {
                JZCustomView view = row.Tag as JZCustomView;
                if (view != null)
                {
                    ModelFieldAppendDialog ModelFieldAppendDialog = new ModelFieldAppendDialog(moduleID, view);
                    if (DialogResult.OK == ModelFieldAppendDialog.ShowDialog())
                    {
                        LoadCustomView();
                    }
                }
            }
        }
예제 #3
0
 /// <summary>
 /// 移动到上一个
 /// </summary>
 private void MoveItemToPrev()
 {
     if (this.fpSpread1.ActiveSheet.RowCount > 0)
     {
         Row row = this.fpSpread1.ActiveSheet.ActiveRow;
         if (row.Index == 0)
         {
             return;
         }
         JZCustomView view = row.Tag as JZCustomView;
         if (view != null)
         {
             views.RemoveAt(row.Index);
             views.Insert(row.Index - 1, view);
             LoadCustomView();
         }
     }
 }
예제 #4
0
 private void Button_Ok_Click(object sender, EventArgs e)
 {
     if (label_DataItemInfo.Text == "" || tBox_Description.Text == "")
     {
         MessageBox.Show("缺少有效输入");
         return;
     }
     if (view == null)
     {
         view             = new JZCustomView();
         view.ColumnWidth = 100;
     }
     view.CellName     = label_DataItemInfo.Text;
     view.Description  = tBox_Description.Text;
     view.DocColumn    = "";
     view.SheetID      = sheetID;
     view.IsEdit       = cBox_IsEdit.Checked;
     this.DialogResult = DialogResult.OK;
     Close();
 }
예제 #5
0
 public ModelFieldAppendDialog(Guid moduleID, JZCustomView view)
 {
     InitializeComponent();
     this.moduleID = moduleID;
     this.view     = view;
 }