protected override void OnModelPropertyChanged(string propertyName)
        {
            if (propertyName == "Presentation")
            {
                if (Presentation == Model.Presentation)
                {
                    return;
                }

                Presentation = Model.Presentation;

                Labels.Clear();

                var converter     = new GenericLabelConverter(ConversionSteps);
                var captionModule = Presentation.GetPropertySetFor <Caption>();
                foreach (var node in Presentation.Graph.Nodes)
                {
                    var label = new LabelViewModel(captionModule.Get(node.Id).Label);
                    label.Commited = converter.Convert(label.Original);

                    Labels.Add(label);
                }

                RaisePropertyChanged(nameof(Labels));
            }
        }
        private void ConvertAllLabels()
        {
            var converter = new GenericLabelConverter(ConversionSteps);

            foreach (var label in Labels)
            {
                label.Commited = converter.Convert(label.Original);
            }
        }
        internal void ConvertTemporarily(ILabelConversionStep convertion)
        {
            TemporalConversionStep = convertion;

            var steps = new Queue <ILabelConversionStep>();

            steps.Enqueue(TemporalConversionStep);

            var converter = new GenericLabelConverter(steps);

            foreach (var label in Labels)
            {
                label.Temporal = converter.Convert(label.Commited);
            }
        }
        private void OnOk()
        {
            Config.LabelConversion.Clear();
            Config.LabelConversion.AddRange(ConversionSteps);
            Config.Save();

            if (Presentation != null)
            {
                var converter     = new GenericLabelConverter(Config.LabelConversion);
                var captionModule = Presentation.GetPropertySetFor <Caption>();
                foreach (var node in Presentation.Graph.Nodes)
                {
                    var caption = captionModule.Get(node.Id);
                    caption.DisplayText = converter.Convert(caption.Label);
                }
            }

            ((IConfirmation)Notification).Confirmed = true;
            FinishInteraction();
        }