Ejemplo n.º 1
0
 private void SetupTemplateInformationView()
 {
     templateInformationViewModel      = new TemplateInformationViewModel(collection.Models, false);
     templateInformationView.ViewModel = templateInformationViewModel;
     templateInformationView.ChangeSelectedItem(0);
     templateInformationView.ComboBoxSelectionChangedEvent += ComboBoxSelectionChangedEventHandler;
     templateInformationView.SaveEvent       += (s, e) => { mainPage.SaveAndStartNewDatabaseSessionAsync(); };
     templateInformationView.FlipButtonClick += FlipTemplateButtonClickHandler;
 }
Ejemplo n.º 2
0
        private void UpdateModelInformation()
        {
            templateViewModel           = new TemplateInformationViewModel(collection.Models, false);
            currentModel                = collection.Models.GetCurrent(false);
            fieldsViewModel             = new NoteFieldsViewModel(currentModel);
            fieldListView.DataContext   = fieldsViewModel.Fields;
            totalNoteTextBlock.Text     = collection.Models.NoteUseCount(currentModel).ToString();
            totalTemplatsTextBlock.Text = templateViewModel.Templates.Count.ToString();
            var type = (ModelType)JsonHelper.GetNameNumber(currentModel, "type");

            if (type == ModelType.CLOZE)
            {
                changeModelType.Text = CHANGE_TO_STD;
            }
            else
            {
                changeModelType.Text = CHANGE_TO_CLOZE;
            }
        }