private void FormMain_Load(object sender, EventArgs e) { // start the encryption thread pool to speed up the analyzer - this is also the first access to the native // "TrueCrypt.dll" and therefore an exception may occur when the library cannot be loaded try { TrueCrypt.EncryptionThreadPoolStart(Environment.ProcessorCount); } catch (Exception ex) { if (ex is DllNotFoundException || ex is EntryPointNotFoundException) { MessageBox.Show(this, PageContext.GetInstance().GetResourceString("LoadTrueCryptDllFailed"), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Stop); silentExit = true; Close(); return; } throw; } // try to open the TestCrypt driver just to test whether the driver can be opened try { TrueCrypt.OpenDriver(); } catch (TrueCrypt.TrueCryptException ex) { // the TestCrypt driver could not be opened - most probably this is caused by a 64-bit operating system // which requires digitally signed drivers string msg; switch (ex.Cause) { case TrueCrypt.TrueCryptException.ExceptionCause.DriverLoadFailed: // check whether loading the driver failed due to the missing digital driver signature if (((uint)ex.ErrorCode == 0x80004005) && Wow.Is64BitOperatingSystem && Wow.IsOSAtLeast(Wow.OSVersion.WIN_VISTA)) { // missing digital driver signature notifyIcon.BalloonTipClicked += notifyIcon_BalloonTipClicked; notifyIcon.BalloonTipTitle = PageContext.GetInstance().GetResourceString("LoadTestCryptDriverFailedTitle"); notifyIcon.BalloonTipText = PageContext.GetInstance().GetResourceString("DriverSignatureEnforcement"); notifyIcon.ShowBalloonTip(30000); } else { // another error has occurred msg = string.Format(PageContext.GetInstance().GetResourceString("LoadTestCryptDriverFailed"), ex.ErrorCode, ex.Message); MessageBox.Show(this, msg, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); } break; case TrueCrypt.TrueCryptException.ExceptionCause.DriverOpenFailed: default: msg = string.Format(PageContext.GetInstance().GetResourceString("OpenTestCryptDriverFailed"), ex.ErrorCode, ex.Message); MessageBox.Show(this, msg, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; } } }
//zz扔剑刺火鸟和伙伴们惊呼! public void ZZandfriends(ref Firebird firebird, ref Sword sword, ref Wow wow) { if (firebird.HP < 1150) { zzTime += Time.deltaTime; sword.image.rectTransform.position += new Vector3(Time.deltaTime * sword.speed, Time.deltaTime * sword.speed, 0.0f); } if (zzTime > 5.0f) { zzTime += Time.deltaTime; sword.image.color = new Color(1, 1, 1, 0.0f); wow.image.color = new Color(1, 1, 1, 1.0f); Wscreenfade(ref wscreen); } }
void Start() { orochi = new Orochi() { Attack = 10, HP = 1500, Cridamage = 20 }; firebird = new Firebird() { Attack = 15, HP = 1200, Cridamage = 45 }; poison = new Poison() { image = imgpoison, speed = 100.0f }; fire = new Fire() { image = imgfire, speed = 100.0f }; posionAD = new PosionAD() { image = imgposionAD }; posionCD = new PosionCD() { image = imgpoisonCD }; fireAD = new FireAD() { image = imgfireAD }; fireCD = new FireCD() { image = imgfireCD }; sword = new Sword() { image = imgsword, speed = 60.0f }; wow = new Wow() { image = imgwow }; wscreen = new Wscreen() { image = imgwscreen, speed = 1.0f }; }
public void UpdateWowCharName(string username, string charname) { int id = GetUserID(username); Wow wow = new Wow() { UserID = id, Realm = GetUserWoWRealm(id), WowCharName = charname }; if (UserExistsInWoWTable(id)) { connection.Update(wow, typeof(Wow)); } else { connection.Insert(wow, typeof(Wow)); } }
public void UpdateWowRealm(string username, string realm) { int id = GetUserID(username); Wow wow = new Wow() { Realm = realm, UserID = id, WowCharName = GetWoWCharName(id) }; if (UserExistsInWoWTable(id)) { connection.Update(wow, typeof(Wow)); } else { connection.Insert(wow, typeof(Wow)); } }
public void UpdateWoWObject(Wow.ObjectBase obj) { if (EventUpdateWoWObject != null) { EventUpdateWoWObject(obj); } }
public void Init(Wow.WowPlayer iPlayer) { player = iPlayer; }
/// <summary> /// Attache BM à un processus /// </summary> /// <param name="processId"></param> public static void AttachToProcess(int processId) { Wow.OpenProcessAndThread(processId); }