private void DoIncZ_Callback( MoleInfo info ) { info.From.Z++; info.Count++; if ( info.Count > 9 ) info.From.EndAction( typeof( MoleHide ) ); }
/// <summary> /// 清空加载的所有数据,包括分子结构信息和基团定义信息 /// </summary> public void Clear() { _molecule = null; SplitEnd = null; _recognizerList = null; DefinedFragment = null; UndefineFragment = null; }
private void DoIncZ_Callback(MoleInfo info) { info._from.Z++; info._count++; if (info._count > 9) { OnEndHideEffects(info._from); } }
private void DoIncZ_Callback(MoleInfo info) { info.From.Z++; info.Count++; if (info.Count > 9) { info.From.EndAction(typeof(MoleHide)); } }
private void DoDecZ_Callback(MoleInfo info) { info._from.Z--; info._count++; if (info._count > 9) { info._from.Hidden = true; info._from.Z += 10; OnEndHideEffects(info._from); } }
// ------------------------------------------------------------------------------------ /// <summary> /// 加载mol文件 /// </summary> /// <param name="filePath"></param> public void LoadMolFile(string filePath) { if (!(File.Exists(filePath) && new Regex(".mol$").IsMatch(filePath))) { return; } using (var sr = new StreamReader(filePath)) { _molecule = new MoleInfo(sr.ReadToEnd()); } }
private void DoDecZ_Callback(MoleInfo info) { info.From.Z++; info.Count++; if (info.Count > 9) { info.From.EndAction(typeof(MoleHide)); info.From.Hidden = true; info.From.Z += 10; } }
private void DoDecZ_Callback( MoleInfo info ) { info.From.Z++; info.Count++; if ( info.Count > 9 ) { info.From.EndAction( typeof( MoleHide ) ); info.From.Hidden = true; info.From.Z += 10; } }
public override void HideEffects(Mobile from) { Action callback; var moleInfo = new MoleInfo(from); if (from.Hidden) { from.Z -= 10; from.Hidden = false; callback = () => DoIncZ_Callback(moleInfo); } else { callback = () => DoDecZ_Callback(moleInfo); } Timer.StartTimer(TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(100), 10, callback); from.PlaySound(0x244); }