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); }
void PresentPendingCards(string CardGroupPath) { string[] paths = null; if (CardGroupPath == "[ALL]") { paths = Globals.GetPathOfEachPendingCard(); } else { paths = Globals.GetPathOfEachPendingCard(CardGroupPath); } var cards = Globals.GetListOfCards(paths); CtrlCardBrowser cb = new CtrlCardBrowser(); cb.Init(cards); wndMainWindow.PresentContent(cb); }
private static string GetButtonsForPendingCards(string CardGroup) { string buttons = ""; string[] pending_cards = Globals.GetPathOfEachPendingCard(CardGroup); if (pending_cards == null) { return(""); } var cards = Globals.GetListOfCards(pending_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 GetNumberOfPendingCards(string GroupPath) { return(Globals.GetPathOfEachPendingCard(GroupPath).Length); }
internal static int GetNumberOfPendingCards() { return(Globals.GetPathOfEachPendingCard().Length); }