예제 #1
0
        /// <summary>
        /// 启动线程
        /// </summary>
        /// <param name="param">参数</param>
        private void createThread(object param)
        {
            FCScript indicator = CreateScript(FCHttpMonitor.MainMonitor.Script, m_native);

            indicator.callFunction(param.ToString());
            indicator.delete();
        }
예제 #2
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public virtual void delete()
 {
     if (!m_deleted)
     {
         if (m_script != null)
         {
             m_script.delete();
         }
         m_deleted = true;
     }
 }
예제 #3
0
 /// <summary>
 /// 删除指标
 /// </summary>
 /// <param name="id">指标ID</param>
 public static void deleteIndicatorExtern(int id)
 {
     if (m_indicators.ContainsKey(id))
     {
         FCScript indicator = m_indicators[id];
         m_indicators.Remove(id);
         indicator.clear();
         indicator.DataSource.delete();
         indicator.DataSource = null;
         indicator.delete();
     }
 }
예제 #4
0
        /// <summary>
        /// 检查脚本
        /// </summary>
        public void checkScript()
        {
            String newScript = "";

            FCFile.read(m_fileName, ref newScript);
            if (m_script != newScript)
            {
                Console.WriteLine("检测到脚本被修改...");
                m_script = newScript;
                lock (m_indicators) {
                    while (true)
                    {
                        try {
                            FCScript indicator = m_indicators.Pop();
                            indicator.delete();
                        }
                        catch {
                            break;
                        }
                    }
                }
            }
        }