private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { var matrix = Factory.Empty <int>(10, 10); var control = new MatrixControl("name"); control.setGrid(matrix); Stack.Children.Add(control); }
private void LoadMatrixControl() { _matrixControl = new MatrixControl { Dock = DockStyle.Fill, Enabled = false, Font = new Font("Segoe UI", 9F), Location = new Point(0, 0), Name = "_matrixControl", Size = new Size(840, 500) }; panel1.Controls.Add(_matrixControl); }
public override void OnInspectorGUI() { DrawDefaultInspector(); MatrixControl someClass = (MatrixControl)target; string name1 = "nameof(someClass.matrixBreak)"; string name2 = "nameof(someClass.matrixTween)"; string name3 = "nameof(someClass.matrixShow)"; string name4 = "nameof(someClass.ObjectsMatrix)"; EditorGUILayout.BeginHorizontal(); SetupArray(someClass.matrixBreak, name1); GUILayout.Width(5); SetupArray(someClass.matrixTween, name2); EditorGUILayout.EndHorizontal(); SetupArray(someClass.matrixShow, name3); SetupArray(someClass.ObjectsMatrix, name4); }
private void matrix_B_Click(object sender, EventArgs e) { var result = GetMatrixDimensions(sender as Control); if (result == null) { return; } ClearB(); var m = new Matrix(result.Item1, result.Item2); var mnc = new MatrixControl(m, pnlB); mnc.Grid.ContextMenuStrip = cntxMenu; mnc.Grid.Focus(); ArrangeControls(); RecordState(); }
private AritmeticControl CreateAritmeticControl(BaseMathEntity entity, Control container) { AritmeticControl ac = null; if (entity is Number) { ac = new NumberControl((Number)entity, container); } else if (entity is Vector) { ac = new VectorControl((Vector)entity, container); } else if (entity is Matrix) { ac = new MatrixControl((Matrix)entity, container); } if (ac != null) { ac.Grid.ContextMenuStrip = cntxMenu; } return(ac); }
public void SeflDestruction() { ins = null; }
void Awake() { ins = this; }