private void entityEditControl1_PaintContent(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; if (!(this.m_item is ItemBindingItem)) { return; } ItemBindingItem item = (ItemBindingItem)this.m_item; Cell cell = item.ContainerCell; if (cell == null) { return; } PaintInfo info = cell.GetPaintInfo(); this.entityEditControl1.MemberBackColor = info.BackColor; this.entityEditControl1.MemberForeColor = info.ForeColor; int nDelta = 8; RectangleF rect = this.entityEditControl1.ContentControl.DisplayRectangle; rect.Inflate(nDelta, nDelta); cell.PaintBorder((long)rect.X, (long)rect.Y, (int)rect.Width, (int)rect.Height, e); }
/// <summary> /// 获得索取号事项数组 /// </summary> /// <returns>CallNumberItem 数组</returns> public List <CallNumberItem> GetCallNumberItems() { ItemBindingItem cur_item = null; if (this.m_item is ItemBindingItem) { cur_item = (ItemBindingItem)this.m_item; } // 返回同一种期刊内的全部册事项信息 List <CallNumberItem> callnumber_items = this.bindingControl1.GetCallNumberItems(cur_item); { CallNumberItem item = null; // 增补一个对象 item = new CallNumberItem(); callnumber_items.Add(item); item.CallNumber = ""; // 不要给出当前的,以免影响到取号结果 item.RecPath = this.entityEditControl1.RecPath; item.Location = entityEditControl1.LocationString; item.Barcode = entityEditControl1.Barcode; } // FOUND: return(callnumber_items); }
/// <summary> /// 获得索取号事项数组 /// </summary> /// <returns>CallNumberItem 数组</returns> public List <CallNumberItem> GetCallNumberItems() { ItemBindingItem cur_item = null; if (this.m_item is ItemBindingItem) { cur_item = (ItemBindingItem)this.m_item; } // 返回同一种期刊内的全部册事项信息 List <CallNumberItem> callnumber_items = this.bindingControl1.GetCallNumberItems(cur_item); { CallNumberItem item = null; // 增补一个对象 item = new CallNumberItem(); callnumber_items.Add(item); item.CallNumber = ""; // 不要给出当前的,以免影响到取号结果 item.RecPath = this.entityEditControl1.RecPath; #if REF // 2017/4/6 if (string.IsNullOrEmpty(item.RecPath)) { if (string.IsNullOrEmpty(entityEditControl1.RefID) == true) { // throw new Exception("entityEditControl_editing 的 RefID 成员不应为空"); // TODO: 可以考虑增加健壮性,当时发生 RefID 字符串 entityEditControl1.RefID = Guid.NewGuid().ToString(); } item.RecPath = "@refID:" + entityEditControl1.RefID; } #endif item.Location = entityEditControl1.LocationString; item.Barcode = entityEditControl1.Barcode; } // FOUND: return(callnumber_items); }
void BackItem() { if (!(this.m_item is ItemBindingItem)) { return; } ItemBindingItem item = (ItemBindingItem)this.m_item; string strError = ""; int nRet = 0; // 收尾上次的对象,从编辑器到对象 if (this.entityEditControl1.Changed == true && item != null) { string strXml = ""; nRet = this.entityEditControl1.GetData( false, // 不检查this.Parent out strXml, out strError); if (nRet == -1) { goto ERROR1; } nRet = item.ChangeItemXml(strXml, out strError); if (nRet == -1) { goto ERROR1; } item.Changed = true; // this.m_item = null; this.entityEditControl1.Changed = false; } return; ERROR1: MessageBox.Show(this, strError); }