Example #1
0
 private void SetMiscDefaults()
 {
     ConstantID = MiscTools.CreateConstantID();
     PreExtApp  = Settings.Default.ConDefaultPreExtApp;
     PostExtApp = Settings.Default.ConDefaultPostExtApp;
     MacAddress = Settings.Default.ConDefaultMacAddress;
     UserField  = Settings.Default.ConDefaultUserField;
 }
Example #2
0
        public virtual ConnectionInfo Copy()
        {
            var newConnectionInfo = (ConnectionInfo)MemberwiseClone();

            newConnectionInfo.ConstantID      = MiscTools.CreateConstantID();
            newConnectionInfo.OpenConnections = new ProtocolList();
            return(newConnectionInfo);
        }
Example #3
0
 private void SetMiscDefaults()
 {
     _constantId = MiscTools.CreateConstantID();
     _preExtApp  = mRemoteNG.Settings.Default.ConDefaultPreExtApp;
     _postExtApp = mRemoteNG.Settings.Default.ConDefaultPostExtApp;
     _macAddress = mRemoteNG.Settings.Default.ConDefaultMacAddress;
     _userField  = mRemoteNG.Settings.Default.ConDefaultUserField;
 }
Example #4
0
        public virtual ConnectionInfo Clone()
        {
            var newConnectionInfo = new ConnectionInfo();

            newConnectionInfo.CopyFrom(this);
            newConnectionInfo.ConstantID  = MiscTools.CreateConstantID();
            newConnectionInfo.Inheritance = Inheritance.Clone();
            return(newConnectionInfo);
        }
Example #5
0
        // Deep clone, recursive
        public override ConnectionInfo Clone()
        {
            var newContainer = new ContainerInfo();

            newContainer.CopyFrom(this);
            newContainer.ConstantID      = MiscTools.CreateConstantID();
            newContainer.OpenConnections = new ProtocolList();
            newContainer.Inheritance     = Inheritance.Clone();
            foreach (var child in Children.ToArray())
            {
                var newChild = child.Clone();
                newChild.RemoveParent();
                newContainer.AddChild(newChild);
            }
            return(newContainer);
        }