Ejemplo n.º 1
0
        internal SLComment Clone()
        {
            SLComment comm = new SLComment(this.listThemeColors);

            comm.sAuthor                 = this.sAuthor;
            comm.rst                     = this.rst.Clone();
            comm.HasSetPosition          = this.HasSetPosition;
            comm.Top                     = this.Top;
            comm.Left                    = this.Left;
            comm.UsePositionMargin       = this.UsePositionMargin;
            comm.TopMargin               = this.TopMargin;
            comm.LeftMargin              = this.LeftMargin;
            comm.AutoSize                = this.AutoSize;
            comm.fWidth                  = this.fWidth;
            comm.fHeight                 = this.fHeight;
            comm.Fill                    = this.Fill.Clone();
            comm.bFromTransparency       = this.bFromTransparency;
            comm.bToTransparency         = this.bToTransparency;
            comm.LineColor               = this.LineColor;
            comm.fLineWeight             = this.fLineWeight;
            comm.LineStyle               = this.LineStyle;
            comm.vLineDashStyle          = this.vLineDashStyle;
            comm.vEndCap                 = this.vEndCap;
            comm.HorizontalTextAlignment = this.HorizontalTextAlignment;
            comm.VerticalTextAlignment   = this.VerticalTextAlignment;
            comm.Orientation             = this.Orientation;
            comm.TextDirection           = this.TextDirection;
            comm.HasShadow               = this.HasShadow;
            comm.ShadowColor             = this.ShadowColor;
            comm.Visible                 = this.Visible;

            return(comm);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Insert comment given the cell reference of the cell it's based on. This will overwrite any existing comment.
        /// </summary>
        /// <param name="CellReference">The cell reference, such as "A1".</param>
        /// <param name="Comment">The cell comment.</param>
        /// <returns>False if the cell reference is invalid. True otherwise.</returns>
        public bool InsertComment(string CellReference, SLComment Comment)
        {
            int iRowIndex    = -1;
            int iColumnIndex = -1;

            if (!SLTool.FormatCellReferenceToRowColumnIndex(CellReference, out iRowIndex, out iColumnIndex))
            {
                return(false);
            }

            return(InsertComment(iRowIndex, iColumnIndex, Comment));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Insert comment given the row index and column index of the cell it's based on. This will overwrite any existing comment.
        /// </summary>
        /// <param name="RowIndex">The row index.</param>
        /// <param name="ColumnIndex">The column index.</param>
        /// <param name="Comment">The cell comment.</param>
        /// <returns>False if either the row index or column index (or both) are invalid. True otherwise.</returns>
        public bool InsertComment(int RowIndex, int ColumnIndex, SLComment Comment)
        {
            if (!SLTool.CheckRowColumnIndexLimit(RowIndex, ColumnIndex))
            {
                return(false);
            }

            if (!slws.Authors.Contains(Comment.Author))
            {
                slws.Authors.Add(Comment.Author);
            }

            SLCellPoint pt   = new SLCellPoint(RowIndex, ColumnIndex);
            SLComment   comm = Comment.Clone();

            slws.Comments[pt] = comm;

            return(true);
        }