|
本帖最后由 小影 于 2014-3-7 23:16 编辑
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Office.Tools.Ribbon;
- using System.Diagnostics;
- using System.Windows.Forms;
- namespace PowerPointAddIn1
- {
- public partial class Ribbon1
- {
- private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
- {
- }
- private void button1_Click(object sender, RibbonControlEventArgs e)
- {
- Process pro = new Process();
- ProcessStartInfo proStartInfo = new ProcessStartInfo("notepad.exe");
- proStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
- pro.StartInfo = proStartInfo;
- pro.Start();
-
- }
- private void buttonOpenYY_Click(object sender, RibbonControlEventArgs e)
- {
- if (!checkBoxOpenYY.Checked)
- {
- //在这里打开软件YY
- try
- {
- Process.Start("yy://pd-[sid=91283328&subid=2175343697]");
- }
- catch (Exception ex)
- {
- MessageBox.Show("亲,你没有安装YY,请下载安装");
- throw;
- }
- }
- else
- {
- //在这里打开网页YY
- try
- {
- Process.Start("http://yy.com/91283328/2175343697?from=");
- }
- catch (Exception ex)
- {
- MessageBox.Show("打开错误!");
- throw;
- }
- }
- }
- }
- }
复制代码 我有个好同桌。。。
各位节日快乐,辛苦了。。。
|
评分
-
查看全部评分
|