private void OnFunction(object sender, EventArgs e) { ArrayList midColLstOfMain = new ArrayList(); ArrayList midColLstOfNext = new ArrayList(); this.GetColList(midColLstOfMain, midColLstOfNext); CLFunction func = new CLFunction(); string cellValue = this.GetCellValue(this.curCell); if ((cellValue != null) && (cellValue != "")) { PPCardCompiler.ExplainXml(cellValue, func); } else { func.ColInMainPage = func.ColInNextPage = PPCConvert.Address2ColName(this.GetFirstCell(this.curCell)); func.FuncType = ((MenuItemEx)sender).Text; func.DisplayInLastPage = true; if (func.FuncType == "单页列小计") { func.DisplayInLastPage = false; } } DlgFunction function2 = new DlgFunction(this.m_tp, midColLstOfMain, midColLstOfNext, base.Parent.Text == "首页", func, this.readOnly); if ((function2.ShowDialog() == DialogResult.OK) && (function2.script != null)) { this.SetCellValue(this.curCell, function2.script); } }
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(); }
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; }
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; } }