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); } }
public ArrayList GetMidColNameList() { ArrayList list = new ArrayList(); 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 address = this.GetRange(row, i).MergeArea.Address; if (address.IndexOf(":") > 0) { string firstCell = this.GetFirstCell(address); if (PPCConvert.Address2Col(firstCell) == i) { list.Add(PPCConvert.Address2ColName(firstCell)); } } else { list.Add(PPCConvert.Address2ColName(address)); } } return(list); }