protected override void Awake() { onEndEdit.AddListener(delegate { OnTextEdited(); }); //onValidateInput += delegate (string input, int charIndex, char addedChar) { return OnValidate(addedChar); }; underLine_ = GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); dateUI_ = GetComponentInParent <DateUI>(); }
public override void LoadMore() { DateTime date = endDate_; int loadCount = GameContext.Config.LogLoadUnit; while (loadCount > 0) { DateUI dateUI = Instantiate(DateUIPrefab.gameObject, this.transform).GetComponent <DateUI>(); dateUI.Set(date, ToColor(date)); dateUI.SetEnableAddDateButtton(false); dateUIlist_.Add(dateUI); Transform parent = dateUI.GetComponentInChildren <VerticalLayoutGroup>().transform; foreach (TreeNote treeNote in GameContext.Window.MainTabGroup.TreeNotes) { LogTitleText titleText = Instantiate(TitleTextPrefab.gameObject, dateUI.GetComponentInChildren <VerticalLayoutGroup>().transform).GetComponent <LogTitleText>(); titleTextlist_.Add(titleText); string filename = ToFileName(treeNote, date); LogTree logTree = null; if (File.Exists(filename)) { logTree = LoadLogTree(parent, date, filename); logTrees_.Add(logTree); } titleText.Intialize(this, filename, logTree, treeNote.Tree.TitleText); } date = date.AddDays(-1.0); --loadCount; } endDate_ = date; UpdateLayoutElement(); }
private void Update() { if (Input.GetKeyDown(KeyCode.R)) { SceneManager.LoadScene(0); DateUI.Destroy(); } }
public static void Destroy() { if (!singleton) { return; } Destroy(singleton.gameObject); singleton = null; }
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); }
private void Initialize() { this.Mon = new DateUI(); this.Tue = new DateUI(); this.Wed = new DateUI(); this.Thu = new DateUI(); this.Fri = new DateUI(); this.Sat = new DateUI(); this.Sun = new DateUI(); this.days = new Dictionary <DayOfWeek, DateUI>() { { DayOfWeek.Monday, this.Mon }, { DayOfWeek.Tuesday, this.Tue }, { DayOfWeek.Wednesday, this.Wed }, { DayOfWeek.Thursday, this.Thu }, { DayOfWeek.Friday, this.Fri }, { DayOfWeek.Saturday, this.Sat }, { DayOfWeek.Sunday, this.Sun }, }; this.DayClickedCommand = new Command(this.OnDayClicked); }
void Start() { singleton = this; DontDestroyOnLoad(gameObject); }
private void OnEnable() { DateUI.SetDate(date); }