private void Initialize(string[] args) { try { InitializationData initializationData = new InitializationData { properties = Util.createProperties() }; initializationData.properties.setProperty("Ice.ThreadPool.Client.Size", "1"); initializationData.properties.setProperty("Ice.ThreadPool.Client.SizeMax", "10"); initializationData.properties.setProperty("Ice.ThreadPool.Server.Size", "1"); initializationData.properties.setProperty("Ice.ThreadPool.Server.SizeMax", "10"); initializationData.properties.setProperty("Ice.ACM.Client", "0"); this.Communicator = Util.initialize(ref args, initializationData); ObjectPrx obj = this.Communicator.stringToProxy("ChatLobby:default -p 12321"); this._lobby = LobbyPrxHelper.checkedCast(obj); if (this._lobby == null) { throw new ApplicationException("Invalid proxy"); } } catch (Exception) { MessageBox.Show(string.Format("ERROR: Cannot connect with a server"), Resources.ChatForm_Chat_Exception, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); Environment.Exit(1); } }
public static LobbyPrx uncheckedCast(Ice.ObjectPrx b) { if(b == null) { return null; } LobbyPrx r = b as LobbyPrx; if(r == null) { LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(b); r = h; } return r; }
public static LobbyPrx uncheckedCast(Ice.ObjectPrx b, string f) { if(b == null) { return null; } Ice.ObjectPrx bb = b.ice_facet(f); LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(bb); return h; }
public static LobbyPrx read__(IceInternal.BasicStream is__) { Ice.ObjectPrx proxy = is__.readProxy(); if(proxy != null) { LobbyPrxHelper result = new LobbyPrxHelper(); result.copyFrom__(proxy); return result; } return null; }
public static LobbyPrx checkedCast(Ice.ObjectPrx b, string f, _System.Collections.Generic.Dictionary<string, string> ctx) { if(b == null) { return null; } Ice.ObjectPrx bb = b.ice_facet(f); try { if(bb.ice_isA("::Chat::Lobby", ctx)) { LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(bb); return h; } } catch(Ice.FacetNotExistException) { } return null; }
public static LobbyPrx checkedCast(Ice.ObjectPrx b, string f) { if(b == null) { return null; } Ice.ObjectPrx bb = b.ice_facet(f); try { if(bb.ice_isA("::Chat::Lobby")) { LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(bb); return h; } } catch(Ice.FacetNotExistException) { } return null; }
public static LobbyPrx checkedCast(Ice.ObjectPrx b, _System.Collections.Generic.Dictionary<string, string> ctx) { if(b == null) { return null; } LobbyPrx r = b as LobbyPrx; if((r == null) && b.ice_isA("::Chat::Lobby", ctx)) { LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(b); r = h; } return r; }
public static LobbyPrx checkedCast(Ice.ObjectPrx b) { if(b == null) { return null; } LobbyPrx r = b as LobbyPrx; if((r == null) && b.ice_isA("::Chat::Lobby")) { LobbyPrxHelper h = new LobbyPrxHelper(); h.copyFrom__(b); r = h; } return r; }