/*
             * private void Cancel()
             * {
             *
             * }
             */

            private static HouseGenTemplate LoadTemplate(string path)
            {
                string filename = Path.GetFileNameWithoutExtension(path);

                var schematic = ClipboardBuffer.Load(path);

                //Template Loading
                string jsonValue = "";

                using (var sr = new StreamReader(new FileStream(Path.GetDirectoryName(path) + "\\" + filename + ".json", FileMode.Open, FileAccess.Read, FileShare.Read)))
                {
                    jsonValue = sr.ReadToEnd();
                }

                HouseGenTemplateData data = JsonConvert.DeserializeObject <HouseGenTemplateData>(jsonValue);

                return(new HouseGenTemplate(filename, schematic, data));
            }
 public HouseGenTemplate(string name, ClipboardBuffer schematic, HouseGenTemplateData template)
 {
     _schematic = schematic;
     _name      = name;
     _data      = template;
 }