예제 #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);
        }
예제 #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);
 }
예제 #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);
    }
예제 #4
0
파일: frmMain.cs 프로젝트: istanic19/MathIS
        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();
        }
예제 #5
0
파일: frmMain.cs 프로젝트: istanic19/MathIS
        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);
        }
예제 #6
0
 public void SeflDestruction()
 {
     ins = null;
 }
예제 #7
0
 void Awake()
 {
     ins = this;
 }