Esempio n. 1
0
        private static MyEditPropertyEnum GetEditProperties(List <MyEntity> entities)
        {
            Array allEditProperties = Enum.GetValues(typeof(MyEditPropertyEnum));

            int[] editPropertiesCount = new int[MyMwcUtils.GetMaxValueFromEnum <MyEditPropertyEnum>() + 1];
            foreach (MyEntity entity in entities)
            {
                MyEditPropertyEnum editPropertyForEntity = GetEditProperties(entity);
                foreach (MyEditPropertyEnum editProperty in allEditProperties)
                {
                    if ((entities.Count == 1 || m_editPropertiesForMultiEdit.Contains(editProperty)) &&
                        (editPropertyForEntity & editProperty) != 0)
                    {
                        editPropertiesCount[(int)editProperty]++;
                    }
                }
            }

            MyEditPropertyEnum result = MyEditPropertyEnum.None;

            foreach (MyEditPropertyEnum editProperty in allEditProperties)
            {
                if (editPropertiesCount[(int)editProperty] == entities.Count)
                {
                    result |= editProperty;
                }
            }

            return(result);
        }
Esempio n. 2
0
 static MyGuiScreenMessageBox()
 {
     m_typesConfiguration = new MyMessageBoxConfiguration[MyMwcUtils.GetMaxValueFromEnum <MyMessageBoxType>() + 1];
     m_typesConfiguration[(int)MyMessageBoxType.MESSAGE] = new MyMessageBoxConfiguration(
         MyTextureManager.GetTexture <MyTexture2D>("Textures\\GUI\\MessageBackground_blue", flags: TextureFlags.IgnoreQuality),
         MyGuiConstants.MESSAGE_BOX_MESSAGE_TEXT_COLOR,
         MyGuiConstants.MESSAGE_BOX_MESSAGE_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_MESSAGE_BUTTON_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_MESSAGE_ROTATING_WHEEL_COLOR,
         MyGuiConstants.MESSAGE_BOX_MESSAGE_BACKGROUND_INTERFERENCE_VIDEO_COLOR,
         MyGuiManager.GetFontMinerWarsBlue(),
         MyGuiManager.GetConfirmButton());
     m_typesConfiguration[(int)MyMessageBoxType.ERROR] = new MyMessageBoxConfiguration(
         MyTextureManager.GetTexture <MyTexture2D>("Textures\\GUI\\MessageBackground_red", flags: TextureFlags.IgnoreQuality),
         MyGuiConstants.MESSAGE_BOX_ERROR_TEXT_COLOR,
         MyGuiConstants.MESSAGE_BOX_ERROR_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_ERROR_BUTTON_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_ERROR_ROTATING_WHEEL_COLOR,
         MyGuiConstants.MESSAGE_BOX_ERROR_BACKGROUND_INTERFERENCE_VIDEO_COLOR,
         MyGuiManager.GetFontMinerWarsWhite(),
         MyGuiManager.GetMessageBoxButton());
     m_typesConfiguration[(int)MyMessageBoxType.NULL] = new MyMessageBoxConfiguration(
         MyTextureManager.GetTexture <MyTexture2D>("Textures\\GUI\\MessageBackground_blue", flags: TextureFlags.IgnoreQuality),
         MyGuiConstants.MESSAGE_BOX_NULL_TEXT_COLOR,
         MyGuiConstants.MESSAGE_BOX_NULL_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_NULL_BUTTON_BACKGROUND_COLOR,
         MyGuiConstants.MESSAGE_BOX_NULL_ROTATING_WHEEL_COLOR,
         MyGuiConstants.MESSAGE_BOX_NULL_BACKGROUND_INTERFERENCE_VIDEO_COLOR,
         MyGuiManager.GetFontMinerWarsBlue(),
         MyGuiManager.GetConfirmButton());
 }
        public static void LoadData()
        {
            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyVoxelCacheCellRenderHelper.LoadData");

            MyMwcLog.WriteLine("MyVoxelCacheCellRenderHelper.LoadData - START");
            MyMwcLog.IncreaseIndent();

            /*
             * if (m_singleMaterialHelper == null)
             * {
             *  m_singleMaterialHelper = new MySingleMaterialHelper();
             *  m_singleMaterialHelper.LoadData();
             *
             *  m_multiMaterialHelper = new MyMultiMaterialHelper();
             *  m_multiMaterialHelper.LoadData();
             * } */

            if (m_preallocatedSingleMaterialHelpers == null)
            {
                m_preallocatedSingleMaterialHelpers = new MySingleMaterialHelper[MyMwcUtils.GetMaxValueFromEnum <MyMwcVoxelMaterialsEnum>() + 1];
                m_preallocatedMultiMaterialHelpers  = new Dictionary <int, MyMultiMaterialHelper>();
            }

            MyMwcLog.DecreaseIndent();
            MyMwcLog.WriteLine("MyVoxelCacheCellRenderHelper.LoadData - END");
            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock();
        }
 public static int GetMaterialsCount()
 {
     if (voxelMaterialCount == -1)
     {
         voxelMaterialCount = MyMwcUtils.GetMaxValueFromEnum <MyMwcVoxelMaterialsEnum>() + 1;
     }
     return(voxelMaterialCount);
 }
