Пример #1
0
        public virtual void Save(OpenedFile file1, Stream stream)
        {
            if (!textEditorControl.CanSaveWithCurrentEncoding())
            {
                if (MessageService.AskQuestion("The file cannot be saved with the current encoding " +
                                               textEditorControl.Encoding.EncodingName + " without losing data." +
                                               "\nDo you want to save it using UTF-8 instead?"))
                {
                    textEditorControl.Encoding = System.Text.Encoding.UTF8;
                }
            }

            textEditorControl.SaveFile(stream);
        }