private static void CopyPlayerIcon(string stagingArea, string projectName)
        {
            string str1 = "Temp/WindowsPlayer.staging.ico";

            Vector2Int[] vector2IntArray = new Vector2Int[10]
            {
                new Vector2Int(256, 256),
                new Vector2Int(128, 128),
                new Vector2Int(96, 96),
                new Vector2Int(64, 64),
                new Vector2Int(48, 48),
                new Vector2Int(40, 40),
                new Vector2Int(32, 32),
                new Vector2Int(24, 24),
                new Vector2Int(20, 20),
                new Vector2Int(16, 16)
            };
            if (!IconUtility.SaveIcoForPlatform(str1, (BuildTargetGroup)1, vector2IntArray))
            {
                return;
            }
            string str2 = Paths.Combine(new string[3]
            {
                stagingArea,
                projectName,
                "WindowsPlayer.ico"
            });

            FileUtil.DeleteFileOrDirectory(str2);
            FileUtil.MoveFileOrDirectory(str1, str2);
        }
        public BusinessProfile()
        {
            CreateMap <Menu, MenuModel>()
            .ForMember(dst => dst.Icon, opt => opt.MapFrom((src, dst) =>
            {
                return(IconUtility.GetIcon(src.type));
            }));

            CreateMap <MenuModel, Menu>();

            CreateMap <PersonModel, Person>();
            CreateMap <Person, PersonModel>();

            CreateMap <ClientModel, Client>();
            CreateMap <Client, ClientModel>();

            CreateMap <StudentModel, Student>();//.ForMember(dst => dst.Courses,opt => opt.Ignore());
            CreateMap <Student, StudentModel>();

            CreateMap <CourseModel, Course>();
            CreateMap <Course, CourseModel>();

            CreateMap <PermissionModel, Permission>();
            CreateMap <Permission, PermissionModel>();

            CreateMap <UserModel, User>();
            CreateMap <User, UserModel>();

            CreateMap <RoleModel, Role>();
            CreateMap <Role, RoleModel>();

            CreateMap <UserRoleModel, UserRole>();
            CreateMap <UserRole, UserRoleModel>();
        }
コード例 #3
0
 public ExtrudeFaces()
 {
     m_Icons = new Texture2D[3];
     m_Icons[(int)ExtrudeMethod.IndividualFaces] = IconUtility.GetIcon("Toolbar/ExtrudeFace_Individual", IconSkin.Pro);
     m_Icons[(int)ExtrudeMethod.VertexNormal]    = IconUtility.GetIcon("Toolbar/ExtrudeFace_VertexNormals", IconSkin.Pro);
     m_Icons[(int)ExtrudeMethod.FaceNormal]      = IconUtility.GetIcon("Toolbar/ExtrudeFace_FaceNormals", IconSkin.Pro);
 }
コード例 #4
0
 public Contents()
 {
     visibilityToggleStyle                     = new GUIStyle();
     visibilityToggleStyle.fixedWidth          = EditorGUIUtility.singleLineHeight;
     visibilityToggleStyle.onNormal.background = IconUtility.LoadIconResource("Visibility_Tool", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath);
     visibilityToggleStyle.normal.background   = IconUtility.LoadIconResource("Visibility_Hidded", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath);
 }
コード例 #5
0
            public static void Init()
            {
                if (s_Initialized)
                {
                    return;
                }

                s_Initialized = true;

                var object_Graphic_off = IconUtility.GetIcon("Modes/Mode_Object");
                var face_Graphic_off   = IconUtility.GetIcon("Modes/Mode_Face");
                var vertex_Graphic_off = IconUtility.GetIcon("Modes/Mode_Vertex");
                var edge_Graphic_off   = IconUtility.GetIcon("Modes/Mode_Edge");

                selectModeIcons = new GUIContent[]
                {
                    object_Graphic_off != null
                    ? new GUIContent(object_Graphic_off, "Object Selection")
                    : new GUIContent("OBJ", "Object Selection"),
                    vertex_Graphic_off != null
                    ? new GUIContent(vertex_Graphic_off, "Vertex Selection")
                    : new GUIContent("VRT", "Vertex Selection"),
                    edge_Graphic_off != null
                    ? new GUIContent(edge_Graphic_off, "Edge Selection")
                    : new GUIContent("EDG", "Edge Selection"),
                    face_Graphic_off != null
                    ? new GUIContent(face_Graphic_off, "Face Selection")
                    : new GUIContent("FCE", "Face Selection"),
                };
            }
