Example #1
0
        static void InitForBusinessLogic()
        {
            //如果数据库文件不存在,则建立数据库文件
            PornDatabase.CreateDatabase();
            PornClassifier.Init();
            FFMPEGWrapper.Init();
            WechatForm.Init();

            update_domain_list_timer = new System.Threading.Timer(PornDatabase.UpdateDatabase, null, new TimeSpan(0, 0, 5), new TimeSpan(4, 0, 0));
            delete_history_timer     = new System.Threading.Timer(PornDatabase.DeleteHistroy, null, new TimeSpan(0, 1, 0), System.Threading.Timeout.InfiniteTimeSpan);
        }
Example #2
0
 public static void Init()
 {
     InitLib();
     instance = new PornClassifier(Properties.Settings.Default.modelFile);
 }