Exemplo n.º 1
0
        void apply()
        {
            int i;

            for (i = 0; i != einfocount; i++)
            {
                var adj = findAdjustable(i);
                if (adj == null)
                {
                    continue;
                }
                var ei = einfos[i];
                if (ei.LabelBox == null)    // haven't created UI yet?
                {
                    continue;
                }
                try {
                    adj.SliderText = ei.LabelBox.Text;
                    adj.Label.Text = adj.SliderText;
                    double d = ElementInfoDialog.ParseUnits(ei.MinBox.Text);
                    adj.MinValue = d;
                    d            = ElementInfoDialog.ParseUnits(ei.MaxBox.Text);
                    adj.MaxValue = d;
                    adj.Value    = ei.Value;
                } catch { }
            }
        }
Exemplo n.º 2
0
        void apply()
        {
            string label = txtLabel.Text;

            if (label.Length == 0)
            {
                label = null;
            }
            scope.Text = label;
            try {
                double d = ElementInfoDialog.ParseUnits(txtManualScale.Text);
                scope.ScaleValue = d;
            } catch { }
        }