Esempio n. 5
0
 public MyAmmoInventoryItems()
 {
     m_ammoInventoryItems           = new List <MyInventoryItem>();
     m_ammoInventoryItemsByAmmoType = new List <MyInventoryItem> [MyMwcUtils.GetMaxValueFromEnum <MyMwcObjectBuilder_SmallShip_Ammo_TypesEnum>() + 1];
     for (int i = 0; i < m_ammoInventoryItemsByAmmoType.Length; i++)
     {
         m_ammoInventoryItemsByAmmoType[i] = new List <MyInventoryItem>();
     }
 }
Esempio n. 6
0
 static MyHackingTool()
 {
     m_hackingResultMessages = new MyHackingResultMessage[MyMwcUtils.GetMaxValueFromEnum <MyHackingResultEnum>() + 1];
     m_hackingResultMessages[(int)MyHackingResultEnum.Success]        = null;
     m_hackingResultMessages[(int)MyHackingResultEnum.NotEnoughLevel] = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_NotEnoughLevel, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack);
     m_hackingResultMessages[(int)MyHackingResultEnum.CanNotBeHacked] = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_CanNotBeHacked, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack);
     m_hackingResultMessages[(int)MyHackingResultEnum.Canceled]       = null;
     m_hackingResultMessages[(int)MyHackingResultEnum.NoHackingTool]  = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_NoHackingTool, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack);
 }
Esempio n. 7
0
        public static void LoadData()
        {
            m_cueVariables    = new MyVar[MyMwcUtils.GetMaxValueFromEnum <MyCueVariableEnum>() + 1];
            m_glovalVariables = new MyVar[MyMwcUtils.GetMaxValueFromEnum <MyCueVariableEnum>() + 1];

            m_cueVariables[(int)MyCueVariableEnum.AmbVolume] = new MyVar()
            {
                VariableName = "AmbVolume", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.MusicProg1Progression] = new MyVar()
            {
                VariableName = "MusicProg1Progression", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.Occluder] = new MyVar()
            {
                VariableName = "Occluder", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.Pitch] = new MyVar()
            {
                VariableName = "Pitch", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.RotatingSpeed] = new MyVar()
            {
                VariableName = "RotatingSpeed", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.Volume] = new MyVar()
            {
                VariableName = "Volume", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.ShipASpeed] = new MyVar()
            {
                VariableName = "Ship A Speed", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.ShipAIdle] = new MyVar()
            {
                VariableName = "Ship A Idle", VariableIndex = -1
            };

            m_cueVariables[(int)MyCueVariableEnum.Distance] = new MyVar()
            {
                VariableName = "Distance", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.DopplerPitchScalar] = new MyVar()
            {
                VariableName = "DopplerPitchScalar", VariableIndex = -1
            };
            m_cueVariables[(int)MyCueVariableEnum.OrientationAngleDegrees] = new MyVar()
            {
                VariableName = "OrientationAngle", VariableIndex = -1
            };

            m_glovalVariables[(int)MyGlobalVariableEnum.ReverbControl] = new MyVar()
            {
                VariableName = "ReverbControl", VariableIndex = -1
            };
        }
