如何在外部编辑器中修改已打开的文件时显示警告消息 [英] How to show warning message when an already opened file ismodified in external editor

查看:127
本文介绍了如何在外部编辑器中修改已打开的文件时显示警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个文本编辑器应用程序可以打开XML文件进行编辑。


现在文件很简单打开后,我在外部编辑器(记事本或wordpad)中打开了相同的文件并将其保存。


在这种情况下,如何向XML编辑器发出警告消息,通知文件已在外部编辑器中查找以及如何接受或拒绝该更改?


我正在使用C#.NET


谢谢,

-Anupam

Hi All,

I have one text editor application which can open XML files for editing.

Now when a file is aleady opened, i have opened the same file in an external editor(notepad or wordpad) and saved it.

In this scenario, how to throw a warning message to the XML editor, notifying that file has been chaged in an external editor and how to accept or reject that change?

I am using C# .NET

Thanks,
-Anupam

推荐答案

hi

使用以下代码帮助您解决问题

hi
by using following code help you to solve problem

展开 | 选择 | Wrap | 行号



hi

使用以下代码帮助您解决问题

hi
by using following code help you to solve problem

展开 | 选择 | Wrap | 行号


我认为有一个可用于此的FileSystemWatcher?

I think there is a FileSystemWatcher that can be used for this?

展开 | 选择 | Wrap | 行号


这篇关于如何在外部编辑器中修改已打开的文件时显示警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