コード例 #1
0
ファイル: CText.cs プロジェクト: bohning/Vocaluxe
        public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight)
        {
            _Theme = new SThemeText();
            _ThemeLoaded = false;
            _ButtonText = false;

            X = x;
            Y = y;
            Z = z;
            Height = h;
            MaxWidth = mw;
            Align = align;
            Style = style;
            Fon = font;

            Color = new SColorF(r, g, b, a);
            SColor = new SColorF(r, g, b, a);

            text = Text;

            Selected = false;

            if (MaxWidth > 0)
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, MaxWidth, 3f * CSettings.iRenderH, 0f);
            }
            else
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, 3f * CSettings.iRenderW, 3f * CSettings.iRenderH, 0f);
            }

            Reflection = true;
            ReflectionSpace = rspace;
            ReflectionHeight = rheight;
        }
コード例 #2
0
 public Image GetAsset(EStyle style, EAsset asset, EAssetModifier modifier)
 {
     lock (assets)
     {
         return(assets.Where(x => x.style == style && asset == x.asset && x.modifier == modifier).First()?.image);
     }
 }
コード例 #3
0
 public Image GetAsset(EStyle style, EAsset asset)
 {
     lock (assets)
     {
         return(assets.Where(x => x.style == style && asset == x.asset && x.modifier == EAssetModifier.All).FirstOrDefault()?.image);
     }
 }
コード例 #4
0
        public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string fontFamily, SColorF col, string text, int partyModeID = -1,
                     float rheight = 0,
                     float rspace  = 0) : this(partyModeID)
        {
            _Theme = new SThemeText {
                FontFamily = fontFamily, FontStyle = style, FontHeight = h, Text = text, Color = { A = col.A, B = col.B, G = col.G, R = col.R }
            };
            ThemeLoaded = false;
            _ButtonText = false;

            MaxRect      = new SRectF(x, y, mw, h, z);
            Align        = align;
            ResizeAlign  = EHAlignment.Center;
            _Font.Name   = fontFamily;
            _Font.Style  = style;
            _Font.Height = h;

            Color    = col;
            SelColor = col;

            Text = text;

            Selected = false;

            _ReflectionSpace  = rspace;
            _ReflectionHeight = rheight;
        }
コード例 #5
0
ファイル: CGlyph.cs プロジェクト: da-ka/Vocaluxe
        private float _GetFactor(char chr, TextFormatFlags flags)
        {
            if (CFonts.Style == EStyle.Normal)
                return 1f;

            EStyle style = CFonts.Style;

            CFonts.Style = EStyle.Normal;
            CFonts.Height = Sizeh;
            float hStyle, hNormal;
            using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
            {
                System.Drawing.Font fo = CFonts.GetFont();
                Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
                //SizeF size = g.MeasureString(chr.ToString(), fo);
                hNormal = sizeB.Height;
            }
            CFonts.Style = style;
            using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
            {
                System.Drawing.Font fo = CFonts.GetFont();
                Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
                //size = g.MeasureString(chr.ToString(), fo);
                hStyle = sizeB.Height;
            }
            return hNormal / hStyle;
        }
コード例 #6
0
        private float GetFactor(char chr, TextFormatFlags flags)
        {
            if (CFonts.Style == EStyle.Normal)
            {
                return(1f);
            }

            EStyle style = CFonts.Style;

            CFonts.Style  = EStyle.Normal;
            CFonts.Height = SIZEh;
            Bitmap bmp = new Bitmap(10, 10);

            System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp);

            Font fo    = CFonts.GetFont();
            Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
            //SizeF size = g.MeasureString(chr.ToString(), fo);
            float h_normal = sizeB.Height;

            CFonts.Style = style;
            bmp          = new Bitmap(10, 10);
            g            = System.Drawing.Graphics.FromImage(bmp);

            fo    = CFonts.GetFont();
            sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
            //size = g.MeasureString(chr.ToString(), fo);
            float h_style = sizeB.Height;

            g.Dispose();
            return(h_normal / h_style);
        }
