From 1bd3cd422512d7d5fc562950cfaa6dee22a3c0a4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 29 Aug 2013 12:36:24 -0400 Subject: Forgot to add new files in previous commit. --- vsprojects/Service/App.config | 6 + vsprojects/Service/Program.cs | 17 +++ vsprojects/Service/Properties/AssemblyInfo.cs | 36 ++++++ vsprojects/Service/Service.csproj | 108 ++++++++++++++++++ vsprojects/Service/ZeroTierOneService.Designer.cs | 71 ++++++++++++ vsprojects/Service/ZeroTierOneService.cs | 44 ++++++++ vsprojects/Service/ZeroTierOneService.resx | 129 ++++++++++++++++++++++ 7 files changed, 411 insertions(+) create mode 100644 vsprojects/Service/App.config create mode 100644 vsprojects/Service/Program.cs create mode 100644 vsprojects/Service/Properties/AssemblyInfo.cs create mode 100644 vsprojects/Service/Service.csproj create mode 100644 vsprojects/Service/ZeroTierOneService.Designer.cs create mode 100644 vsprojects/Service/ZeroTierOneService.cs create mode 100644 vsprojects/Service/ZeroTierOneService.resx (limited to 'vsprojects/Service') diff --git a/vsprojects/Service/App.config b/vsprojects/Service/App.config new file mode 100644 index 00000000..8e156463 --- /dev/null +++ b/vsprojects/Service/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsprojects/Service/Program.cs b/vsprojects/Service/Program.cs new file mode 100644 index 00000000..579e5bfe --- /dev/null +++ b/vsprojects/Service/Program.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceProcess; +using System.Text; +using System.Threading.Tasks; + +namespace Service +{ + static class Program + { + static void Main() + { + ServiceBase.Run(new ZeroTierOneService()); + } + } +} diff --git a/vsprojects/Service/Properties/AssemblyInfo.cs b/vsprojects/Service/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..04bb7710 --- /dev/null +++ b/vsprojects/Service/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Service")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Service")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8c5f91e6-d727-431c-b99c-8e16dc423889")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/vsprojects/Service/Service.csproj b/vsprojects/Service/Service.csproj new file mode 100644 index 00000000..10372114 --- /dev/null +++ b/vsprojects/Service/Service.csproj @@ -0,0 +1,108 @@ + + + + + Debug + AnyCPU + {079E8119-388C-4676-964E-0B8C5324F770} + WinExe + Properties + Service + Service + v4.5 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + Service.Program + + + + + + + + + + + + + + + Component + + + ZeroTierOneService.cs + + + + + + + + + + ZeroTierOneService.cs + + + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/vsprojects/Service/ZeroTierOneService.Designer.cs b/vsprojects/Service/ZeroTierOneService.Designer.cs new file mode 100644 index 00000000..9b1f6ddf --- /dev/null +++ b/vsprojects/Service/ZeroTierOneService.Designer.cs @@ -0,0 +1,71 @@ +namespace Service +{ + partial class ZeroTierOneService + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.zeroTierProcess = new System.Diagnostics.Process(); + this.checkForUpdatesTimer = new System.Windows.Forms.Timer(this.components); + // + // zeroTierProcess + // + this.zeroTierProcess.EnableRaisingEvents = true; + this.zeroTierProcess.StartInfo.CreateNoWindow = true; + this.zeroTierProcess.StartInfo.Domain = ""; + this.zeroTierProcess.StartInfo.LoadUserProfile = false; + this.zeroTierProcess.StartInfo.Password = null; + this.zeroTierProcess.StartInfo.RedirectStandardError = true; + this.zeroTierProcess.StartInfo.RedirectStandardInput = true; + this.zeroTierProcess.StartInfo.RedirectStandardOutput = true; + this.zeroTierProcess.StartInfo.StandardErrorEncoding = null; + this.zeroTierProcess.StartInfo.StandardOutputEncoding = null; + this.zeroTierProcess.StartInfo.UserName = ""; + this.zeroTierProcess.StartInfo.UseShellExecute = false; + this.zeroTierProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; + this.zeroTierProcess.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(this.zeroTierProcess_OutputDataReceived); + this.zeroTierProcess.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(this.zeroTierProcess_ErrorDataReceived); + this.zeroTierProcess.Exited += new System.EventHandler(this.zeroTierProcess_Exited); + // + // checkForUpdatesTimer + // + this.checkForUpdatesTimer.Enabled = true; + this.checkForUpdatesTimer.Interval = 3600000; + this.checkForUpdatesTimer.Tick += new System.EventHandler(this.checkForUpdatesTimer_Tick); + // + // ZeroTierOneService + // + this.ServiceName = "ZeroTier One"; + + } + + #endregion + + private System.Diagnostics.Process zeroTierProcess; + private System.Windows.Forms.Timer checkForUpdatesTimer; + } +} diff --git a/vsprojects/Service/ZeroTierOneService.cs b/vsprojects/Service/ZeroTierOneService.cs new file mode 100644 index 00000000..f654f108 --- /dev/null +++ b/vsprojects/Service/ZeroTierOneService.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.ServiceProcess; +using System.Text; +using System.Threading.Tasks; + +namespace Service +{ + public partial class ZeroTierOneService : ServiceBase + { + public ZeroTierOneService() + { + InitializeComponent(); + } + + protected override void OnStart(string[] args) + { + } + + protected override void OnStop() + { + } + + private void zeroTierProcess_Exited(object sender, EventArgs e) + { + } + + private void zeroTierProcess_ErrorDataReceived(object sender, DataReceivedEventArgs e) + { + } + + private void zeroTierProcess_OutputDataReceived(object sender, DataReceivedEventArgs e) + { + } + + private void checkForUpdatesTimer_Tick(object sender, EventArgs e) + { + } + } +} diff --git a/vsprojects/Service/ZeroTierOneService.resx b/vsprojects/Service/ZeroTierOneService.resx new file mode 100644 index 00000000..73b94cb8 --- /dev/null +++ b/vsprojects/Service/ZeroTierOneService.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 146, 17 + + + False + + \ No newline at end of file -- cgit v1.2.3