Esempio n. 8
0
            public MyPerCameraDraw()
            {
                ShadowEntitiesOccluded = new int[MinerWars.AppCode.Game.Render.MyShadowRenderer.NumSplits + 1];
                ShadowDrawCalls        = new int[MinerWars.AppCode.Game.Render.MyShadowRenderer.NumSplits + 1];

                int lodCount = MyMwcUtils.GetMaxValueFromEnum <MyLodTypeEnum>() + 1;

                MaterialChanges     = new int[lodCount];
                TechniqueChanges    = new int[lodCount];
                VertexBufferChanges = new int[lodCount];
                EntityChanges       = new int[lodCount];
            }
        public static void LoadData()
        {
            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyVoxelMaterials.LoadData");

            m_materials     = new MyVoxelMaterial[MyMwcUtils.GetMaxValueFromEnum <MyMwcVoxelMaterialsEnum>() + 1];
            m_meshMaterials = new MyMeshMaterial[MyMwcUtils.GetMaxValueFromEnum <MyMwcVoxelMaterialsEnum>() + 1];

            Add(MyMwcVoxelMaterialsEnum.Indestructible_01, "Indestructible_01", true, true, 0.6f, 100, false);
            Add(MyMwcVoxelMaterialsEnum.Indestructible_02, "Indestructible_02", true, true, 0.6f, 100, false);
            Add(MyMwcVoxelMaterialsEnum.Indestructible_03, "Indestructible_03", true, true, 0.6f, 100, false);
            Add(MyMwcVoxelMaterialsEnum.Indestructible_04, "Indestructible_04", true, true, 0.6f, 100, false);
            Add(MyMwcVoxelMaterialsEnum.Indestructible_05_Craters_01, "Indestructible_05_Craters_01", true, true, 0.1f, 100, false);
            Add(MyMwcVoxelMaterialsEnum.Ice_01, "Ice_01", false, true, 1, 20.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Treasure_01, "Treasure_01", false, false, 0.9f, 10.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Treasure_02, "Treasure_02", false, false, 0.7f, 20.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Iron_01, "Iron_01", false, false, 0.7f, 2.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Iron_02, "Iron_02", false, false, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Stone_01, "Stone_01", false, true, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_02, "Stone_02", false, true, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_03, "Stone_03", false, true, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_04, "Stone_04", false, true, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_05, "Stone_05", false, false, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_06, "Stone_06", false, false, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_07, "Stone_07", false, false, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_08, "Stone_08", false, false, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_10, "Stone_10", false, true, 0.6f, 100.0f, true);
            Add(MyMwcVoxelMaterialsEnum.Stone_13_Wall_01, "Stone_13_Wall_01", false, true, 0.6f, 50, true);
            Add(MyMwcVoxelMaterialsEnum.Uranite_01, "Uraninite_01", false, false, 1.2f, 50.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Helium3_01, "Helium3_01", false, false, 0.4f, 20.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Helium4_01, "Helium4_01", false, true, 0.9f, 60.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Organic_01, "Organic_01", false, false, 0, 1, false);
            Add(MyMwcVoxelMaterialsEnum.Gold_01, "Gold_01", false, false, 1.5f, 2.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Silver_01, "Silver_01", false, false, 0.8f, 1.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Nickel_01, "Nickel_01", false, false, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Magnesium_01, "Magnesium_01", false, true, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Platinum_01, "Platinum_01", false, false, 0.8f, 2.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Silicon_01, "Silicon_01", false, true, 2.0f, 50.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Cobalt_01, "Cobalt_01", false, false, 0.6f, 10.0f, false);
            Add(MyMwcVoxelMaterialsEnum.Snow_01, "Snow_01", false, false, 0.1f, 0.1f, false);
            Add(MyMwcVoxelMaterialsEnum.Lava_01, "lava_01", false, true, 0, 1, false);
            Add(MyMwcVoxelMaterialsEnum.Concrete_01, "Concrete_01", false, true, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Concrete_02, "Concrete_02", false, true, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Sandstone_01, "Sandstone_01", false, true, 0.6f, 2, false);
            Add(MyMwcVoxelMaterialsEnum.Stone_Red, "Stone_Red", false, true, 0.6f, 2, false);

            foreach (MyMwcVoxelMaterialsEnum material in Enum.GetValues(typeof(MyMwcVoxelMaterialsEnum)))
            {
                MyCommonDebugUtils.AssertRelease(Get(material) != null);
            }

            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock();
        }