コード例 #7
0
        public CFontStyle(string file, EStyle style, float outline, SColorF outlineColor)
        {
            _FilePath    = file;
            _Style       = style;
            Outline      = outline;
            OutlineColor = outlineColor;

            switch (CConfig.Config.Graphics.TextureQuality)
            {
            case ETextureQuality.TR_CONFIG_TEXTURE_LOWEST:
                _MaxGlyphHeight = 20f;
                break;

            case ETextureQuality.TR_CONFIG_TEXTURE_LOW:
                _MaxGlyphHeight = 40f;
                break;

            case ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM:
                _MaxGlyphHeight = 60f;
                break;

            case ETextureQuality.TR_CONFIG_TEXTURE_HIGH:
                _MaxGlyphHeight = 80f;
                break;

            case ETextureQuality.TR_CONFIG_TEXTURE_HIGHEST:
                _MaxGlyphHeight = 100f;
                break;

            default:
                _MaxGlyphHeight = 60f;
                break;
            }
        }
コード例 #8
0
 public void SendStyle(EStyle Style)
 {
     if (Style == EStyle.Blue)
     {
         Icon = Assets.Musix_Icon_Blue;
     }
     else if (Style == EStyle.Color)
     {
         Icon = Assets.Musix_Icon_Rainbow;
     }
     foreach (Control Ct in Controls)
     {
         if (typeof(IStyleableControl).IsAssignableFrom(Ct.GetType()))
         {
             IStyleableControl styleableControl = Ct as IStyleableControl;
             styleableControl.SendStyle(Style);
         }
     }
     foreach (Control Ct in PNContent.Controls)
     {
         if (typeof(IStyleableControl).IsAssignableFrom(Ct.GetType()))
         {
             IStyleableControl styleableControl = Ct as IStyleableControl;
             styleableControl.SendStyle(Style);
         }
     }
 }
コード例 #9
0
        public void SetShowData(EStyle style, string content, string lBtnStr = null, Action lBtnHandle = null,
                                string mBtnStr = null, Action mBtnHandle = null, string rBtnStr = null, Action rBtnHandle = null)
        {
            Utility.GameObj.SetActive(mLeftBtnGo, 0 != (style & EStyle.Left));
            Utility.GameObj.SetActive(mMiddleBtnGo, 0 != (style & EStyle.Middle));
            Utility.GameObj.SetActive(mRightBtnGo, 0 != (style & EStyle.Right));

            if (null != mContentText)
            {
                mContentText.text = content;
            }

            if (null != lBtnStr)
            {
                mLeftBtnDescText.text = lBtnStr;
            }

            if (null != mBtnStr)
            {
                mMiddleBtnDescText.text = mBtnStr;
            }

            if (null != rBtnStr)
            {
                mRightBtnDescText.text = rBtnStr;
            }

            mLeftBtnHandle   = lBtnHandle;
            mMiddleBtnHandle = mBtnHandle;
            mRightBtnHandle  = rBtnHandle;
        }
コード例 #10
0
ファイル: CText.cs プロジェクト: bohning/Vocaluxe
        public CText()
        {
            _Theme = new SThemeText();
            _ThemeLoaded = false;
            _ButtonText = false;

            X = 0f;
            Y = 0f;
            Z = 0f;
            Height = 1f;
            MaxWidth = 0f;
            Bounds = new SRectF();
            Align = EAlignment.Left;
            Style = EStyle.Normal;
            Fon = "Normal";

            Color = new SColorF();
            SColor = new SColorF();
            Reflection = false;
            ReflectionSpace = 0f;
            ReflectionHeight = 0f;

            Text = String.Empty;
            Selected = false;
            Visible = true;
            Alpha = 1f;
        }
