Beispiel #1
0
		private void DoIncZ_Callback( MoleInfo info )
		{
			info.From.Z++;
			info.Count++;
			if ( info.Count > 9 )
				info.From.EndAction( typeof( MoleHide ) );
		}
Beispiel #2
0
 /// <summary>
 /// 清空加载的所有数据,包括分子结构信息和基团定义信息
 /// </summary>
 public void Clear()
 {
     _molecule        = null;
     SplitEnd         = null;
     _recognizerList  = null;
     DefinedFragment  = null;
     UndefineFragment = null;
 }
Beispiel #3
0
 private void DoIncZ_Callback(MoleInfo info)
 {
     info._from.Z++;
     info._count++;
     if (info._count > 9)
     {
         OnEndHideEffects(info._from);
     }
 }
Beispiel #4
0
 private void DoIncZ_Callback(MoleInfo info)
 {
     info.From.Z++;
     info.Count++;
     if (info.Count > 9)
     {
         info.From.EndAction(typeof(MoleHide));
     }
 }
Beispiel #5
0
 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);
     }
 }
Beispiel #6
0
        // ------------------------------------------------------------------------------------

        /// <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());
            }
        }
Beispiel #7
0
 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;
     }
 }
Beispiel #8
0
		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;
			}
		}
Beispiel #9
0
        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);
        }