Ejemplo n.º 1
0
 protected override void BuildLanguageBlockCollection()
 {
     LanguageBlocks.Clear();
     foreach (var artifact in EditorTree.RootNode.Tree.ArtifactCollection.OfType <CodeLineArtifact>())
     {
         var contentType = contentTypeRegistry.FromFriendlyName(artifact.BlockInfo.Language).ToEmbeddableContentType();
         if (contentType != null)
         {
             LanguageBlocks.AddBlock(new ArtifactLanguageBlock(artifact, contentType));
         }
     }
     LanguageBlocks.SortByPosition();
 }
        private void SwitchLang()
        {
            var indx = LanguageBlocks.FindIndex(x => x.Name == CurrentLayout.Name);

            CurrentLayout = indx == LanguageBlocks.Count - 1 ? LanguageBlocks[0] : LanguageBlocks[indx + 1];
        }