Win.CodeNavi.frmMain.openFileToolStripMenuItem_Click C# (CSharp) Method

openFileToolStripMenuItem_Click() private method

Opens a file
private openFileToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string strFile = null;
            int intLine = 0;

            if (richNotes.SelectedText.Count() > 0)
            {
                if (richNotes.SelectedText.Trim().Substring(3, richNotes.SelectedText.Trim().Count() - 3).Contains(':') == true)
                {
                    string[] strBits = richNotes.SelectedText.Trim().Split(':');

                    if (strBits.Count() == 3 && strBits[2].Count() > 0)
                    {
                        if (File.Exists(strBits[0] + ":" + strBits[1]))
                        {
                            strFile = strBits[0] + ":" + strBits[1];
                            intLine = Convert.ToInt32(strBits[2]);
                        }
                        else
                        {
                            UpdateNotesStatus("File not found " + richNotes);
                        }
                    }
                }
                else if (File.Exists(richNotes.SelectedText) == true)
                {
                    strFile = richNotes.SelectedText;
                }
                else
                {
                    UpdateNotesStatus("File not found " + richNotes);
                }
            }

            frmCodeViewNew frmSearch = new frmCodeViewNew(strFile, intLine, this);
            frmSearch.MdiParent = this;
            frmSearch.Visible = true;
        }