コード例 #11
0
ファイル: CText.cs プロジェクト: zhaozw/Vocaluxe
        public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight)
        {
            _Theme       = new SThemeText();
            _ThemeLoaded = false;
            _ButtonText  = false;

            X        = x;
            Y        = y;
            Z        = z;
            Height   = h;
            MaxWidth = mw;
            Align    = align;
            Style    = style;
            Fon      = font;

            Color  = new SColorF(r, g, b, a);
            SColor = new SColorF(r, g, b, a);

            Text = text;

            Selected = false;

            if (MaxWidth > 0)
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, MaxWidth, 3f * CSettings.iRenderH, 0f);
            }
            else
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, 3f * CSettings.iRenderW, 3f * CSettings.iRenderH, 0f);
            }

            Reflection       = true;
            ReflectionSpace  = rspace;
            ReflectionHeight = rheight;
        }
コード例 #12
0
ファイル: PeTipsMsg.cs プロジェクト: shrubba/planetexplorers
    public PeTipMsg(string content, string iconName, EMsgLevel level, EMsgType msgType = EMsgType.Misc, int musicID = -1)
    {
        m_IconName = iconName;
        m_Content  = content;
        m_MsgType  = msgType;
        m_MusicID  = musicID;
        m_Style    = EStyle.Icon;

        if (level == EMsgLevel.Norm)
        {
            m_Color = s_NormalColor;
        }
        else if (level == EMsgLevel.Warning)
        {
            m_Color = s_WarningColor;
        }
        else if (level == EMsgLevel.Error)
        {
            m_Color = s_ErrorColor;
        }
        else if (level == EMsgLevel.HighLightRed)
        {
            m_Color = s_HighLightRed;
        }

        PeTipsMsgMan.Instance.AddTipMsg(this);
    }
コード例 #13
0
ファイル: CText.cs プロジェクト: zhaozw/Vocaluxe
        public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
        {
            _Theme       = new SThemeText();
            _ThemeLoaded = false;
            _ButtonText  = false;

            X        = x;
            Y        = y;
            Z        = z;
            Height   = h;
            MaxWidth = mw;
            Align    = align;
            Style    = style;
            Fon      = font;

            Color  = col;
            SColor = new SColorF(col);

            Text = text;

            Selected = false;

            if (MaxWidth > 0)
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, MaxWidth, 3f * CSettings.iRenderH, 0f);
            }
            else
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, 3f * CSettings.iRenderW, 3f * CSettings.iRenderH, 0f);
            }

            Reflection = false;
        }
コード例 #14
0
 /// <summary>
 /// Return info by type.
 /// </summary>
 public MyImageStyleInfo GetInfo(EStyle type)
 {
     if (type <= EStyle.UNDEFINED || EStyle.Length <= type)
     {
         return(null);
     }
     return(mConfig.Infos[(int)type]);
 }
コード例 #15
0
 public static void ShowMsgBox(EStyle style, string content, Action confirmHandle = null, Action cancelHandle = null)
 {
     Game.WindowsMgr.ShowWindow <MessageBoxWnd>(delegate(WindowBase wnd)
     {
         MessageBoxWnd tmpWnd = wnd as MessageBoxWnd;
         tmpWnd.SetShowData(style, content, confirmHandle, cancelHandle);
     });
 }
コード例 #16
0
 public void SendStyle(EStyle Style)
 {
     System.Console.WriteLine($"GOT STYLE: {Style}");
     this.Style = Style;
     foreach (MusixDynamicSidebarItem item in flowElements.Controls.OfType <MusixDynamicSidebarItem>())
     {
         System.Console.WriteLine("Send Style");
         item.SendStyle(Style);
     }
 }
コード例 #17
0
        void SetShowData(EStyle style, string content,
                         Action confirmHandle = null, Action cancelHandle = null)
        {
            mMsgContentLabel.text = content;
            mConfirmHandle        = confirmHandle;

            mCancelHandle = cancelHandle;

            SetActive(mCanceBtn, cancelHandle != null);
        }
