示例#1
0
        public JoyAssgn(JoyAssgn otherInstance)
        {
            device = otherInstance.device;

            productGUID  = otherInstance.productGUID;
            productName  = otherInstance.productName;
            instanceGUID = otherInstance.instanceGUID;

            detentPosition = otherInstance.detentPosition;

            productName = Regex.Replace(productName, "[^A-Z|a-z|0-9|~|`|\\[|\\]|\\{|\\}|\\-|_|\\=|\\'|\\s]", String.Empty);

            for (int i = 0; i < axis.Length; i++)
            {
                axis[i] = otherInstance.axis[i].Clone();
            }
            for (int i = 0; i < pov.Length; i++)
            {
                pov[i] = otherInstance.pov[i].Clone();
            }
            for (int i = 0; i < dx.Length; i++)
            {
                dx[i] = otherInstance.dx[i].Clone();
            }
        }
示例#2
0
        public void Load(JoyAssgn j)
        {
            detentPosition = j.detentPosition;

            axis = j.axis;
            pov  = j.pov;

            for (int i = 0; i < j.dx.Length; i++)
            {
                if (i >= dx.Length)
                {
                    return;
                }
                dx[i] = j.dx[i];
            }
        }