Variable.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. 
  2. using ApiProcessToken.Models.common;
  3. using CommonObj.common;
  4. using CommonObj.model;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Reflection;
  11. using System.Security.Policy;
  12. using System.Threading.Tasks;
  13. using System.Xml;
  14. namespace ApiProcess.Process
  15. {
  16. public class Variable
  17. {
  18. static readonly log4net.ILog logger = log4net.LogManager.GetLogger(typeof(Variable));
  19. public static ProcessUpdateDb _threadLoadData;
  20. public static Queue chargerObj;
  21. public static void LoadConfigData()
  22. {
  23. try
  24. {
  25. chargerObj = new Queue();
  26. _threadLoadData = new ProcessUpdateDb();
  27. string sName = "ProcessReload Stard: " + Guid.NewGuid().ToString();
  28. _threadLoadData.Start(sName);
  29. }
  30. catch (Exception ex)
  31. {
  32. }
  33. }
  34. public static void WriteLineAppendTextFile(string sFileName, string sLine)
  35. {
  36. try
  37. {
  38. StreamWriter sw = null;
  39. if (File.Exists(sFileName))
  40. sw = File.AppendText(sFileName);
  41. else
  42. sw = File.CreateText(sFileName);
  43. sw.WriteLine(sLine);
  44. sw.Close();
  45. }
  46. catch
  47. {
  48. //MessageBox.Show(ex1.Message);
  49. }
  50. }
  51. }
  52. }