當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。