コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
 protected virtual void When(LinkCompleted @event)
 {
     SentLinkRequests.Remove(new LibraryId(@event.AcceptingLibraryId));
     LinkedLibraries.Add(new LibraryId(@event.AcceptingLibraryId));
 }
コード例 #4
0
 protected virtual void When(LinkAccepted @event)
 {
     ReceivedLinkRequests.Remove(new LibraryId(@event.RequestingLibraryId));
     LinkedLibraries.Add(new LibraryId(@event.RequestingLibraryId));
 }