Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates an exact copy of this row.
        /// </summary>
        /// <returns>
        /// An <see cref="T:System.Object"></see> that represents the cloned <see cref="T:System.Windows.Forms.DataGridViewRow"></see>.
        /// </returns>
        /// <PermissionSet><IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/><IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/><IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/></PermissionSet>
        /// ------------------------------------------------------------------------------------
        public override object Clone()
        {
            FwTextBoxRow newRow = base.Clone() as FwTextBoxRow;

            newRow.WritingSystemHvo = m_writingSystemHvo;
            return(newRow);
        }
Exemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the writing system.
        /// </summary>
        /// <param name="rowIndex">Index of the row.</param>
        /// <returns>The HVO of the writing system</returns>
        /// ------------------------------------------------------------------------------------
        internal int GetWritingSystem(int rowIndex)
        {
            if (rowIndex >= 0)
            {
                FwTextBoxRow row = DataGridView.Rows[rowIndex] as FwTextBoxRow;
                if (row != null)
                {
                    return(row.WritingSystemHvo);
                }
            }

            return(m_ws);
        }
Exemplo n.º 3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the writing system for the column. If that is 0 (i.e., not specified), attempt
        /// to get the writing system from the specified DataGridView row.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private int GetWritingSystemWithFallback(int rowIndex)
        {
            if (m_ws > 0)
            {
                return(m_ws);
            }

            if (DataGridView == null || rowIndex < 0 || rowIndex >= DataGridView.RowCount)
            {
                return(0);
            }

            FwTextBoxRow row = DataGridView.Rows[rowIndex] as FwTextBoxRow;

            return(row == null || row.WritingSystemHvo == 0 ? 0 : row.WritingSystemHvo);
        }