コード例 #1
0
        }         // public void open(string filename) { // open file //stor.open(filename);

        public static VFileStorage openStorage4Read(string foldername, string filename)
        {
            //log("openStorage4Read, ...");
            var res = new VFileStorage(null);

            res.setFolder(foldername);
            res.open(filename);
            return(res);
        }                                                                                // public static VFileStorage openStorage4Read(string foldername, string filename)
コード例 #2
0
        }                                             // internal void restoreMap(string filename)

        private string readMapConfig(string filename) //invoke from restoreMap method: string cfg = readMapConfig(filename); // from VFileStorage
        // return json string from save
        {
            var stor = new VFileStorage(log);

            stor.open(filename);
            string cfg = stor.read();

            log(string.Format("VRestore.readMapConfig, cfg [{0}]", cfg));
            return(cfg);
            //throw new Exception("VRestore.readMapConfig, not yet");
        }
コード例 #3
0
        internal void deleteMap(string filename)
        {
            var stor = new VFileStorage(log);

            stor.open(filename);
            string cfg = stor.read();

            log(string.Format("VRestore.deleteMap, fname [{0}], content [{1}]", filename, cfg));
            stor.delete(filename);
            return;

            //restoreWnd.listBox1.Items.Clear();
            //var saves = getSavesList();
            //foreach(string fn in saves) {
            //restoreWnd.listBox1.Items.Add(fn);
            //}
        }                                         // internal void deleteMap(string filename)