Ejemplo n.º 1
0
        private PPCellAttach CheckEditStyle(string cell)
        {
            string cellValue = this.GetCellValue(cell);
            int    num       = PPCConvert.Address2Row(cell);

            if (CLCard.InRange(this.midBegin, this.midEnd, this.curCell))
            {
                if (num == PPCConvert.Address2Row(this.midBegin))
                {
                    return(PPCellAttach.Option);
                }
                return(PPCellAttach.None);
            }
            if ((cellValue != "") && (cellValue[0] != '<'))
            {
                if (this.readOnly)
                {
                    return(PPCellAttach.None);
                }
                return(PPCellAttach.Label);
            }
            if (cellValue == string.Empty)
            {
                if (this.readOnly)
                {
                    return(PPCellAttach.None);
                }
                return(PPCellAttach.Unknow);
            }
            if (cellValue[0] == '<')
            {
                return(PPCardCompiler.GetXmlEditStyle(cellValue));
            }
            return(PPCellAttach.None);
        }
Ejemplo n.º 2
0
        private void OnInsertBarcode(object sender, EventArgs e)
        {
            string     cellValue = this.GetCellValue(this.curCell);
            DlgBarcode barcode   = new DlgBarcode(cellValue, this.m_tp.HeadClass, this.readOnly);

            if (PPCardCompiler.GetXmlEditStyle(cellValue) == PPCellAttach.None)
            {
                barcode.CellStart = this.curCell;
            }
            if (barcode.ShowDialog() == DialogResult.OK)
            {
                this.SetCellValue(this.curCell, barcode.Script);
            }
        }
Ejemplo n.º 3
0
        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);
                }
            }
        }