Exemple #1
0
        /// <summary>Creates a card associated with this note.</summary>
        /// <param name="config">The configuration.</param>
        /// <param name="data">The data.</param>
        /// <returns></returns>
        public Card CreateCard(CollectionConfig config, string data)
        {
            Card card = new Card(config, Id, data);

            Cards.Add(card);

            return(card);
        }
Exemple #2
0
        /// <summary>Initializes a new instance of the <see cref="Card"/> class.</summary>
        /// <param name="config">The configuration.</param>
        /// <param name="noteId">The note identifier.</param>
        /// <param name="data">The data.</param>
        public Card(CollectionConfig config, int noteId = -1, string data = null)
        {
            Id           = DateTime.Now.UnixTimestamp();
            Config       = config;
            NoteId       = noteId;
            LastModified = Id;

            Due           = 0;
            PracticeState = Models.PracticeState.New;
            MiscState     = CardMiscStateFlag.None;

            _eFactor  = 0;
            _interval = 0;

            Reviews = 0;
            Lapses  = 0;

            Data = data;
        }