├── AC_TrackCycle
├── Resources
│ ├── Thumbs.db
│ ├── AC_logo_small.png
│ └── AC_logo_small_grey.png
├── TrackMapControl.cs
├── GetStringForm.cs
├── Program.cs
├── GuiLogWriter.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── GuiTrackCyclePlugin.cs
├── GetStringForm.Designer.cs
├── app.config
├── AHSV.cs
├── AC_TrackCycle.csproj
├── GetStringForm.resx
└── TrackCyclerForm.resx
├── AC_Service
├── ACService.svc
├── AuthService.svc
├── packages.config
├── IAuthService.cs
├── IACService.cs
├── ACService.svc.cs
├── Web.Debug.config
├── Web.Release.config
├── AuthService.svc.cs
├── Properties
│ └── AssemblyInfo.cs
├── Web.config
└── AC_Service.csproj
├── AC_DBFillerEF
├── packages.config
├── Model1.cs
├── App.Config
├── Model1.Designer.cs
├── Lap.cs
├── Result.cs
├── Incident.cs
├── Model1.Context.cs
├── Properties
│ └── AssemblyInfo.cs
├── Model1.edmx.diagram
├── Session.cs
├── Driver.cs
├── DBFiller.cs
├── AC_DBFillerEF.csproj
└── Model1.edmx.sql
├── AC_SessionReportPlugin
├── packages.config
├── JsonReportWriter.cs
├── Properties
│ └── AssemblyInfo.cs
├── AC_SessionReportPlugin.csproj
└── ReportPlugin.cs
├── AC_ServiceClient
├── Service References
│ └── ACServiceReference
│ │ ├── ACService.disco
│ │ ├── ACService.xsd
│ │ ├── configuration.svcinfo
│ │ ├── Reference.svcmap
│ │ ├── ACService2.xsd
│ │ ├── Reference.cs
│ │ ├── ACService1.xsd
│ │ └── ACService.wsdl
├── ACServiceSessionReportHandler.cs
├── app.config
├── Properties
│ └── AssemblyInfo.cs
└── AC_ServiceClient.csproj
├── .gitignore
├── AC_ServerStarter
├── RaceSession.cs
├── Properties
│ └── AssemblyInfo.cs
├── NOTICES.txt
├── AC_ServerStarter.csproj
└── README.txt
├── README.md
├── AC_TrackCycle_Console
├── Properties
│ └── AssemblyInfo.cs
├── AC_TrackCycle_Console.csproj
├── app.config
└── Program.cs
├── AC_TrackCycle_Console.sln
├── AC_SERVER_APPS.sln
├── AllProjects.sln
└── LICENSE.md
/AC_TrackCycle/Resources/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flitzi/AC_SERVER_APPS/HEAD/AC_TrackCycle/Resources/Thumbs.db
--------------------------------------------------------------------------------
/AC_Service/ACService.svc:
--------------------------------------------------------------------------------
1 | <%@ ServiceHost Language="C#" Debug="true" Service="AC_Service.ACService" CodeBehind="ACService.svc.cs" %>
--------------------------------------------------------------------------------
/AC_Service/AuthService.svc:
--------------------------------------------------------------------------------
1 | <%@ ServiceHost Language="C#" Debug="true" Service="AC_Service.AuthService" CodeBehind="AuthService.svc.cs" %>
--------------------------------------------------------------------------------
/AC_TrackCycle/Resources/AC_logo_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flitzi/AC_SERVER_APPS/HEAD/AC_TrackCycle/Resources/AC_logo_small.png
--------------------------------------------------------------------------------
/AC_TrackCycle/Resources/AC_logo_small_grey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flitzi/AC_SERVER_APPS/HEAD/AC_TrackCycle/Resources/AC_logo_small_grey.png
--------------------------------------------------------------------------------
/AC_Service/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AC_SessionReportPlugin/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/ACService.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AC_Service/IAuthService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.ServiceModel;
5 | using System.ServiceModel.Web;
6 | using System.Web;
7 |
8 | namespace AC_Service
9 | {
10 | [ServiceContract]
11 | public interface IAuthService
12 | {
13 | [WebGet(ResponseFormat = WebMessageFormat.Xml, UriTemplate = "Auth/{minSR}/{id}")]
14 | string Auth(string minSR, string id);
15 | }
16 | }
--------------------------------------------------------------------------------
/AC_DBFillerEF/Model1.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 |
--------------------------------------------------------------------------------
/AC_Service/IACService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.Serialization;
5 | using System.ServiceModel;
6 | using System.ServiceModel.Web;
7 | using System.Text;
8 | using AC_SessionReport;
9 |
10 | namespace AC_Service
11 | {
12 | [ServiceContract]
13 | public interface IACService
14 | {
15 | [OperationContract]
16 | void PostResult(SessionReport report);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/AC_TrackCycle/TrackMapControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace AC_TrackCycle
11 | {
12 | public partial class TrackMapControl : Control
13 | {
14 | public TrackMapControl()
15 | {
16 | this.DoubleBuffered = true;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/App.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AC_ServiceClient/ACServiceSessionReportHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using AC_ServiceClient.ACServiceReference;
7 | using AC_SessionReport;
8 |
9 | namespace AC_ServiceClient
10 | {
11 | public class ACServiceSessionReportHandler : ISessionReportHandler
12 | {
13 | public void HandleReport(SessionReport report)
14 | {
15 | ACServiceClient client = new ACServiceClient();
16 | client.PostResult(report);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/AC_TrackCycle/GetStringForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace AC_TrackCycle
11 | {
12 | public partial class GetStringForm : Form
13 | {
14 | public string String { get; private set; }
15 | public GetStringForm(string title)
16 | {
17 | InitializeComponent();
18 | this.Text = title;
19 | }
20 |
21 | private void button_OK_Click(object sender, EventArgs e)
22 | {
23 | this.String = textBox1.Text;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | *.suo
6 | *.user
7 | bin/
8 | obj/
9 | packages/
10 | /.vs/AllProjects/v15/Server/sqlite3/db.lock
11 | /.vs/AllProjects/v15/Server/sqlite3/storage.ide
12 | /.vs/AllProjects/v15/Server/sqlite3/storage.ide-shm
13 | /.vs/AllProjects/v15/Server/sqlite3/storage.ide-wal
14 | /.vs/AC_SERVER_APPS/v15/Server/sqlite3/db.lock
15 | /.vs/AC_SERVER_APPS/v15/Server/sqlite3/storage.ide
16 | /.vs/AC_SERVER_APPS/v15/Server/sqlite3/storage.ide-shm
17 | /.vs/AC_SERVER_APPS/v15/Server/sqlite3/storage.ide-wal
18 |
--------------------------------------------------------------------------------
/AC_TrackCycle/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Windows.Forms;
4 |
5 | namespace AC_TrackCycle
6 | {
7 | internal static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | private static void Main()
14 | {
15 | try
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new TrackCyclerForm());
20 | }
21 | catch (Exception ex)
22 | {
23 | MessageBox.Show(ex.Message);
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/AC_DBFillerEF/Model1.Designer.cs:
--------------------------------------------------------------------------------
1 | // T4 code generation is enabled for model 'C:\Users\Tom\Documents\GitHub\AC_SERVER_APPS\AC_DBFillerEF\Model1.edmx'.
2 | // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
3 | // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
4 | // is open in the designer.
5 |
6 | // If no context and entity classes have been generated, it may be because you created an empty model but
7 | // have not yet chosen which version of Entity Framework to use. To generate a context class and entity
8 | // classes for your model, open the model in the designer, right-click on the designer surface, and
9 | // select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation
10 | // Item...'.
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/ACService.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/AC_Service/ACService.svc.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.Serialization;
5 | using System.ServiceModel;
6 | using System.ServiceModel.Channels;
7 | using System.ServiceModel.Web;
8 | using System.Text;
9 | using AC_DBFillerEF;
10 | using AC_SessionReport;
11 |
12 | namespace AC_Service
13 | {
14 | public class ACService : IACService
15 | {
16 | public void PostResult(SessionReport report)
17 | {
18 | OperationContext context = OperationContext.Current;
19 | MessageProperties prop = context.IncomingMessageProperties;
20 | RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
21 | string ip = endpoint.Address;
22 |
23 | new DBFiller().HandleReport(report);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/AC_ServiceClient/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AC_ServerStarter/RaceSession.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace AC_ServerStarter
4 | {
5 | public class RaceSession
6 | {
7 | public readonly string Track, Layout;
8 | public readonly int Laps;
9 |
10 | public RaceSession(string track, string layout, int laps)
11 | {
12 | this.Track = track;
13 | this.Layout = layout;
14 | this.Laps = laps;
15 | }
16 |
17 | public override string ToString()
18 | {
19 | if (string.IsNullOrEmpty(this.Layout))
20 | {
21 | return this.Track + " " + this.Laps + " laps";
22 | }
23 | return this.Track + "," + this.Layout + " " + this.Laps + " laps";
24 | }
25 | }
26 |
27 | public class RaceConfig
28 | {
29 | public readonly string Directory;
30 |
31 | public RaceConfig(string directory)
32 | {
33 | this.Directory = directory;
34 | }
35 |
36 | public override string ToString()
37 | {
38 | return Path.GetFileName(this.Directory);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/AC_SessionReportPlugin/JsonReportWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Reflection;
4 | using Newtonsoft.Json;
5 | using acPlugins4net.info;
6 | using acPlugins4net.helpers;
7 |
8 | namespace AC_SessionReportPlugin
9 | {
10 | public class JsonReportWriter : ISessionReportHandler
11 | {
12 | public void HandleReport(SessionInfo report)
13 | {
14 | string output = JsonConvert.SerializeObject(report, Formatting.Indented);
15 | string dir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "sessionresults");
16 |
17 | if (!Directory.Exists(dir))
18 | {
19 | Directory.CreateDirectory(dir);
20 | }
21 | StreamWriter writer =
22 | new StreamWriter(
23 | Path.Combine(
24 | dir,
25 | new DateTime(report.Timestamp, DateTimeKind.Utc).ToString("yyyyMMdd_HHmmss") + "_" + report.TrackName + "_"
26 | + report.SessionName + ".json"));
27 | writer.Write(output);
28 | writer.Close();
29 | writer.Dispose();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/AC_TrackCycle/GuiLogWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using acPlugins4net.helpers;
3 |
4 | namespace AC_TrackCycle
5 | {
6 | public class GuiLogWriter : FileLogWriter
7 | {
8 | private readonly TrackCyclerForm form;
9 | public bool LogMessagesToFile = true;
10 |
11 | public GuiLogWriter(TrackCyclerForm form, string defaultLogDirectory, string filePath)
12 | : base(defaultLogDirectory, filePath)
13 | {
14 | this.form = form;
15 | }
16 |
17 | public override void Log(string message)
18 | {
19 | if (this.LogMessagesToFile)
20 | {
21 | base.Log(message);
22 | }
23 | else if (this.CopyToConsole)
24 | {
25 | Console.WriteLine(message);
26 | }
27 | this.form.BeginInvoke(new Action(this.form.WriteMessage), message);
28 | }
29 |
30 | public override void Log(Exception ex)
31 | {
32 | string str = GetExceptionString(ex);
33 | this.LogMessageToFile(str);
34 | this.form.BeginInvoke(new Action(this.form.WriteMessage), str);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/AC_DBFillerEF/Lap.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Collections.Generic;
14 |
15 | public partial class Lap
16 | {
17 | public int Id { get; set; }
18 | public int SessionId { get; set; }
19 | public int DriverId { get; set; }
20 | public string Car { get; set; }
21 | public short LapNo { get; set; }
22 | public int Time { get; set; }
23 | public short Cuts { get; set; }
24 | public short Position { get; set; }
25 | public float Grip { get; set; }
26 | public System.DateTime Timestamp { get; set; }
27 |
28 | public virtual Driver Driver { get; set; }
29 | public virtual Session Session { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Result.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Collections.Generic;
14 |
15 | public partial class Result
16 | {
17 | public int Id { get; set; }
18 | public int SessionId { get; set; }
19 | public int DriverId { get; set; }
20 | public string Car { get; set; }
21 | public short StartPosition { get; set; }
22 | public short Position { get; set; }
23 | public int IncidentCount { get; set; }
24 | public int Distance { get; set; }
25 | public short LapCount { get; set; }
26 | public string Gap { get; set; }
27 | public short TopSpeed { get; set; }
28 |
29 | public virtual Session Session { get; set; }
30 | public virtual Driver Driver { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Incident.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Collections.Generic;
14 |
15 | public partial class Incident
16 | {
17 | public int Id { get; set; }
18 | public int SessionId { get; set; }
19 | public byte Type { get; set; }
20 | public float RelativeSpeed { get; set; }
21 | public System.DateTime Timestamp { get; set; }
22 | public int DriverId1 { get; set; }
23 | public Nullable DriverId2 { get; set; }
24 | public float WorldPosX { get; set; }
25 | public float WorldPosY { get; set; }
26 | public float WorldPosZ { get; set; }
27 |
28 | public virtual Session Session { get; set; }
29 | public virtual Driver Driver1 { get; set; }
30 | public virtual Driver Driver2 { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Model1.Context.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Data.Entity;
14 | using System.Data.Entity.Infrastructure;
15 |
16 | public partial class AC_DBEntities : DbContext
17 | {
18 | public AC_DBEntities()
19 | : base("name=AC_DBEntities")
20 | {
21 | }
22 |
23 | protected override void OnModelCreating(DbModelBuilder modelBuilder)
24 | {
25 | throw new UnintentionalCodeFirstException();
26 | }
27 |
28 | public virtual DbSet Drivers { get; set; }
29 | public virtual DbSet Laps { get; set; }
30 | public virtual DbSet Sessions { get; set; }
31 | public virtual DbSet Results { get; set; }
32 | public virtual DbSet Incidents { get; set; }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/AC_Service/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/AC_Service/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AC_SERVER_APPS
2 |
3 | This repository contains some .NET C# Assetto Corsa Server tools.
4 |
5 | - AC_SessionReport: A simple project containing a serializable multiplayer session report and also defines an interface for handling the report in custom tools.
6 | - AC_SessionReportPlugin: This is the server plugin that collects information about the session and creates a SessionReport object. The plugin is derived from Minolins acPlugins4net.AcServerPlugin, currently using the fork https://github.com/flitzi/acplugins. The main advantage over the report we get from kunos in the default json is that we get the full drivers list, not only the last connected drivers (which I think is the case in the default json). It also collects driven distances (odometer).
7 | - AC_ServerStarter: This reads the server.cfg and starts the plugin before starting the acServer.exe. It also can be configured to do a track cycle. Defines three new admin commands (/next_track, /change_track, /send_chat). Contains a SessionReport handler for writing a report.json.
8 | - AC_TrackCycle: (executable) a simple server administration GUI. Shows what's going on, has the option to send messages from the server and to cycle to the next track. In the App.config you can specify which SessionReport handler should be loaded (currently JsonReportWriter and DBFiller, you probably want to remove the DBFiller if you don't have a MSSQL DB)
9 | - AC_TrackCycle_Console: (executable) the console version of AC_TrackCycle.
10 | - AC_DBFillerEF: A SessionReport handler filling a MSSQL database using EntitiyFramework6.
11 |
--------------------------------------------------------------------------------
/AC_Service/AuthService.svc.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Linq.Expressions;
5 | using System.Runtime.Serialization;
6 | using System.ServiceModel;
7 | using System.ServiceModel.Channels;
8 | using System.ServiceModel.Web;
9 | using System.Text;
10 | using AC_DBFillerEF;
11 |
12 | namespace AC_Service
13 | {
14 | public class AuthService : IAuthService
15 | {
16 | public string Auth(string minSR, string id)
17 | {
18 | WebOperationContext.Current.OutgoingResponse.ContentType = "text/html";
19 |
20 | try
21 | {
22 | int minSRnum;
23 | if (!int.TryParse(minSR, out minSRnum))
24 | {
25 | minSRnum = 0; //TODO find a good default
26 | }
27 |
28 | using (AC_DBEntities entities = new AC_DBEntities())
29 | {
30 | Driver driver = entities.Drivers.FirstOrDefault(d => d.SteamId == id);
31 |
32 | if (driver != null && driver.IncidentCount > 0 && driver.Distance > 200000
33 | && driver.Distance / driver.IncidentCount < minSRnum)
34 | {
35 | return "Deny|Your Safety Rating is too low to enter this server.";
36 | }
37 | }
38 | }
39 | catch
40 | {
41 |
42 | }
43 | return "Allow";
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/AC_Service/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AC_Service")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("GAF AG")]
12 | [assembly: AssemblyProduct("AC_Service")]
13 | [assembly: AssemblyCopyright("Copyright © GAF AG 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("90bedf40-530e-443e-ab91-d7700e76b3e3")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AC_ServiceClient/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AC_ServiceClient")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("GAF AG")]
12 | [assembly: AssemblyProduct("AC_ServiceClient")]
13 | [assembly: AssemblyCopyright("Copyright © GAF AG 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("14aeab0e-8f73-4171-a906-a26b4b287455")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("AC_DBFillerEF")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("the gurus")]
12 | [assembly: AssemblyProduct("AC_DBFillerEF")]
13 | [assembly: AssemblyCopyright("Copyright © flitzi 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 |
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 |
25 | [assembly: Guid("a2c76c5c-5b21-4e63-876c-ba89d5236182")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 |
38 | [assembly: AssemblyVersion(AC_DBFillerEF.DBFiller.Version)]
39 | [assembly: AssemblyFileVersion(AC_DBFillerEF.DBFiller.Version)]
40 |
--------------------------------------------------------------------------------
/AC_SessionReportPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("AC_SessionReportPlugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("the gurus")]
12 | [assembly: AssemblyProduct("AC_SessionReportPlugin")]
13 | [assembly: AssemblyCopyright("Copyright © flitzi 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 |
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 |
25 | [assembly: Guid("9ef78b48-4269-420b-a111-0af4b317b1d2")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 |
38 | [assembly: AssemblyVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
39 | [assembly: AssemblyFileVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
40 |
--------------------------------------------------------------------------------
/AC_ServerStarter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using AC_ServerStarter;
2 | using System.Reflection;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 |
9 | [assembly: AssemblyTitle("AC_ServerStarter")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("the gurus")]
13 | [assembly: AssemblyProduct("AC_ServerStarter")]
14 | [assembly: AssemblyCopyright("Copyright © flitzi 2015")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 |
22 | [assembly: ComVisible(false)]
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 |
26 | [assembly: Guid("07e1c444-42f3-4298-9817-e647ed10f7ac")]
27 |
28 | // Version information for an assembly consists of the following four values:
29 | //
30 | // Major Version
31 | // Minor Version
32 | // Build Number
33 | // Revision
34 | //
35 | // You can specify all the values or you can default the Build and Revision Numbers
36 | // by using the '*' as shown below:
37 | // [assembly: AssemblyVersion("1.0.*")]
38 |
39 | [assembly: AssemblyVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
40 | [assembly: AssemblyFileVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
41 |
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/configuration.svcinfo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/AC_TrackCycle/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using AC_ServerStarter;
2 | using System.Reflection;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 |
9 | [assembly: AssemblyTitle("AC_TrackCycle")]
10 | [assembly: AssemblyDescription("Assetto Corsa server track cycle tool")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("the gurus")]
13 | [assembly: AssemblyProduct("AC_TrackCycle")]
14 | [assembly: AssemblyCopyright("Copyright flitzi © 2017")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 |
22 | [assembly: ComVisible(false)]
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 |
26 | [assembly: Guid("db4165a1-dc5e-4829-84a5-2497b97b8fd5")]
27 |
28 | // Version information for an assembly consists of the following four values:
29 | //
30 | // Major Version
31 | // Minor Version
32 | // Build Number
33 | // Revision
34 | //
35 | // You can specify all the values or you can default the Build and Revision Numbers
36 | // by using the '*' as shown below:
37 | // [assembly: AssemblyVersion("1.0.*")]
38 |
39 | [assembly: AssemblyVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
40 | [assembly: AssemblyFileVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
--------------------------------------------------------------------------------
/AC_TrackCycle_Console/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using AC_ServerStarter;
2 | using System.Reflection;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 |
9 | [assembly: AssemblyTitle("AC_TrackCycle_Console")]
10 | [assembly: AssemblyDescription("Assetto Corsa server track cycle tool")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("the gurus")]
13 | [assembly: AssemblyProduct("AC_TrackCycle")]
14 | [assembly: AssemblyCopyright("Copyright flitzi © 2015")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 |
22 | [assembly: ComVisible(false)]
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 |
26 | [assembly: Guid("db4165a1-dc5e-4929-84a5-2497b97b8fd5")]
27 |
28 | // Version information for an assembly consists of the following four values:
29 | //
30 | // Major Version
31 | // Minor Version
32 | // Build Number
33 | // Revision
34 | //
35 | // You can specify all the values or you can default the Build and Revision Numbers
36 | // by using the '*' as shown below:
37 | // [assembly: AssemblyVersion("1.0.*")]
38 |
39 | [assembly: AssemblyVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
40 | [assembly: AssemblyFileVersion(AC_SessionReportPlugin.ReportPlugin.Version)]
--------------------------------------------------------------------------------
/AC_DBFillerEF/Model1.edmx.diagram:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Session.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Collections.Generic;
14 |
15 | public partial class Session
16 | {
17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
18 | public Session()
19 | {
20 | this.Laps = new HashSet();
21 | this.Results = new HashSet();
22 | this.Incidents = new HashSet();
23 | }
24 |
25 | public int Id { get; set; }
26 | public string Server { get; set; }
27 | public string Name { get; set; }
28 | public byte Type { get; set; }
29 | public string Track { get; set; }
30 | public Nullable LapCount { get; set; }
31 | public Nullable Time { get; set; }
32 | public byte Ambient { get; set; }
33 | public byte Road { get; set; }
34 | public string Weather { get; set; }
35 | public System.DateTime Timestamp { get; set; }
36 |
37 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
38 | public virtual ICollection Laps { get; set; }
39 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
40 | public virtual ICollection Results { get; set; }
41 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
42 | public virtual ICollection Incidents { get; set; }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Driver.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated from a template.
4 | //
5 | // Manual changes to this file may cause unexpected behavior in your application.
6 | // Manual changes to this file will be overwritten if the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace AC_DBFillerEF
11 | {
12 | using System;
13 | using System.Collections.Generic;
14 |
15 | public partial class Driver
16 | {
17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
18 | public Driver()
19 | {
20 | this.Laps = new HashSet();
21 | this.Results = new HashSet();
22 | this.Incidents1 = new HashSet();
23 | this.Incidents2 = new HashSet();
24 | }
25 |
26 | public int Id { get; set; }
27 | public string SteamId { get; set; }
28 | public string Name { get; set; }
29 | public string Team { get; set; }
30 | public int IncidentCount { get; set; }
31 | public int Distance { get; set; }
32 | public int Points { get; set; }
33 |
34 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
35 | public virtual ICollection Laps { get; set; }
36 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
37 | public virtual ICollection Results { get; set; }
38 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
39 | public virtual ICollection Incidents1 { get; set; }
40 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
41 | public virtual ICollection Incidents2 { get; set; }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/AC_TrackCycle/GuiTrackCyclePlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using acPlugins4net;
3 | using acPlugins4net.info;
4 | using acPlugins4net.messages;
5 | using AC_SessionReportPlugin;
6 | using AC_ServerStarter;
7 |
8 | namespace AC_TrackCycle
9 | {
10 | public class GuiTrackCyclePlugin : TrackCyclePlugin
11 | {
12 | private readonly TrackCyclerForm form;
13 |
14 | public GuiTrackCyclePlugin(TrackCyclerForm form)
15 | {
16 | this.form = form;
17 | }
18 |
19 | public override void ChangeTrack(int index, bool broadcastResults)
20 | {
21 | this.form.BeginInvoke(new Action(this.form.TrackChanging), null);
22 | base.ChangeTrack(index, broadcastResults);
23 | this.form.BeginInvoke(new Action(this.form.TrackChanged), null);
24 | }
25 |
26 | protected override void OnNewSession(MsgSessionInfo msg)
27 | {
28 | base.OnNewSession(msg);
29 | this.form.BeginInvoke(new Action(this.form.SetSessionInfo), msg);
30 | this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
31 | }
32 |
33 | protected override void OnSessionInfo(MsgSessionInfo msg)
34 | {
35 | base.OnNewSession(msg);
36 | this.form.BeginInvoke(new Action(this.form.SetSessionInfo), msg);
37 | this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
38 | }
39 |
40 | protected override void OnClientLoaded(MsgClientLoaded msg)
41 | {
42 | base.OnClientLoaded(msg);
43 | this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
44 | this.form.BeginInvoke(new Action(this.form.OnClientLoadedG), msg);
45 | }
46 |
47 | protected override void OnConnectionClosed(MsgConnectionClosed msg)
48 | {
49 | base.OnConnectionClosed(msg);
50 | this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
51 | this.form.BeginInvoke(new Action(this.form.UpdatePositionGraph), null);
52 | }
53 |
54 | protected override void OnBulkCarUpdateFinished()
55 | {
56 | base.OnBulkCarUpdateFinished();
57 | this.form.BeginInvoke(new Action(this.form.UpdatePositionGraph), null);
58 | }
59 |
60 | protected override void OnLapCompleted(LapInfo lap)
61 | {
62 | base.OnLapCompleted(lap);
63 | this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/AC_ServerStarter/NOTICES.txt:
--------------------------------------------------------------------------------
1 | AC_TrackCycle
2 | -------------
3 |
4 | Copyright 2018 flitzi
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 |
18 |
19 |
20 | acPlugins4net
21 | -------------
22 |
23 | Copyright 2018 minolin
24 |
25 | Licensed under the Apache License, Version 2.0 (the "License");
26 | you may not use this file except in compliance with the License.
27 | You may obtain a copy of the License at
28 |
29 | http://www.apache.org/licenses/LICENSE-2.0
30 |
31 | Unless required by applicable law or agreed to in writing, software
32 | distributed under the License is distributed on an "AS IS" BASIS,
33 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 | See the License for the specific language governing permissions and
35 | limitations under the License.
36 |
37 |
38 |
39 | Newtonsoft.Json
40 | ---------------
41 |
42 | The MIT License (MIT)
43 |
44 | Copyright (c) 2007 James Newton-King
45 |
46 | Permission is hereby granted, free of charge, to any person obtaining a copy of
47 | this software and associated documentation files (the "Software"), to deal in
48 | the Software without restriction, including without limitation the rights to
49 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
50 | the Software, and to permit persons to whom the Software is furnished to do so,
51 | subject to the following conditions:
52 |
53 | The above copyright notice and this permission notice shall be included in all
54 | copies or substantial portions of the Software.
55 |
56 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
58 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
59 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
60 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
61 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/Reference.svcmap:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 | true
6 |
7 | false
8 | false
9 | false
10 |
11 |
12 |
13 |
14 | true
15 | Auto
16 | true
17 | false
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/ACService2.xsd:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/Reference.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AC_ServiceClient.ACServiceReference {
12 |
13 |
14 | [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
15 | [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ACServiceReference.IACService")]
16 | public interface IACService {
17 |
18 | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IACService/PostResult", ReplyAction="http://tempuri.org/IACService/PostResultResponse")]
19 | void PostResult(AC_SessionReport.SessionReport report);
20 | }
21 |
22 | [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
23 | public interface IACServiceChannel : AC_ServiceClient.ACServiceReference.IACService, System.ServiceModel.IClientChannel {
24 | }
25 |
26 | [System.Diagnostics.DebuggerStepThroughAttribute()]
27 | [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
28 | public partial class ACServiceClient : System.ServiceModel.ClientBase, AC_ServiceClient.ACServiceReference.IACService {
29 |
30 | public ACServiceClient() {
31 | }
32 |
33 | public ACServiceClient(string endpointConfigurationName) :
34 | base(endpointConfigurationName) {
35 | }
36 |
37 | public ACServiceClient(string endpointConfigurationName, string remoteAddress) :
38 | base(endpointConfigurationName, remoteAddress) {
39 | }
40 |
41 | public ACServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
42 | base(endpointConfigurationName, remoteAddress) {
43 | }
44 |
45 | public ACServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
46 | base(binding, remoteAddress) {
47 | }
48 |
49 | public void PostResult(AC_SessionReport.SessionReport report) {
50 | base.Channel.PostResult(report);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/AC_TrackCycle_Console.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle", "AC_TrackCycle\AC_TrackCycle.csproj", "{8A1A8798-9F72-4760-ACF2-578B77B3F1A8}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "acPlugins4net", "..\acplugins\acplugins4net\acPlugins4net\acPlugins4net.csproj", "{755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_ServerStarter", "AC_ServerStarter\AC_ServerStarter.csproj", "{07E1C444-42F3-4298-9817-E647ED10F7AC}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_SessionReportPlugin", "AC_SessionReportPlugin\AC_SessionReportPlugin.csproj", "{9EF78B48-4269-420B-A111-0AF4B317B1D2}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle_Console", "AC_TrackCycle_Console\AC_TrackCycle_Console.csproj", "{8B577579-8E11-4344-B4D7-0D0C477B4A8D}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Release|Any CPU = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.Build.0 = Release|Any CPU
30 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.Build.0 = Release|Any CPU
42 | EndGlobalSection
43 | GlobalSection(SolutionProperties) = preSolution
44 | HideSolutionNode = FALSE
45 | EndGlobalSection
46 | EndGlobal
47 |
--------------------------------------------------------------------------------
/AC_TrackCycle/GetStringForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC_TrackCycle
2 | {
3 | partial class GetStringForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.textBox1 = new System.Windows.Forms.TextBox();
32 | this.button_OK = new System.Windows.Forms.Button();
33 | this.SuspendLayout();
34 | //
35 | // textBox1
36 | //
37 | this.textBox1.Location = new System.Drawing.Point(12, 12);
38 | this.textBox1.Name = "textBox1";
39 | this.textBox1.Size = new System.Drawing.Size(260, 20);
40 | this.textBox1.TabIndex = 0;
41 | //
42 | // button_OK
43 | //
44 | this.button_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
45 | this.button_OK.Location = new System.Drawing.Point(106, 38);
46 | this.button_OK.Name = "button_OK";
47 | this.button_OK.Size = new System.Drawing.Size(75, 23);
48 | this.button_OK.TabIndex = 1;
49 | this.button_OK.Text = "OK";
50 | this.button_OK.UseVisualStyleBackColor = true;
51 | this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
52 | //
53 | // GetStringForm
54 | //
55 | this.AcceptButton = this.button_OK;
56 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
57 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
58 | this.ClientSize = new System.Drawing.Size(284, 70);
59 | this.Controls.Add(this.button_OK);
60 | this.Controls.Add(this.textBox1);
61 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
62 | this.MaximizeBox = false;
63 | this.MinimizeBox = false;
64 | this.Name = "GetStringForm";
65 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
66 | this.Text = "GetStringForm";
67 | this.ResumeLayout(false);
68 | this.PerformLayout();
69 |
70 | }
71 |
72 | #endregion
73 |
74 | private System.Windows.Forms.TextBox textBox1;
75 | private System.Windows.Forms.Button button_OK;
76 | }
77 | }
--------------------------------------------------------------------------------
/AC_SessionReportPlugin/AC_SessionReportPlugin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}
8 | Library
9 | Properties
10 | AC_SessionReportPlugin
11 | AC_SessionReportPlugin
12 | v4.0
13 | 512
14 | Client
15 |
16 |
17 | true
18 | full
19 | false
20 | ..\bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | ..\bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 | ..\packages\Newtonsoft.Json.7.0.1\lib\net40\Newtonsoft.Json.dll
36 | True
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | {755c6b0d-3ed5-45d3-a06f-1575d26da4d9}
54 | acPlugins4net
55 |
56 |
57 |
58 |
59 |
60 |
61 |
68 |
--------------------------------------------------------------------------------
/AC_ServerStarter/AC_ServerStarter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {07E1C444-42F3-4298-9817-E647ED10F7AC}
8 | Library
9 | Properties
10 | AC_ServerStarter
11 | AC_ServerStarter
12 | v4.0
13 | 512
14 | Client
15 |
16 |
17 | true
18 | full
19 | false
20 | ..\bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | ..\bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {755c6b0d-3ed5-45d3-a06f-1575d26da4d9}
51 | acPlugins4net
52 |
53 |
54 | {9ef78b48-4269-420b-a111-0af4b317b1d2}
55 | AC_SessionReportPlugin
56 |
57 |
58 |
59 |
60 | PreserveNewest
61 |
62 |
63 | PreserveNewest
64 |
65 |
66 |
67 |
74 |
--------------------------------------------------------------------------------
/AC_SERVER_APPS.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle", "AC_TrackCycle\AC_TrackCycle.csproj", "{8A1A8798-9F72-4760-ACF2-578B77B3F1A8}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "acPlugins4net", "..\acplugins\acplugins4net\acPlugins4net\acPlugins4net.csproj", "{755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_DBFillerEF", "AC_DBFillerEF\AC_DBFillerEF.csproj", "{A2C76C5C-5B21-4E63-876C-BA89D5236182}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_ServerStarter", "AC_ServerStarter\AC_ServerStarter.csproj", "{07E1C444-42F3-4298-9817-E647ED10F7AC}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_SessionReportPlugin", "AC_SessionReportPlugin\AC_SessionReportPlugin.csproj", "{9EF78B48-4269-420B-A111-0AF4B317B1D2}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle_Console", "AC_TrackCycle_Console\AC_TrackCycle_Console.csproj", "{8B577579-8E11-4344-B4D7-0D0C477B4A8D}"
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
20 | Debug|Any CPU = Debug|Any CPU
21 | Release|Any CPU = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.Build.0 = Release|Any CPU
40 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.Build.0 = Release|Any CPU
44 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
46 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.Build.0 = Release|Any CPU
48 | EndGlobalSection
49 | GlobalSection(SolutionProperties) = preSolution
50 | HideSolutionNode = FALSE
51 | EndGlobalSection
52 | EndGlobal
53 |
--------------------------------------------------------------------------------
/AC_TrackCycle_Console/AC_TrackCycle_Console.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}
8 | Exe
9 | Properties
10 | AC_TrackCycle_Console
11 | AC_TrackCycle_Console
12 | v4.0
13 | 512
14 | Client
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | ..\bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | ..\bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | {755c6b0d-3ed5-45d3-a06f-1575d26da4d9}
55 | acPlugins4net
56 |
57 |
58 | {07e1c444-42f3-4298-9817-e647ed10f7ac}
59 | AC_ServerStarter
60 |
61 |
62 | {9ef78b48-4269-420b-a111-0af4b317b1d2}
63 | AC_SessionReportPlugin
64 |
65 |
66 |
67 |
68 |
69 |
70 |
77 |
--------------------------------------------------------------------------------
/AC_TrackCycle/app.config:
--------------------------------------------------------------------------------
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 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/AC_TrackCycle/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AC_TrackCycle.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AC_TrackCycle.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap AC_logo_small {
67 | get {
68 | object obj = ResourceManager.GetObject("AC_logo_small", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap AC_logo_small_grey {
77 | get {
78 | object obj = ResourceManager.GetObject("AC_logo_small_grey", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/AC_Service/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
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 |
56 |
57 |
58 |
59 |
60 |
61 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/AC_TrackCycle_Console/app.config:
--------------------------------------------------------------------------------
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 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/AC_TrackCycle/AHSV.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace AC_TrackCycle
6 | {
7 | ///
8 | /// AHSV struct. Alpha, Hue, Saturation, Value color.
9 | ///
10 | public struct AHSV
11 | {
12 | ///
13 | /// The alpha. Between 0 and 255.
14 | ///
15 | public byte Alpha;
16 |
17 | ///
18 | /// The hue. Between 0 and 360.
19 | ///
20 | public float Hue;
21 |
22 | ///
23 | /// The saturation. Between 0 and 1.
24 | ///
25 | public float Saturation;
26 |
27 | ///
28 | /// The value. Between 0 and 1.
29 | ///
30 | public float Value;
31 |
32 | ///
33 | /// Initializes a new instance of the struct.
34 | ///
35 | /// The alpha. Between 0 and 255.
36 | /// The hue. Between 0 and 360.
37 | /// The saturation. Between 0 and 1.
38 | /// The value. Between 0 and 1.
39 | public AHSV(byte A, float H, float S, float V)
40 | {
41 | this.Hue = H;
42 | this.Saturation = S;
43 | this.Value = V;
44 | this.Alpha = A;
45 | }
46 |
47 | ///
48 | /// Converts the AHSV to the ARGB.
49 | ///
50 | /// The ARGB.
51 | public Color ToColor()
52 | {
53 | double r = 0;
54 | double g = 0;
55 | double b = 0;
56 |
57 | if (this.Saturation == 0)
58 | {
59 | r = g = b = this.Value;
60 | }
61 | else
62 | {
63 | // the color wheel consists of 6 sectors. Figure out which sector you're in.
64 | double sectorPos = this.Hue / 60.0;
65 | int sectorNumber = (int)(Math.Floor(sectorPos));
66 | // get the fractional part of the sector
67 | double fractionalSector = sectorPos - sectorNumber;
68 |
69 | // calculate values for the three axes of the color.
70 | double p = this.Value * (1.0 - this.Saturation);
71 | double q = this.Value * (1.0 - (this.Saturation * fractionalSector));
72 | double t = this.Value * (1.0 - (this.Saturation * (1 - fractionalSector)));
73 |
74 | // assign the fractional colors to r, g, and b based on the sector
75 | // the angle is in.
76 | switch (sectorNumber)
77 | {
78 | case 0:
79 | r = this.Value;
80 | g = t;
81 | b = p;
82 | break;
83 | case 1:
84 | r = q;
85 | g = this.Value;
86 | b = p;
87 | break;
88 | case 2:
89 | r = p;
90 | g = this.Value;
91 | b = t;
92 | break;
93 | case 3:
94 | r = p;
95 | g = q;
96 | b = this.Value;
97 | break;
98 | case 4:
99 | r = t;
100 | g = p;
101 | b = this.Value;
102 | break;
103 | case 5:
104 | r = this.Value;
105 | g = p;
106 | b = q;
107 | break;
108 | }
109 | }
110 |
111 | return Color.FromArgb(this.Alpha, (byte)Math.Round(255 * r), (byte)Math.Round(255 * g), (byte)Math.Round(255 * b));
112 | }
113 | }
114 | }
--------------------------------------------------------------------------------
/AC_ServiceClient/AC_ServiceClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {14AEAB0E-8F73-4171-A906-A26B4B287455}
8 | Library
9 | Properties
10 | AC_ServiceClient
11 | AC_ServiceClient
12 | v4.0
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 | false
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | false
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | True
52 | True
53 | Reference.svcmap
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | Designer
64 |
65 |
66 | Designer
67 |
68 |
69 | Designer
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | WCF Proxy Generator
87 | Reference.cs
88 |
89 |
90 |
91 |
98 |
--------------------------------------------------------------------------------
/AC_TrackCycle/AC_TrackCycle.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}
8 | WinExe
9 | Properties
10 | AC_TrackCycle
11 | AC_TrackCycle
12 | v4.0
13 | 512
14 | Client
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | ..\bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | true
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | ..\bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | true
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Form
54 |
55 |
56 | GetStringForm.cs
57 |
58 |
59 |
60 | True
61 | True
62 | Resources.resx
63 |
64 |
65 | Form
66 |
67 |
68 | TrackCyclerForm.cs
69 |
70 |
71 |
72 |
73 |
74 | Component
75 |
76 |
77 | GetStringForm.cs
78 |
79 |
80 | ResXFileCodeGenerator
81 | Resources.Designer.cs
82 |
83 |
84 | TrackCyclerForm.cs
85 |
86 |
87 | Designer
88 |
89 |
90 |
91 |
92 | {755c6b0d-3ed5-45d3-a06f-1575d26da4d9}
93 | acPlugins4net
94 |
95 |
96 | {07e1c444-42f3-4298-9817-e647ed10f7ac}
97 | AC_ServerStarter
98 |
99 |
100 | {9ef78b48-4269-420b-a111-0af4b317b1d2}
101 | AC_SessionReportPlugin
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
122 |
--------------------------------------------------------------------------------
/AllProjects.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Express 14 for Windows Desktop
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle", "AC_TrackCycle\AC_TrackCycle.csproj", "{8A1A8798-9F72-4760-ACF2-578B77B3F1A8}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "acPlugins4net", "..\acplugins\acplugins4net\acPlugins4net\acPlugins4net.csproj", "{755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_DBFillerEF", "AC_DBFillerEF\AC_DBFillerEF.csproj", "{A2C76C5C-5B21-4E63-876C-BA89D5236182}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_ServerStarter", "AC_ServerStarter\AC_ServerStarter.csproj", "{07E1C444-42F3-4298-9817-E647ED10F7AC}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_SessionReportPlugin", "AC_SessionReportPlugin\AC_SessionReportPlugin.csproj", "{9EF78B48-4269-420B-A111-0AF4B317B1D2}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC_TrackCycle_Console", "AC_TrackCycle_Console\AC_TrackCycle_Console.csproj", "{8B577579-8E11-4344-B4D7-0D0C477B4A8D}"
17 | EndProject
18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "acServerFake", "..\acplugins\acplugins4net\acServerFake\acServerFake.csproj", "{0E3EEA9D-A980-4797-A3BC-B7E35102ABFF}"
19 | EndProject
20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin2ChatPlugin", "..\acplugins\Admin2ChatPlugin\Admin2ChatPlugin.csproj", "{96F10BDD-B04A-4B49-8DF5-D81B992E707E}"
21 | EndProject
22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinoRatingPlugin", "..\acplugins\MinoRatingPlugin\MinoRatingPlugin\MinoRatingPlugin.csproj", "{DDD7D021-4CF5-49B7-A536-AEA324F7234A}"
23 | EndProject
24 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "acRemoteServerUDP_Example", "..\acplugins\acplugins4net\acRemoteServerUDP_Example\acRemoteServerUDP_Example.csproj", "{8621449F-9FBF-41D8-8E0F-589C48FA76A2}"
25 | EndProject
26 | Global
27 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
28 | Debug|Any CPU = Debug|Any CPU
29 | Release|Any CPU = Release|Any CPU
30 | EndGlobalSection
31 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
32 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {8A1A8798-9F72-4760-ACF2-578B77B3F1A8}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 | {755C6B0D-3ED5-45D3-A06F-1575D26DA4D9}.Release|Any CPU.Build.0 = Release|Any CPU
40 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}.Release|Any CPU.Build.0 = Release|Any CPU
44 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
46 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 | {07E1C444-42F3-4298-9817-E647ED10F7AC}.Release|Any CPU.Build.0 = Release|Any CPU
48 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
50 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 | {9EF78B48-4269-420B-A111-0AF4B317B1D2}.Release|Any CPU.Build.0 = Release|Any CPU
52 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
54 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
55 | {8B577579-8E11-4344-B4D7-0D0C477B4A8D}.Release|Any CPU.Build.0 = Release|Any CPU
56 | {0E3EEA9D-A980-4797-A3BC-B7E35102ABFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57 | {0E3EEA9D-A980-4797-A3BC-B7E35102ABFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
58 | {0E3EEA9D-A980-4797-A3BC-B7E35102ABFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
59 | {0E3EEA9D-A980-4797-A3BC-B7E35102ABFF}.Release|Any CPU.Build.0 = Release|Any CPU
60 | {96F10BDD-B04A-4B49-8DF5-D81B992E707E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61 | {96F10BDD-B04A-4B49-8DF5-D81B992E707E}.Debug|Any CPU.Build.0 = Debug|Any CPU
62 | {96F10BDD-B04A-4B49-8DF5-D81B992E707E}.Release|Any CPU.ActiveCfg = Release|Any CPU
63 | {96F10BDD-B04A-4B49-8DF5-D81B992E707E}.Release|Any CPU.Build.0 = Release|Any CPU
64 | {DDD7D021-4CF5-49B7-A536-AEA324F7234A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
65 | {DDD7D021-4CF5-49B7-A536-AEA324F7234A}.Debug|Any CPU.Build.0 = Debug|Any CPU
66 | {DDD7D021-4CF5-49B7-A536-AEA324F7234A}.Release|Any CPU.ActiveCfg = Release|Any CPU
67 | {DDD7D021-4CF5-49B7-A536-AEA324F7234A}.Release|Any CPU.Build.0 = Release|Any CPU
68 | {8621449F-9FBF-41D8-8E0F-589C48FA76A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69 | {8621449F-9FBF-41D8-8E0F-589C48FA76A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
70 | {8621449F-9FBF-41D8-8E0F-589C48FA76A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
71 | {8621449F-9FBF-41D8-8E0F-589C48FA76A2}.Release|Any CPU.Build.0 = Release|Any CPU
72 | EndGlobalSection
73 | GlobalSection(SolutionProperties) = preSolution
74 | HideSolutionNode = FALSE
75 | EndGlobalSection
76 | EndGlobal
77 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/DBFiller.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data.Entity;
4 | using System.Linq;
5 | using acPlugins4net.info;
6 | using acPlugins4net.helpers;
7 |
8 | namespace AC_DBFillerEF
9 | {
10 | public class DBFiller : ISessionReportHandler
11 | {
12 | public const string Version = "0.9.2";
13 |
14 |
15 | //private static int[] ChampionshipPoints = new int[] { 25, 18, 15, 12, 10, 8, 6, 4, 2, 1 };
16 | public void HandleReport(SessionInfo report)
17 | {
18 | AC_DBEntities entities = new AC_DBEntities();
19 | using (DbContextTransaction transaction = entities.Database.BeginTransaction())
20 | {
21 | try
22 | {
23 | Session session = new Session();
24 | session.Server = report.ServerName;
25 | session.Name = report.SessionName;
26 | session.Type = report.SessionType;
27 | session.Track = report.TrackName + (string.IsNullOrEmpty(report.TrackConfig) ? string.Empty : (" " + report.TrackConfig));
28 | session.LapCount = (short)report.LapCount;
29 | session.Time = report.SessionDuration;
30 | session.Ambient = report.AmbientTemp;
31 | session.Road = report.RoadTemp;
32 | session.Weather = report.Weather;
33 | session.Timestamp = new DateTime(report.Timestamp, DateTimeKind.Utc);
34 |
35 | entities.Sessions.Add(session);
36 |
37 | Dictionary driverDict = new Dictionary();
38 | Dictionary driverReportDict = new Dictionary();
39 | foreach (DriverInfo connection in report.Drivers)
40 | {
41 | Driver driver = entities.Drivers.FirstOrDefault(d => d.SteamId == connection.DriverGuid);
42 | if (driver == null)
43 | {
44 | driver = new Driver();
45 | driver.SteamId = connection.DriverGuid;
46 | entities.Drivers.Add(driver);
47 | }
48 |
49 | driver.Name = connection.DriverName;
50 | driver.Team = connection.DriverTeam;
51 | driver.IncidentCount += connection.Incidents;
52 | driver.Distance += (int)connection.Distance;
53 | driver.Points += 0; //TODO?
54 |
55 | driverDict.Add(connection.ConnectionId, driver);
56 | driverReportDict.Add(connection.ConnectionId, connection);
57 |
58 | Result result = new Result();
59 | result.Session = session;
60 | result.Driver = driver;
61 | result.Car = connection.CarModel;
62 | result.StartPosition = (short)connection.StartPosition;
63 | result.Position = (short)connection.Position;
64 | result.IncidentCount = connection.Incidents;
65 | result.Distance = (int)connection.Distance;
66 | result.LapCount = (short)connection.LapCount;
67 | result.Gap = connection.Gap;
68 | result.TopSpeed = (short)Math.Round(connection.TopSpeed);
69 |
70 | entities.Results.Add(result);
71 | }
72 |
73 | foreach (LapInfo lapReport in report.Laps)
74 | {
75 | Lap lap = new Lap();
76 | lap.Session = session;
77 | lap.Driver = driverDict[lapReport.ConnectionId];
78 | lap.Car = driverReportDict[lapReport.ConnectionId].CarModel;
79 | lap.LapNo = (short)lapReport.LapNo;
80 | lap.Time = (int)lapReport.Laptime;
81 | lap.Cuts = lapReport.Cuts;
82 | lap.Position = (short)lapReport.Position;
83 | lap.Grip = lapReport.GripLevel;
84 | lap.Timestamp = new DateTime(lapReport.Timestamp, DateTimeKind.Utc);
85 |
86 | entities.Laps.Add(lap);
87 | }
88 |
89 | foreach (IncidentInfo incidentReport in report.Incidents)
90 | {
91 | Incident incident = new Incident();
92 | incident.Session = session;
93 | incident.Type = incidentReport.Type;
94 | incident.RelativeSpeed = incidentReport.ImpactSpeed;
95 | incident.Timestamp = new DateTime(incidentReport.Timestamp, DateTimeKind.Utc);
96 | incident.Driver1 = driverDict[incidentReport.ConnectionId1];
97 | incident.Driver2 = incidentReport.ConnectionId2 >= 0 ? driverDict[incidentReport.ConnectionId2] : null;
98 | incident.WorldPosX = incidentReport.WorldPosition.X;
99 | incident.WorldPosY = incidentReport.WorldPosition.Y;
100 | incident.WorldPosZ = incidentReport.WorldPosition.Z;
101 |
102 | entities.Incidents.Add(incident);
103 | }
104 |
105 | entities.SaveChanges();
106 | transaction.Commit();
107 | }
108 | catch
109 | {
110 | transaction.Rollback();
111 | throw;
112 | }
113 | }
114 | }
115 | }
116 | }
--------------------------------------------------------------------------------
/AC_TrackCycle/GetStringForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/AC_TrackCycle_Console/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Configuration;
3 | using System.IO;
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 | using acPlugins4net;
7 | using acPlugins4net.helpers;
8 | using AC_ServerStarter;
9 | using System.Text;
10 | using System.Threading;
11 | using acPlugins4net.configuration;
12 | using AC_SessionReportPlugin;
13 |
14 | namespace AC_TrackCycle_Console
15 | {
16 | ///
17 | /// A static helper class Mono related.
18 | ///
19 | public static class MonoHelper
20 | {
21 | ///
22 | /// Whether this program is running on mono.
23 | ///
24 | public static readonly bool IsRunningMono;
25 | ///
26 | /// Whether this program is running on linux.
27 | ///
28 | public static readonly bool IsLinux;
29 |
30 | static MonoHelper()
31 | {
32 | IsRunningMono = Type.GetType("Mono.Runtime") != null;
33 | int p = (int)Environment.OSVersion.Platform;
34 | IsLinux = (p == 4) || (p == 6) || (p == 128);
35 | }
36 | }
37 |
38 | internal static class Program
39 | {
40 | private static TrackCyclePlugin trackCycler;
41 |
42 | #region Trap application termination
43 | [DllImport("Kernel32")]
44 | private static extern bool SetConsoleCtrlHandler(EventHandler handler, bool add);
45 |
46 | private delegate bool EventHandler(CtrlType sig);
47 |
48 | private static EventHandler _handler;
49 |
50 | private enum CtrlType
51 | {
52 | CTRL_C_EVENT = 0,
53 | CTRL_BREAK_EVENT = 1,
54 | CTRL_CLOSE_EVENT = 2,
55 | CTRL_LOGOFF_EVENT = 5,
56 | CTRL_SHUTDOWN_EVENT = 6
57 | }
58 |
59 | private static bool Handler(CtrlType sig)
60 | {
61 | if (trackCycler != null)
62 | {
63 | trackCycler.StopServer();
64 | }
65 |
66 | return true;
67 | }
68 | #endregion
69 |
70 | ///
71 | /// The main entry point for the application.
72 | ///
73 | [STAThread]
74 | private static void Main()
75 | {
76 | try
77 | {
78 | FileLogWriter logWriter = null;
79 |
80 | IConfigManager config = new AppConfigConfigurator();
81 |
82 | bool interactiveConsole = config.GetSettingAsInt("interactive_console", 0) == 1;
83 |
84 | if (config.GetSettingAsInt("log_to_console", 0) == 0)
85 | {
86 | if (config.GetSettingAsInt("overwrite_log_file", 0) == 1)
87 | {
88 | logWriter = new FileLogWriter(
89 | Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "logs"),
90 | "TrackCycle.log")
91 | { LogWithTimestamp = true };
92 | }
93 | else
94 | {
95 | logWriter = new FileLogWriter(
96 | Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "logs"),
97 | DateTime.UtcNow.ToString("yyyyMMdd_HHmmss") + "_Startup.log")
98 | { LogWithTimestamp = true };
99 | }
100 | }
101 |
102 | try
103 | {
104 | trackCycler = new TrackCyclePlugin();
105 |
106 | AcServerPluginManager pluginManager = new AcServerPluginManager(logWriter, config);
107 | pluginManager.LoadInfoFromServerConfig();
108 | pluginManager.AddPlugin(trackCycler);
109 | pluginManager.LoadPluginsFromAppConfig();
110 |
111 | if (!MonoHelper.IsLinux)
112 | {
113 | // Some boilerplate to react to close window event, CTRL-C, kill, etc
114 | _handler += new EventHandler(Handler);
115 | SetConsoleCtrlHandler(_handler, true);
116 | }
117 |
118 | trackCycler.StartServer();
119 | Console.Out.WriteLine("Server running...");
120 |
121 | if (interactiveConsole)
122 | {
123 | Console.Out.WriteLine("Write 'next_track' to cycle to the next track.");
124 | Console.Out.WriteLine("Write 'exit' to shut the server down.");
125 | }
126 |
127 | while (true)
128 | {
129 | if (interactiveConsole)
130 | {
131 | string line = Console.ReadLine();
132 | if (line.ToLower() == "exit")
133 | {
134 | break;
135 | }
136 | else if (line.ToLower() == "next_track")
137 | {
138 | trackCycler.NextTrackAsync(true);
139 | }
140 | else
141 | {
142 | pluginManager.BroadcastChatMessage(line);
143 | }
144 | }
145 | else
146 | {
147 | Thread.Sleep(500);
148 | }
149 | }
150 |
151 | trackCycler.StopServer();
152 | }
153 | catch (Exception ex)
154 | {
155 | if (logWriter != null)
156 | {
157 | logWriter.Log(ex);
158 | }
159 | else
160 | {
161 | throw;
162 | }
163 | }
164 | if (logWriter != null)
165 | {
166 | logWriter.StopLoggingToFile();
167 | }
168 | }
169 | catch (Exception ex)
170 | {
171 | Console.WriteLine(ex.Message);
172 | }
173 | }
174 | }
175 | }
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/ACService1.xsd:
--------------------------------------------------------------------------------
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 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | true
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/AC_TrackCycle/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\AC_logo_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\AC_logo_small_grey.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
--------------------------------------------------------------------------------
/AC_SessionReportPlugin/ReportPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Linq;
5 | using System.Reflection;
6 | using acPlugins4net;
7 | using acPlugins4net.helpers;
8 | using acPlugins4net.kunos;
9 | using acPlugins4net.messages;
10 | using System.IO;
11 | using System.Threading;
12 | using acPlugins4net.info;
13 |
14 | namespace AC_SessionReportPlugin
15 | {
16 | public class ReportPlugin : AcServerPlugin
17 | {
18 | public const string Version = "2.8.3"; // for now use same version
19 |
20 | public int BroadcastIncidents { get; set; }
21 | public int BroadcastResults { get; set; }
22 | public int BroadcastFastestLap { get; set; }
23 |
24 | public string WelcomeMessage { get; set; }
25 |
26 | protected bool loadedHandlersFromConfig;
27 |
28 | protected virtual string CreateWelcomeMessage(DriverInfo driverReport)
29 | {
30 | if (!string.IsNullOrWhiteSpace(this.WelcomeMessage))
31 | {
32 | return this.WelcomeMessage.Replace("$DriverName$", driverReport.DriverName).Replace("$ServerName$", this.PluginManager.CurrentSession.ServerName);
33 | }
34 | return null;
35 | }
36 |
37 | #region AcServerPluginBase overrides
38 | protected override void OnInit()
39 | {
40 | this.BroadcastIncidents = this.PluginManager.Config.GetSettingAsInt("broadcast_incidents", 0);
41 | this.BroadcastResults = this.PluginManager.Config.GetSettingAsInt("broadcast_results", 10);
42 | this.BroadcastFastestLap = this.PluginManager.Config.GetSettingAsInt("broadcast_fastest_lap", 1);
43 | this.WelcomeMessage = this.PluginManager.Config.GetSetting("welcome_message");
44 | }
45 |
46 | protected override void OnClientLoaded(MsgClientLoaded msg)
47 | {
48 | DriverInfo driverReport;
49 | if (this.PluginManager.TryGetDriverInfo(msg.CarId, out driverReport))
50 | {
51 | driverReport.ConnectedTimestamp = DateTime.UtcNow.Ticks;
52 | string welcome = CreateWelcomeMessage(driverReport);
53 | if (!string.IsNullOrWhiteSpace(welcome))
54 | {
55 | foreach (string line in welcome.Split('|'))
56 | {
57 | this.PluginManager.SendChatMessage(msg.CarId, line);
58 | }
59 | }
60 | }
61 | }
62 |
63 |
64 | protected override void OnCollision(IncidentInfo incident)
65 | {
66 | if (this.BroadcastIncidents > 0)
67 | {
68 | DriverInfo driver = this.PluginManager.GetDriverByConnectionId(incident.ConnectionId1);
69 |
70 | if (incident.Type == (byte)ACSProtocol.MessageType.ACSP_CE_COLLISION_WITH_CAR)
71 | {
72 | DriverInfo driver2 = this.PluginManager.GetDriverByConnectionId(incident.ConnectionId2);
73 |
74 | this.PluginManager.BroadcastChatMessage(
75 | string.Format(
76 | "Collision between {0} and {1} with {2}km/h",
77 | driver.DriverName,
78 | driver2.DriverName,
79 | Math.Round(incident.ImpactSpeed)));
80 | }
81 | else if (this.BroadcastIncidents > 1)
82 | {
83 | this.PluginManager.BroadcastChatMessage(
84 | string.Format("{0} crashed into wall with {1}km/h", driver.DriverName, Math.Round(incident.ImpactSpeed)));
85 | }
86 | }
87 | }
88 |
89 | protected override void OnNewSession(MsgSessionInfo msg)
90 | {
91 | if (this.PluginManager.PreviousSession != null
92 | && this.BroadcastResults > 0
93 | && (this.PluginManager.PreviousSession.Laps.Count > 0 || this.PluginManager.PreviousSession.Incidents.Count > 0))
94 | {
95 | this.PluginManager.BroadcastChatMessage(this.PluginManager.PreviousSession.SessionName + " Results:");
96 | this.PluginManager.BroadcastChatMessage("Pos Name\tCar\tGap\tBestLap\tIncidents");
97 | foreach (DriverInfo d in this.PluginManager.PreviousSession.Drivers.OrderBy(d => d.Position).Take(this.BroadcastResults))
98 | {
99 | this.PluginManager.BroadcastChatMessage(
100 | string.Format(
101 | "{0} {1}\t{2}\t{3}\t{4}\t{5}",
102 | d.Position.ToString("00"),
103 | (d.DriverName == null || d.DriverName.Length <= 10) ? d.DriverName : d.DriverName.Substring(0, 10),
104 | (d.CarModel == null || d.CarModel.Length <= 10) ? d.CarModel : d.CarModel.Substring(0, 10),
105 | d.Gap,
106 | d.BestLapTxt,
107 | d.Incidents));
108 | }
109 | }
110 | }
111 |
112 | protected override void OnLapCompleted(LapInfo lap)
113 | {
114 | DriverInfo driver = PluginManager.GetDriverByConnectionId(lap.ConnectionId);
115 | driver.LapCount = lap.LapNo;
116 | if (lap.Cuts == 0 && (lap.Laptime < driver.BestLap || driver.BestLap == 0))
117 | {
118 | driver.BestLap = lap.Laptime;
119 | }
120 |
121 | if (this.BroadcastFastestLap > 0)
122 | {
123 | // check if this is a new fastest lap for this session
124 | if (lap.Cuts == 0 && this.PluginManager.CurrentSession.Laps.FirstOrDefault(l => l.Cuts == 0 && l.Laptime < lap.Laptime) == null)
125 | {
126 | this.PluginManager.BroadcastChatMessage(
127 | string.Format("{0} has set a new fastest lap: {1}", driver.DriverName, AcServerPluginManager.FormatTimespan((int)lap.Laptime)));
128 | }
129 | else if (this.BroadcastFastestLap > 1)
130 | {
131 | if (lap.Cuts == 0)
132 | {
133 | this.PluginManager.BroadcastChatMessage(
134 | string.Format("{0} completed a lap: {1}", driver.DriverName, AcServerPluginManager.FormatTimespan((int)lap.Laptime)));
135 | }
136 | else
137 | {
138 | this.PluginManager.BroadcastChatMessage(
139 | string.Format("{0} did a lap with {1} cut(s): {2}", driver.DriverName, lap.Cuts, AcServerPluginManager.FormatTimespan((int)lap.Laptime)));
140 | }
141 | }
142 | }
143 | }
144 | #endregion
145 | }
146 | }
--------------------------------------------------------------------------------
/AC_Service/AC_Service.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 |
8 |
9 | 2.0
10 | {90BEDF40-530E-443E-AB91-D7700E76B3E3}
11 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
12 | Library
13 | Properties
14 | AC_Service
15 | AC_Service
16 | v4.5.2
17 | True
18 | true
19 | true
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | true
29 | full
30 | false
31 | bin\
32 | DEBUG;TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 | pdbonly
39 | true
40 | bin\
41 | TRACE
42 | prompt
43 | 4
44 | false
45 |
46 |
47 |
48 | ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
49 | True
50 |
51 |
52 | ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | ACService.svc
83 |
84 |
85 |
86 |
87 |
88 | AuthService.svc
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | Web.config
98 |
99 |
100 | Web.config
101 |
102 |
103 |
104 |
105 | {a2c76c5c-5b21-4e63-876c-ba89d5236182}
106 | AC_DBFillerEF
107 |
108 |
109 | {480c57c6-3d1a-4d73-a9e1-7ae6b2d55b6f}
110 | AC_SessionReport
111 |
112 |
113 |
114 | 10.0
115 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | True
125 | True
126 | 53366
127 | /
128 | http://localhost:53366/
129 | False
130 | False
131 |
132 |
133 | False
134 |
135 |
136 |
137 |
138 |
145 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/AC_DBFillerEF.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A2C76C5C-5B21-4E63-876C-BA89D5236182}
8 | Library
9 | Properties
10 | AC_DBFillerEF
11 | AC_DBFillerEF
12 | v4.5.2
13 | 512
14 | publish\
15 | true
16 | Disk
17 | false
18 | Foreground
19 | 7
20 | Days
21 | false
22 | false
23 | true
24 | 0
25 | 1.0.0.%2a
26 | false
27 | false
28 | true
29 |
30 |
31 |
32 | true
33 | full
34 | false
35 | ..\bin\Debug\
36 | DEBUG;TRACE
37 | prompt
38 | 4
39 |
40 |
41 | pdbonly
42 | true
43 | ..\bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 |
48 |
49 |
50 | ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
51 | True
52 |
53 |
54 | ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll
55 | True
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | Model1.tt
72 |
73 |
74 | Model1.tt
75 |
76 |
77 | Model1.tt
78 |
79 |
80 | True
81 | True
82 | Model1.Context.tt
83 |
84 |
85 | True
86 | True
87 | Model1.tt
88 |
89 |
90 | True
91 | True
92 | Model1.edmx
93 |
94 |
95 |
96 | Model1.tt
97 |
98 |
99 | Model1.tt
100 |
101 |
102 |
103 |
104 | TextTemplatingFileGenerator
105 | Model1.edmx
106 | Model1.Context.cs
107 |
108 |
109 |
110 | TextTemplatingFileGenerator
111 | Model1.edmx
112 | Model1.cs
113 |
114 |
115 |
116 |
117 | EntityModelCodeGenerator
118 | Model1.Designer.cs
119 |
120 |
121 | Designer
122 |
123 |
124 | Model1.edmx
125 | Designer
126 |
127 |
128 |
129 |
130 |
131 | False
132 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29
133 | true
134 |
135 |
136 | False
137 | .NET Framework 3.5 SP1
138 | false
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | {755c6b0d-3ed5-45d3-a06f-1575d26da4d9}
147 | acPlugins4net
148 |
149 |
150 |
151 |
158 |
--------------------------------------------------------------------------------
/AC_TrackCycle/TrackCyclerForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | True
122 |
123 |
124 | True
125 |
126 |
127 | True
128 |
129 |
130 | True
131 |
132 |
133 | True
134 |
135 |
136 | True
137 |
138 |
139 | True
140 |
141 |
142 | True
143 |
144 |
145 | True
146 |
147 |
148 | True
149 |
150 |
151 | True
152 |
153 |
154 | True
155 |
156 |
157 | 17, 17
158 |
159 |
160 | 202, 17
161 |
162 |
--------------------------------------------------------------------------------
/AC_DBFillerEF/Model1.edmx.sql:
--------------------------------------------------------------------------------
1 |
2 | -- --------------------------------------------------
3 | -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
4 | -- --------------------------------------------------
5 | -- Date Created: 08/09/2015 10:10:59
6 | -- Generated from EDMX file: C:\Users\Tom\Documents\GitHub\AC_SERVER_APPS\AC_DBFillerEF\Model1.edmx
7 | -- --------------------------------------------------
8 |
9 | SET QUOTED_IDENTIFIER OFF;
10 | GO
11 | USE [AC_DB];
12 | GO
13 | IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
14 | GO
15 |
16 | -- --------------------------------------------------
17 | -- Dropping existing FOREIGN KEY constraints
18 | -- --------------------------------------------------
19 |
20 | IF OBJECT_ID(N'[dbo].[FK_Laps_To_Drivers]', 'F') IS NOT NULL
21 | ALTER TABLE [dbo].[Laps] DROP CONSTRAINT [FK_Laps_To_Drivers];
22 | GO
23 | IF OBJECT_ID(N'[dbo].[FK_Laps_To_Sessions]', 'F') IS NOT NULL
24 | ALTER TABLE [dbo].[Laps] DROP CONSTRAINT [FK_Laps_To_Sessions];
25 | GO
26 | IF OBJECT_ID(N'[dbo].[FK_SessionResult]', 'F') IS NOT NULL
27 | ALTER TABLE [dbo].[Results] DROP CONSTRAINT [FK_SessionResult];
28 | GO
29 | IF OBJECT_ID(N'[dbo].[FK_DriverResult]', 'F') IS NOT NULL
30 | ALTER TABLE [dbo].[Results] DROP CONSTRAINT [FK_DriverResult];
31 | GO
32 | IF OBJECT_ID(N'[dbo].[FK_SessionIncidents]', 'F') IS NOT NULL
33 | ALTER TABLE [dbo].[Incidents] DROP CONSTRAINT [FK_SessionIncidents];
34 | GO
35 | IF OBJECT_ID(N'[dbo].[FK_DriverIncident1]', 'F') IS NOT NULL
36 | ALTER TABLE [dbo].[Incidents] DROP CONSTRAINT [FK_DriverIncident1];
37 | GO
38 | IF OBJECT_ID(N'[dbo].[FK_DriverIncidents2]', 'F') IS NOT NULL
39 | ALTER TABLE [dbo].[Incidents] DROP CONSTRAINT [FK_DriverIncidents2];
40 | GO
41 |
42 | -- --------------------------------------------------
43 | -- Dropping existing tables
44 | -- --------------------------------------------------
45 |
46 | IF OBJECT_ID(N'[dbo].[Drivers]', 'U') IS NOT NULL
47 | DROP TABLE [dbo].[Drivers];
48 | GO
49 | IF OBJECT_ID(N'[dbo].[Laps]', 'U') IS NOT NULL
50 | DROP TABLE [dbo].[Laps];
51 | GO
52 | IF OBJECT_ID(N'[dbo].[Sessions]', 'U') IS NOT NULL
53 | DROP TABLE [dbo].[Sessions];
54 | GO
55 | IF OBJECT_ID(N'[dbo].[Results]', 'U') IS NOT NULL
56 | DROP TABLE [dbo].[Results];
57 | GO
58 | IF OBJECT_ID(N'[dbo].[Incidents]', 'U') IS NOT NULL
59 | DROP TABLE [dbo].[Incidents];
60 | GO
61 |
62 | -- --------------------------------------------------
63 | -- Creating all tables
64 | -- --------------------------------------------------
65 |
66 | -- Creating table 'Drivers'
67 | CREATE TABLE [dbo].[Drivers] (
68 | [Id] int IDENTITY(1,1) NOT NULL,
69 | [SteamId] nvarchar(max) NOT NULL,
70 | [Name] nvarchar(max) NOT NULL,
71 | [Team] nvarchar(max) NULL,
72 | [IncidentCount] int NOT NULL,
73 | [Distance] int NOT NULL,
74 | [Points] int NOT NULL
75 | );
76 | GO
77 |
78 | -- Creating table 'Laps'
79 | CREATE TABLE [dbo].[Laps] (
80 | [Id] int IDENTITY(1,1) NOT NULL,
81 | [SessionId] int NOT NULL,
82 | [DriverId] int NOT NULL,
83 | [Car] nvarchar(max) NOT NULL,
84 | [LapNo] smallint NOT NULL,
85 | [Time] int NOT NULL,
86 | [Cuts] smallint NOT NULL,
87 | [Position] smallint NOT NULL,
88 | [Grip] real NOT NULL,
89 | [Timestamp] datetime NOT NULL
90 | );
91 | GO
92 |
93 | -- Creating table 'Sessions'
94 | CREATE TABLE [dbo].[Sessions] (
95 | [Id] int IDENTITY(1,1) NOT NULL,
96 | [Server] nvarchar(max) NOT NULL,
97 | [Name] nvarchar(max) NOT NULL,
98 | [Type] tinyint NOT NULL,
99 | [Track] nvarchar(max) NOT NULL,
100 | [LapCount] smallint NULL,
101 | [Time] int NULL,
102 | [Ambient] tinyint NOT NULL,
103 | [Road] tinyint NOT NULL,
104 | [Weather] nvarchar(max) NOT NULL,
105 | [Timestamp] datetime NOT NULL
106 | );
107 | GO
108 |
109 | -- Creating table 'Results'
110 | CREATE TABLE [dbo].[Results] (
111 | [Id] int IDENTITY(1,1) NOT NULL,
112 | [SessionId] int NOT NULL,
113 | [DriverId] int NOT NULL,
114 | [Car] nvarchar(max) NOT NULL,
115 | [StartPosition] smallint NOT NULL,
116 | [Position] smallint NOT NULL,
117 | [IncidentCount] int NOT NULL,
118 | [Distance] int NOT NULL,
119 | [LapCount] smallint NOT NULL,
120 | [Gap] nvarchar(max) NULL,
121 | [TopSpeed] smallint NOT NULL
122 | );
123 | GO
124 |
125 | -- Creating table 'Incidents'
126 | CREATE TABLE [dbo].[Incidents] (
127 | [Id] int IDENTITY(1,1) NOT NULL,
128 | [SessionId] int NOT NULL,
129 | [Type] tinyint NOT NULL,
130 | [RelativeSpeed] real NOT NULL,
131 | [Timestamp] datetime NOT NULL,
132 | [DriverId1] int NOT NULL,
133 | [DriverId2] int NULL,
134 | [WorldPosX] real NOT NULL,
135 | [WorldPosY] real NOT NULL,
136 | [WorldPosZ] real NOT NULL
137 | );
138 | GO
139 |
140 | -- --------------------------------------------------
141 | -- Creating all PRIMARY KEY constraints
142 | -- --------------------------------------------------
143 |
144 | -- Creating primary key on [Id] in table 'Drivers'
145 | ALTER TABLE [dbo].[Drivers]
146 | ADD CONSTRAINT [PK_Drivers]
147 | PRIMARY KEY CLUSTERED ([Id] ASC);
148 | GO
149 |
150 | -- Creating primary key on [Id] in table 'Laps'
151 | ALTER TABLE [dbo].[Laps]
152 | ADD CONSTRAINT [PK_Laps]
153 | PRIMARY KEY CLUSTERED ([Id] ASC);
154 | GO
155 |
156 | -- Creating primary key on [Id] in table 'Sessions'
157 | ALTER TABLE [dbo].[Sessions]
158 | ADD CONSTRAINT [PK_Sessions]
159 | PRIMARY KEY CLUSTERED ([Id] ASC);
160 | GO
161 |
162 | -- Creating primary key on [Id] in table 'Results'
163 | ALTER TABLE [dbo].[Results]
164 | ADD CONSTRAINT [PK_Results]
165 | PRIMARY KEY CLUSTERED ([Id] ASC);
166 | GO
167 |
168 | -- Creating primary key on [Id] in table 'Incidents'
169 | ALTER TABLE [dbo].[Incidents]
170 | ADD CONSTRAINT [PK_Incidents]
171 | PRIMARY KEY CLUSTERED ([Id] ASC);
172 | GO
173 |
174 | -- --------------------------------------------------
175 | -- Creating all FOREIGN KEY constraints
176 | -- --------------------------------------------------
177 |
178 | -- Creating foreign key on [DriverId] in table 'Laps'
179 | ALTER TABLE [dbo].[Laps]
180 | ADD CONSTRAINT [FK_Laps_To_Drivers]
181 | FOREIGN KEY ([DriverId])
182 | REFERENCES [dbo].[Drivers]
183 | ([Id])
184 | ON DELETE NO ACTION ON UPDATE NO ACTION;
185 | GO
186 |
187 | -- Creating non-clustered index for FOREIGN KEY 'FK_Laps_To_Drivers'
188 | CREATE INDEX [IX_FK_Laps_To_Drivers]
189 | ON [dbo].[Laps]
190 | ([DriverId]);
191 | GO
192 |
193 | -- Creating foreign key on [SessionId] in table 'Laps'
194 | ALTER TABLE [dbo].[Laps]
195 | ADD CONSTRAINT [FK_Laps_To_Sessions]
196 | FOREIGN KEY ([SessionId])
197 | REFERENCES [dbo].[Sessions]
198 | ([Id])
199 | ON DELETE NO ACTION ON UPDATE NO ACTION;
200 | GO
201 |
202 | -- Creating non-clustered index for FOREIGN KEY 'FK_Laps_To_Sessions'
203 | CREATE INDEX [IX_FK_Laps_To_Sessions]
204 | ON [dbo].[Laps]
205 | ([SessionId]);
206 | GO
207 |
208 | -- Creating foreign key on [SessionId] in table 'Results'
209 | ALTER TABLE [dbo].[Results]
210 | ADD CONSTRAINT [FK_SessionResult]
211 | FOREIGN KEY ([SessionId])
212 | REFERENCES [dbo].[Sessions]
213 | ([Id])
214 | ON DELETE NO ACTION ON UPDATE NO ACTION;
215 | GO
216 |
217 | -- Creating non-clustered index for FOREIGN KEY 'FK_SessionResult'
218 | CREATE INDEX [IX_FK_SessionResult]
219 | ON [dbo].[Results]
220 | ([SessionId]);
221 | GO
222 |
223 | -- Creating foreign key on [DriverId] in table 'Results'
224 | ALTER TABLE [dbo].[Results]
225 | ADD CONSTRAINT [FK_DriverResult]
226 | FOREIGN KEY ([DriverId])
227 | REFERENCES [dbo].[Drivers]
228 | ([Id])
229 | ON DELETE NO ACTION ON UPDATE NO ACTION;
230 | GO
231 |
232 | -- Creating non-clustered index for FOREIGN KEY 'FK_DriverResult'
233 | CREATE INDEX [IX_FK_DriverResult]
234 | ON [dbo].[Results]
235 | ([DriverId]);
236 | GO
237 |
238 | -- Creating foreign key on [SessionId] in table 'Incidents'
239 | ALTER TABLE [dbo].[Incidents]
240 | ADD CONSTRAINT [FK_SessionIncidents]
241 | FOREIGN KEY ([SessionId])
242 | REFERENCES [dbo].[Sessions]
243 | ([Id])
244 | ON DELETE NO ACTION ON UPDATE NO ACTION;
245 | GO
246 |
247 | -- Creating non-clustered index for FOREIGN KEY 'FK_SessionIncidents'
248 | CREATE INDEX [IX_FK_SessionIncidents]
249 | ON [dbo].[Incidents]
250 | ([SessionId]);
251 | GO
252 |
253 | -- Creating foreign key on [DriverId1] in table 'Incidents'
254 | ALTER TABLE [dbo].[Incidents]
255 | ADD CONSTRAINT [FK_DriverIncident1]
256 | FOREIGN KEY ([DriverId1])
257 | REFERENCES [dbo].[Drivers]
258 | ([Id])
259 | ON DELETE NO ACTION ON UPDATE NO ACTION;
260 | GO
261 |
262 | -- Creating non-clustered index for FOREIGN KEY 'FK_DriverIncident1'
263 | CREATE INDEX [IX_FK_DriverIncident1]
264 | ON [dbo].[Incidents]
265 | ([DriverId1]);
266 | GO
267 |
268 | -- Creating foreign key on [DriverId2] in table 'Incidents'
269 | ALTER TABLE [dbo].[Incidents]
270 | ADD CONSTRAINT [FK_DriverIncidents2]
271 | FOREIGN KEY ([DriverId2])
272 | REFERENCES [dbo].[Drivers]
273 | ([Id])
274 | ON DELETE NO ACTION ON UPDATE NO ACTION;
275 | GO
276 |
277 | -- Creating non-clustered index for FOREIGN KEY 'FK_DriverIncidents2'
278 | CREATE INDEX [IX_FK_DriverIncidents2]
279 | ON [dbo].[Incidents]
280 | ([DriverId2]);
281 | GO
282 |
283 | -- --------------------------------------------------
284 | -- Script has ended
285 | -- --------------------------------------------------
--------------------------------------------------------------------------------
/AC_ServiceClient/Service References/ACServiceReference/ACService.wsdl:
--------------------------------------------------------------------------------
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 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | http://localhost:53366/ACService.svc
176 |
177 | gock@gaf.de
178 |
179 |
180 |
181 |
182 |
--------------------------------------------------------------------------------
/AC_ServerStarter/README.txt:
--------------------------------------------------------------------------------
1 | AC_TrackCycle
2 | =============
3 |
4 | Features:
5 | ---------
6 | - track cycles automatically after race end
7 | - track cycle via admin command
8 | - complete cfg template cycle (new since 2.0)
9 | - server message to inform players of incoming track change (new since 2.0)
10 | - session control tab (new since 2.4)
11 | - connected drivers tab (new since 2.4)
12 | - track graph tab (new since 2.4)
13 | - result logging into json, including all players (not only the last connected players), collision events, laps (new since 2.0) (optional upload to database and safety rating based player access will come soon)
14 | - server chat via server GUI or server command line (new since 2.0)
15 | - server chat via admin command (new since 2.0)
16 | - server private message via admin command (new since 2.2)
17 | - results displayed as server chat messages including best lap and incidents (new since 2.0)
18 | - near real-time incident report as server chat message including involved cars and impact speed (new since 2.0)
19 | - live fastest lap in session broadcast (new since 2.1)
20 | - driver welcome message (new since 2.1)
21 | - complete C# source code on https://github.com/flitzi/AC_SERVER_APPS
22 |
23 |
24 | Installation:
25 | -------------
26 | - Extract the files into your AC/server directory, next to acServer executable or extract anywhere else and set ac_server_directory in exe.config to folder where acServer executable is located
27 | - If not already installed you need .NET 4.0
28 |
29 |
30 | Configuration:
31 | --------------
32 | Plugin for result, report and server chat functionality
33 | - put these lines in the server_cfg.ini (you may adjust the ports, the ports are read from the server_cfg.ini)
34 |
35 | UDP_PLUGIN_ADDRESS=127.0.0.1:12000
36 | UDP_PLUGIN_LOCAL_PORT=11000
37 |
38 |
39 | Track Cycle (optional):
40 |
41 | - put this section in your server_cfg.ini
42 | [TRACK_CYCLE]
43 | TRACKS=spa,5;ks_nordschleife,endurance,2;mugello,6;nurburgring,6;silverstone,6;imola,6
44 |
45 | syntax is like this ,;,,;,
46 |
47 |
48 | Presets Cycle (optional):
49 |
50 | - fill the name of the preset directory that includes a server_cfg.ini and/or entry_list.ini in the exe.config key presets_cycle, separated with ;
51 | e.g.
52 |
53 |
54 | the default directory stucture for this then should be:
55 |
56 | /acserver.exe
57 | /presets/spa_gt3/server_cfg.ini
58 | /presets/spa_gt3/server_cfg.ini
59 | /presets/nurburgring_street_mix/server_cfg.ini
60 | /presets/nurburgring_street_mix/server_cfg.ini
61 |
62 | you can change the presets directory name in the exe.config with the key ac_presets_directory ( note: before 2.7.8 this was always the cfg directory, but since acServerManager.exe creates a templates directory why not use that as default. If you want the 2.7.7 behaviour use )
63 |
64 | note: If you have the [TRACK_CYCLE] block in the default cfg/server_cfg.ini then this will take priority over the presets cycle.
65 |
66 |
67 | In the exe.config you can also specify which incidents are broadcasted, 0=off, 1=only car with car, 2=all
68 |
69 |
70 | You can specify the number of result broadcast positions
71 |
72 |
73 | You can specify whether fastest lap set in session should be broadcasted live, 0=off, 1=on, 2=every lap
74 |
75 |
76 | You can specify the welcome message. For multiple lines use the | for line breaks. To disable set to empty string.
77 |
78 |
79 | - if you uncheck "Change track after race" the track will not be cycled after the race, you can flip this option while the server is running, so if you like to stay on the track for some races just uncheck, if you have enough, check.
80 |
81 | - the "Next Track" button switches the track immediately
82 |
83 | - you can also use admin commands to change the track while you are in the game, just type in the chat after you authorized yourself as admin with /admin myPassword
84 |
85 | /next_track
86 | switches to the next track in list
87 |
88 | /change_track spa
89 | /change_track ks_nordschleife,endurance (separated with comma, but no space)
90 | the track in needs to be in the TRACKS=... list
91 | this also works with the id of the track that is shown with /list_tracks, e.g. /change_track 1
92 |
93 | /queue_track spa
94 | /queue_track ks_nordschleife,endurance (separated with comma, but no space)
95 | the track in needs to be in the TRACKS=... list
96 | this also works with the id of the track that is shown with /list_tracks, e.g. /queue_track 1
97 |
98 |
99 | - everyone can use these commands in the chat
100 |
101 | /list_tracks
102 | lists the all the tracks in the cycle
103 |
104 | /vote_track spa
105 | /vote_track ks_nordschleife,endurance (separated with comma, but no space)
106 | the track in needs to be in the TRACKS=... list
107 | this also works with the id of the track that is shown with /list_tracks, e.g. /vote_track 1
108 | you can only vote once per cycle, it doesn't matter when you vote (practice/qualify/race)
109 | the track with the most votes will be the next track, unless the server admin chooses something else
110 | if multiple tracks have the same amount of votes, none of them is used
111 |
112 | - admin command for broadcasting a message from the server
113 | /broadcast blablabla
114 |
115 | - admin command for sending a message from the server to a specific player
116 | /send_chat carId blablabla
117 |
118 |
119 | note:
120 | - chat started with / is not visible to other players
121 |
122 | - the result json are saved in the "sessionresults" folder
123 |
124 | - for the track graph to work you need the official map.png and map.ini in the official folder structure. If you run acServer from a complete game steam installation, they will be found. If you are having a standalone server installation, you can put the two files per track in the content/tracks subfolders (where the surface.ini files are)
125 |
126 | Changelog:
127 | ----------
128 |
129 | 2.8.3 (2021/03/17)
130 | - added change_track_immediately_if_percentage_of_players_voted config option
131 |
132 |
133 | 2.8.2 (2021/03/11)
134 | - fixed missing enable_white_list key in AC_TrackCycle.exe.config
135 |
136 |
137 | 2.8.1 (2021/02/20)
138 | - votes now change track if auto_change_track = 0
139 | - if several tracks get the same number of votes, the first track in list with this number of votes will be used
140 |
141 |
142 | 2.8.0 (2021/02/15)
143 | - added auto_change_track config option
144 |
145 |
146 | 2.7.9 (2018/01/08)
147 | - added log_to_console, overwrite_log_file and interactive_console keys in AC_TrackCycle_Console.exe.config
148 |
149 |
150 | 2.7.8 (2018/01/06)
151 | - renamed template_cycle to preset_cycle in exe.config
152 | - added ac_presets_directory in exe.config, this is the directory where the presets should be stored ( note: before 2.7.8 this was always the cfg directory, but since acServerManager.exe creates a templates directory why not use that as default. If you want the 2.7.7 behaviour use )
153 | - not showing the complete path of the presets
154 | - fixed GUI not showing the current session status for the very first session
155 |
156 |
157 | 2.7.7 (2017/12/23)
158 | - changed startup order
159 | - using additional kill process when using create_server_window = 1
160 |
161 |
162 | 2.7.6 (2017/12/18)
163 | - (re)starting other processes in background
164 |
165 |
166 | 2.7.5 (2017/12/18)
167 | - added BestLap and LapCount columns to Drivers tab
168 | - added elapsed time textbox
169 |
170 |
171 | 2.7.4 (2017/05/16)
172 | - small changes to make AC_TrackCycle_Console.exe Linux compatible (using mono) (tested with a mono docker)
173 |
174 |
175 | 2.7.3 (2017/03/03)
176 | - trying to write the server log messages in correct order
177 | - allowing /change_track with index
178 | - added /queue_track admin command
179 | - added /list_tracks command
180 | - added /vote_track command
181 | - removed change_track_after_every_loop config option, now always changing track after every loop
182 |
183 |
184 | 2.7.2 (2016/08/01)
185 | - new config options
186 |
187 |
188 |
189 |
190 | 2.7.0 (2016/07/16)
191 | - updated to AC v1.7
192 | - fixed issue with broadcast results
193 | - showing timestamp in chat
194 |
195 |
196 | 2.6.1 (2016/07/10)
197 | - option to set broadcast_fastest_lap to 2 to broadcast every completed lap
198 |
199 |
200 | 2.6.0 (2016/07/09)
201 | - option to start additional executables, they are also restarted when the server is restarted due to track change, this helps with plugins that can't handle server restarts/track changes
202 |
203 |
204 | 2.5.1 (2016/01/02)
205 | - blocking "Smoothing" server log messages
206 |
207 |
208 | 2.5.0 (2015/10/22)
209 | - updated to new acServer UDP protocol version (AC v1.3.4)
210 | - added DriverGuid column to Connected Drivers tab
211 | - added ban context menu option
212 |
213 |
214 | 2.4.0 (2015/10/21)
215 | - fixed change_track_after_every_loop doesn't cycle twice if used with race session
216 | - if next cycle has same track, layout and laps then the server is not restarted
217 | - showing number of connected drivers
218 | - added Session Control tab
219 | - added Connected Drivers tab
220 | - added Track Graph tab
221 |
222 | 2.3.0 (2015/10/10)
223 | - updated to new acServer UDP protocol version (AC v1.3)
224 |
225 | 2.2.3 (2015/09/07)
226 | - added change_track_after_every_loop config option that enables track change after "server looping" message (useful if not having race sessions)
227 |
228 | 2.2.2 (2015/09/05)
229 | - fixed bug with broadcast_incidents = 0 not disabling broadcast of car collisions
230 | - fixed session info in GUI not being set
231 | - session report: warp detection improvement
232 |
233 | 2.2.1 (2015/08/13)
234 | - restructured code
235 | - renamed /send_chat to /broadcast
236 | - renamed /send_pm to /send_chat
237 | - fixed issue with DriverInfo not correctly carried over to next session
238 | - some changes and additions to written session results (e.g. LapLength)
239 |
240 | 2.2.0 (2015/08/11)
241 | - updated to new acServer UDP protocol version (AC v1.2.3)
242 | - no longer needed to provide password for each admin command
243 | - added "/send_pm carId msg" admin command
244 |
245 | 2.1.1 (2015/08/09)
246 | - fixed problem with results broadcast sometimes screwed up (duplicate lines)
247 | - truncating long driver and car names in results broadcast
248 | - disabled BroadCastIncidents by default
249 | - fixed problem with startpositions in session report
250 |
251 | 2.1.0 (2015/08/09)
252 | - changed to .NET 4.0 (Client Profile is sufficient) instead of .NET 4.5.2
253 | - updated to new AcServerPluginManager, allowing multiple internal and external plugins to be configured in exe.config
254 | - added live fastest lap in session broadcast
255 | - added driver welcome message
256 | - added StartPosition and TopSpeed to SessionReport
257 | - improved computation of race session position results
258 |
259 | 2.0.0 (2015/08/05)
260 | - new AC 1.2 server plugin functionality
261 |
262 | 1.3.0 (2015/05/10)
263 | - added console version
264 | - flushing log file immediately
265 |
266 | 1.2.0 (2015/03/12)
267 | - now possible to use different TRACK_CONFIG
268 |
269 | 1.1.0 (2015/03/08)
270 | - option to create logs
271 | - writing log after each track change and flushing log after 50000 lines to prevent high memory usage
272 |
273 | 1.0.0
274 | - initial release
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------