コード例 #1
0
        private void cboSegment_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (updatingPoint)
            {
                return;
            }
            ComboBox comboBox = (ComboBox)sender;

            LBE.ComboSegmentType st = (LBE.ComboSegmentType)comboBox.SelectedItem;


            if (st.Value == Data.SegmentKind.None)
            {
                cboSegment.SelectedIndex = -1;
            }
        }
コード例 #2
0
        private void cboSegment_SelectionChangeCommitted(object sender, EventArgs e)
        {
            if (updatingPoint)
            {
                return;
            }
            ComboBox comboBox = (ComboBox)sender;

            LBE.ComboSegmentType st = (LBE.ComboSegmentType)comboBox.SelectedItem;

            foreach (Data.Key key in selection.Keys) // Anchors will be updated in recalc
            {
                if (key.getSegmentType() != Data.SegmentKind.None)
                {
                    key.setSegmentType(st.Value);
                    key.IsDirty = true;
                    getCurrentGradient().GetCurveByTag(key.Tag).IsDirty = true;
                }
            }

            graphViewHandler.RefreshPicture();
        }