Stores visual appearance related properties for a Row
Beispiel #1
0
        /// <summary>
        /// Releases all resources used by the Row
        /// </summary>
        public void Dispose()
        {
            if (!this.disposed)
            {
                this.tag = null;

                if (this.tableModel != null)
                {
                    this.tableModel.Rows.Remove(this);
                }

                this.tableModel = null;
                this.index      = -1;

                if (this.cells != null)
                {
                    Cell cell;

                    for (int i = 0; i < this.cells.Count; i++)
                    {
                        cell = this.cells[i];

                        cell.InternalRow = null;
                        cell.Dispose();
                    }

                    this.cells = null;
                }

                this.rowStyle = null;
                this.state    = (byte)0;

                this.disposed = true;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initialise default values
        /// </summary>
        private void Init()
        {
            this.cells = null;

            this.tag               = null;
            this.tableModel        = null;
            this.index             = -1;
            this.rowStyle          = null;
            this.selectedCellCount = 0;

            this.state = (byte)(STATE_EDITABLE | STATE_ENABLED);
        }
Beispiel #3
0
        /// <summary>
        /// Initialise default values
        /// </summary>
        private void Init()
        {
            this.cells = null;

            this.tag               = null;
            this.tableModel        = null;
            this.index             = -1;
            this.rowStyle          = null;
            this.selectedCellCount = 0;
            this.hasWordWrapCell   = false;
            this.wordWrapIndex     = 0;
            this.height            = -1;

            this.state = (byte)(STATE_EDITABLE | STATE_ENABLED);
        }
Beispiel #4
0
        private void FillDataGrid(List <Pdf2JpgFileInfo> pdfFiles)
        {
            var rowStyle = new RowStyle
            {
                Font = new Font("微软雅黑", 9f, FontStyle.Regular)
            };
            var index         = this.tableFiles.TableModel.Rows.Count;
            var sameFilesName = new List <string>();

            foreach (var pdfFile in pdfFiles)
            {
                if (IsExistSameFileName(pdfFile.FileName))
                {
                    sameFilesName.Add(pdfFile.FileName);
                    continue;
                }
                var row = new Row();
                row.Cells.AddRange(new Cell[]
                {
                    new Cell(pdfFile.FileName, Properties.Resources.pdf_ico),
                    new Cell(Utils.CountSize(Utils.GetFileSize(pdfFile.FilePath))),
                    new Cell(1),
                    new Cell(100),
                    new Cell(0),
                    new Cell("删除", Properties.Resources.trash_empty),
                    new Cell(pdfFile.FilePath)
                });
                row.Tag = ConvertState.NotConvert;
                this.tableFiles.TableModel.Rows.Add(row);
                this.tableFiles.TableModel.Rows[index].RowStyle = rowStyle;
                index++;
            }

            if (sameFilesName.Count > 0)
            {
                if (sameFilesName.Count > 5)
                {
                    sameFilesName = sameFilesName.Take(5).ToList();
                    sameFilesName.Add("... ...");
                }
                var height   = sameFilesName.Count * 20 + 150;
                var strNames = string.Join("\n", sameFilesName);
                YMessageBox.ShowMsgBox(height, $"下列文件:\n{strNames}\n已存在,将忽略添加!");
            }
        }
Beispiel #5
0
        /// <summary>
        /// Releases all resources used by the Row
        /// </summary>
        public void Dispose()
        {
            if (!this.disposed)
            {
                this.tag = null;

                if (this.tableModel != null)
                {
                    this.tableModel.Rows.Remove(this);
                }

                this.tableModel = null;
                this.index = -1;

                if (this.cells != null)
                {
                    Cell cell;

                    for (int i=0; i<this.cells.Count; i++)
                    {
                        cell = this.cells[i];

                        cell.InternalRow = null;
                        cell.Dispose();
                    }

                    this.cells = null;
                }

                this.rowStyle = null;
                this.state = (byte) 0;

                this.disposed = true;
            }
        }
Beispiel #6
0
        /// <summary>
        /// Initialise default values
        /// </summary>
        private void Init()
        {
            this.cells = null;

            this.tag = null;
            this.tableModel = null;
            this.index = -1;
            this.rowStyle = null;
            this.selectedCellCount = 0;
            this.hasWordWrapCell = false;
            this.wordWrapIndex = 0;
            this.height = -1;
            this._internalGridLineFlags = null;

            this.state = (byte) (STATE_EDITABLE | STATE_ENABLED);
        }
Beispiel #7
0
		/// <summary>
		/// Initialise default values
		/// </summary>
		private void Init()
		{
			this.cells = null;

			this.tag = null;
			this.tableModel = null;
			this.index = -1;
			this.rowStyle = null;
			this.selectedCellCount = 0;

			this.state = (byte) (STATE_EDITABLE | STATE_ENABLED);
		}