Esempio n. 10
0
        // initialize container
        public MyPrefabContainer()
        {
            m_prefabs            = new List <MyPrefabBase>(MyPrefabContainerConstants.MAX_PREFABS_IN_CONTAINER + 1);
            m_deactivatedPrefabs = new List <MyPrefabBase>(MyPrefabContainerConstants.MAX_PREFABS_IN_CONTAINER + 1);

            Inventory = new MyInventory(1000);

            m_prefabTypeSingleFlagsCount = new int[MyMwcUtils.GetMaxValueFromEnum <PrefabTypesFlagEnum>() + 1];

            m_prefabsByCategory = new List <MyPrefabBase> [MyMwcUtils.GetMaxValueFromEnum <CategoryTypesEnum>() + 1];
            foreach (ushort categoryTypeId in Enum.GetValues(typeof(CategoryTypesEnum)))
            {
                m_prefabsByCategory[categoryTypeId] = new List <MyPrefabBase>();
            }
        }
        static MyAspectRatioExList()
        {
            List = new MyAspectRatioEx[MyMwcUtils.GetMaxValueFromEnum <MyAspectRatioEnum>() + 1];

            Add(false, MyAspectRatioEnum.NORMAL_4_3, 4.0f / 3.0f, MyTextsWrapperEnum.AspectRatioNormal_4_3, MyTextsWrapperEnum.AspectRatio_Short_Normal_4_3);
            Add(false, MyAspectRatioEnum.WIDE_16_9, 16.0f / 9.0f, MyTextsWrapperEnum.AspectRatioWide_16_9, MyTextsWrapperEnum.AspectRatio_Short_Normal_16_9);
            Add(false, MyAspectRatioEnum.WIDE_16_10, 16.0f / 10.0f, MyTextsWrapperEnum.AspectRatioWide_16_10, MyTextsWrapperEnum.AspectRatio_Short_Normal_16_10);

            Add(false, MyAspectRatioEnum.DUAL_HEAD_NORMAL_4_3, 2 * 4.0f / 3.0f, MyTextsWrapperEnum.AspectRatioDualHeadNormal_4_3, MyTextsWrapperEnum.AspectRatio_Short_Dual_4_3);
            Add(false, MyAspectRatioEnum.DUAL_HEAD_WIDE_16_9, 2 * 16.0f / 9.0f, MyTextsWrapperEnum.AspectRatioDualHeadWide_16_9, MyTextsWrapperEnum.AspectRatio_Short_Dual_16_9);
            Add(false, MyAspectRatioEnum.DUAL_HEAD_WIDE_16_10, 2 * 16.0f / 10.0f, MyTextsWrapperEnum.AspectRatioDualHeadWide_16_10, MyTextsWrapperEnum.AspectRatio_Short_Dual_16_10);

            Add(true, MyAspectRatioEnum.TRIPLE_HEAD_NORMAL_4_3, 3 * 4.0f / 3.0f, MyTextsWrapperEnum.AspectRatioTripleHeadNormal_4_3, MyTextsWrapperEnum.AspectRatio_Short_Triple_4_3);
            Add(true, MyAspectRatioEnum.TRIPLE_HEAD_WIDE_16_9, 3 * 16.0f / 9.0f, MyTextsWrapperEnum.AspectRatioTripleHeadWide_16_9, MyTextsWrapperEnum.AspectRatio_Short_Triple_16_9);
            Add(true, MyAspectRatioEnum.TRIPLE_HEAD_WIDE_16_10, 3 * 16.0f / 10.0f, MyTextsWrapperEnum.AspectRatioTripleHeadWide_16_10, MyTextsWrapperEnum.AspectRatio_Short_Triple_16_10);
        }
