File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Flow.Launcher.Plugin/Interfaces Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ public interface IPublicAPI
29
29
/// </summary>
30
30
void RestartApp ( ) ;
31
31
32
+ /// <summary>
33
+ /// Run a shell command or external program
34
+ /// </summary>
35
+ /// <param name="cmd">The command or program to run</param>
36
+ void ShellRun ( string cmd ) ;
37
+
32
38
/// <summary>
33
39
/// Save everything, all of Flow Launcher and plugins' data and settings
34
40
/// </summary>
Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ public void OpenSettingDialog()
103
103
} ) ;
104
104
}
105
105
106
+ public void ShellRun ( string cmd )
107
+ {
108
+ System . Diagnostics . Process process = new ( ) ;
109
+ var startInfo = process . StartInfo ;
110
+ startInfo . FileName = "cmd.exe" ;
111
+ startInfo . Arguments = $ "/C { cmd } ";
112
+ startInfo . CreateNoWindow = true ;
113
+ process . Start ( ) ;
114
+ }
115
+
106
116
public void StartLoadingBar ( ) => _mainVM . ProgressBarVisibility = Visibility . Visible ;
107
117
108
118
public void StopLoadingBar ( ) => _mainVM . ProgressBarVisibility = Visibility . Collapsed ;
You can’t perform that action at this time.
0 commit comments