コード例 #6
0
 public ToggleXRay()
 {
     m_Icons = new Texture2D[]
     {
         IconUtility.GetIcon("Toolbar/Selection_SelectHidden-Off", IconSkin.Pro),
         IconUtility.GetIcon("Toolbar/Selection_SelectHidden-On", IconSkin.Pro)
     };
 }
コード例 #7
0
 public ToggleHandleOrientation()
 {
     m_Icons = new Texture2D[]
     {
         IconUtility.GetIcon("Toolbar/HandleAlign_World", IconSkin.Pro),
         IconUtility.GetIcon("Toolbar/HandleAlign_Local", IconSkin.Pro),
         IconUtility.GetIcon("Toolbar/HandleAlign_Plane", IconSkin.Pro),
     };
 }
コード例 #8
0
        public void GetApplicationInfoFromThePath()
        {
            if (!File.Exists(Path))
            {
                return;
            }

            Name = PathUtility.GetFileNameFromPath(Path) == null ? Name : PathUtility.GetFileNameFromPath(Path);
            Icon = IconUtility.ExtractIcon(Path);
        }
コード例 #9
0
    protected static void CopyResolutionDialogBanner(string destinationFolder)
    {
#pragma warning disable 618
        var bannerTexture = PlayerSettings.resolutionDialogBanner;
        if (bannerTexture != null)
        {
            var path = Path.Combine(destinationFolder, "ScreenSelector.png");
            IconUtility.SaveTextureToFile(path, bannerTexture, StringToFourCC("PNGf"));
        }
#pragma warning restore 618
    }
 protected override void CopyVariationFolderIntoStagingArea(
     BuildPostProcessArgs args,
     HashSet <string> filesToNotOverwrite)
 {
     FileUtil.CopyDirectoryFiltered(this.GetVariationFolder(args) + "/Data", (string)args.stagingAreaData, true, (Func <string, bool>)(f => this.CopyPlayerFilter(f, args)), true);
     if (base.GetCreateSolution(args))
     {
         string str = this.UseIl2Cpp ? "il2cpp" : "mono";
         List <KeyValuePair <string, string> > keyValuePairList = new List <KeyValuePair <string, string> >(8);
         keyValuePairList.Add(new KeyValuePair <string, string>("win32_development_" + str, "x86/Debug"));
         keyValuePairList.Add(new KeyValuePair <string, string>("win32_development_" + str, "x86/Release"));
         keyValuePairList.Add(new KeyValuePair <string, string>("win32_nondevelopment_" + str, "x86/Master"));
         keyValuePairList.Add(new KeyValuePair <string, string>("win64_development_" + str, "x64/Debug"));
         keyValuePairList.Add(new KeyValuePair <string, string>("win64_development_" + str, "x64/Release"));
         keyValuePairList.Add(new KeyValuePair <string, string>("win64_nondevelopment_" + str, "x64/Master"));
         if (this.UseIl2Cpp)
         {
             keyValuePairList.Add(new KeyValuePair <string, string>("win32_nondevelopment_" + str, "x86/MasterWithLTCG"));
             keyValuePairList.Add(new KeyValuePair <string, string>("win64_nondevelopment_" + str, "x64/MasterWithLTCG"));
         }
         foreach (KeyValuePair <string, string> keyValuePair in keyValuePairList)
         {
             WindowsDesktopStandalonePostProcessor.CopyVariationNativeBinaries(args, keyValuePair.Key, WindowsDesktopStandalonePostProcessor.kSolutionOutputFolder + "/" + keyValuePair.Value, false, false, true, this.UseIl2Cpp);
         }
         WindowsDesktopStandalonePostProcessor.CopyPlayerSolutionIntoStagingArea(args, filesToNotOverwrite, this.UseIl2Cpp);
     }
     else
     {
         string variationName = this.GetVariationName(args);
         WindowsDesktopStandalonePostProcessor.CopyVariationNativeBinaries(args, variationName, string.Empty, true, true, false, this.UseIl2Cpp);
         string str1 = Path.Combine((string)args.stagingArea, DesktopStandalonePostProcessor.IsHeadlessMode(args) ? "WindowsPlayerHeadless.exe" : "WindowsPlayer.exe");
         if (!IconUtility.AddIconToWindowsExecutable(str1))
         {
             throw new BuildFailedException("Failed to add a custom icon to the executable.");
         }
         ((BuildReport)args.report).RecordFileAdded(str1, CommonRoles.executable);
         ((BuildReport)args.report).RecordFileAdded((string)args.stagingArea + "/UnityPlayer.dll", CommonRoles.engineLibrary);
         ((BuildReport)args.report).RecordFileAdded((string)args.stagingArea + "/UnityCrashHandler" + ((int)args.target == 19 ? "64" : "32") + ".exe", CommonRoles.crashHandler);
         foreach (string file in Directory.GetFiles((string)args.stagingArea, "*.pdb", SearchOption.TopDirectoryOnly))
         {
             ((BuildReport)args.report).RecordFileAdded((string)args.stagingArea + "/" + Path.GetFileName(file), CommonRoles.debugInfo);
         }
         string str2 = (string)args.stagingArea + "/" + this.GetDestinationExeName(args);
         FileUtil.MoveFileOrDirectory(str1, str2);
         ((BuildReport)args.report).RecordFilesMoved(str1, str2);
     }
     DesktopStandalonePostProcessor.RecordCommonFiles(args, this.GetVariationFolder(args), (string)args.stagingArea);
 }
        public void New(RoutedEventArgs e)
        {
            var menuItem = e.Source as MenuItem;
            var header   = menuItem.Header.ToString();

            int type = 0;

            if (header.ToLower() == "folder")
            {
                type = 1;
            }
            else if (header.ToLower() == "file")
            {
                type = 2;
            }
            else if (header.ToLower() == "image")
            {
                type = 3;
            }

            var parentId = SelectedMenu.Id;

            var menuDto = new MenuModel
            {
                Name = "New " + header,
                Pid  = parentId,
                Type = type
            };

            _menuService.AddOrUpdate(menuDto).Then(r => {
                if (r.HasError())
                {
                    WindowManager.ShowErrorWindow(r.StatusCode);
                    return;
                }

                var menu = r.Data.Data;
                if (menu != null)
                {
                    SelectedMenu.Id = menu.Id;
                    menuDto.Id      = menu.Id;
                }
                menuDto.Icon   = IconUtility.GetIcon(menuDto.Type);
                menuDto.Parent = SelectedMenu;
                SelectedMenu.Children.Add(menuDto);
            });
        }
