Example #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 (ParameterValue == null)
            {
                var typeSelector = GetTypeSelector(ParameterType);
                typeSelector.ShowDialog();

                if (!typeSelector.DialogResult.Value)
                {
                    return;
                }
                paramCreator.RootTarget = typeSelector.Instance;
            }
            else
            {
                paramCreator.RootTarget = ParameterValue;
            }

            paramCreator.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            paramCreator.ShowDialog();

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

            var paramCreator = new ParameterCreator
            {
                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."
                },
                Title                 = "Change Target",
                RootTarget            = RootTarget,
                WindowStartupLocation = WindowStartupLocation.CenterScreen
            };

            paramCreator.ShowDialog();

            if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value)
            {
                Target = paramCreator.SelectedTarget;
            }
        }
Example #3
0
        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;
            }
        }
        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(ParameterType);
                typeSelector.ShowDialog();

                if (!typeSelector.DialogResult.Value)
                {
                    return;
                }
                paramCreator.RootTarget = typeSelector.Instance;
            }
            else
            {
                paramCreator.RootTarget = this.ParameterValue;
            }

            paramCreator.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            paramCreator.ShowDialog();

            if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value)
            {
                ParameterValue = null;//To force a property changed
                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.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            paramCreator.ShowDialog();

            if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value)
            {
                this.Target = paramCreator.SelectedTarget;
            }
        }