private void OnLoadText(TabInfo tabInfo)
        {
            if (tabInfo.Guid != _fileGuid || _textEditor == null)
            {
                return;
            }

            Reset(() =>
            {
                IsReadOnly   = tabInfo.IsReadOnly;
                IsShowEditor = tabInfo.IsShowEditor;

                _fileGuid        = tabInfo.Guid;
                _textEditor.Text = tabInfo.FileContent;
            });

            if (IsSelected)
            {
                CompileCommand.RaiseCanExecuteChanged();
                RedoCommand.RaiseCanExecuteChanged();
                UndoCommand.RaiseCanExecuteChanged();

                _textEditor.Focus();
                CaretPosChanged();

                if (AutoCompile || IsReadOnly)
                {
                    Compile(tabInfo.FileContent);
                }
            }
        }
        private void OnIsActiveChanged()
        {
            SaveCommand.RaiseCanExecuteChanged();

            CompileCommand.IsActive = IsActive;
            CompileCommand.RaiseCanExecuteChanged();

            RedoCommand.IsActive = IsActive;
            RedoCommand.RaiseCanExecuteChanged();

            UndoCommand.IsActive = IsActive;
            UndoCommand.RaiseCanExecuteChanged();

            IsActiveChanged?.Invoke(this, new EventArgs());
        }