コード例 #1
0
ファイル: IconsHelper.cs プロジェクト: aureliopires/gisa
        // utilizado quando se pretende o icon da entidade mais o da relação
        public Bitmap GetIcon(TipoEntidadeInterna indexEntidade, TipoEstado indexEstadoEntidade, TipoOpcao indexOpcao, TipoEstado indexEstadoRelacao)
        {
            var idxIconEntidade = new EntidadeIconIndexFormat() { tipoEntidadeInterna = indexEntidade, iconEstadoEntidade = indexEstadoEntidade, iconOpcao = indexOpcao };
            var idxPropRelEntidade = new PropRelIconIndexFormat() { iconEstado = indexEstadoRelacao, iconOpcao = indexOpcao, propRelIcon = SharedResourcesOld.CurrentSharedResources.Relation };
            var idxIconComposto = new ComposedIconIndexFormat() { entidadeIconIndexFormat = idxIconEntidade, propRelIconIndexFormat = idxPropRelEntidade };

            return GetComposedIcon(idxIconComposto);
        }
コード例 #2
0
ファイル: IconsHelper.cs プロジェクト: aureliopires/gisa
        private Bitmap GetComposedIcon(ComposedIconIndexFormat idxIconComposto)
        {
            if (ComposedIconsDictionary.ContainsKey(idxIconComposto)) return ComposedIconsDictionary[idxIconComposto];

            Bitmap bmpEntidade = GetBitmapEntidade(idxIconComposto.entidadeIconIndexFormat);
            Bitmap bmpRelProp = GetBitmapPropRel(idxIconComposto.propRelIconIndexFormat);

            var bmp = ComposeIcon(bmpEntidade, bmpRelProp);
            ComposedIconsDictionary[idxIconComposto] = bmp;

            return bmp;
        }
コード例 #3
0
ファイル: IconsHelper.cs プロジェクト: huguitosilva1/gisa
        private Bitmap GetComposedIcon(ComposedIconIndexFormat idxIconComposto)
        {
            if (ComposedIconsDictionary.ContainsKey(idxIconComposto))
            {
                return(ComposedIconsDictionary[idxIconComposto]);
            }

            Bitmap bmpEntidade = GetBitmapEntidade(idxIconComposto.entidadeIconIndexFormat);
            Bitmap bmpRelProp  = GetBitmapPropRel(idxIconComposto.propRelIconIndexFormat);

            var bmp = ComposeIcon(bmpEntidade, bmpRelProp);

            ComposedIconsDictionary[idxIconComposto] = bmp;

            return(bmp);
        }
コード例 #4
0
ファイル: IconsHelper.cs プロジェクト: huguitosilva1/gisa
        // utilizado quando se pretende o icon da entidade mais o da relação
        public Bitmap GetIcon(TipoEntidadeInterna indexEntidade, TipoEstado indexEstadoEntidade, TipoOpcao indexOpcao, TipoEstado indexEstadoRelacao)
        {
            var idxIconEntidade = new EntidadeIconIndexFormat()
            {
                tipoEntidadeInterna = indexEntidade, iconEstadoEntidade = indexEstadoEntidade, iconOpcao = indexOpcao
            };
            var idxPropRelEntidade = new PropRelIconIndexFormat()
            {
                iconEstado = indexEstadoRelacao, iconOpcao = indexOpcao, propRelIcon = SharedResourcesOld.CurrentSharedResources.Relation
            };
            var idxIconComposto = new ComposedIconIndexFormat()
            {
                entidadeIconIndexFormat = idxIconEntidade, propRelIconIndexFormat = idxPropRelEntidade
            };

            return(GetComposedIcon(idxIconComposto));
        }