Ejemplo n.º 1
0
    public static void ShowWindow()
    {
        CardEditor cardEditor = (CardEditor)EditorWindow.GetWindow <CardEditor>("Card Editor", typeof(CardEditorList));

        cardEditor.LoadListOfCards();
        cardEditor.Show();
    }
Ejemplo n.º 2
0
 static void init()
 {
     if (window)
     {
         window.Close();
     }
     window = EditorWindow.GetWindow<CardEditor>();
 }
Ejemplo n.º 3
0
    static void Init()
    {
        CardEditor ce = (CardEditor)EditorWindow.GetWindow(typeof(CardEditor));

        ce.Show();

        cardData = CardDataLoader.LoadData();
        keys     = new List <string>();
        foreach (KeyValuePair <string, CardDataLoader.CardData> kvp in cardData)
        {
            keys.Add(kvp.Key);
        }
    }
Ejemplo n.º 4
0
        public void UpdateCard()
        {
            Mock <IUnitOfWork> unitOfWork
                = new Mock <IUnitOfWork>(MockBehavior.Strict);

            unitOfWork
            .Setup(uow => uow.Cards.Update(It.IsAny <Card>()));

            var sut = new CardEditor(unitOfWork.Object);

            var card = Cards[0];

            sut.UpdateCard(card);

            unitOfWork.Verify(
                uow => uow.Cards.Update(It.IsAny <Card>()), Times.Once);
        }
Ejemplo n.º 5
0
        private void cardEditToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CardEditor ce = new CardEditor();

            ce.ShowDialog();
        }