private void ModifiedProjectFormChangesSubmitted(object sender, SledModifiedProjectChangesEventArgs e) { // Fire event GuiChangesSubmitted.Raise(this, e); }
private void ModifiedProjectFormServiceGuiChangesSubmitted(object sender, SledModifiedProjectChangesEventArgs e) { foreach (var change in e.AcceptedChanges) { switch (change.ChangeType) { case SledModifiedProjectChangeType.Name: { var changeName = (SledModifiedProjectNameChange)change; ActiveProject.Name = changeName.NewName; } break; case SledModifiedProjectChangeType.Guid: { var changeGuid = (SledModifiedProjectGuidChange)change; ActiveProject.Guid = changeGuid.NewGuid; } break; case SledModifiedProjectChangeType.AssetDir: { var changeAssetDir = (SledModifiedProjectAssetDirChange)change; ChangeAssetDirectoryNoGui(changeAssetDir.OldDirectory, changeAssetDir.NewDirectory, true, false); } break; case SledModifiedProjectChangeType.FileAdded: { var changeFileAdded = (SledModifiedProjectFileAddedChange)change; SledProjectFilesFileType projFile; AddFile(changeFileAdded.AbsolutePath, out projFile); } break; case SledModifiedProjectChangeType.FileRemoved: { var changeFileRemoved = (SledModifiedProjectFileRemovedChange)change; RemoveFile(changeFileRemoved.AbsolutePath); } break; } } SaveSettings(); }