Smrf.NodeXL.ExcelTemplate.AnalyzeEmailNetworkDialog.FirstParticipantSpecified C# (CSharp) Method

FirstParticipantSpecified() protected method

protected FirstParticipantSpecified ( ) : System.Boolean
return System.Boolean
    FirstParticipantSpecified()
    {
        AssertValid();

        if (!cbxUseParticipants.Checked)
        {
            return (false);
        }

        DataGridViewRowCollection oRows = dgvParticipants.Rows;

        if (oRows.Count == 0)
        {
            return (false);
        }

        DataGridViewRow oFirstRow = oRows[0];

        if (oFirstRow.IsNewRow)
        {
            return (false);
        }

        String sFirstParticipant =
            (String)oFirstRow.Cells[this.colParticipant.Name].Value;

        if ( sFirstParticipant == null ||
            String.IsNullOrEmpty( sFirstParticipant.Trim() ) )
        {
            return (false);
        }

        return (true);
    }