private void InitializeHistory() { this.lstHistory = new ArrayList(); OWC.Range after = this.GetRange(1, 1); Label_0014: after = this.Find("<修改记录>", after); if (after != null) { CLHistory history = new CLHistory(); try { PPCardCompiler.ExplainXml(after.Text.ToString(), history); } catch { goto Label_0014; } this.lstHistory.Add(history); goto Label_0014; } this.lstHistory.Sort(); }
private void DlgAutoNumber_Load(object sender, EventArgs e) { if (this.isTiModeler) { this.rbtCurrentPage.Enabled = false; } if (!this.hasNextPage) { this.cmbNextPageCol.Enabled = false; } if (this.readOnly) { this.rbtAllPages.Enabled = false; this.groupBox1.Enabled = false; this.groupBox2.Enabled = false; if (this.allowUpdate) { if (this.m_tp.AutoNumber == null) { this.btnOK.Text = "设置"; } else { this.btnOK.Text = "更新"; } } else { this.btnOK.Visible = false; this.btnCancel.Text = "确定"; } } if ((this.AutoNumberXml != null) && (this.AutoNumberXml.ToString() != "")) { AutoNumber number = PPCardCompiler.ExplainAutoNumberXML(this.AutoNumberXml); this.txtPrefix.Text = number.Prefix; this.txtPostfix.Text = number.Postfix; this.numStart.Value = number.Start; this.cmbInterval.Text = number.Interval.ToString(); this.cmbMainPageCol.Text = PPCConvert.Int2ABC(number.ColAtMainPage); this.cmbNextPageCol.Text = PPCConvert.Int2ABC(number.ColAtNextPage); } }
private void OnInsertPicture(object sender, EventArgs e) { string cellValue = this.GetCellValue(this.curCell); DlgPicture picture = new DlgPicture(cellValue, this.readOnly); if (PPCardCompiler.GetXmlEditStyle(cellValue) == PPCellAttach.None) { picture.CellStart = this.curCell; } if (picture.ShowDialog() == DialogResult.OK) { if ((picture.PicType != InterPicType.ResourcePic) && (base.Parent.Text == "封面")) { MessageBox.Show("封面只能插入资源图片,请重新设置。"); } else { this.SetCellValue(this.curCell, picture.Script); } } }
public ArrayList GetMidBindCells() { ArrayList list = new ArrayList(); if ((this.midBegin != null) && (this.midEnd != null)) { int row = PPCConvert.Address2Row(this.midBegin); int num2 = PPCConvert.Address2Col(this.midBegin); int num3 = PPCConvert.Address2Col(this.midEnd); for (int i = num2; i <= num3; i++) { if ((this.GetCellValue(row, i) != null) && (this.GetCellValue(row, i) != string.Empty)) { PPCardCell cc = new PPCardCell(); PPCardCompiler.ExplainXml(this.GetCellValue(row, i), cc); list.Add(cc); } } } return(list); }
public string GetMainItem() { int row = PPCConvert.Address2Row(this.midBegin); int num2 = PPCConvert.Address2Col(this.midBegin); int num3 = PPCConvert.Address2Col(this.midEnd); for (int i = num2; i <= num3; i++) { string cellValue = this.GetCellValue(row, i); if ((cellValue != null) && (cellValue != "")) { PPCardCell cc = new PPCardCell(); PPCardCompiler.ExplainXml(cellValue, cc); if (((cc != null) && (cc.Area == PPCardArea.Mid)) && (cc.Attachment == PPCellAttach.Option)) { return(cc.ClassName); } } } return(""); }
private void InitializeProcess() { this.lstProcess = new ArrayList(); OWC.Range after = this.GetRange(1, 1); Label_0014: after = this.Find("<流程记录>", after); if (after == null) { return; } CLState state = new CLState { CellSign = after.Address }; try { PPCardCompiler.ExplainXml(after.Text.ToString(), state); } catch { goto Label_0014; } this.lstProcess.Add(state); goto Label_0014; }
private void OnInsertProcessRecord(object sender, EventArgs e) { ArrayList list = new ArrayList(this.lstProcess.Count); foreach (CLState state in this.lstProcess) { list.Add(state.CellSign); } DlgProcessList list2 = new DlgProcessList(this.lstProcess, this.readOnly); list2.ShowDialog(); if (!this.readOnly) { foreach (string str in list) { this.SetCellValue(str, ""); } this.lstProcess = list2.Processes; foreach (CLState state2 in this.lstProcess) { this.SetCellValue(state2.CellSign, PPCardCompiler.CreateXML(state2)); } } }
private void OnInsertModifyRecord(object sender, EventArgs e) { ArrayList list = new ArrayList(this.lstHistory.Count); foreach (CLHistory history in this.lstHistory) { list.Add(history.CellSign); } DlgHistoryList list2 = new DlgHistoryList(this.lstHistory, this.readOnly); list2.ShowDialog(); if (!this.readOnly) { foreach (string str in list) { this.SetCellValue(str, ""); } this.lstHistory = list2.Histories; foreach (CLHistory history2 in this.lstHistory) { this.SetCellValue(history2.CellSign, PPCardCompiler.CreateXML(history2)); } } }
public DlgOption2(string script, PPCardArea area, bool readOnly, string address, bool isCAPP, string tmpType, CLCardTemplate tp) { this.address = ""; this.cobIndex = -2; this.m_tp = tp; this.IsPrintTemplate = !isCAPP; this.readOnly = readOnly; this.area = area; this.InitializeComponent(); this.InitializeImageList(); this.InitBarcodeTemplete(); if (!readOnly) { this.CreateTypeTree(this.tvwType); } this.CCInit = ccFavorite; if (this.CCInit == null) { this.CCInit = new PPCardCell(); } this.CCInit.Address = address; this.address = address; this.CCInit.IsKey = false; this.CCInit.IsSubKey = false; this.CCInit.AttributeName = ""; if ((script != "") && (script.IndexOf("<") >= 0)) { PPCardCompiler.ExplainXml(script, this.CCInit); this.area = this.CCInit.Area; } if ((this.CCInit.ClassName == "") && (this.area == PPCardArea.Head)) { this.CCInit.ClassName = tmpType; } this.tbcData.SelectedTab = this.tabBinding; if (this.CCInit.IsKey) { this.chkKey.Enabled = true; this.chkSubKey.Enabled = false; } else if (this.CCInit.IsSubKey) { this.chkKey.Enabled = false; this.chkSubKey.Enabled = true; } else { this.chkKey.Enabled = !HasKey; this.chkSubKey.Enabled = !HasSubKey; } if (this.area == PPCardArea.Mid) { this.rbtMid.Checked = true; this.CCInit.Area = PPCardArea.Mid; } else { this.chkKey.Checked = false; this.chkKey.Enabled = false; this.chkSubKey.Checked = false; this.chkSubKey.Enabled = false; this.rbtMid.Checked = false; this.CCInit.Area = PPCardArea.Head; } }
private void btnOK_Click(object sender, EventArgs e) { PPCardCell cardCell = this.CardCell; if ((cardCell.AttributeName == "") || (cardCell.ClassName == "")) { MessageBox.Show("有关属性没有定制或者没有正确定制,请检查并更正。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if ((!this.IsPrintTemplate && (((this.m_tp.HeadClass != ((string)this.txtField.Tag)) && ModelContext.MetaModel.IsCard(this.txtField.Tag as string)) || this.rbtMid.Checked)) && ((cardCell.LeftClassName == "") || (cardCell.LeftRelName == ""))) { MessageBox.Show("关联关系没有定制,请检查并更正。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (cardCell.IsBarcode && (cardCell.BarcodeTemplate == "")) { MessageBox.Show("条码输出没有选择条码模板,请检查并更正。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if ((!this.IsPrintTemplate && (cardCell.DataType == 9)) && (cardCell.Area != PPCardArea.Head)) { MessageBox.Show("只有表头才能绑定网格类型,请检查并更正。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { if (this.pnlGrid.Visible) { if (!CLPPFile.CheckAddress(cardCell.Address)) { MessageBox.Show("网格的起始单元格格式不对。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (!CLPPFile.CheckAddress(cardCell.Address2)) { MessageBox.Show("网格的结束单元格格式不对。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } if (cardCell.IsSubKey) { if (!HasKey) { MessageBox.Show("您还没有设置关键列,不能设置子关键列。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (cardCell.IsKey) { MessageBox.Show("一列不能既设置成关键列,又设置成子关键列。", "工艺", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } this.rtxScript.Text = PPCardCompiler.CreateXML(cardCell); ccFavorite = new PPCardCell(cardCell); ccFavorite.Script = ""; if (cardCell.IsKey) { HasKey = true; } else if (cardCell.IsSubKey) { HasSubKey = true; } base.DialogResult = DialogResult.OK; } }