Esempio n. 1
0
        private void mainGridContextMenu_Opened(object sender, EventArgs e)
        {
            // Checks and Enable/Disables Go to URL menu item
            if (textDataGrid.SelectedRows.Count == 1)
            {
                TextEventArgs textEventArgs = new TextEventArgs();    // Declares new TextEventArg
                // Adds row text content as string to TextEventArgs
                textEventArgs.Add((string)textDataGrid.SelectedRows[0].Cells[1].Value);
                textGridCheckURLAndSetStatus(sender, textEventArgs);

                if (ContentIdentifier.ContainsURL((string)textDataGrid.SelectedRows[0].Cells[1].Value))
                {
                    if (Properties.Settings.Default.isURLIdentificationEnabled)
                    {
                        goToURLToolStripMenuItem.Enabled = true;
                    }
                }
            }
            else
            {
                goToURLToolStripMenuItem.Enabled = false;
                viewInSyntaxHighlightingToolStripMenuItem.Enabled = false;
            }
            // Checks and Enable/Disable Edit Context menu item5
            if (textDataGrid.SelectedRows.Count != 1)
            {
                goToURLToolStripMenuItem.Enabled = false;
            }
        }
Esempio n. 2
0
 private void UrlListDisplay_Load(object sender, EventArgs e)
 {
     if (listBox1.Items.Count == 1)
     {
         Process.Start(ContentIdentifier.CheckAndAppendHTTP((string)listBox1.Items[0]));
         Close();
     }
 }
Esempio n. 3
0
 private void URLCalled(object sender, EventArgs e)
 {
     if (view.SelectedRowTextContent != null)
     {
         UrlListDisplay urlListDisplay = new UrlListDisplay(this,
                                                            ContentIdentifier.GetURLs(view.SelectedRowTextContent.text));
         urlListDisplay.ShowDialog();
     }
 }
Esempio n. 4
0
 private void openButton_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         Process.Start(ContentIdentifier.CheckAndAppendHTTP(listBox1.SelectedItem.ToString()));
     }
     else
     {
         MessageBox.Show("Please select a URL to open.",
                         "Clipboarder - Display URL",
                         MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
 }
Esempio n. 5
0
 private void textGridCheckURLAndSetStatus(object sender, TextEventArgs e)
 {
     if (Properties.Settings.Default.isURLIdentificationEnabled)
     {
         if (Properties.Settings.Default.isCutomRegexEnabled)
         {
             view.ShowURLStatus = ContentIdentifier.ContainsURL(e.GetAll[0],
                                                                Properties.Settings.Default.regex);
         }
         else
         {
             view.ShowURLStatus = ContentIdentifier.ContainsURL(e.GetAll[0]);
         }
     }
     else
     {
         view.ShowURLStatus = false;
     }
 }