Пример #1
0
        public static void OpenUpdate(Matrix matrix, string name = null)
        {
            MatrixWindow window = GetCreateWindow(matrix, name);

            if (name != null)
            {
                window.name = name;
            }
            else
            {
                window.name = "Matrix Preview";
            }
            window.SetMatrix(matrix);
        }
Пример #2
0
        public static MatrixWindow GetCreateWindow(Matrix matrix, string name = null)
        /// Tries to find opened window by matrix/name and updates it, and opens new window if non is found
        {
            MatrixWindow window = GetWindow(matrix, name);

            if (window == null)
            {
                window = CreateInstance <MatrixWindow>();
                window.ShowTab();
                window.SetMatrix(matrix, name);
            }

            window.Show();

            return(window);
        }