コード例 #1
0
        public void Initialize(ConverterEditorForm form)
        {
            this.form = form;

            form.BindingChanged += form_BindingChanged;
                
        }
コード例 #2
0
        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();

                form.BindingChanged -= form_BindingChanged;

                form = null;
            }
            base.Dispose(disposing);
        }
コード例 #3
0
        private void bindingSettingsControl_ConverterEditButtonClick(object sender, EventArgs e)
        {
            if (particleEffect.BindingRepository == null) return;

            var propertyForm = new ConverterEditorForm();

            // Edit soure property
            var current = particleEffect.BindingRepository.GetObjectBinding(bindingSettingsControl.SelectedBinding);
            if (current != null)
            {

                propertyForm.SetBinding(current);

                // the form edits the binding directly.
                propertyForm.ShowDialog(this);

/*
                if (result == DialogResult.OK)
                {
                    repository.SetBindingConverter(bindingSettingsControl.SelectedBinding, propertyForm.BindingConverter);
                }
*/
            }
            propertyForm.Dispose();
        }