Esempio n. 12
0
 private void DetectNotSameProperties()
 {
     m_editPropertiesNotSame = new bool[MyMwcUtils.GetMaxValueFromEnum <MyEditPropertyEnum>() + 1];
     foreach (MyEntity entity in m_entities)
     {
         if ((m_editPropertiesFlags & MyEditPropertyEnum.Name) > 0 &&
             entity.Name != m_editProperties.Name)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.Name] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.DisplayName) > 0 &&
             entity.DisplayName != m_editProperties.DisplayName)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.DisplayName] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.Faction) > 0 &&
             entity.Faction != m_editProperties.Faction)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.Faction] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.HealthRatio) > 0 &&
             entity.HealthRatio != m_editProperties.HealthRatio)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.HealthRatio] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.MaxHealth) > 0 &&
             entity.MaxHealth != m_editProperties.MaxHealth)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.MaxHealth] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.Indestructible) > 0 &&
             !entity.IsDestructible != m_editProperties.IsIndestructible)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.Indestructible] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.UseProperties) > 0 &&
             entity is IMyUseableEntity && ((IMyUseableEntity)entity).UseProperties != m_editProperties.UseProperties)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.UseProperties] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.RequiresEnergy) > 0 &&
             entity is MyPrefabBase && ((MyPrefabBase)entity).RequiresEnergy != m_editProperties.RequiresEnergy)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.RequiresEnergy] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.Activated) > 0 &&
             entity.Activated != m_editProperties.IsActivated)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.Activated] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.DisplayHud) > 0 &&
             entity.DisplayOnHud != m_editProperties.DisplayHud)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.DisplayHud] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.Difficulty) > 0 &&
             entity.MaxDifficultyToActivated != m_editProperties.Difficulty)
         {
             m_editPropertiesNotSame[(int)MyEditPropertyEnum.Difficulty] = true;
         }
         if ((m_editPropertiesFlags & MyEditPropertyEnum.KinematicPartsHealthAndMaxHealth) > 0 &&
             entity is MyPrefabKinematic)
         {
             MyPrefabKinematic prefabKinematic = entity as MyPrefabKinematic;
             MyPrefabConfigurationKinematic prefabKinematicConfig = prefabKinematic.GetConfiguration() as MyPrefabConfigurationKinematic;
             for (int i = 0; i < prefabKinematicConfig.KinematicParts.Count; i++)
             {
                 MyPrefabKinematicPart prefabKinematicPart = prefabKinematic.Parts[i];
                 if (m_editProperties.KinematicPartsHealthAndMaxHealth == null &&
                     (prefabKinematicConfig.KinematicParts.Count != m_editProperties.KinematicPartsHealthAndMaxHealth.Length ||
                      m_editProperties.KinematicPartsHealthAndMaxHealth[i] == null && prefabKinematicPart != null ||
                      m_editProperties.KinematicPartsHealthAndMaxHealth[i] != null && prefabKinematicPart == null ||
                      m_editProperties.KinematicPartsHealthAndMaxHealth[i].Health != prefabKinematicPart.Health ||
                      m_editProperties.KinematicPartsHealthAndMaxHealth[i].MaxHealth != prefabKinematicPart.MaxHealth))
                 {
                     m_editPropertiesNotSame[(int)MyEditPropertyEnum.KinematicPartsHealthAndMaxHealth] = true;
                 }
             }
         }
     }
 }
        static MyGuiControlTextbox()
        {
            m_keyToString = new MyGuiControlTextboxKeyToString[MyMwcUtils.GetMaxValueFromEnum <Keys>() + 1];

            //  First set all items to null so later we can assing individual strings only where we want (when we want to map key to string)
            for (int i = 0; i < m_keyToString.Length; i++)
            {
                m_keyToString[i] = null;
            }

            //  This are here only for controling the delay in keypress
            AddKey(Keys.Left, null, null);
            AddKey(Keys.Right, null, null);
            AddKey(Keys.Home, null, null);
            AddKey(Keys.End, null, null);
            AddKey(Keys.Delete, null, null);
            AddKey(Keys.Back, null, null);

            //  For converting key to string
            AddKey(Keys.A, "a", "A");
            AddKey(Keys.B, "b", "B");
            AddKey(Keys.C, "c", "C");
            AddKey(Keys.D, "d", "D");
            AddKey(Keys.E, "e", "E");
            AddKey(Keys.F, "f", "F");
            AddKey(Keys.G, "g", "G");
            AddKey(Keys.H, "h", "H");
            AddKey(Keys.I, "i", "I");
            AddKey(Keys.J, "j", "J");
            AddKey(Keys.K, "k", "K");
            AddKey(Keys.L, "l", "L");
            AddKey(Keys.M, "m", "M");
            AddKey(Keys.N, "n", "N");
            AddKey(Keys.O, "o", "O");
            AddKey(Keys.P, "p", "P");
            AddKey(Keys.Q, "q", "Q");
            AddKey(Keys.R, "r", "R");
            AddKey(Keys.S, "s", "S");
            AddKey(Keys.T, "t", "T");
            AddKey(Keys.U, "u", "U");
            AddKey(Keys.V, "v", "V");
            AddKey(Keys.W, "w", "W");
            AddKey(Keys.X, "x", "X");
            AddKey(Keys.Y, "y", "Y");
            AddKey(Keys.Z, "z", "Z");
            AddKey(Keys.OemOpenBrackets, "[", "{");
            AddKey(Keys.OemCloseBrackets, "]", "}");
            AddKey(Keys.Multiply, "*", "*");
            AddKey(Keys.Subtract, "-", "-");
            AddKey(Keys.Add, "+", "+");
            AddKey(Keys.Divide, "/", "/");
            AddKey(Keys.NumPad0, "0", "0");
            AddKey(Keys.NumPad1, "1", "1");
            AddKey(Keys.NumPad2, "2", "2");
            AddKey(Keys.NumPad3, "3", "3");
            AddKey(Keys.NumPad4, "4", "4");
            AddKey(Keys.NumPad5, "5", "5");
            AddKey(Keys.NumPad6, "6", "6");
            AddKey(Keys.NumPad7, "7", "7");
            AddKey(Keys.NumPad8, "8", "8");
            AddKey(Keys.NumPad9, "9", "9");
            AddKey(Keys.Decimal, ".", ".");
            AddKey(Keys.OemBackslash, "\\", "|");
            AddKey(Keys.OemComma, ",", "<");
            AddKey(Keys.OemMinus, "-", "_");
            AddKey(Keys.OemPeriod, ".", ">");
            AddKey(Keys.OemPipe, "\\", "|");
            AddKey(Keys.OemPlus, "=", "+");
            AddKey(Keys.OemQuestion, "/", "?");
            AddKey(Keys.OemQuotes, "\'", "\"");
            AddKey(Keys.OemSemicolon, ";", ":");
            AddKey(Keys.OemTilde, "`", "~");
            AddKey(Keys.Space, " ", " ");
            AddKey(Keys.D0, "0", ")");
            AddKey(Keys.D1, "1", "!");
            AddKey(Keys.D2, "2", "@");
            AddKey(Keys.D3, "3", "#");
            AddKey(Keys.D4, "4", "$");
            AddKey(Keys.D5, "5", "%");
            AddKey(Keys.D6, "6", "^");
            AddKey(Keys.D7, "7", "&");
            AddKey(Keys.D8, "8", "*");
            AddKey(Keys.D9, "9", "(");
        }