コード例 #18
0
ファイル: SearchEntry.cs プロジェクト: ozay17/MusixClient
 public void SendStyle(EStyle Style)
 {
     if (Style == EStyle.Blue)
     {
         pbDownload.Image = Assets.DownloadMain_Blue;
     }
     else if (Style == EStyle.Color)
     {
         pbDownload.Image = Assets.DownloadMain_Color;
     }
 }
コード例 #19
0
 public Image GetIcon(EStyle style)
 {
     if (style == EStyle.Blue)
     {
         return(Assets.Download1_Blue);
     }
     else
     {
         return(Assets.Download1_Color);
     }
 }
コード例 #20
0
ファイル: UILabel.cs プロジェクト: TheWindX/YAUI
 public UILabel(string t = "Template", int sz = 12, EStyle st = EStyle.normal, uint color = 0xffffffff, uint colorLink = 0xffffffff, float maxLength = -1)
 {
     mStyle = st;
     mStyleBack = st;
     mSz = sz;
     text = t;
     textColor = color;
     textColorLink = colorLink;
     mLineWidthLimit = maxLength;
     updateFont();
 }
コード例 #21
0
ファイル: InfoPage.cs プロジェクト: ozay17/MusixClient
 public Image GetIcon(EStyle style)
 {
     if (style == EStyle.Blue)
     {
         return(Assets.Musix_Main_BDROP1);
     }
     else
     {
         return(Assets.Musix_Main_R1);
     }
 }
コード例 #22
0
 public Image GetIcon(EStyle style)
 {
     if (style == EStyle.Blue)
     {
         return(Assets.Settings_Blue);
     }
     else
     {
         return(Assets.Settings_Color);
     }
 }
コード例 #23
0
ファイル: UIEdit.cs プロジェクト: TheWindX/YAUI
        public UIEdit(string bgText, int fontSz = 10, int w=128, int lines=1, uint color = 0xffffffff, EStyle style=EStyle.normal)
        {
            shrinkAble = true;
            mBackGround.width = w;
            mBackGround.height = fontSz*lines+UILabel.lineHeightGain*(lines-1);
            mLabel = new UILabel(bgText, fontSz, EStyle.normal, color, color, w);

            this.evtOnLMDown += onClick;
            mBackGround.paresent = this;
            mLabel.paresent = this;
            mBackGround.setDepthTail();
        }
コード例 #24
0
        private void _DrawSelectedTileText(CText text, float scaleFactor, EStyle style)
        {
            CText ScaledText = _ScaleText(text, scaleFactor, style);

            ScaledText.Color.A = 1f;
            float X = MaxRect.X - (MaxRect.W * (SelectedTileZoomFactor - 1) / 2);

            X            += (_TileCoverW + _TileTextIndent) * SelectedTileZoomFactor;
            ScaledText.X  = (float)Math.Round(X);
            ScaledText.Y -= _ListDragDiffY;
            ScaledText.Draw();
        }
コード例 #25
0
 public void RegisterAsset(EStyle style, EAsset asset, Image Image)
 {
     lock (assets)
     {
         if (!HasAsset(style, asset))
         {
             assets.Add(new MusixAssetItem()
             {
                 asset = asset, style = style, image = Image
             });
         }
     }
 }
コード例 #26
0
 public Image GetAsset(EStyle style, EAsset asset)
 {
     if (!AssetCache.HasAsset(style, asset))
     {
         Image newAsset = MenuItem.GetIcon(style);
         AssetCache.RegisterAsset(style, EAsset.MenuIcon, newAsset);
         return(newAsset);
     }
     else
     {
         return(AssetCache.GetAsset(style, asset));
     }
 }
