splitter

Custom paint Splitter control in C# WinForms

混江龙づ霸主 提交于 2019-12-01 08:07:58
问题 I am trying to paint the split line that appears when you drag a splitter control: As you can see from this image, the default splitter is a checkerboard. ...this doesn't work: public partial class MockForm : Form { public MockForm() { InitializeComponent(); this.splitter1.Paint += splitter1_Paint; } private void splitter1_Paint(object sender, PaintEventArgs e) { e.Graphics.Clear(Color.Red); } } this just paints the background of the control but not the splitter when it's dragged. Any ideas?

Parse a string with key=value pair in a map? [duplicate]

泄露秘密 提交于 2019-11-29 17:30:35
This question already has an answer here: Parse a string with delimiters and load it in a map? 2 answers I have below String which is in the format of key1=value1, key2=value2 which I need to load it in a map (Map<String, String>) as key=value so I need to split on comma , and then load cossn as key and 0 its value. String payload = "cossn=0, itwrqm=200006033213"; Map<String, String> holder = Splitter.on(",").trimResults().withKeyValueSeparator("=").split(payload); I am using Splitter here to do the job for me but for some cases it is failing. For some of my strings, value has some string with