コード例 #12
0
        public void New(RoutedEventArgs e)
        {
            var menuItem = e.Source as MenuItem;
            var header   = menuItem.Header.ToString();

            int type = 0;

            if (header.ToLower() == "folder")
            {
                type = 1;
            }
            else if (header.ToLower() == "file")
            {
                type = 2;
            }
            else if (header.ToLower() == "image")
            {
                type = 3;
            }

            var parentId = SelectedMenu.Id;

            var menuDto = new MenuModel
            {
                Name = "New " + header,
                Pid  = parentId,
                Type = type
            };

            var addResult = _menuService.AddOrUpdate(menuDto);
            var menu      = addResult.Data;

            if (menu != null)
            {
                SelectedMenu.Id = menu.Id;
                menuDto.Id      = menu.Id;
            }
            menuDto.Icon   = IconUtility.GetIcon(menuDto.Type);
            menuDto.Parent = SelectedMenu;
            SelectedMenu.Children.Add(menuDto);
        }
コード例 #13
0
 public void GetIcon_ArgumentEmptyString_NoExceptionThrown()
 {
     Assert.DoesNotThrow(() => IconUtility.GetIcon(string.Empty));
 }
コード例 #14
0
 public void GetIcon_ArgumentEmptyString_ReturnsNull()
 {
     Assert.IsNull(IconUtility.GetIcon(string.Empty));
 }
コード例 #15
0
 public void GetIcon_ArgumentInvalidPathToTexture_ReturnsNull()
 {
     Assert.IsNull(IconUtility.GetIcon(k_InvalidPath));
 }
