private static void CreateControls(CanvasDocument app, IList <string> paFiles, Dictionary <string, ControlTemplate> templateDefaults, ErrorContainer errors) { foreach (var file in paFiles) { var fileEntry = new DirectoryReader.Entry(file); AddControl(app, file, false, fileEntry.GetContents(), errors); } }
// For backwards compat purposes. We may not have the new model for the // editor state file if the app was unpacked prior to these changes. // In this case, revert back to the using previous functionality. // // When SourceSerializer is updated past v24, this could be removed entirely. private static void ApplyV24BackCompat(ControlTreeState editorState, DirectoryReader.Entry file) { editorState.ControlStates = file.ToObject <Dictionary <string, ControlState> >(); editorState.TopParentName = Utilities.UnEscapeFilename(file._relativeName.Replace(".editorstate.json", "")); }