Пример #1
0
        ///////////////////////////////////////////////////////////////////////////
        // 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;
                }
            }
        }
Пример #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;
                        }
                    }
                }
            }
        }