Esempio n. 1
0
        public virtual void CreateTool()
        {
            foreach (var result in Results.ToArray())
            {
                AddIntermediateResults(result);
            }
            Results = Sort(Results);
            var macro = MacroSerializer.WriteMacroToString(Inputs, Results);

            UserDefinedTool.AddFromString(macro);
        }
Esempio n. 2
0
        public static void LoadAllTools()
        {
            var storage = IsolatedStorageFile.GetUserStoreForApplication();

            if (!storage.DirectoryExists("Macros"))
            {
                storage.CreateDirectory("Macros");
            }
            var names = storage.GetFileNames(wildcard);

            foreach (var name in names)
            {
                using (var reader = new StreamReader(storage.OpenFile(@"Macros\" + name, FileMode.Open)))
                {
                    string tool = reader.ReadToEnd();
                    UserDefinedTool.AddFromString(tool);
                }
            }
        }