-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
26 lines (21 loc) · 825 Bytes
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using DevExpress.Utils;
using DevExpress.XtraBars;
using System;
using System.Linq;
namespace dxSample {
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
Random r = new Random();
public Form1() {
InitializeComponent();
}
private void barEditItem1_EditValueChanged(object sender, EventArgs e) {
var editItem = sender as BarEditItem;
var value = Convert.ToInt32(editItem.EditValue);
PointFloat[] points = new PointFloat[value];
for (int i = 0; i < value; i++) {
points[i] = new PointFloat() { X = Convert.ToSingle(r.NextDouble()), Y = r.Next(0, 2) == 0 ? 0 : 1 };
}
diagramShape1.ConnectionPoints = new DevExpress.XtraDiagram.PointCollection(points);
}
}
}