mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 18:05:40 +02:00
Current mission displayed at panel
This commit is contained in:
@@ -118,6 +118,11 @@ public class DatabaseController
|
||||
SQLQueryTxt += "INSERT INTO `pe_OnlineStatus` (`pe_OnlineStatus_instance`) SELECT '" + Int32.Parse(TCPFrameInstance) + "' FROM DUAL WHERE NOT EXISTS(SELECT * FROM `pe_OnlineStatus` WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "');";
|
||||
SQLQueryTxt += "UPDATE `pe_OnlineStatus` SET `pe_OnlineStatus_theatre` = '" + TCPFrame.payload.mission.theatre + "', `pe_OnlineStatus_name` = '" + TCPFrame.payload.mission.name + "' , `pe_OnlineStatus_pause` = '" + TCPFrame.payload.mission.pause + "', `pe_OnlineStatus_multiplayer` = '" + TCPFrame.payload.mission.multiplayer + "', `pe_OnlineStatus_realtime` = '" + TCPFrame.payload.mission.realtime + "', `pe_OnlineStatus_modeltime` = '" + TCPFrame.payload.mission.modeltime + "', `pe_OnlineStatus_players` = " + player_count + " WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "';";
|
||||
|
||||
// Save for GUI
|
||||
Globals.CurrentMission.Theatre = TCPFrame.payload.mission.theatre;
|
||||
Globals.CurrentMission.Mission = TCPFrame.payload.mission.name;
|
||||
Globals.CurrentMission.Pause = TCPFrame.payload.mission.pause;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
// This class gathers all global variable
|
||||
|
||||
// Class to hold current game state/mission information
|
||||
class CurrentMissionClass
|
||||
{
|
||||
|
||||
public string Theatre = "";
|
||||
public string Mission = "";
|
||||
public string Pause = "";
|
||||
|
||||
public string ToInfoString()
|
||||
{
|
||||
return this.Mission + " (" + this.Theatre + ") Pause:" + this.Pause;
|
||||
}
|
||||
}
|
||||
|
||||
internal class Globals
|
||||
{
|
||||
public static string[] AppLogHistory = new string[10]; // Log history for GUI
|
||||
@@ -11,7 +25,7 @@ internal class Globals
|
||||
public static bool StatusDatabase = false; // Historic db connection status
|
||||
public static bool StatusSRS = false; // Historic srs connection status
|
||||
public static bool StatusLotATC = false; // Historic lotatc connection status
|
||||
public static bool StatusHistoryConnection = false; // Historic tcp connection status
|
||||
public static bool StatusHistoryConnection = false; // Historic tcp connection status
|
||||
public static bool StatusConnection = false; // Flag if is TCP connectionstill alive
|
||||
public static int ErrorsDatabase = 0; // MySQL - Error counter
|
||||
public static int ErrorsGame = 0; // TCP connection - Error counter
|
||||
@@ -22,5 +36,6 @@ internal class Globals
|
||||
public static string VersionDCSHook = ""; // Version - DCS hook
|
||||
public static string VersionDatabase = ""; // Version - Database
|
||||
public static string VersionPerun = "DEBUG"; // Version - Perun
|
||||
public static CurrentMissionClass CurrentMission = new CurrentMissionClass(); // Mission - name
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user