Beispiel #1
0
 public static Launcher CreateClient(SimpleServerAddress clientStartupServerAddress)
 {
     return(new Launcher()
     {
         runMode = Constants.RunMode.Client,
         ClientStartupServerAddress = clientStartupServerAddress,
     });
 }
Beispiel #2
0
 public static Launcher CreateClient(SimpleServerAddress clientStartupServerAddress)
 {
     return new Launcher()
     {
         runMode = Constants.RunMode.Client,
         ClientStartupServerAddress = clientStartupServerAddress,
     };
 }
Beispiel #3
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            var newAddress = new SimpleServerAddress()
            {
                Address = Address,
                Port = this.Port
            };
            if (!lboHistory.Items.Contains(newAddress))
                lboHistory.Items.Insert(0, newAddress);

            this.DialogResult = DialogResult.OK;
        }
Beispiel #4
0
        private void ShowClientComponent(SimpleServerAddress serverAddress)
        {
            // TODO: For now, the Client is a Win Forms app that is run in Client mode.
            System.Diagnostics.Process.Start(DnDCS.XNA.Libs.XNAConfigValues.WinFormsApp, string.Join(" ", ((int)DnDCS.Libs.Constants.RunMode.Client).ToString(), serverAddress.Address, serverAddress.Port.ToString()));
            this.Exit();

            //var clientComponent = new ClientComponent(serverAddress.Address, serverAddress.Port);
            //clientComponent.OnEscape += new System.Action(clientComponent_OnEscape);
            //clientComponent.Initialize();

            //this.SwitchGameComponent(clientComponent);
        }
Beispiel #5
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            var newAddress = new SimpleServerAddress()
            {
                Address = Address,
                Port    = this.Port
            };

            if (!lboHistory.Items.Contains(newAddress))
            {
                lboHistory.Items.Insert(0, newAddress);
            }

            this.DialogResult = DialogResult.OK;
        }
Beispiel #6
0
 private void menu_OnClientConnect(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Beispiel #7
0
 private void menuConnect_OnEnter(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Beispiel #8
0
        private void ShowClientComponent(SimpleServerAddress serverAddress)
        {
            // TODO: For now, the Client is a Win Forms app that is run in Client mode.
            System.Diagnostics.Process.Start(DnDCS.XNA.Libs.XNAConfigValues.WinFormsApp, string.Join(" ", ((int)DnDCS.Libs.Constants.RunMode.Client).ToString(), serverAddress.Address, serverAddress.Port.ToString()));
            this.Exit();

            //var clientComponent = new ClientComponent(serverAddress.Address, serverAddress.Port);
            //clientComponent.OnEscape += new System.Action(clientComponent_OnEscape);
            //clientComponent.Initialize();

            //this.SwitchGameComponent(clientComponent);
        }
Beispiel #9
0
 private void menuConnect_OnEnter(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Beispiel #10
0
 private void menu_OnClientConnect(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }