コード例 #1
0
ファイル: ParserDesign.cs プロジェクト: dlebansais/Wrist
        private ResourceDictionary LoadResourceFile(IParsingSourceStream sourceStream, List <string> FileNames)
        {
            Windows.UI.Xaml.ResourceDictionary Root;

            try
            {
                Root = (Windows.UI.Xaml.ResourceDictionary)sourceStream.LoadXaml();
            }
            catch (ParsingException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new ParsingException(90, sourceStream, e);
            }

            ResourceDictionary WrappedDictionary = new ResourceDictionary();

            AddDictionaryContent(sourceStream, WrappedDictionary, Root, FileNames);

            return(WrappedDictionary);
        }
コード例 #2
0
        private ILayout Parse(string fileName, IParsingSourceStream sourceStream)
        {
            Layout Root;

            try
            {
                Root = (Layout)sourceStream.LoadXaml();

                string Name     = Path.GetFileNameWithoutExtension(fileName);
                string XamlName = ParserDomain.ToXamlName(sourceStream, Name, "Layout");

                Root.SetName(Name, XamlName, fileName);
            }
            catch (ParsingException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new ParsingException(93, sourceStream, e);
            }

            return(Root);
        }