当前位置: 首页>>代码示例>>C#>>正文


C# Model.ToValueString方法代码示例

本文整理汇总了C#中System.ComponentModel.Model.ToValueString方法的典型用法代码示例。如果您正苦于以下问题:C# Model.ToValueString方法的具体用法?C# Model.ToValueString怎么用?C# Model.ToValueString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ComponentModel.Model的用法示例。


在下文中一共展示了Model.ToValueString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Render

        /// <summary>
        /// Rendert ein Match
        /// </summary>
        /// <param name="oMatch"></param>
        public void Render(Model.Database.Match oMatch)
        {
            Model.Database.Week oWeek;
            Model.Database.Region oRegion;

            Image oImage;
            Graphics oGraphics;

            string cWeekDirectoryPath;
            string cMatchFilePath;
            string cFehler = string.Empty;

            try
            {

                //Directory Checks
                //---------------------------------------------------------------------------------------------------------

                oWeek = m_oLstWeeks.Single(x => x.ID == oMatch.WEEK_ID);
                oRegion = m_oLstRegionen.Single(x => x.ID == oWeek.REGION_ID);

                cWeekDirectoryPath = Path.Combine(APP_CONFIG["OUTPUT_PATH"], string.Format("{0}_{1:d}-{2:d}",
                    oRegion.NAME,
                    oWeek.START_TIME,
                    oWeek.END_TIME));

                if (!Directory.Exists(cWeekDirectoryPath))
                {
                    Directory.CreateDirectory(cWeekDirectoryPath);
                }

                cMatchFilePath = Path.Combine(cWeekDirectoryPath, string.Format("{0}_{1}-{2}-{3}.png",
                    oMatch.ANET_ID.Replace("-", "."),
                    m_oDictWelten[oMatch.GREEN_WORLD_ID].NAME.Split('[')[0].Trim().Replace("'", ""),
                    m_oDictWelten[oMatch.BLUE_WORLD_ID].NAME.Split('[')[0].Trim().Replace("'", ""),
                    m_oDictWelten[oMatch.RED_WORLD_ID].NAME.Split('[')[0].Trim().Replace("'", "")));


                oImage = Image.FromFile(APP_CONFIG["TEMPLATE_PATH"]);
                oGraphics = Graphics.FromImage(oImage);
                oGraphics.SmoothingMode = SmoothingMode.AntiAlias;
                oGraphics.InterpolationMode = InterpolationMode.High;
                oGraphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

                //Header
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderHeader(ref oImage, ref oGraphics, oMatch, oWeek);

                //Matchup
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderMatchupFinal(ref oImage, ref oGraphics, oMatch, oWeek);

                //SMC
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderSMC(ref oImage, ref oGraphics, oMatch, oWeek);

                //Keepcrusher
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderKeepcrusher(ref oImage, ref oGraphics, oMatch, oWeek);

                //Camps
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderCampSupremacy(ref oImage, ref oGraphics, oMatch, oWeek);

                //Battle
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderInBattle(ref oImage, ref oGraphics, oMatch, oWeek);

                //Gilden
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderGuilds(ref oImage, ref oGraphics, oMatch, oWeek);

                //Tick
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderTick(ref oImage, ref oGraphics, oMatch, oWeek);

                //BLoodlust
                //---------------------------------------------------------------------------------------------------------
                cFehler += RenderBloodlust(ref oImage, ref oGraphics, oMatch, oWeek);

                if (cFehler.Length == 0)
                {
                    oImage.Save(cMatchFilePath, System.Drawing.Imaging.ImageFormat.Png);
                }
                else
                {
                    MessageBox.Show("Fehler bei " + oMatch.ToValueString());
                }
                SetLoadingLabelCurrents("Saved.", 9, ANZ_SCHRITTE);

            }
            catch (Exception oEx)
            {
                LOGWRITER.WriteMessage(oEx.ToString(), LogWriter.MESSAGE_TYPE.Error);
            }
        }
开发者ID:werdes,项目名称:WvW_Renderer,代码行数:100,代码来源:Wvw_Info_Renderer.cs


注:本文中的System.ComponentModel.Model.ToValueString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。