Example #1
0
        void SetTitleEvent()
        {
            if (controller == null)
            {
                return;
            }

            string newTitle;

            if (controller.IsNewDocument && controller is FileDocumentController fileController)
            {
                if (myUntitledTitle == null)
                {
                    myUntitledTitle = workbench.GetUniqueTabName(fileController.FilePath);
                }
                newTitle = myUntitledTitle;
            }
            else
            {
                newTitle = controller.DocumentTitle;
            }

            if (newTitle != Title)
            {
                Title = newTitle;
            }
        }