private void CreateControlLayout() { Headlabel.Text = $"Manipulate"; comboBox = new ComboBox(); comboBox.Location = Headlabel.Underneath(); comboBox.Width = this.Width; comboBox.Items.AddRange(Enum.GetValues(typeof(MathOperators)).Cast <object>().ToArray()); comboBox.DropDownStyle = ComboBoxStyle.DropDownList; comboBox.SelectedIndex = 0; Output = new ConnectionPoint(typeof(IOIDAction)); Output.Location = new Point(this.Width - Output.Width, comboBox.Bottom); Output.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; Output.SetColor(COLORACTION); InputA = new ConnectionPoint(new Type[] { typeof(OIDRegister) }); InputA.Location = new Point(0, comboBox.Bottom); InputA.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; InputA.SetColor(COLORREGISTER); HeadLabel l2 = new HeadLabel(); l2.Text = $"Register Only"; l2.Location = InputA.RightFrom().AddY(2); InputB = new ConnectionPoint(new Type[] { typeof(OIDRegister), typeof(ushort) }); InputB.Location = new Point(0, InputA.Bottom); InputB.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; InputB.SetColor(COLORREGVALUE); HeadLabel l3 = new HeadLabel(); l3.Text = $"Register, Value"; l3.Location = InputB.RightFrom().AddY(3); this.Height = InputB.Bottom; this.Controls.Add(l2); this.Controls.Add(l3); this.Controls.Add(comboBox); this.Controls.Add(Output); this.Controls.Add(InputA); this.Controls.Add(InputB); this.DoubleClick += (_, __) => { var no = NodeObject(true); if (no != null && no is IOIDAction oID) { RaiseMessageEvent(new MessageEventArgs($"{oID.GetActionString}")); } }; }
private void CreateControlLayout() { Headlabel.Text = $"Timer"; Output = new ConnectionPoint(typeof(IOIDAction)); Output.Location = new Point(this.Width - Output.Width, Headlabel.Bottom); Output.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; Output.SetColor(COLORACTION); InputA = new ConnectionPoint(new Type[] { typeof(OIDRegister) }); InputA.Location = new Point(0, Headlabel.Bottom); InputA.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; InputA.SetColor(COLORREGISTER); HeadLabel l2 = new HeadLabel(); l2.Text = $"Register Only"; l2.Location = InputA.RightFrom().AddY(2); InputB = new ConnectionPoint(new Type[] { typeof(ushort) }); InputB.Location = new Point(0, InputA.Bottom); InputB.OnConnectionStateChange += (_, e) => { base.RaiseFeebackEvent(new FeebackEventArgs(e)); }; InputB.SetColor(COLORVALUE); HeadLabel l3 = new HeadLabel(); l3.Text = $"Register, Value"; l3.Location = InputB.RightFrom().AddY(3); this.Height = InputB.Bottom; this.Controls.Add(l2); this.Controls.Add(l3); this.Controls.Add(Output); this.Controls.Add(InputA); this.Controls.Add(InputB); this.DoubleClick += (_, __) => { var no = NodeObject(true); if (no != null && no is IOIDAction oID) { RaiseMessageEvent(new MessageEventArgs($"{oID.GetActionString}")); } }; }