コード例 #1
0
        public static void ShowCodeGeneratorForm(IEnumerable <ClassNode> classes, CppTypeMapping typeMapping)
        {
            Contract.Requires(classes != null);
            Contract.Requires(typeMapping != null);

            ShowCodeGeneratorForm(classes, new CppCodeGenerator(typeMapping));
        }
コード例 #2
0
ファイル: CppCodeGenerator.cs プロジェクト: zeffy/ReClass.NET
 public CppCodeGenerator(CppTypeMapping typeMapping)
 {
     nodeTypeToTypeDefinationMap = new Dictionary <Type, string>
     {
         [typeof(BoolNode)]           = typeMapping.TypeBool,
         [typeof(DoubleNode)]         = typeMapping.TypeDouble,
         [typeof(FloatNode)]          = typeMapping.TypeFloat,
         [typeof(FunctionPtrNode)]    = typeMapping.TypeFunctionPtr,
         [typeof(Int8Node)]           = typeMapping.TypeInt8,
         [typeof(Int16Node)]          = typeMapping.TypeInt16,
         [typeof(Int32Node)]          = typeMapping.TypeInt32,
         [typeof(Int64Node)]          = typeMapping.TypeInt64,
         [typeof(Matrix3x3Node)]      = typeMapping.TypeMatrix3x3,
         [typeof(Matrix3x4Node)]      = typeMapping.TypeMatrix3x4,
         [typeof(Matrix4x4Node)]      = typeMapping.TypeMatrix4x4,
         [typeof(UInt8Node)]          = typeMapping.TypeUInt8,
         [typeof(UInt16Node)]         = typeMapping.TypeUInt16,
         [typeof(UInt32Node)]         = typeMapping.TypeUInt32,
         [typeof(UInt64Node)]         = typeMapping.TypeUInt64,
         [typeof(Utf8CharacterNode)]  = typeMapping.TypeUtf8Text,
         [typeof(Utf16CharacterNode)] = typeMapping.TypeUtf16Text,
         [typeof(Utf32CharacterNode)] = typeMapping.TypeUtf32Text,
         [typeof(Vector2Node)]        = typeMapping.TypeVector2,
         [typeof(Vector3Node)]        = typeMapping.TypeVector3,
         [typeof(Vector4Node)]        = typeMapping.TypeVector4
     };
 }
コード例 #3
0
ファイル: SettingsForm.cs プロジェクト: zk2013/ReClass.NET
        public SettingsForm(Settings settings, CppTypeMapping typeMapping)
        {
            Contract.Requires(settings != null);
            Contract.Requires(typeMapping != null);

            this.settings    = settings;
            this.typeMapping = typeMapping;

            InitializeComponent();

            var imageList = new ImageList();

            imageList.Images.Add(Properties.Resources.B16x16_Gear);
            imageList.Images.Add(Properties.Resources.B16x16_Color_Wheel);
            imageList.Images.Add(Properties.Resources.B16x16_Settings_Edit);

            settingsTabControl.ImageList              = imageList;
            generalSettingsTabPage.ImageIndex         = 0;
            colorsSettingTabPage.ImageIndex           = 1;
            typeDefinitionsSettingsTabPage.ImageIndex = 2;

            SetGeneralBindings();
            SetColorBindings();
            SetTypedefinitionBindings();

            if (NativeMethods.IsUnix())
            {
                fileAssociationGroupBox.Enabled = false;
            }
            else
            {
                NativeMethodsWindows.SetButtonShield(createAssociationButton, true);
                NativeMethodsWindows.SetButtonShield(removeAssociationButton, true);
            }
        }