Beispiel #1
0
        public void CreateCustomParameter()
        {
            var paramCreator = new ParameterCreator();

            paramCreator.Title = "Create parameter";
            paramCreator.TextBlockDescription.Text = "Modify the properties of the parameter. Press OK to finalize the parameter";

            if (this.ParameterValue == null)
            {
                var typeSelector = GetTypeSelector(this.ParameterType);
                typeSelector.ShowDialog();

                if (!typeSelector.DialogResult.Value)
                {
                    return;
                }

                paramCreator.RootTarget = typeSelector.Instance;
            }
            else
            {
                paramCreator.RootTarget = this.ParameterValue;
            }

            paramCreator.ShowDialogEx(this);

            if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value)
            {
                this.ParameterValue = null; //To force a property changed
                this.ParameterValue = paramCreator.RootTarget;
            }
        }
        private void ChangeTarget_Click(object sender, RoutedEventArgs e)
        {
            if (this.RootTarget == null)
            {
                return;
            }

            var paramCreator = new ParameterCreator();

            paramCreator.TextBlockDescription.Text = "Delve into the new desired target by double-clicking on the property. Clicking OK will select the currently delved property to be the new target.";
            paramCreator.Title      = "Change Target";
            paramCreator.RootTarget = this.RootTarget;

            paramCreator.ShowDialogEx(this);

            if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value)
            {
                this.Target = paramCreator.SelectedTarget;
            }
        }
Beispiel #3
0
        public void CreateCustomParameter()
        {
            var paramCreator = new ParameterCreator
            {
                Title = "Create parameter",
                TextBlockDescription =
                {
                    Text = "Modify the properties of the parameter. Press OK to finalize the parameter"
                }
            };

            if (this.ParameterValue is null &&
                this.ParameterType is not null)
            {
                var typeSelector = GetTypeSelector(this.ParameterType);
                typeSelector.ShowDialog();

                if (typeSelector.DialogResult != true)
                {
                    return;
                }

                paramCreator.RootTarget = typeSelector.Instance;
            }