コード例 #16
0
        public static void SetIcon(this GameObject go, GameObjectLabelIcon icon)
        {
#if UNITY_EDITOR
            IconUtility.SetIcon(go, icon);
#endif
        }
コード例 #17
0
        public static void SetIcon(this GameObject go, Sprite sprite)
        {
#if UNITY_EDITOR
            IconUtility.SetIcon(go, sprite);
#endif
        }
コード例 #18
0
        public static void SetIcon(this GameObject go, Texture2D texture)
        {
#if UNITY_EDITOR
            IconUtility.SetIcon(go, texture);
#endif
        }
コード例 #19
0
        public static void ClearIcon(this GameObject go)
        {
#if UNITY_EDITOR
            IconUtility.SetIcon(go, (Texture2D)null);
#endif
        }
コード例 #20
0
 public void GetIcon_ArgumentValidPathToTexture_ReturnsValidReference()
 {
     Assert.IsNotNull(IconUtility.GetIcon(k_SculpIconPath));
 }
コード例 #21
0
        static void Init()
        {
            if (s_Initialized)
            {
                return;
            }

            s_Initialized = true;

            s_ButtonStyle = new GUIStyle()
            {
                normal = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_ButtonBackgroundNormal),
                    textColor  = UnityEditor.EditorGUIUtility.isProSkin ? k_TextColorWhiteNormal : Color.black
                },
                hover = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_ButtonBackgroundHover),
                    textColor  = UnityEditor.EditorGUIUtility.isProSkin ? k_TextColorWhiteHover : Color.black,
                },
                active = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_ButtonBackgroundPressed),
                    textColor  = UnityEditor.EditorGUIUtility.isProSkin ? k_TextColorWhiteActive : Color.black,
                },
                alignment     = ProBuilderEditor.s_IsIconGui ? TextAnchor.MiddleCenter : TextAnchor.MiddleLeft,
                border        = new RectOffset(3, 3, 3, 3),
                stretchWidth  = true,
                stretchHeight = false,
                margin        = new RectOffset(4, 4, 4, 4),
                padding       = new RectOffset(4, 4, 4, 4)
            };

            s_ToolbarHelpIcon = new GUIStyle()
            {
                margin      = new RectOffset(0, 0, 0, 0),
                padding     = new RectOffset(0, 0, 0, 0),
                alignment   = TextAnchor.MiddleCenter,
                fixedWidth  = 18,
                fixedHeight = 18
            };

            s_SettingsGroup = new GUIStyle()
            {
                normal = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_SettingsBackgroundNormal)
                },
                hover = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_SettingsBackgroundNormal)
                },
                active = new GUIStyleState()
                {
                    background = IconUtility.GetIcon(k_SettingsBackgroundNormal)
                },
                border        = new RectOffset(3, 3, 3, 3),
                stretchWidth  = true,
                stretchHeight = false,
                margin        = new RectOffset(4, 4, 4, 4),
                padding       = new RectOffset(4, 4, 4, 6)
            };

            s_RowStyle = new GUIStyle()
            {
                normal = new GUIStyleState()
                {
                    background = UnityEditor.EditorGUIUtility.whiteTexture
                },
                stretchWidth  = true,
                stretchHeight = false,
                margin        = new RectOffset(4, 4, 4, 4),
                padding       = new RectOffset(4, 4, 4, 4)
            };

            s_HeaderLabel = new GUIStyle(UnityEditor.EditorStyles.boldLabel)
            {
                alignment     = TextAnchor.LowerLeft,
                fontSize      = 18,
                stretchWidth  = true,
                stretchHeight = false
            };

            Font asap = FileUtility.LoadInternalAsset <Font>(k_FontAsap);

            if (asap != null)
            {
                s_HeaderLabel.font = asap;
            }

            s_SceneTextBox = new GUIStyle(GUI.skin.box)
            {
                wordWrap      = false,
                richText      = true,
                stretchWidth  = false,
                stretchHeight = false,
                border        = new RectOffset(2, 2, 2, 2),
                padding       = new RectOffset(4, 4, 4, 4),
                alignment     = TextAnchor.UpperLeft,
                normal        = new GUIStyleState()
                {
                    textColor  = k_TextColorWhiteNormal,
                    background = IconUtility.GetIcon(k_SceneTextBoxBackgroundNormal)
                }
            };
        }