|
取了两段代码出来
private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
{
}
private void notepad_Click(object sender, RibbonControlEventArgs e)
{
//打开记事本
System.Diagnostics.Process.Start("notepad.exe");
}
private void YYcheck_Click(object sender, RibbonControlEventArgs e)
{
if (YYcheck.Checked == true)
{
//打开网页版
System.Diagnostics.Process.Start("http://yy.com/91283328/2175343697?from=");
}else{
try
{
//打开YY
System.Diagnostics.Process.Start("yy://pd-[sid=91283328&subid=2175343697]");
}
catch (System.Exception ex)
{
//打开网页版
System.Diagnostics.Process.Start("http://yy.com/91283328/2175343697?from=");
}
}
} |
|