forked from petabridge/akka-bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LauncherForm.cs
36 lines (31 loc) · 1.13 KB
/
LauncherForm.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
using System;
using System.Windows.Forms;
using Akka.Actor;
using GithubActors.Actors;
namespace GithubActors
{
public partial class LauncherForm : Form
{
private IActorRef _mainFormActor;
public LauncherForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
/* INITIALIZE ACTORS */
_mainFormActor = Program.GithubActors.ActorOf(Props.Create(() => new MainFormActor(lblIsValid)), ActorPaths.MainFormActor.Name);
Program.GithubActors.ActorOf(Props.Create(() => new GithubValidatorActor(GithubClientFactory.GetClient())), ActorPaths.GithubValidatorActor.Name);
Program.GithubActors.ActorOf(Props.Create(() => new GithubCommanderActor()),
ActorPaths.GithubCommanderActor.Name);
}
private void btnLaunch_Click(object sender, EventArgs e)
{
_mainFormActor.Tell(new ProcessRepo(tbRepoUrl.Text));
}
private void LauncherForm_FormClosing(object sender, FormClosingEventArgs e)
{
Application.Exit();
}
}
}