private void applyLineStyle_CheckedChanged(object sender, System.EventArgs e) { compositePanel.Enabled = compositeLines.Enabled = sizeGroup.Enabled = lineGroup.Enabled = previewGroup.Enabled = applyLineStyle.Checked; if (!m_inUpdate) { if (!applyLineStyle.Checked) { applyLineStyle.Tag = m_item; m_item = new BindingList <IStroke>(); UpdatePreviewResult(); } else { m_item = applyLineStyle.Tag as IList <IStroke>; if (m_item == null) { m_item = new BindingList <IStroke>(); } if (m_item.Count == 0) { m_item.Add(_factory.CreateDefaultStroke()); } UpdateDisplay(); } } }
private void displayLine_CheckedChanged(object sender, EventArgs e) { if (m_inUpdate) { return; } if (lineStyleEditor.displayLine.Checked) { m_item.Stroke = previousStroke ?? _factory.CreateDefaultStroke(); } else { if (m_item.Stroke != null) { previousStroke = m_item.Stroke; } m_item.Stroke = null; } UpdatePreviewResult(); if (Changed != null) { Changed(this, new EventArgs()); } }