-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
55 lines (48 loc) · 1.42 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ControllerCmd.Paladin.Wirecast.Interfaces;
using ControllerCmd.Paladin.Wirecast;
namespace WirecastTestingGUI
{
public partial class Form1 : Form
{
IWirecastControl controller1;
public Form1()
{
controller1 = new WirecastControl(new Wirecast());
InitializeComponent();
}
private void StartInstanceAsyncCallback(bool successful)
{
if (successful)
{
autolive.Enabled = true;
autolive.Checked = controller1.IsAutoLive;
toggle_broadcast.Enabled = true;
status.Text = "Got Wirecast";
}
}
private void start_wirecast_Click(object sender, EventArgs e)
{
if (!controller1.IsRunning)
{
controller1.StartInstanceAsync(StartInstanceAsyncCallback);
}
}
private void autolive_CheckedChanged(object sender, EventArgs e)
{
controller1.IsAutoLive = autolive.Checked;
}
private void toggle_broadcast_Click(object sender, EventArgs e)
{
controller1.BroadcastAsync(!controller1.IsBroadcasting);
}
}
}