1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using SHDocVw;
namespace plugup
{
public partial class UserControl1 : SpicIE.Controls.Toolbar
{
public UserControl1()
{
InitializeComponent();
this.ToolbarName = "toolbar";
this.ToolbarHelpText = "Learn more at xxx.com";
this.ToolbarStyle = ToolbarEnum.ExplorerToolbar;
// represents the startup size of the bar
this.Size = new Size(20, 20);
// represents the sizing steps
this.IntegralSize = new Size(0, 0);
// represents the minimum size
this.MinSize = new Size(30, 30);
// represents the maximum size
this.MaxSize = new Size(600, 600);
// creates a new control collection and inserts the designer-generated controls
Control[] ctrls = new Control[Controls.Count];
Controls.CopyTo(ctrls, 0);
// call internal method for implementing controls in the toolbar
BuildControls(ctrls);
}
public override string PluginGuid
{
get
{
return "cb142b6f-abd2-4255-9266-f406071d1a58";
}
}
public override string PluginProgID
{
get
{
return "plugup.UserControl1";
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "www.facebook.com";
process.Start();
}
private void pictureBox2_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "www.twitter.com";
process.Start();
}
private void pictureBox4_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=http://mail.google.com/mail/&scc=1<mpl=default<mplcache=2";
process.Start();
}
}
} |
Partager