Skip to content

Commit

Permalink
oups
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Dec 13, 2021
1 parent bc8d4bd commit 0c8320e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ControllerHelper/ControllerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public partial class ControllerHelper : Form

private readonly ILogger logger;

public ControllerHelper(string[] args, ILogger logger)
public ControllerHelper(string[] Arguments, ILogger logger)
{
InitializeComponent();

this.logger = logger;
this.args = args;
this.args = Arguments;

Assembly CurrentAssembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(CurrentAssembly.Location);
Expand Down Expand Up @@ -147,6 +147,9 @@ public ControllerHelper(string[] args, ILogger logger)
case DialogResult.No:
break;
}

this.args = new string[] { "service", "--action=install" };

FirstStart = false;
Properties.Settings.Default.FirstStart = FirstStart;
Properties.Settings.Default.Save();
Expand Down Expand Up @@ -223,6 +226,9 @@ private void ControllerHelper_Load(object sender, EventArgs e)

UpdateStatus(false);

// start Service Manager
ServiceManager.Start();

// start pipe client and server
PipeClient.Start();
PipeServer.Start();
Expand Down
4 changes: 4 additions & 0 deletions ControllerHelper/ServiceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public ServiceManager(string name, ControllerHelper helper, string display, stri

// monitor service
MonitorTimer = new Timer(1000) { Enabled = true, AutoReset = true };
}

public void Start()
{
MonitorTimer.Elapsed += MonitorHelper;
}

Expand Down

0 comments on commit 0c8320e

Please sign in to comment.