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()); }
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"; } }
public static SQLTagDB Load() { return(IDisposableFactory.New <SQLTagDB>(new SQLTagDB())); //数据库连接惰性打开 }
public static IUriDB CreateUriDB() { Ins = IDisposableFactory.New <IUriDB>(new LuceneUriDB()); return(Ins); }
public RichTxtBox() { InitializeComponent(); IDisposableFactory.New <RichTxtBox>(this); }
//public static ITagDB CreateTagDB() //{ // Ins = IDisposableFactory.New<ITagDB>(new LuceneTagDB()); // return Ins; //} public static ITagDB CreateTagDB() { Ins = IDisposableFactory.New <ITagDB>(SQLTagDB.Load()); return(Ins); }
//public static ITagDB CreateTagDB() //{ // Ins = IDisposableFactory.New<ITagDB>(new LuceneTagDB()); // return Ins; //} public static ITagDB CreateTagDB() { return(IDisposableFactory.New <ITagDB>(new TagDBLogger(SQLTagDB.Load()))); }