Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Linkify Add-in for Visual Studio

, 2 Aug 2008 CPOL
Link source code comments to your bug tracker, MSDN, development Wiki and more.
linkifybin_1.2.zip
Linkify.AddIn
Linkify.dll
linkifybin_1pt2.zip
Linkify.AddIn
Linkify.dll
linkifysetup_1.2.zip
LinkifySetup_1.2.exe
linkifysetup_1pt2.zip
LinkifySetup_1.2.exe
linkifysrc_1.2.zip
Linkify
IconDataConvert.exe
Linkify.AddIn
Linkify.csproj.user
linkify.ico
Setup
LinkifySetup.iss
Setup.vcproj.CALIGULA.PH.user
utility
linkifysrc_1pt2.zip
IconDataConvert.exe
Linkify.AddIn
Linkify.csproj.user
linkify.ico
LinkifySetup.iss
Setup.vcproj.CALIGULA.PH.user
Linkify_1pt3_bin.zip
Linkify.dll
Linkify2005.AddIn
Linkify2008.AddIn
Linkify_1pt3_Setup.zip
LinkifySetup.exe
Linkify_1pt3_src.zip
IconDataConvert.exe
imlConfirm.bmp
linkify.ico
Linkify2005.AddIn
Linkify2008.AddIn
LinkifySetup.iss
Setup.vcproj.CALIGULA.PH.user
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace Linkify
{
  public partial class FormConfirm : Form
  {
    bool haveError = false;

    public FormConfirm()
    {
      InitializeComponent();
    }

    public void ResetConstents()
    {
      m_lvInfo.Items.Clear();
    }

    public void AddInfo(string name, string value)
    {
      ListViewItem lvi = m_lvInfo.Items.Add(name);
      lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, value));
      m_lvInfo.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
    }

    public void AddError(string error)
    {
      ListViewItem lvi = m_lvInfo.Items.Insert(0, "Error");
      lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, error));
      lvi.SubItems[0].Font = new Font(lvi.SubItems[0].Font, FontStyle.Bold);
      lvi.SubItems[0].BackColor = lvi.SubItems[1].BackColor = SystemColors.Info;
      lvi.SubItems[0].ForeColor = lvi.SubItems[1].ForeColor = SystemColors.InfoText;
      lvi.ImageIndex = 1;
      lvi.Selected = false;
      lvi.Focused = false;

      m_lvInfo.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

      cbRun.Visible = false;
      haveError = true;
      // focus to cancel button must be set after initializing control
      // when focus does not get set, listview draws "error" line incorrectly. doh!
    }


    private void button1_Click(object sender, EventArgs e)
    {
      // .. nothing
    }

    private bool m_forceSettings = false;
    public bool ForceSettings
    {
      get { return m_forceSettings;  }
    }

    private void cbEditSettings_Click(object sender, EventArgs e)
    {
      m_forceSettings = true;
    }

    public void SetUrl(string url)
    {
      lblMoreInfoLink.Text = url;
      lblMoreInfo.Visible = lblMoreInfoLink.Visible = !String.IsNullOrEmpty(url);
    }

    private void lblMoreInfoLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
      ProcessStartInfo psi = new ProcessStartInfo("iexplore.exe", lblMoreInfoLink.Text);
      System.Diagnostics.Process.Start(psi);
    }

    private void FormConfirm_Shown(object sender, EventArgs e)
    {
      if (haveError)
        cbCancel.Focus();
    }
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

peterchen
Klippel
Germany Germany
Peter is tired of being called "Mr. Chen", even so certain individuals insist on it. No, he's not chinese.
 
Peter has seen lots of boxes you youngsters wouldn't even accept as calculators. He is proud of having visited the insides of a 16 Bit Machine.
 
In his spare time he ponders new ways of turning groceries into biohazards, or tries to coax South American officials to add some stamps to his passport.
 
Beyond these trivialities Peter works for Klippel[^], a small german company that wants to make mankind happier by selling them novel loudspeaker measurement equipment.
 

Where are you from?[^]



Please, if you are using one of my articles for anything, just leave me a comment. Seeing that this stuff is actually useful to someone is what keeps me posting and updating them.
Should you happen to not like it, tell me, too

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 2 Aug 2008
Article Copyright 2006 by peterchen
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid