本文整理汇总了C#中IController.HandshakeInitializeGUI方法的典型用法代码示例。如果您正苦于以下问题:C# IController.HandshakeInitializeGUI方法的具体用法?C# IController.HandshakeInitializeGUI怎么用?C# IController.HandshakeInitializeGUI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IController
的用法示例。
在下文中一共展示了IController.HandshakeInitializeGUI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScenarioControllerLoop
//.........这里部分代码省略.........
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("Whiteboard", e.Message));
}
break;
case "HandshakeAvailablePlayers":
try
{
if (((StringValue)vpEvent.parameters["TargetTerminalID"]).value == DDD_Global.Instance.TerminalID && DDD_Global.Instance.HasAuthenticated)
{
StringListValue s = vpEvent.parameters["AvailablePlayers"] as StringListValue;
DDD_Global.Instance.DM_List = ((StringListValue)vpEvent.parameters["Players"]).strings;
if (s != null)
{
if (s.strings.Count > 0)
{
receiver.HandshakeAvailablePlayers(s.strings.ToArray());
}
}
}
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("HandshakeAvailablePlayers", e.Message));
}
break;
case "HandshakeInitializeGUI":
try
{
if (((StringValue)vpEvent.parameters["TerminalID"]).value == DDD_Global.Instance.TerminalID)
{
UTM_Mapping.HorizonalMetersPerPixel = (float)(((DoubleValue)vpEvent.parameters["HorizontalPixelsPerMeter"]).value);
UTM_Mapping.VerticalMetersPerPixel = (float)(((DoubleValue)vpEvent.parameters["VerticalPixelsPerMeter"]).value);
DDD_Global.Instance.PlayerID = ((StringValue)vpEvent.parameters["PlayerID"]).value;
DDD_Global.Instance.ImageLibrary = ((StringValue)vpEvent.parameters["IconLibrary"]).value;
DDD_Global.Instance.MapName = ((StringValue)vpEvent.parameters["MapName"]).value;
DDD_Global.Instance.MapLocation = string.Format("{0}\\MapLib\\{1}", DDD_Global.Instance.DDDClientShareFolder, DDD_Global.Instance.MapName);
DDD_Global.Instance.ScenarioName = ((StringValue)vpEvent.parameters["ScenarioName"]).value;
DDD_Global.Instance.ScenarioDescription = ((StringValue)vpEvent.parameters["ScenarioDescription"]).value;
DDD_Global.Instance.PlayerBrief = ((StringValue)vpEvent.parameters["PlayerBrief"]).value;
//DDD_Global.Instance.VoiceServerHostname = ((StringValue)vpEvent.parameters["VoiceChatServerName"]).value;
DDD_Global.Instance.VoiceServerHostname = _HostName;
DDD_Global.Instance.VoiceServerPort = ((IntegerValue)vpEvent.parameters["VoiceChatServerPort"]).value;
DDD_Global.Instance.ConaitoServerPassword = ((StringValue)vpEvent.parameters["VoiceChatUserPassword"]).value;
DDD_Global.Instance.VoiceChatEnabled = ( ( BooleanValue )vpEvent.parameters["VoiceChatEnabled"] ).value;
DDD_Global.Instance.IsObserver = ((BooleanValue)vpEvent.parameters["IsObserver"]).value;
DDD_Global.Instance.IsForkReplay = ((BooleanValue)vpEvent.parameters["IsForkReplay"]).value;
if (vpEvent.parameters.ContainsKey("DefaultDisplayLabels"))
{
String val = ((StringValue)vpEvent.parameters["DefaultDisplayLabels"]).value;
((DDD_MainWinFormInterface)receiver).toggleDisplayLabels(val);
}
if (vpEvent.parameters.ContainsKey("DefaultDisplayTags"))
{
String val = ((StringValue)vpEvent.parameters["DefaultDisplayTags"]).value;
((DDD_MainWinFormInterface)receiver).toggleTagDisplay(val);
}