コード例 #27
0
        private CText _ScaleText(CText text, float scaleFactor, EStyle style)
        {
            SRectF ScaledRect = new SRectF(text.X, text.Y, text.W, text.H, text.Z);

            ScaledRect = ScaledRect.Scale(scaleFactor);
            CText ScaledText = new CText(ScaledRect.X, ScaledRect.Y, ScaledRect.Z,
                                         ScaledRect.H, ScaledRect.W, text.Align, style,
                                         "Outline", text.Color, "");

            ScaledText.MaxRect     = new SRectF(ScaledText.MaxRect.X, ScaledText.MaxRect.Y, MaxRect.W + MaxRect.X - ScaledText.Rect.X - 5f, ScaledText.MaxRect.H, ScaledText.MaxRect.Z);
            ScaledText.ResizeAlign = EHAlignment.Center;
            ScaledText.Text        = text.Text;
            return(ScaledText);
        }
コード例 #28
0
 public void SendStyle(EStyle Style)
 {
     StatusIconProvider?.StyleChanged(Style);
     if (!AssetCache.HasAsset(Style, EAsset.MenuIcon))
     {
         Image newAsset = MenuItem.GetIcon(Style);
         AssetCache.RegisterAsset(Style, EAsset.MenuIcon, newAsset);
         pbIcon.Image = newAsset;
     }
     else
     {
         pbIcon.Image = AssetCache.GetAsset(Style, EAsset.MenuIcon);
     }
 }
コード例 #29
0
 public void DeregisterAsset(EStyle style, EAsset asset, EAssetModifier modifier, bool Dispose)
 {
     lock (assets)
     {
         MusixAssetItem item = assets.Where(x => x.asset == asset && x.style == style && x.modifier == modifier).First();
         if (item != null)
         {
             if (Dispose)
             {
                 item.image.Dispose();
             }
             assets.Remove(item);
         }
     }
 }
コード例 #30
0
 public void SendStyle(EStyle Style)
 {
     if (Style == EStyle.Blue)
     {
         pbBrowse.Image    = Assets.Browse_Blue;
         pbDownloads.Image = Assets.DownloadMain_Blue;
         pbSearch.Image    = Assets.Search_Blue;
         pbSettings.Image  = Assets.Settings_Blue;
     }
     else if (Style == EStyle.Color)
     {
         pbBrowse.Image    = Assets.Browse_Color;
         pbDownloads.Image = Assets.DownloadMain_Color;
         pbSearch.Image    = Assets.Search_Color;
         pbSettings.Image  = Assets.Settings_Color;
     }
 }
コード例 #31
0
 public void SendStyle(EStyle Style)
 {
     if (Style == EStyle.Blue)
     {
         pbSearch.Image = Assets.Search_Blue;
     }
     else if (Style == EStyle.Color)
     {
         pbSearch.Image = Assets.Search_Color;
     }
     foreach (Control ct in FlowEntries.Controls)
     {
         if (typeof(IStyleableControl).IsAssignableFrom(ct.GetType()))
         {
             ((IStyleableControl)ct).SendStyle(Style);
         }
     }
 }
コード例 #32
0
        private static void BuildGlyphs()
        {
            string Text = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPGRSTUVWGXZ1234567890";

            for (int i = 0; i < _Fonts.Count; i++)
            {
                CurrentFont = i;

                foreach (char chr in Text)
                {
                    Style = EStyle.Normal;
                    _Fonts[_CurrentFont].Normal.AddGlyph(chr);
                    Style = EStyle.Bold;
                    _Fonts[_CurrentFont].Bold.AddGlyph(chr);
                    Style = EStyle.Italic;
                    _Fonts[_CurrentFont].Italic.AddGlyph(chr);
                    Style = EStyle.BoldItalic;
                    _Fonts[_CurrentFont].BoldItalic.AddGlyph(chr);
                }
            }
            Style = EStyle.Normal;
            SetFont("Normal");
        }
コード例 #33
0
ファイル: ManWindow.cs プロジェクト: burstas/rmps
 public void ChangeStyle(EStyle style)
 {
     _Session.Style = style;
 }
