Exemple #1
0
 public static Launcher CreateClient(SimpleServerAddress clientStartupServerAddress)
 {
     return(new Launcher()
     {
         runMode = Constants.RunMode.Client,
         ClientStartupServerAddress = clientStartupServerAddress,
     });
 }
Exemple #2
0
 public static Launcher CreateClient(SimpleServerAddress clientStartupServerAddress)
 {
     return new Launcher()
     {
         runMode = Constants.RunMode.Client,
         ClientStartupServerAddress = clientStartupServerAddress,
     };
 }
        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;
        }
Exemple #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);
        }
        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;
        }
Exemple #6
0
 private void menu_OnClientConnect(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Exemple #7
0
 private void menuConnect_OnEnter(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Exemple #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);
        }
Exemple #9
0
 private void menuConnect_OnEnter(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }
Exemple #10
0
 private void menu_OnClientConnect(SimpleServerAddress serverAddress)
 {
     ShowClientComponent(serverAddress);
 }