public void setup() { //if (!System.IO.Directory.Exists(Cfg.Ins.TagDB)) //{ // System.IO.Directory.CreateDirectory(Cfg.Ins.TagDB); //} db = UriDBFactory.CreateUriDB(); }
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"; } }