本文整理汇总了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);
}
}