本文整理汇总了C#中System.IO.RenamedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RenamedEventArgs类的具体用法?C# RenamedEventArgs怎么用?C# RenamedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenamedEventArgs类属于System.IO命名空间,在下文中一共展示了RenamedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRenamed
private void OnRenamed(object source, RenamedEventArgs e)
{
// Specify what is done when a file is renamed.
mainForm.addFileChange("File: " + e.OldFullPath + " renamed to " + e.FullPath);
FileEvent fe = new FileEvent(++eventnum, e.ChangeType, e.FullPath, e.OldFullPath);
proc.addevent(ref fe);
}
示例2: ProxyRename
private void ProxyRename(object sender, RenamedEventArgs e)
{
if (e.Name.ToLowerInvariant() == _localFileName)
{
Reparse();
}
}
示例3: fsWather_Renamed
private void fsWather_Renamed(object sender, RenamedEventArgs e)
{
if (Renamed != null)
{
Renamed(this, e);
}
}
示例4: FileSystemWatcher_Renamed
void FileSystemWatcher_Renamed(object sender, RenamedEventArgs e)
{
ListViewItem lvi = GetListViewItem(e.OldFullPath);
if(lvi != null)
ListViewItemCreator.SetListViewItemValues(lvi, GetFileSystemInfo(e.FullPath), this.exRepListView);
}
示例5: OnRenamed
private void OnRenamed(object source, RenamedEventArgs e)
{
int index = MakeReserve();
writeLog(e.FullPath + " " + e.ChangeType + " <" + index + ">");
Console.WriteLine("File: {0} renamed to {1}", e.OldFullPath, e.FullPath);
}
示例6: Watcher_Renamed
private void Watcher_Renamed(object sender, RenamedEventArgs e)
{
var delete = new FileSystemEventArgs(WatcherChangeTypes.Deleted, Path.GetDirectoryName(e.OldFullPath), Path.GetFileName(e.OldName));
var create = new FileSystemEventArgs(WatcherChangeTypes.Created, Path.GetDirectoryName(e.FullPath), Path.GetFileName(e.Name));
queue.Enqueue(delete);
queue.Enqueue(create);
}
示例7: Renamed
private async void Renamed(RenamedEventArgs renamedEventArgument, Func<string, bool, Task> updateBundle)
{
using (await rwLock.ReadLockAsync())
{
if (!_watchedFiles.ContainsKey(renamedEventArgument.OldFullPath) ||
!renamedEventArgument.FullPath.StartsWith(ProjectHelpers.GetSolutionFolderPath(), StringComparison.OrdinalIgnoreCase))
return;
}
HashSet<Tuple<string, FileSystemWatcher>> oldValue;
using (await rwLock.ReadLockAsync())
{
oldValue = _watchedFiles[renamedEventArgument.OldFullPath];
}
using (await rwLock.WriteLockAsync())
{
_watchedFiles.Remove(renamedEventArgument.OldFullPath);
}
_document = await _document.LoadFromFile(renamedEventArgument.FullPath);
foreach (Tuple<string, FileSystemWatcher> tuple in oldValue)
{
tuple.Item2.EnableRaisingEvents = false;
tuple.Item2.Dispose();
if (_extensions.Any(e => tuple.Item1.EndsWith(e, StringComparison.OrdinalIgnoreCase)))
await AttachFileObserver(_document, _document.FileName, updateBundle);
else
await AttachFileObserver(_document, tuple.Item1, updateBundle);
}
}
示例8: Rename
/// <summary>
/// Обработчик события переименования папки
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public static void Rename(object sender, RenamedEventArgs e)
{
Model.Dir dir = Model.Dir.FindByPath(e.OldFullPath);
dir.RenameOnServer(e.FullPath);
Helpers.ApplicationHelper.SetCurrentTimeToSettings();
}
示例9: FileEventArgs
public FileEventArgs(WatcherChangeTypes changeType, string fullname, string name, RenamedEventArgs renameArgs)
{
this.ChangeType = changeType;
this.FullPath = fullname;
this.Name = name;
RenameName = renameArgs;
}
示例10: OnRenamed
private void OnRenamed(object sender, RenamedEventArgs e)
{
if (!m_bDirty)
{
m_bDirty = true;
}
}
示例11: ProcessActionItems
public void ProcessActionItems(RenamedEventArgs e, FSEventType type)
{
foreach(FswatchRuleActionItem actionitem in this.__actionitems)
{
actionitem.InvokeAction(e, type);
}
}
示例12: OnRenamedInternal
private void OnRenamedInternal(object sender, RenamedEventArgs e)
{
_logger.Info("Config file renamed from " + e.OldFullPath + " to " + e.FullPath);
DirectoryToMonitor = e.FullPath;
_changeMonitor.Filter = Path.GetFileName(e.FullPath);
ConfigRenamed(e.OldFullPath, e.FullPath);
}
示例13: FileRenamed_Handler
private static void FileRenamed_Handler(object source, RenamedEventArgs e)
{
_countFileChangeEvent++;
Console.WriteLine("FileEvent {0} : {1} - Old Path : {2} New Path : {3}",
_countFileChangeEvent.ToString("#00"), e.ChangeType, e.OldFullPath, e.FullPath);
m_timer.Change(TimeoutMillis, System.Threading.Timeout.Infinite);
}
示例14: FolderWatcherTest_Renamed
private void FolderWatcherTest_Renamed(object sender, RenamedEventArgs e)
{
Invoke(new Action(() =>
{
listBox2.Items.Add("Renamed " + e.OldFullPath + " => " + e.FullPath + " " + sender.ToString());
}));
}
示例15: BranchWatcher_Renamed
private void BranchWatcher_Renamed(object sender, RenamedEventArgs e)
{
if (!string.Equals(e.Name, "branch", StringComparison.InvariantCultureIgnoreCase))
return;
RequestCurrentBadgeRefresh();
}