October 16, 20196 yr [E] 21:59:55 - Quester.Bot > Pulse(): System.IO.IOException: Процесс не может получить доступ к файлу "D:\BOTs\WRobot 3.3.5\Profiles\Quester\Cache\A.xml.cs", так как этот файл используется другим процессом. в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) в System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) в System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) в System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) в System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) в System.IO.File.WriteAllText(String path, String contents) в Quester.Bot.Bot.Pulse(Boolean loadSettingsProfile, String profile) 21:59:55 - [Quester] Failed to start After use the thread: Thread startStop = new Thread(() => { robotManager.Products.Products.ProductStop(); Thread.Sleep(1000); robotManager.Products.Products.ProductStart(); }); startStop.Start(); Thread.Sleep(3000); startStop.Abort();
October 17, 20196 yr put abort beetween try/catch try { startStop.Abort(); } catch { } or don't use it
Create an account or sign in to comment