public ForBlock() : base("for") { ForInitializer = new StatementLine(); ForCondition = new ExpressionBlock(); ForIncrementStep = new ExpressionBlock(); const int c = ShapeStyle.DefaultFontSize; ForInitializer.MyControl.Box.Margins.Left = c; ForInitializer.MyControl.Box.Margins.SetTopAndBottom(0); ForInitializer.MyControl.Box.MouseSensitivityArea.SetLeftAndRight(c); ForInitializer.Draggable = false; InitField(ForInitializer); ForCondition.MyControl.Box.Margins.Left = c; ForCondition.MyControl.Box.MouseSensitivityArea.SetLeftAndRight(c); InitField(ForCondition); ForIncrementStep.MyControl.Box.Margins.SetLeftAndRight(c); ForIncrementStep.MyControl.Box.MouseSensitivityArea.SetLeftAndRight(c); InitField(ForIncrementStep); LabelBlock firstSep = new LabelBlock(";"); firstSep.MyControl.Enabled = false; LabelBlock secondSep = new LabelBlock(";"); secondSep.MyControl.Enabled = false; this.HMembers.Add(ForInitializer); this.HMembers.Add(firstSep); this.HMembers.Add(ForCondition); this.HMembers.Add(secondSep); this.HMembers.Add(ForIncrementStep); }
public NameValueBlock(string name, string value) : base() { Name = new LabelBlock(name); Value = new TextBoxBlock(value); this.Add(Name, Value); this.MyListControl.Focusable = true; }
public NameValueBlock(string name, string value) : base() { Name = new LabelBlock(name); Value = new TextBoxBlock(value); this.Add(Name, Value); this.MyListControl.Focusable = true; }
public TutorialRootBlock5() : base() { label = new LabelBlock("Click me"); mouseCoords = new LabelBlock(); this.Add(label); this.Add(mouseCoords); label.MyControl.MouseDown += label_MouseDown; this.MyControl.MouseMove += delegate(MouseWithKeysEventArgs MouseInfo) { mouseCoords.Text = MouseInfo.X.ToString() + "; " + MouseInfo.Y; }; this.MyControl.Style.FillStyleInfo.Mode = FillMode.HorizontalGradient; }