コード例 #1
0
    public override void OnTabSelected()
    {
        base.OnTabSelected();

        SubscribeKeyInput();

        GameContext.Window.LogTabButton.OwnerNote = null;

        List <string> filepathList = new List <string>(EditedLogTreeDict.Keys);

        foreach (string filepath in filepathList)
        {
            string  filename = Path.GetFileName(filepath);
            LogTree logTree  = logTrees_.Find((LogTree lt) => lt.File.Name == filename);
            if (logTree != null)
            {
                logTree.ReloadFile();
                EditedLogTreeDict.Remove(logTree.File.FullName);
            }
            else
            {
                LogTitleText titleText = titleTextlist_.Find((LogTitleText tt) => tt.name == filename);
                if (titleText != null)
                {
                    logTree = InsertLogTree(titleText, titleText.GetComponentInParent <DateUI>().Date, filepath);
                    titleText.OnLoad(logTree);
                    EditedLogTreeDict.Remove(titleText.FilePath);
                }
            }
        }
    }
コード例 #2
0
    public void OnTreeNoteSelected()
    {
        scrollRect_.verticalScrollbar.value = targetScrollValue_;
        LogTabButton.Text = TitleText;

        foreach (LogTree logTree in logTrees_)
        {
            if (EditedLogTreeDict.ContainsKey(logTree.File.FullName))
            {
                logTree.ReloadFile();
                EditedLogTreeDict.Remove(logTree.File.FullName);
            }
        }
    }