|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Office.Tools.Ribbon;
- namespace WordAddIn1
- {
- public partial class Ribbon1
- {
- private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
- {
- }
- private void button1_Click(object sender, RibbonControlEventArgs e)
- {
- System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo myProStartInfo = new System.Diagnostics.ProcessStartInfo("notepad.exe");
- myProcess.StartInfo = myProStartInfo;
- myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- myProcess.Start();
- }
- private void button2_Click(object sender, RibbonControlEventArgs e)
- {
- if (this.checkBox1.Checked)//如果勾选
- {
- System.Diagnostics.Process.Start("http://yy.com/91283328/2175343697?from=");//打开网页YY
- }
- else
- {
- System.Diagnostics.Process.Start("yy://pd-[sid=91283328&subid=2175343697]");//打开软件YY
- }
- }
- }
- }
复制代码 |
评分
-
查看全部评分
|