rdp-portal/MainForm.cs

34 lines
981 B
C#
Raw Normal View History

2022-10-27 16:16:09 +02:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
2022-10-28 10:45:38 +02:00
using System.Diagnostics;
2022-10-27 16:16:09 +02:00
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RDP_Portal {
public partial class MainForm : Form {
public MainForm() {
InitializeComponent();
}
2022-10-28 10:45:38 +02:00
private void buttonMoreOptions_Click(object sender, EventArgs e) {
ProcessStartInfo startInfo = new ProcessStartInfo {
CreateNoWindow = false,
UseShellExecute = false,
FileName = "mstsc.exe",
Arguments = "/edit test.rdp"
};
try {
var exeProcess = Process.Start(startInfo) ?? throw new InvalidOperationException();
exeProcess.WaitForExit();
} catch (Exception ex) {
MessageBox.Show(ex.ToString());
}
}
2022-10-27 16:16:09 +02:00
}
}