コード例 #34
0
ファイル: DataModel.cs プロジェクト: burstas/rmps
        /// <summary>
        /// 获取指定标签下回答给定问题的答案
        /// </summary>
        /// <param name="list"></param>
        /// <param name="input"></param>
        /// <param name="style"></param>
        /// <param name="lanId">语言索引</param>
        /// <param name="catIds">标签索引</param>
        /// <returns></returns>
        public bool FindQuestion(List<MSentence> list, string input, EStyle style, string lanId, List<string> catIds)
        {
            input = ToLike(input);

            var buf = new StringBuilder();
            string cats = "";
            if (catIds != null && catIds.Count > 0)
            {
                foreach (string catId in catIds)
                {
                    if (CharUtil.IsValidate(catId))
                    {
                        buf.Append('\'').Append(catId).Append(",'");
                    }
                }
                if (buf.Length > 0)
                {
                    cats = buf.ToString(0, buf.Length - 1);
                }
                buf.Remove(0, buf.Length);
            }

            buf.Append("SELECT ");
            buf.Append(DataConst.P3100101).Append(',');
            buf.Append(DataConst.P3100102).Append(',');
            buf.Append(DataConst.P3100103).Append(',');
            buf.Append(DataConst.P3100104).Append(',');
            buf.Append(DataConst.P3100105).Append(',');
            buf.Append(DataConst.P3100106);
            buf.Append("  FROM ");
            buf.Append(DataConst.P3100100);
            if (cats.Length > 0)
            {
                buf.Append(" LEFT JOIN ").Append(DataConst.P3100300).Append(" ON ").Append(DataConst.P3100103).Append('=').Append(DataConst.P3100302);
            }
            buf.Append(" WHERE ");
            buf.Append(DataConst.P3100102).Append('=').Append((long)style);
            if (input.Length > 0 || input != "%")
            {
                buf.Append("  AND ").Append(DataConst.P3100106).Append(" LIKE '").Append(_UserModel.Encode(input)).Append('\'');
            }
            if (CharUtil.IsValidateHash(lanId))
            {
                buf.Append("  AND ").Append(DataConst.P3100104).Append("='").Append(lanId).Append('\'');
            }
            if (cats.Length > 0)
            {
                buf.Append("  AND ").Append(DataConst.P3100301).Append("in (").Append(cats).Append(')');
            }
            buf.Append(" ORDER BY ").Append(DataConst.P3100101).Append(" DESC");

            DataTable dt = _DBE.ExecuteSelect(buf.ToString());
            list.AddRange(from DataRow row in dt.Rows select ReadSentence(row));
            dt.Dispose();
            return true;
        }
コード例 #35
0
ファイル: CFont.cs プロジェクト: HansMaiser/Vocaluxe
        private static void BuildGlyphs()
        {
            string Text = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPGRSTUVWGXZ1234567890";

            for (int i = 0; i < _Fonts.Count; i++)
            {
                CurrentFont = i;

                foreach (char chr in Text)
                {
                    Style = EStyle.Normal;
                    _Fonts[_CurrentFont].Normal.AddGlyph(chr);
                    Style = EStyle.Bold;
                    _Fonts[_CurrentFont].Bold.AddGlyph(chr);
                    Style = EStyle.Italic;
                    _Fonts[_CurrentFont].Italic.AddGlyph(chr);
                    Style = EStyle.BoldItalic;
                    _Fonts[_CurrentFont].BoldItalic.AddGlyph(chr);
                }
            }
            Style = EStyle.Normal;
            SetFont("Normal");
            
        }
