bool tradeskins(string name) { // get skin files available string[] files = skinfiles(Environment.CurrentDirectory); // set status variable bool worked = true; try { // loop through every file foreach (string fn in files) { // if it's the skin we want to trade if (skinfromfile(fn) == name) { // get it along with it's persisted settings Response r = (Response)SkinImpl.DeskinFile(fn); // add it to trade list _reslist.Add(r); // show it to user _resnames.Items.Add(r.FullName); // mark it as loaded _resskinidx.Add(_reslist.Count - 1, name); // route symbols to it? // update status worked &= true; } } return(true); } catch (Exception) { } return(false); }
bool tradeskins(string name) { // get skin files available string[] files = skinfiles(SKINPATH); // set status variable bool worked = true; try { // loop through every file foreach (string fn in files) { // if it's the skin we want to trade if (skinfromfile(fn) == name) { // get it along with it's persisted settings Response r = (Response)SkinImpl.DeskinFile(SKINPATH + fn); // add it int id = addresponse(r); // check if it was added bool added = id != -1; // update status worked &= added; // mark it as loaded if (added) { _resskinidx.Add(id, name); } } } return(true); } catch (Exception) { } return(false); }
void loadskin(string fn) { // load skin SkinImpl skn = new SkinImpl(); bool ok = Util.FromFile <SkinImpl>(fn, ref skn, debug); // load tickfiles from skin foreach (string file in skn.TickFiles) { loadfile(file); } // load response myres = (Response)SkinImpl.DeskinFile(fn, debug); }