Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the Network class.
 /// </summary>
 /// <param name="name">The name of the network.</param>
 /// <param name="address">The address of the network</param>
 /// <param name="isFavorite">Whether the network is a favorite or not</param>
 /// <param name="connectCommands">The commands to be executed upon connecting.</param>
 public Network(string name, string address, bool isFavorite, string connectCommands, Identity identity, bool useCustomIdentity = false)
 {
     this.Name = name;
       this.Address = address;
       this.IsFavorite = isFavorite;
       this.ConnectCommands = connectCommands;
       this.Identity = identity;
       this.UseCustomIdentity = useCustomIdentity;
 }
Exemple #2
0
 public void Connect()
 {
     if (this.UseCustomIdentity)
     {
         this.ConnectButtonPressed(new Network(this.NetworkName,
                                               this.NetworkAddress,
                                               false, string.Empty,
                                               new Identity(this.IdentityName, string.Empty,
                                                            this.IdentityAlternative,
                                                            this.IdentityRealName),
                                               true));
     }
     else
     {
         this.ConnectButtonPressed(new Network(this.NetworkName, this.NetworkAddress, false, string.Empty, Identity.GlobalIdentity(), false));
     }
 }