private void CreateGenerator() { String vocabulary = Path.Combine(FileUtils.VocabulariesFolder, "German-Russian.lsv"); String profile = Path.Combine(FileUtils.ProfilesFolder, "Andrey.lsp"); _generator = new FlashCardsGenerator(vocabulary, profile); }
public FlashCardsWnd(IFlashCardsGenerator generator, int sleep) { Debug.Assert(generator != null); _generator = generator; InitializeComponent(); listAnswers.MouseDoubleClick += new MouseButtonEventHandler(listAnswers_MouseDoubleClick); _timerSleep = new DispatcherTimer(); _timerSleep.IsEnabled = false; _timerSleep.Interval = new TimeSpan(0, sleep, 0); _timerSleep.Tick += new EventHandler(OnTimerSleepTick); _timerSafeFreeze = new DispatcherTimer(); _timerSafeFreeze.IsEnabled = false; _timerSafeFreeze.Interval = new TimeSpan(0, 0, 0, 0, 500); _timerSafeFreeze.Tick += new EventHandler(OnTimerSafeFreezeTick); _notifyIcon = new System.Windows.Forms.NotifyIcon(); _notifyIcon.Icon = LinguaSpace.Words.Properties.Resources.LinguaSpace; _notifyIcon.Click += new EventHandler(OnNotifyIconClick); Closed += new EventHandler(OnClosed); Loaded += new RoutedEventHandler(OnLoaded); IsVisibleChanged += new DependencyPropertyChangedEventHandler(OnIsVisibleChanged); }