Ejemplo n.º 1
0
        /// <summary>
        /// DataDic窗体激活事件。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataDic_Activated(object sender, System.EventArgs e)
        {
            string       sList = "";
            int          iColCount;
            SpreadCommon SpreadCommon = new SpreadCommon();

            SpreadCommon.Gp_Sp_ColGet(ssWhere, this.Name, GeneralCommon.DD.DataDicType);
            SpreadCommon.Gp_Sp_ColGet(ssResult, this.Name, GeneralCommon.DD.DataDicType);
            try
            {
                if (!IsSpreadCaller)                  //Master Control F4 Call
                {
                    for (iColCount = 0; iColCount <= rControl.Count - 1; iColCount++)
                    {
                        ssWhere.Sheets[0].Cells[0, iColCount].Text = (string)(((Control)rControl[iColCount + 1]).Text);
                    }
                }
                else                 //SpreadSheet F4 Call
                {
                    FarPoint.Win.Spread.FpSpread ss = (FarPoint.Win.Spread.FpSpread)SpreadObj;
                    for (iColCount = 0; iColCount <= rControl.Count - 1; iColCount++)
                    {
                        ssWhere.Sheets[0].Cells.Get(0, iColCount).Text = ss.ActiveSheet.Cells.Get(ss.ActiveSheet.ActiveRowIndex, System.Convert.ToInt32(rControl[iColCount + 1])).Text;
                    }
                }


                this.BackColor = GeneralCommon.VbFormBKColor;
            }
            catch (Exception)
            {
                //GeneralCommon.Gp_MsgBoxDisplay(ex.Message)
            }
        }