コード例 #1
0
 /// <summary>
 /// 设置窗体不可编辑
 /// </summary>
 /// <param name="canEdit"></param>
 public void SetFormEdit(bool canEdit)
 {
     try
     {
         txtNoteName.Properties.ReadOnly  = !canEdit;
         cboxPrint.Properties.ReadOnly    = !canEdit;
         popEditDept.Properties.ReadOnly  = false;
         popEditWard.Properties.ReadOnly  = false;
         chboxUsing.Properties.ReadOnly   = false;
         chboxPicEdit.Properties.ReadOnly = !canEdit;
         //chboxCheck.Properties.ReadOnly = !canEdit;
         btnAddTable.Enabled = canEdit;
         btnSave.Enabled     = true;
         foreach (var item in xScorlTablist.Controls)
         {
             UCCommonNoteTab uCCommonNoteTab = (item as UCCommonNoteTab);
             if (uCCommonNoteTab == null)
             {
                 continue;
             }
             uCCommonNoteTab.SetFormEdit(canEdit);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 private void AddCommonNoteTab(CommonNote_TabEntity commonNote_TabEntity, int index)
 {
     try
     {
         UCCommonNoteTab uCCommonNoteTab = new UCCommonNoteTab(commonNote_TabEntity, m_app);
         uCCommonNoteTab.groupControlTab.Text = "表格" + index;
         if (index == 1)
         {
             uCCommonNoteTab.hyLinkRemove.Visible = false;
         }
         uCCommonNoteTab.hyLinkRemove.Click += delegate(object sender, EventArgs e)
         {
             if (!string.IsNullOrEmpty(uCCommonNoteTab.m_commonNote_TabEntity.CommonNote_Tab_Flow))
             {
                 uCCommonNoteTab.m_commonNote_TabEntity.Valide = "0";
                 commonNote_TabEntityDel.Add(uCCommonNoteTab.m_commonNote_TabEntity);
             }
             xScorlTablist.Controls.Remove(uCCommonNoteTab);
             SetBiaoGeXuHao();
         };
         uCCommonNoteTab.Dock = DockStyle.Top;
         xScorlTablist.Controls.Add(uCCommonNoteTab);
         uCCommonNoteTab.BringToFront();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
 /// <summary>
 /// 设置表格的序号
 /// </summary>
 private void SetBiaoGeXuHao()
 {
     try
     {
         for (int i = 0; i < xScorlTablist.Controls.Count; i++)
         {
             UCCommonNoteTab uCCommonNoteTab = xScorlTablist.Controls[i] as UCCommonNoteTab;
             if (uCCommonNoteTab == null)
             {
                 continue;
             }
             uCCommonNoteTab.groupControlTab.Text = "表格" + (i + 1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }