コード例 #1
0
        public static bool Apply(Card card)
        {
            if (card == null)
            {
                return(false);
            }
            SavedCardStyle savedCard = Get(card.Name);

            if (savedCard == null)
            {
                return(false);
            }

            savedCard.ApplyTo(card);
            return(true);
        }
コード例 #2
0
        public static void Save(Card card)
        {
            if (card == null)
            {
                return;
            }
            SavedCardStyle savedCard = Get(card.Name);

            if (savedCard == null)
            {
                savedCard = new SavedCardStyle(card);
                AllKnownCardStyles.Add(savedCard);
            }
            else
            {
                savedCard.LoadFrom(card);
            }

            GoogleSheets.SaveChanges(savedCard);
        }