本文整理汇总了C#中System.IO.RenamedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RenamedEventArgs类的具体用法?C# RenamedEventArgs怎么用?C# RenamedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenamedEventArgs类属于System.IO命名空间,在下文中一共展示了RenamedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:fmaj7,项目名称:HoneyBadger,代码行数:7,代码来源:Watcher.cs
示例2: ProxyRename
private void ProxyRename(object sender, RenamedEventArgs e)
{
if (e.Name.ToLowerInvariant() == _localFileName)
{
Reparse();
}
}
开发者ID:NickCraver,项目名称:WebEssentials2013,代码行数:7,代码来源:DocumentBase.cs
示例3: fsWather_Renamed
private void fsWather_Renamed(object sender, RenamedEventArgs e)
{
if (Renamed != null)
{
Renamed(this, e);
}
}
开发者ID:lujinlong,项目名称:Apq,代码行数:7,代码来源:FsWatcher.cs
示例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);
}
开发者ID:almx,项目名称:ExRep,代码行数:7,代码来源:ExRepListViewControl_FileSystemWatcher.cs
示例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);
}
开发者ID:AlbinaKuptsova,项目名称:Kuptsova_Albina,代码行数:7,代码来源:Watcher.cs
示例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);
}
开发者ID:Ullink,项目名称:NugetConverter,代码行数:7,代码来源:AssembliesDirectoryWatcher.cs
示例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);
}
}
开发者ID:EdsonF,项目名称:WebEssentials2013,代码行数:35,代码来源:BundleFilesObserver.cs
示例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();
}
开发者ID:dkostenko,项目名称:2safe,代码行数:12,代码来源:Dirs.cs
示例9: FileEventArgs
public FileEventArgs(WatcherChangeTypes changeType, string fullname, string name, RenamedEventArgs renameArgs)
{
this.ChangeType = changeType;
this.FullPath = fullname;
this.Name = name;
RenameName = renameArgs;
}
开发者ID:wykoooo,项目名称:copy-dotnet-library,代码行数:7,代码来源:FileWatcher.cs
示例10: OnRenamed
private void OnRenamed(object sender, RenamedEventArgs e)
{
if (!m_bDirty)
{
m_bDirty = true;
}
}
开发者ID:cuongpv88,项目名称:work,代码行数:7,代码来源:Form2.cs
示例11: ProcessActionItems
public void ProcessActionItems(RenamedEventArgs e, FSEventType type)
{
foreach(FswatchRuleActionItem actionitem in this.__actionitems)
{
actionitem.InvokeAction(e, type);
}
}
开发者ID:rdlaitila,项目名称:mono-fsmon,代码行数:7,代码来源:FswatchRuleChain.cs
示例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);
}
开发者ID:demonix,项目名称:iPoint.ServiceStatistics,代码行数:7,代码来源:ChangeMonitorableConfigStore.cs
示例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);
}
开发者ID:RuhuiCheng,项目名称:Hello-Word,代码行数:7,代码来源:Program.cs
示例14: FolderWatcherTest_Renamed
private void FolderWatcherTest_Renamed(object sender, RenamedEventArgs e)
{
Invoke(new Action(() =>
{
listBox2.Items.Add("Renamed " + e.OldFullPath + " => " + e.FullPath + " " + sender.ToString());
}));
}
开发者ID:rvong,项目名称:winVDictionary,代码行数:7,代码来源:Form1.cs
示例15: BranchWatcher_Renamed
private void BranchWatcher_Renamed(object sender, RenamedEventArgs e)
{
if (!string.Equals(e.Name, "branch", StringComparison.InvariantCultureIgnoreCase))
return;
RequestCurrentBadgeRefresh();
}
开发者ID:gandarez,项目名称:VSCommands,代码行数:7,代码来源:MercurialSourceControlInfoProvider.cs
示例16: OnRenamed
private static void OnRenamed(object source, RenamedEventArgs e)
{
var o = e.OldName;
var n = e.Name;
LogRepo.Create(Timestamp.Now, e.ChangeType.ToString(), e.FullPath, e.OldName);
ConsoleLogger.Log(Timestamp.Now + " File: {0} renamed to {1}", o, n);
}
开发者ID:ARMmaster17,项目名称:Antd,代码行数:7,代码来源:DirectoryWatcher.cs
示例17: OnRenamed
private static void OnRenamed(object source, RenamedEventArgs e)
{
// Specify what is done when a file is renamed.
////console.WriteLine("File: {0} renamed to {1} ", e.OldFullPath, e.FullPath);
//console.WriteLine("File: {0} {1} to {2} and FileName: {3} finally, Old File Name: {4}", e.OldFullPath, e.ChangeType, e.FullPath, e.Name, e.OldName);
DataStore.Filenode toBeQueueNode = new DataStore.Filenode();
toBeQueueNode.setNewPath(e.FullPath);
toBeQueueNode.setAction(e.ChangeType.ToString());
toBeQueueNode.setOldPath(e.OldFullPath);
toBeQueueNode.setCloudDestinationPath(null); //indetermined, requires modification
/*try
{
FileInfo oldfileinfo = new FileInfo(e.OldFullPath);
FileInfo newfileinfo = new FileInfo(e.FullPath);
oldfileinfo.Refresh();
//console.WriteLine("Old File LastWriteTime" + oldfileinfo.LastWriteTime);
newfileinfo.Refresh();
//console.WriteLine("New File lastWriteTime" + newfileinfo.LastWriteTime);
if (oldfileinfo.Exists)
{
//console.WriteLine("Old File Length in Bytes: " + oldfileinfo.Length);
}
if (newfileinfo.Exists)
{
//console.WriteLine("New File Length in Bytes: " + newfileinfo.Length);
}
if (oldfileinfo.LastWriteTime.CompareTo(newfileinfo.LastWriteTime) < 0)
{
//console.WriteLine("New File Info has later modification time");
}
else if (oldfileinfo.LastWriteTime.CompareTo(newfileinfo.LastWriteTime) > 0)
{
//console.WriteLine("Old File Info has later modification time");
}
else
{
//they are the same
//console.WriteLine("Same Modification Time");
}
}
catch (Exception ex)
{
//exception thrown
//console.WriteLine("Length Write Time Exception");
}*/
if (Entry.Entry.checkWave(e.Name) || Entry.Entry.checkTmp(e.Name))
return;
Entry.Entry.fileQueue.Enqueue(toBeQueueNode);
}
开发者ID:obviousninja,项目名称:Citrix-Uploader,代码行数:59,代码来源:DirWatcher.cs
示例18: fsw_Renamed
void fsw_Renamed(object sender, RenamedEventArgs e)
{
txtActivity.Invoke(
(MethodInvoker)delegate {
txtActivity.AppendText(e.ChangeType.ToString() + " : " + e.Name + "\n");
}
);
}
开发者ID:flcdrg,项目名称:XSDExtractor,代码行数:8,代码来源:MainForm.cs
示例19: OnRenamed
private void OnRenamed(object source, RenamedEventArgs e)
{
// Specify what is done when a file is renamed.
ReaderFileWip22();
ReaderFileWip23();
ReaderFileWip21();
}
开发者ID:cuongpv88,项目名称:work,代码行数:8,代码来源:Form1.cs
示例20: OnRenamed
private static void OnRenamed(object source, RenamedEventArgs ev)
{
ProcessChangeOnlyOnce(ev, e =>
{
ConsoleWriteLineSeparator();
Console.WriteLine("RENAMED to: \"{0}\"", RelativePath(e.FullPath));
ProcessChange(e.FullPath);
});
}
开发者ID:chmontgomery,项目名称:auto-tsc,代码行数:9,代码来源:Program.cs
注:本文中的System.IO.RenamedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论