public bool Init(InitCondition Condition) { CurrentFace = Faces.QuestionFace; bool is_ok = CheckCardsFolder(); if (is_ok == false) { MessageBox.Show("Initialization failed"); } switch (Condition) { case InitCondition.AllCards: this.Cards = Globals.GetListOfCards(Globals.GetPathOfEachCard()); break; case InitCondition.PendingCards: this.Cards = Globals.GetListOfCards(Globals.GetPathOfEachPendingCard()); break; case InitCondition.MissedCards: this.Cards = Globals.GetListOfCards(Globals.GetPathOfEachMissedCard()); break; case InitCondition.SingleSpecifiedCard: this.Cards = Globals.GetListOfCards(new string[] { this.SingleSpecifiedCardFolder }); break; } this.CurrentCardIndex = 0; Present(); return(is_ok); }
internal static int GetNumberOfMissedCards() { string[] missed_cards = Globals.GetPathOfEachMissedCard(); if (missed_cards == null) { return(0); } return(missed_cards.Length); }
void PresentMissedCards(string CardGroupPath) { string[] paths = null; if (CardGroupPath == "[ALL]") { paths = Globals.GetPathOfEachMissedCard(); } else { paths = Globals.GetPathOfEachMissedCard(CardGroupPath); } var cards = Globals.GetListOfCards(paths); CtrlCardBrowser cb = new CtrlCardBrowser(); cb.Init(cards); wndMainWindow.PresentContent(cb); }
private static string GetButtonsForMissedCards(string CardGroup) { string buttons = ""; string[] missed_cards = Globals.GetPathOfEachMissedCard(CardGroup); if (missed_cards == null) { return(""); } var cards = Globals.GetListOfCards(missed_cards); foreach (Card card in cards) { string btn_text = Globals.GetLastPartOfDir(card.CardAbsPath); string href = string.Format("{0}/Q.html", btn_text); buttons += GetButton(btn_text, 200, 30, href); buttons += "<br />"; buttons += "\r\n"; } return(buttons); }
internal static int GetNumberOfMissedCards(string GroupPath) { return(Globals.GetPathOfEachMissedCard(GroupPath).Length); }