public void Execute(ApplyRenameCommand command) { if (string.IsNullOrEmpty(command.Item.Name)) { command.Item.Name = "RenameMe"; } command.Item.Rename(command.Name); command.Item.EndEditing(); DesignerWindow dw = InvertApplication.Container.Resolve <DesignerWindow>(); dw.RefreshContent(); }
private void RenameApplied(ApplyRenameCommand applyRenameCommand) { var gensNow = InvertGraphEditor.GetAllCodeGenerators( Container.Resolve <DatabaseService>().CurrentConfiguration, new IDataRecord[] { applyRenameCommand.Item }) .Select(p => Path.Combine(Application.dataPath, p.RelativeFullPathName)).ToArray(); if (gensNow.Length == RenameGens.Length) { for (var i = 0; i < gensNow.Length; i++) { if (File.Exists(RenameGens[i])) { File.Move(RenameGens[i], gensNow[i]); } } } }
private void RenameApplying(ApplyRenameCommand applyRenameCommand) { RenameGens = InvertGraphEditor.GetAllCodeGenerators( Container.Resolve <DatabaseService>().CurrentConfiguration, new IDataRecord[] { applyRenameCommand.Item }) .Select(p => Path.Combine(Application.dataPath, p.RelativeFullPathName)).ToArray(); }