示例#1
0
        public void SetData(XlsItem xls_item)
        {
            this.xls_item = xls_item;

            xls_name_txt.Text  = xls_item.showName;
            this.c_btn.Enabled = xls_item.outputFlag.IndexOf('c') >= 0;
            this.s_btn.Enabled = xls_item.outputFlag.IndexOf('s') >= 0;
        }
示例#2
0
        private void FixXlsParserType(ref XlsItem xls_item)
        {
            if (xls_item.showName.Equals("D-掉落"))
            {
                xls_item.parser_type = XLS_PARSER_TYPE.DROP;
            }

            else if (xls_item.showName.Equals("B-BOSS"))
            {
                xls_item.parser_type = XLS_PARSER_TYPE.BOSS_SKILL_CONDITION;
            }

            else if (xls_item.showName.Equals("R-任务"))
            {
                xls_item.parser_type = XLS_PARSER_TYPE.TASK;
            }
        }
示例#3
0
        private bool ReadNormalContentsXls()
        {
            List <ISheet> sheet_list = new List <ISheet>();
            string        path       = string.Format("{0}/{1}.xls", ConfigIni.XlsDir, "填表说明/通用配置");

            if (!XlsReader.Instance.ReadExcel(path, sheet_list))
            {
                return(false);
            }

            if (sheet_list.Count <= 0)
            {
                return(false);
            }

            ISheet sheet   = sheet_list[0];
            int    row_num = 10000;

            for (int i = 2; i < row_num; ++i)
            {
                IRow row = sheet.GetRow(i);
                if (null == row || row.LastCellNum < 3)
                {
                    break;
                }

                XlsItem xls_item = new XlsItem();
                xls_item.showName   = row.GetCell(0).ToString();
                xls_item.path       = string.Format("{0}/{1}.xls", ConfigIni.XlsDir, row.GetCell(1).ToString());
                xls_item.outputFlag = row.GetCell(2).ToString();
                this.FixXlsParserType(ref xls_item);

                this.xlsList.Add(xls_item);
            }

            return(true);
        }