///////////////////////////////////////////////////////////////////////////
        // Functions to initialize the UI with values

        private void InitBehaviorUI()
        {
            Debug.Assert(IsInitMode() == true,
                         "initBehaviorUI called when page is not in init mode");

            behaviorEdit.Clear();

            Debug.Assert(behaviorAttribute != null,
                         "Expected behaviorAttribute to be non-null");

            string value = behaviorAttribute.Value;

            if ((value != null) && (value.Length != 0))
            {
                string url = StylePageUtil.ParseUrlProperty(value, true);
                if (url != null)
                {
                    behaviorEdit.Text = url;
                }
            }
        }
Esempio n. 2
0
        private void InitBulletImageUI()
        {
            Debug.Assert(IsInitMode() == true,
                         "initBulletImageUI called when page is not in init mode");

            customBulletCheck.ThreeState = true;
            customBulletCheck.CheckState = CheckState.Indeterminate;
            customImageEdit.Clear();

            Debug.Assert(bulletImageAttribute != null,
                         "Expected bulletImageAttribute to be non-null");

            string value = bulletImageAttribute.Value;

            if (value != null)
            {
                customBulletCheck.ThreeState = false;
                customBulletCheck.Checked    = false;

                customImageOption.Checked = true;
                if (value.Length != 0)
                {
                    customBulletCheck.Checked = true;
                    if (String.Compare(IMAGE_NONE_VALUE, value, true, CultureInfo.InvariantCulture) == 0)
                    {
                        customNoneOption.Checked = true;
                    }
                    else
                    {
                        string url = StylePageUtil.ParseUrlProperty(value, false);
                        if (url != null)
                        {
                            customImageEdit.Text = url;
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        ///////////////////////////////////////////////////////////////////////////
        // Functions to save UI settings into values

        private string SaveBulletImageUI()
        {
            string value = null;

            if ((listTypeCombo.SelectedIndex == IDX_TYPE_BULLETED) &&
                customBulletCheck.Checked)
            {
                if (customNoneOption.Checked)
                {
                    value = IMAGE_NONE_VALUE;
                }
                else
                {
                    value = StylePageUtil.CreateUrlProperty(customImageEdit.Text.Trim());
                }
            }
            if (value == null)
            {
                value = "";
            }

            return(value);
        }
        ///////////////////////////////////////////////////////////////////////////
        // Functions to retrieve UI settings into values

        private string SaveBehaviorUI()
        {
            return(StylePageUtil.CreateUrlProperty(behaviorEdit.Text.Trim()));
        }