Ejemplo n.º 1
0
        // create the resources file in the desired path
        public static void CreateXamlRes(string path, bool openInEditor)
        {
            StringsXMLEditor.CreateDocument(path);
            VsUtils.AddFileIfUnexisting(VsUtils.GetCurrentProject(), path);
            Ensurer.EnsureAppXaml();

            if (openInEditor)
            {
                VsUtils.OpenInEditor(path);
            }

            Ensurer.EnsureEverything();
        }
Ejemplo n.º 2
0
        // ensure the strings.xml file exists
        public static void EnsureStringResources(Project project = null)
        {
            if (project == null)
            {
                project = VsUtils.GetCurrentProject();
            }
            var resFile = Resourcer.GetResourcePath(Resourcer.GetStringsResName());

            if (!File.Exists(resFile)) // if the file doesn't exist, create it
            {
                StringsXMLEditor.CreateDocument(resFile);
            }

            VsUtils.AddFileIfUnexisting(VsUtils.GetCurrentProject(), resFile);
        }