Exemple #1
0
 private void Opening()
 {
     if (FileSpecificationsPageState.SelectedFileSpecification != null)
     {
         _editorManager.SetValue(FileSpecificationsPageState.SelectedFileSpecification.Content);
         _editorManager.MoveCursorToPosition(FileSpecificationsPageState.CursorPosition);
         _editorManager.Focus();
         StateHasChanged();
     }
 }
Exemple #2
0
        private void Opening()
        {
            if (_frameworkVersion != InputDefinitionFile10.VERSION && _frameworkVersion != InputDefinitionFile20.VERSION)
            {
                return;
            }

            _editorManager = EditorManager.CreateJsonEditor(JS, "editor", true);
            if (_frameworkVersion == InputDefinitionFile10.VERSION)
            {
                _parsedDataAndSpec10 = LoadedFilePageState.ParsedDataAndSpec10;
                _editorManager.SetValue(_parsedDataAndSpec10.ParsedData.ToJson());
            }

            if (_frameworkVersion == InputDefinitionFile20.VERSION)
            {
                _parsedDataAndSpec20 = LoadedFilePageState.ParsedDataAndSpec20;
                _editorManager.SetValue(_parsedDataAndSpec20.ParsedData.ToJson());
            }

            if (LoadedFileJsonPageState.CursorPosition != null)
            {
                _editorManager.MoveCursorToPosition(LoadedFileJsonPageState.CursorPosition);
            }

            _editorManager.Focus();
            StateHasChanged();
        }
Exemple #3
0
        private void Opening()
        {
            if (_parsedData == null)
            {
                return;
            }

            _editorManager = EditorManager.CreateJsonEditor(JS, "editor", true);

            var groups = GroupHelper.BuildRowGroups(_parsedData.DecodedDataRows, _inputDefinitionFile.Datas);

            _editorManager.SetValue(groups.ToJson());

            if (LoadedFileGroupJsonPageState.CursorPosition != null)
            {
                _editorManager.MoveCursorToPosition(LoadedFileGroupJsonPageState.CursorPosition);
            }

            _editorManager.Focus();
            StateHasChanged();
        }