예제 #1
0
        public void SetState(CodeSnippet snippet)
        {
            _supressTextChanged = true;

            _StateSnippet         = snippet;
            _mainform.tbPath.Text = snippet.GetPath();
            _mainform.rtfEditor.ClearUndo();
            _mainform.rtfEditor.ResetText();

            _mainform.rtfEditor.OwnTheme = snippet.RTFOwnTheme;
            if (_mainform.rtfEditor.OwnTheme)
            {
                _mainform.rtfEditor.SetOwnTheme(snippet.RTFTheme);
            }
            else
            {
                _mainform.rtfEditor.Theme = Config.Theme;
            }

            _mainform.rtfEditor.Rtf = snippet.GetRTF();

            _mainform.rtfEditor.Zoom = Config.Zoom;

            _supressTextChanged = false;
        }