Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public void SeflDestruction()
 {
     ins = null;
 }
Ejemplo n.º 7
0
 void Awake()
 {
     ins = this;
 }