示例#1
0
		public PracticeWindow(List<PracticeItem> terms, PracticeMode whichMode) {
			InitializeComponent();

			mainMenu.Renderer = new ToolStripAeroRenderer(ToolbarTheme.MediaToolbar);

			if (terms.Count > 0) {
				queue = new PracticeQueue(terms);

				// TODO: Decided the default based on a setting.
				switch (whichMode) {
					case PracticeMode.Flashcards:
						SetMode(new FlashcardMode());
						break;

					case PracticeMode.Default:
					case PracticeMode.Learn:
					default:
						SetMode(new LearnMode());
						break;
				}
			}

			this.FormClosed += delegate {
				if (mode != null)
					mode.Stop();
			};

			components = components ?? new Container();
			if(mode != null)
				components.Add(new DisposableComponent(mode));
		}
示例#2
0
        public PracticeWindow(List <PracticeItem> terms, PracticeMode whichMode)
        {
            InitializeComponent();

            mainMenu.Renderer = new ToolStripAeroRenderer(ToolbarTheme.MediaToolbar);

            if (terms.Count > 0)
            {
                queue = new PracticeQueue(terms);

                // TODO: Decided the default based on a setting.
                switch (whichMode)
                {
                case PracticeMode.Flashcards:
                    SetMode(new FlashcardMode());
                    break;

                case PracticeMode.Default:
                case PracticeMode.Learn:
                default:
                    SetMode(new LearnMode());
                    break;
                }
            }

            this.FormClosed += delegate {
                if (mode != null)
                {
                    mode.Stop();
                }
            };

            components = components ?? new Container();
            if (mode != null)
            {
                components.Add(new DisposableComponent(mode));
            }
        }
示例#3
0
 private void practiceWeakPoints_Click(object sender, EventArgs e)
 {
     mode.Stop();
     queue = new PracticeQueue(DataStore.Database.GetSuggestedPracticeItems(GuiConfiguration.PracticeDefaultCount));
     SetMode(new LearnMode());
 }
示例#4
0
		private void practiceWeakPoints_Click(object sender, EventArgs e) {
			mode.Stop();
			queue = new PracticeQueue(DataStore.Database.GetSuggestedPracticeItems(GuiConfiguration.PracticeDefaultCount));
			SetMode(new LearnMode());
		}