示例#1
0
        /// <summary>
        /// Makes a copy of this object.
        /// </summary>
        /// <returns>A copy of this object with the same property values.</returns>
        public LaunchParams Clone()
        {
            LaunchParams clone = new LaunchParams();

            clone.GameToLaunch = this.GameToLaunch;
            clone.Username = this.Username;
            clone.Password = this.Password;
            clone.LoginTimeoutInMs = this.LoginTimeoutInMs;
            clone.GameDir = this.GameDir;

            clone.FilesToSwitch = new List<FileSwitcher>( this.FilesToSwitch.Count );
            foreach ( FileSwitcher fileToSwitch in this.FilesToSwitch )
            {
                clone.FilesToSwitch.Add( fileToSwitch.Clone() );
            }

            clone.ClosePopup = this.ClosePopup;
            clone.LaunchInWindowed = this.LaunchInWindowed;
            clone.WindowWidth = this.WindowWidth;
            clone.WindowHeight = this.WindowHeight;

            clone.GameDonePollingIntervalInMs = this.GameDonePollingIntervalInMs;
            clone.GameWindowCreatedPollingIntervalInMs = this.GameWindowCreatedPollingIntervalInMs;
            clone.GameDeadPollingIntervalInMs = this.GameDeadPollingIntervalInMs;

            return clone;
        }