private async void AddLinkedLibrary(object param) { var ofd = new OpenFileDialog(); ofd.InitialDirectory = Model.CurrentDirectory; var result = await ofd.ShowAsync(); if (result != null && !string.IsNullOrEmpty(result.First())) { string newInclude = Model.CurrentDirectory.MakeRelativePath(result.First()).ToAvalonPath(); LinkedLibraries.Add(newInclude); UpdateLinkerString(); } }
private async void AddLinkedLibrary() { var ofd = new OpenFileDialog(); ofd.Title = "Add Linked Library"; ofd.InitialDirectory = Model.CurrentDirectory; var result = await ofd.ShowAsync(Application.Current.MainWindow); if (result != null && !string.IsNullOrEmpty(result.FirstOrDefault())) { string newInclude = Model.CurrentDirectory.MakeRelativePath(result.First()).ToAvalonPath(); LinkedLibraries.Add(newInclude); UpdateLinkerString(); } }
protected virtual void When(LinkCompleted @event) { SentLinkRequests.Remove(new LibraryId(@event.AcceptingLibraryId)); LinkedLibraries.Add(new LibraryId(@event.AcceptingLibraryId)); }
protected virtual void When(LinkAccepted @event) { ReceivedLinkRequests.Remove(new LibraryId(@event.RequestingLibraryId)); LinkedLibraries.Add(new LibraryId(@event.RequestingLibraryId)); }