コード例 #36
0
ファイル: DataModel.cs プロジェクト: burstas/rmps
        /// <summary>
        /// 
        /// </summary>
        /// <param name="list"></param>
        /// <param name="askId"></param>
        /// <param name="style"></param>
        /// <param name="lanId"></param>
        /// <param name="catIds"></param>
        /// <returns></returns>
        public bool FindResponse(List<MSentence> list, string askId, EStyle style, string lanId, List<string> catIds)
        {
            var buf = new StringBuilder();
            if (catIds != null && catIds.Count > 0)
            {
                foreach (string catId in catIds)
                {
                    if (CharUtil.IsValidate(catId))
                    {
                        buf.Append('\'').Append(catId).Append(",'");
                    }
                }
            }

            bool withCat = buf.Length > 1;

            _DBE.AddTable(DataConst.P3100100);
            _DBE.AddTable(DataConst.P3100200);
            if (withCat)
            {
                _DBE.AddTable(DataConst.P3100300);
            }

            _DBE.AddColumn(DataConst.P3100101);
            _DBE.AddColumn(DataConst.P3100102);
            _DBE.AddColumn(DataConst.P3100103);
            _DBE.AddColumn(DataConst.P3100104);
            _DBE.AddColumn(DataConst.P3100105);
            _DBE.AddColumn(DataConst.P3100106);

            _DBE.AddWhere(DataConst.P3100103, DataConst.P3100202, false);
            if (withCat)
            {
                _DBE.AddWhere(DataConst.P3100103, DataConst.P3100302, false);
                _DBE.AddWhere(DataConst.P3100301, "IN", '(' + buf.ToString(0, buf.Length - 1) + ')', false);
            }
            _DBE.AddWhere(DataConst.P3100102, "" + (int)style, false);
            _DBE.AddWhere(DataConst.P3100201, askId);
            if (CharUtil.IsValidateHash(lanId))
            {
                _DBE.AddWhere(DataConst.P3100104, lanId);
            }
            _DBE.AddSort(DataConst.P3100203, false);

            DataTable dt = _DBE.ExecuteSelect();
            list.AddRange(from DataRow row in dt.Rows select ReadSentence(row));
            dt.Dispose();
            return true;
        }
コード例 #37
0
ファイル: DataModel.cs プロジェクト: burstas/rmps
        /// <summary>
        /// 
        /// </summary>
        /// <param name="style"></param>
        /// <returns></returns>
        public List<MSentence> ListSentence(EStyle style)
        {
            _DBE.ReInit();
            _DBE.AddTable(DataConst.P3100100);

            _DBE.AddColumn(DataConst.P3100101);
            _DBE.AddColumn(DataConst.P3100102);
            _DBE.AddColumn(DataConst.P3100103);
            _DBE.AddColumn(DataConst.P3100104);
            _DBE.AddColumn(DataConst.P3100105);
            _DBE.AddColumn(DataConst.P3100106);

            _DBE.AddWhere(DataConst.P3100102, ((int)style).ToString());
            _DBE.AddSort(DataConst.P3100101, false);

            DataTable dt = _DBE.ExecuteSelect();
            var list = (from DataRow row in dt.Rows select ReadSentence(row)).ToList();
            dt.Dispose();
            return list;
        }
コード例 #38
0
ファイル: CText.cs プロジェクト: HansMaiser/Vocaluxe
        public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
        {
            _Theme = new SThemeText();
            _ThemeLoaded = false;
            _ButtonText = false;

            X = x;
            Y = y;
            Z = z;
            Height = h;
            MaxWidth = mw;
            Align = align;
            HAlign = EHAlignment.Center;
            Style = style;
            Fon = font;

            Color = col;
            SColor = new SColorF(col);

            Text = text;

            Selected = false;

            if (MaxWidth > 0)
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, MaxWidth, 3f * CSettings.iRenderH, 0f);
            }
            else
            {
                Bounds = new SRectF(-CSettings.iRenderW, -CSettings.iRenderH, 3f * CSettings.iRenderW, 3f * CSettings.iRenderH, 0f);
            }

            Reflection = false;
        }
コード例 #39
0
 public bool HasAsset(EStyle style, EAsset asset)
 {
     return(GetAsset(style, asset) != null);
 }
コード例 #40
0
 public bool HasAsset(EStyle style, EAsset asset, EAssetModifier modifier)
 {
     return(GetAsset(style, asset, modifier) != null);
 }