Exemple #1
0
 public void setup()
 {
     UTestCfg.Ins.IsUTest = true;
     //if (!System.IO.Directory.Exists(Cfg.Ins.TagDB))
     //{
     //    System.IO.Directory.CreateDirectory(Cfg.Ins.TagDB);
     //}
     db = IDisposableFactory.New <SQLTagDB>(new SQLTagDB());
 }
Exemple #2
0
 public static ITagDB CreateTagDB(string t)
 {
     if (t.Contains("json"))
     {
         Ins = IDisposableFactory.New <ITagDB>(JsonTagDB.Load());
     }
     else if (t.Contains("sql"))
     {
         Ins = IDisposableFactory.New <ITagDB>(SQLTagDB.Load());
     }
     return(Ins);
 }
        private void InitialViews()
        {
            if (uriDB == null || tagDB == null)
            {
                TipsCenter.Ins.StartTime = "Before Init DBS ";
                //URI DB初始化
                Logger.I("InitializeComponent Finished!,init uridb");
                uriDB = UriDBFactory.CreateUriDB();
                uriDB.UriDBChanged      += UriDBChangedCallback;
                TipsCenter.Ins.StartTime = "UriDB Init";

                //TAG DB初始化
                Logger.I("InitializeComponent Finished!,init tagdb");
                tagDB = TagDBFactory.CreateTagDB();
                tagDB.TagDBChanged      += TagDBChanged;
                TipsCenter.Ins.StartTime = "TagDB Init";

                //查询输入框初始化
                SearchBox.textBox.TextChanged += SearchBoxTextChanged_Callback;
                SearchBox.SearchDataProvider   = tagDB;
                TipsCenter.Ins.StartTime       = "SearchBoxInit";

                //Tag视图初始化
                tagCanvas.InitDB(tagDB, uriDB);
                tagCanvas.SelectedTagChanged += SelectedTagChanged_Callback;
                TipsCenter.Ins.StartTime      = "tagCanvasInit";

                GUTag mroot = GUTag.Parse(DynamicCfg.Ins.MainCanvasRoot, tagDB);
                TipsCenter.Ins.StartTime = "mRoot";
                GUTag sroot = GUTag.Parse(DynamicCfg.Ins.SubCanvasRoot, tagDB);
                TipsCenter.Ins.StartTime = "sRoot";
                TipsCenter.Ins.StartTime = "MainWindow:64(before showtaggraph)";
                ShowTagGraph(mroot, sroot);
                TipsCenter.Ins.StartTime = "AfterShowTagGraph";
                IDisposableFactory.New <MainWindow>(this);

                richTxt.Focus();
                this.Title = "TagExplorer " + CfgPath.RootPath;
                TipsCenter.Ins.StartTime = "MainWindow:70";
            }
        }
Exemple #4
0
 public static SQLTagDB Load()
 {
     return(IDisposableFactory.New <SQLTagDB>(new SQLTagDB()));
     //数据库连接惰性打开
 }
Exemple #5
0
 public static IUriDB CreateUriDB()
 {
     Ins = IDisposableFactory.New <IUriDB>(new LuceneUriDB());
     return(Ins);
 }
Exemple #6
0
 public RichTxtBox()
 {
     InitializeComponent();
     IDisposableFactory.New <RichTxtBox>(this);
 }
Exemple #7
0
 //public static ITagDB CreateTagDB()
 //{
 //    Ins = IDisposableFactory.New<ITagDB>(new LuceneTagDB());
 //    return Ins;
 //}
 public static ITagDB CreateTagDB()
 {
     Ins = IDisposableFactory.New <ITagDB>(SQLTagDB.Load());
     return(Ins);
 }
Exemple #8
0
 //public static ITagDB CreateTagDB()
 //{
 //    Ins = IDisposableFactory.New<ITagDB>(new LuceneTagDB());
 //    return Ins;
 //}
 public static ITagDB CreateTagDB()
 {
     return(IDisposableFactory.New <ITagDB>(new TagDBLogger(SQLTagDB.Load())));
 }