public JsonResult bulkUsers(filename fnames) { //Thread thread = new Thread(WorkThreadFunction); if (fnames.Command1 == "Command1") { List <string> csvvalue = loadCsvFile(fnames.fname); cssrecords = csvvalue.Count; //ViewBag.Message = "Success"; thread.Start(fnames.fname); string FileName = ""; filename obj = new filename { records = cssrecords }; return(Json(obj, JsonRequestBehavior.AllowGet)); } else { thread.Abort(); // cssrecords = -1; filename obj = new filename { records = 0 }; return(Json(obj, JsonRequestBehavior.AllowGet)); } }
public JsonResult getcount() { filename obj = new filename { records = cssrecords, succesrcrds = successrcrd, failedrcrds = failedrcrd }; return(Json(obj, JsonRequestBehavior.AllowGet)); }
output = new StreamWriter(filename, append : false, new UTF8Encoding(encoderShouldEmitUTF8Identifier : false, throwOnInvalidBytes : true));
RequestImage(photos, asset, filename, options);
await WriteEntryAsync(filename, entry);
public TextureHandler(string filename, TEX classic, int palette = -1, Color[] colors = null) => Init(filename, classic, 1, 1, palette : palette, colors : colors);
// private int dummy; /**/ #if true//2019.08.21(UTF8対応) private Encoding enc = Encoding.Default; #endif public CSV() { this.bTabSep = false; clear(); //this.dict = new Dictionary<uint, string>(); //this.c_max = 0; //this.r_max = 0; //this.cnt = 0; } public CSV(bool bTabSep) { this.bTabSep = bTabSep; clear(); //this.dict = new Dictionary<uint, string>(); //this.c_max = 0; //this.r_max = 0; //this.cnt = 0; } #if true//2019.08.21(UTF8対応) public CSV(int code) { this.bTabSep = false; clear(); switch (code) { case 0: this.enc = new UTF8Encoding(false); break; case 1: this.enc = new UTF8Encoding(true); break; default: this.enc = Encoding.Default; break; } } #endif public void clear() { this.dict = new Dictionary <uint, string>(); this.c_max = 0; this.r_max = 0; this.cnt = 0; } public void set(int c, int r, string str) { uint key = (uint)((c << 16) | r); if (this.c_max < c) { this.c_max = c; } if (this.r_max < r) { this.r_max = r; } #if true if (str.IndexOf(',') >= 0) { str = "\"" + str + "\""; } if (!this.dict.ContainsKey(key)) { this.cnt++; } else { this.dict.Remove(key); } this.dict.Add(key, str); #else if (!this.dict.ContainsKey(key)) { this.cnt++; } if (str.IndexOf(',') >= 0) { str = "\"" + str + "\""; } this.dict.Add(key, str); #endif } public String get(int c, int r) { uint key = (uint)((c << 16) | r); if (!this.dict.ContainsKey(key)) { return(""); } return(this.dict[key]); } public void ToCsvText(out string str) { StringBuilder buf = new StringBuilder(); String sep; if (bTabSep) { sep = "\t"; } else { sep = ","; } for (int r = 0; r <= this.r_max; r++) { for (int c = 0; c <= this.c_max; c++) { if (c > 0) { buf.Append(sep); } buf.Append(get(c, r)); } buf.Append("\r\n"); } str = buf.ToString(); } public Boolean load(string filename) { StreamReader rd; String buf; String[] clms; char[] sep = { ',', '\t' }; bool rc = false; int r = 0; if (bTabSep) { sep = new char[] { '\t' }; } else { sep = new char[] { ',' }; } try { /* rd = new StreamReader(filename, Encoding.GetEncoding("Shift_JIS"));*/ rd = new StreamReader(filename, Encoding.Default);
=> CompileShader(filename, File.OpenText(filename), target, flags, entrypoint, encoding, new FileInfo(filename).DirectoryName !);
public TextureHandler(string filename, TEX classic, uint cols = 1, uint rows = 1, int pallet = -1) => Init(filename, classic, cols, rows, pallet);
return(ReadParseWal(filename, rawdata));
".tif" => new TiffBitmapDecoder(new Uri(filename, UriKind.RelativeOrAbsolute), BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default),
WritePngToFile(filename, image, new Rectangle(0, 0, size.Item1, size.Item2));
m_File = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.None);