public void UpdateSaveTexts(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { RemovableStack <IFileVM> vms = new RemovableStack <IFileVM>(); foreach (IDocumentView current in ActiveDocuments) { if ((current.GetVM() as IFileVM) != null) { vms.Push(current.GetVM() as IFileVM); } } if (vms.Peek() != null) { this.SaveText = "Save " + vms.Peek().TitleName; this.SaveAsText = "Save " + vms.Peek().TitleName + " As..."; } else { this.SaveText = "Save"; this.SaveAsText = "Save As..."; } }
public void UpdateSaveTexts(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { RemovableStack<IFileVM> vms = new RemovableStack<IFileVM>(); foreach(IDocumentView current in ActiveDocuments) { if ((current.GetVM() as IFileVM) != null) { vms.Push(current.GetVM() as IFileVM); } } if (vms.Peek() != null) { this.SaveText = "Save " + vms.Peek().TitleName; this.SaveAsText = "Save " + vms.Peek().TitleName + " As..."; } else { this.SaveText = "Save"; this.SaveAsText = "Save As..."; } }