protected LogTree LoadLogTree(Transform parent, DateTime date, string filename) { LogTree logTree = Instantiate(LogTreePrefab.gameObject, parent).GetComponent <LogTree>(); logTree.Initialize(this, new ActionManagerProxy(actionManager_), heapManager_); logTree.LoadLog(new FileInfo(filename), date); logTree.SubscribeKeyInput(); logTree.OnEdited += this.OnEdited; return(logTree); }
protected LogTree LoadLogTree(DateTime date, string filename) { DateUI dateUI = Instantiate(DateUIPrefab.gameObject, this.transform).GetComponent <DateUI>(); LogTree logTree = Instantiate(LogTreePrefab.gameObject, dateUI.transform).GetComponent <LogTree>(); dateUI.Set(date, ToColor(date)); dateUI.SetEnableAddDateButtton(File.Exists(ToFileName(treeNote_, date.AddDays(-1.0))) == false); logTree.Initialize(this, new ActionManagerProxy(actionManager_), heapManager_); logTree.LoadLog(new FileInfo(filename), date); logTree.SubscribeKeyInput(); logTree.OnEdited += this.OnEdited; logTrees_.Add(logTree); return(logTree); }