Example #1
0
 void BackToDo(object sender, DoWorkEventArgs e)
 {
     try
     {
         LoggerQuickHelp.WriteLog("异步线程调用", "Calculate");
         while (true)
         {
             CallDo();
             System.Threading.Thread.Sleep(300);
         }
     }
     catch (Exception ex)
     {
         LoggerQuickHelp.WriteLog(ex.ToString(), "Exception");
     }
 }
Example #2
0
        static void Main(string[] args)
        {
            string format =
                @"<Content Include={0}> 
    <CopyToOutputDirectory>PreserveNewest </CopyToOutputDirectory >
</Content > ";
            string        dir   = @"E:\Code\CodeDev\UI.GitCore\DevCore\MammoDev\XPect.UI\XP.UI.Startup\Resource\Image";
            string        rep   = @"E:\Code\CodeDev\UI.GitCore\DevCore\MammoDev\XPect.UI\XP.UI.Startup\";
            List <string> files = FindFiles(dir, true);
            StringBuilder sb    = new StringBuilder();

            foreach (var item in files)
            {
                string f  = item.Replace(rep, string.Empty);
                string ft = string.Format(format, "\"" + f + "\"");
                sb.AppendLine(ft);
            }
            LoggerQuickHelp.WriteLog(sb.ToString(), string.Empty);
            Console.ReadLine();
        }
Example #3
0
 void CallDo()
 {
     LoggerQuickHelp.WriteLog("异步线程调用execute =" + cur, "Calculate");
     cur++;
 }