Exemplo n.º 1
0
        private void AddPortButtonHandler(object sender, EventArgs e)
        {
            ButtonBase button = sender as ButtonBase;
            AddTunnelForm addTunnelForm = new AddTunnelForm((TunnelType)button.Tag);
            if (addTunnelForm.ShowDialog(this) == DialogResult.OK)
            {
                if (this.selectedSession != null)
                {
                    this.selectedSession.Tunnels.Add(new Tunnel(this.selectedSession, addTunnelForm.SourcePort, addTunnelForm.Destination, addTunnelForm.DestinationPort, addTunnelForm.TunnelType));
                    this.selectedSession.Serialize();

                    this.SwitchSession(this, null);
                }
            }
        }
Exemplo n.º 2
0
        private void AddPortButtonHandler(object sender, EventArgs e)
        {
            ButtonBase    button        = sender as ButtonBase;
            AddTunnelForm addTunnelForm = new AddTunnelForm((TunnelType)button.Tag);

            if (addTunnelForm.ShowDialog(this) == DialogResult.OK)
            {
                if (this.selectedSession != null)
                {
                    this.selectedSession.Tunnels.Add(new Tunnel(this.selectedSession, addTunnelForm.SourcePort, addTunnelForm.Destination, addTunnelForm.DestinationPort, addTunnelForm.TunnelType));
                    this.selectedSession.Serialize();

                    this.SwitchSession(this, null);
                }
            }
        }