Beispiel #1
0
 private void OpenSequence()
 {
     OpenRequest.Raise(fileNotification, n =>
     {
         if (n.Confirmed)
         {
             var sequence        = sequencePersistence.OpenSequence(n.Path);
             var missingChannels = configService == null ? new string[0] :
                                   sequence.PrimarySequence
                                   .Concat(sequence.AbortSequence)
                                   .Select(evt => evt.ChannelName)
                                   .Except(configService.Config.Channels.Select(channel => channel.Name));
             if (missingChannels.Any())
             {
                 var builder = new StringBuilder();
                 foreach (var channel in missingChannels)
                 {
                     builder.AppendLine(channel);
                 }
                 // Missing channel names
                 UnableToOpenSequenceNotification.Raise(new Notification
                 {
                     Title   = "Unable to Open Sequence",
                     Content = "Cannot open a sequence for running that has channel names not in the current configuration.\n"
                               + "Missing channels:\n" + builder.ToString()
                 });
             }
             else
             {
                 var viewModel = new SequenceViewModel(sequence);
                 fileEditorService.OpenSequenceInRegion(RegionNames.SequenceRunnerRegion, n.Path, viewModel);
             }
         }
     });
 }
 protected void Open()
 {
     Notification.Confirmed = false;
     OpenRequest.Raise(Notification, n =>
     {
         if (n.Confirmed)
         {
             OpenCore(n.Path);
         }
     });
 }