private void Cancel() { if (SelectedLayoutGroup != null) { SelectedLayoutGroup.CancelEdit(); } if (SelectedLayout != null) { SelectedLayout.CancelEdit(); } AppMode = _prevAppMode; }
private void OnSave() { try { SelectedLayout.Set(TempLayout); Layout.SaveLayouts(Layouts); } catch { //Throw message - tbi } }
private void EditItem() { switch (AppMode) { case AppModes.ViewLayoutGroup: SelectedLayoutGroup.BeginEdit(); AppMode = AppModes.EditLayoutGroup; break; case AppModes.ViewLayout: SelectedLayout.BeginEdit(); AppMode = AppModes.EditLayout; break; } }
private void SelectMode(FlashCardMode mode, bool initializeLayout) { //Select Mode. Both vocabulary and spelling are using same layout if (SelectedLayout != null) { SelectedLayout.Close(); } Mode = mode; SelectedLayout = (mode == FlashCardMode.Match) ? (IFlashCardLayout) new Layout_02(this) : new Layout_01(this); OnLayoutChanged(); if (initializeLayout) { SelectedLayout.InitializeControls(); } }
private void SaveItem() { switch (AppMode) { case AppModes.AddLayoutGroup: case AppModes.EditLayoutGroup: SelectedLayoutGroup.EndEdit(); SaveLayoutGroup(); break; case AppModes.AddLayout: case AppModes.EditLayout: SelectedLayout.EndEdit(); SaveLayout(); break; } SaveConfiguration(); }
private void ReleaseManagedResources() { SaveSettings(); //Release managed resources foreach (NAudioPlayerWrapper ptrPlayer in Characters.Values) { ptrPlayer.Dispose(); } Characters.Clear(); Cards.Dispose(); Cards = null; OptionDialog.Dispose(); OptionDialog = null; if (SelectedLayout != null) { SelectedLayout.Close(); SelectedLayout = null; } }