Example #1
0
        /// <summary>
        /// Copies values from <paramref name="p"/> over to this profile
        /// <para>Note: <paramref name="p"/> and this profile must have the same Id</para>
        /// </summary>
        /// <param name="p">the profile to update from</param>
        public void Update(Profile p)
        {
            if (p.Id != Id)
            {
                throw new InvalidOperationException("Cannot update profile from wrong Id");
            }

            Name     = p.Name;
            Speedrun = new SpeedrunSettings
            {
                Engine   = p.Speedrun.Engine,
                Keybinds = p.Speedrun.Keybinds,
            };
            Daud = new DaudSettings
            {
                KnifeOfDunwall  = p.Daud.KnifeOfDunwall,
                BrigmoreWitches = p.Daud.BrigmoreWitches,
            };

            Movies = new MovieSettings
            {
                Intro      = p.Movies.Intro,
                Loadscreen = p.Movies.Loadscreen,
            };
        }
Example #2
0
 public Profile()
 {
     Id       = Guid.NewGuid();
     Name     = string.Empty;
     Speedrun = new SpeedrunSettings();
 }