using System; using System.Collections.Generic; using System.Linq; using System.Text; using Mesnac.Action.Base; namespace Mesnac.Action.Default.Tools { /// /// 调用系统计算器类 /// public class CalCalculatorAction : DatabaseAction, IAction { public void Run(RuntimeParameter runtime) { base.RunIni(runtime); try { System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo(); Info.FileName = "calc.exe ";//"calc.exe"为计算器,"notepad.exe"为记事本 System.Diagnostics.Process Proc = System.Diagnostics.Process.Start(Info); } catch (Exception ex) { ICSharpCode.Core.LoggingService.Error("调用系统计算器失败:" + ex.Message); } } } }