/// <summary> /// Defines the RCPackageFormats of the test program. /// </summary> static TestClientMessages() { RESET = RCPackageFormatMap.Get("RC.DssServices.Test.Reset"); COLOR_CHANGE_REQUEST = RCPackageFormatMap.Get("RC.DssServices.Test.ColorChangeRequest"); COLOR_CHANGE_NOTIFICATION = RCPackageFormatMap.Get("RC.DssServices.Test.ColorChangeNotification"); COMMAND = RCPackageFormatMap.Get("RC.DssServices.Test.Command"); }
/// <summary> /// Initializes the Network class. /// </summary> static Network() { FORMAT_LOBBY_INFO = RCPackageFormatMap.Get("RC.NetworkingSystem.LobbyInfo"); FORMAT_LOBBY_INFO_VANISHED = RCPackageFormatMap.Get("RC.NetworkingSystem.LobbyInfoVanished"); FORMAT_LOBBY_LINE_STATE_REPORT = RCPackageFormatMap.Get("RC.NetworkingSystem.LobbyLineStateReport"); FORMAT_DISCONNECT_INDICATOR = RCPackageFormatMap.Get("RC.NetworkingSystem.DisconnectIndicator"); FORMAT_DISCONNECT_ACK = RCPackageFormatMap.Get("RC.NetworkingSystem.DisconnectAcknowledge"); FORMAT_DEDICATED_MESSAGE = RCPackageFormatMap.Get("RC.NetworkingSystem.DedicatedMessage"); }
/// <summary> /// Class level constructor. /// </summary> static RCLogTrace() { RCL_EVENT_FORMAT = RCPackageFormatMap.Get("RC.Common.RclEvent"); RCL_FORK_FORMAT = RCPackageFormatMap.Get("RC.Common.RclFork"); RCL_JOIN_FORMAT = RCPackageFormatMap.Get("RC.Common.RclJoin"); RCL_EXCEPTION_FORMAT = RCPackageFormatMap.Get("RC.Common.RclException"); timer = new Stopwatch(); timer.Start(); }
static void Main() { ConfigurationManager.Initialize("../../../../config/RC.Common.Diagnostics.RCLReader/RC.Common.Diagnostics.RCLReader.root"); EVENT_FORMAT = RCPackageFormatMap.Get("RC.Common.RclEvent"); FORK_FORMAT = RCPackageFormatMap.Get("RC.Common.RclFork"); JOIN_FORMAT = RCPackageFormatMap.Get("RC.Common.RclJoin"); EXCEPTION_FORMAT = RCPackageFormatMap.Get("RC.Common.RclException"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new mainForm()); }
static DssRoot() { APPLICATION_VERSION = new Version(ConstantsTable.Get <string>("RC.App.Version")); DSS_CTRL_CONN_REQUEST = RCPackageFormatMap.Get("RC.DssServices.DssCtrlConnectionRequest"); DSS_CTRL_CONN_ACK = RCPackageFormatMap.Get("RC.DssServices.DssCtrlConnectionAcknowledge"); DSS_CTRL_CONN_REJECT = RCPackageFormatMap.Get("RC.DssServices.DssCtrlConnectionReject"); DSS_CTRL_SETUP_STEP_RQ_BEGIN = RCPackageFormatMap.Get("RC.DssServices.DssCtrlSetupStepRqBegin"); DSS_CTRL_SETUP_STEP_AW_BEGIN = RCPackageFormatMap.Get("RC.DssServices.DssCtrlSetupStepAwBegin"); DSS_CTRL_SETUP_STEP_MSG_END = RCPackageFormatMap.Get("RC.DssServices.DssCtrlSetupStepMsgEnd"); DSS_CTRL_START_SIMULATION = RCPackageFormatMap.Get("RC.DssServices.DssCtrlStartSimulation"); DSS_SIM_ERROR = RCPackageFormatMap.Get("RC.DssServices.DssSimulationError"); DSS_COMMIT = RCPackageFormatMap.Get("RC.DssServices.DssCommit"); DSS_COMMIT_ANSWER = RCPackageFormatMap.Get("RC.DssServices.DssCommitAnswer"); DSS_CTRL_DROP_GUEST = RCPackageFormatMap.Get("RC.DssServices.DssCtrlDropGuest"); DSS_LEAVE = RCPackageFormatMap.Get("RC.DssServices.DssLeave"); DSS_COMMAND = RCPackageFormatMap.Get("RC.DssServices.DssCommand"); }
public MainForm() { InitializeComponent(); /// Initialize the network List <int> wellKnownBroadcastPorts = new List <int>(); wellKnownBroadcastPorts.Add(25000); wellKnownBroadcastPorts.Add(25001); wellKnownBroadcastPorts.Add(25002); wellKnownBroadcastPorts.Add(25003); this.network = Network.CreateLocalAreaNetwork(wellKnownBroadcastPorts); MY_FORMAT = RCPackageFormatMap.Get("RC.NetworkingSystem.Test.TestFormat"); /// Open the images for the indicators this.engagedIndicator = (Bitmap)Bitmap.FromFile("engaged.png"); this.openedIndicator = (Bitmap)Bitmap.FromFile("opened.png"); this.closedIndicator = (Bitmap)Bitmap.FromFile("closed.png"); this.unknownIndicator = (Bitmap)Bitmap.FromFile("unknown.png"); this.lastKnownIdOfThisPeer = -1; this.lastKnownLineStates = null; /// Create and fill the control maps this.indicators = new PictureBox[8]; this.indicatorMap = new Dictionary <PictureBox, int>(); this.indicators[0] = this.picLineState0; this.indicators[1] = this.picLineState1; this.indicators[2] = this.picLineState2; this.indicators[3] = this.picLineState3; this.indicators[4] = this.picLineState4; this.indicators[5] = this.picLineState5; this.indicators[6] = this.picLineState6; this.indicators[7] = this.picLineState7; for (int i = 0; i < this.indicators.Length; i++) { this.indicatorMap.Add(this.indicators[i], i); } this.openButtons = new Button[8]; this.openButtonMap = new Dictionary <Button, int>(); this.openButtons[0] = this.btnOpen0; this.openButtons[1] = this.btnOpen1; this.openButtons[2] = this.btnOpen2; this.openButtons[3] = this.btnOpen3; this.openButtons[4] = this.btnOpen4; this.openButtons[5] = this.btnOpen5; this.openButtons[6] = this.btnOpen6; this.openButtons[7] = this.btnOpen7; for (int i = 0; i < this.openButtons.Length; i++) { this.openButtonMap.Add(this.openButtons[i], i); } this.closeButtons = new Button[8]; this.closeButtonMap = new Dictionary <Button, int>(); this.closeButtons[0] = this.btnClose0; this.closeButtons[1] = this.btnClose1; this.closeButtons[2] = this.btnClose2; this.closeButtons[3] = this.btnClose3; this.closeButtons[4] = this.btnClose4; this.closeButtons[5] = this.btnClose5; this.closeButtons[6] = this.btnClose6; this.closeButtons[7] = this.btnClose7; for (int i = 0; i < this.closeButtons.Length; i++) { this.closeButtonMap.Add(this.closeButtons[i], i); } this.textBoxes = new TextBox[8]; this.textBoxMap = new Dictionary <TextBox, int>(); this.textBoxes[0] = this.txtIO0; this.textBoxes[1] = this.txtIO1; this.textBoxes[2] = this.txtIO2; this.textBoxes[3] = this.txtIO3; this.textBoxes[4] = this.txtIO4; this.textBoxes[5] = this.txtIO5; this.textBoxes[6] = this.txtIO6; this.textBoxes[7] = this.txtIO7; for (int i = 0; i < this.textBoxes.Length; i++) { this.textBoxMap.Add(this.textBoxes[i], i); } this.targetSelectors = new CheckBox[8]; this.targetSelectorMap = new Dictionary <CheckBox, int>(); this.targetSelectors[0] = this.chkTargetSel0; this.targetSelectors[1] = this.chkTargetSel1; this.targetSelectors[2] = this.chkTargetSel2; this.targetSelectors[3] = this.chkTargetSel3; this.targetSelectors[4] = this.chkTargetSel4; this.targetSelectors[5] = this.chkTargetSel5; this.targetSelectors[6] = this.chkTargetSel6; this.targetSelectors[7] = this.chkTargetSel7; for (int i = 0; i < this.targetSelectors.Length; i++) { this.targetSelectorMap.Add(this.targetSelectors[i], i); } this.testButtons = new Button[8]; this.testButtonMap = new Dictionary <Button, int>(); this.testButtons[0] = this.btnTest0; this.testButtons[1] = this.btnTest1; this.testButtons[2] = this.btnTest2; this.testButtons[3] = this.btnTest3; this.testButtons[4] = this.btnTest4; this.testButtons[5] = this.btnTest5; this.testButtons[6] = this.btnTest6; this.testButtons[7] = this.btnTest7; for (int i = 0; i < this.testButtons.Length; i++) { this.testButtonMap.Add(this.testButtons[i], i); } }
static Program() { ConfigurationManager.Initialize("../../../../config/RC.DssServices.TestConsole/RC.DssServices.TestConsole.root"); MY_FORMAT = RCPackageFormatMap.Get("RC.DssServices.TestConsole.TestFormat"); }