本文整理汇总了C#中Color.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Color.Save方法的具体用法?C# Color.Save怎么用?C# Color.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Color
的用法示例。
在下文中一共展示了Color.Save方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: uiGridViewColors_RowCommand
protected void uiGridViewColors_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "EditColor")
{
Color objData = new Color();
objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
uiTextBoxEnName.Text = objData.ColorNameEng;
uiTextBoxArName.Text = objData.ColorNameAr;
uiTextBoxColorCode.Text = objData.ColorCode;
uiPanelAllCats.Visible = false;
uiPanelEditCat.Visible = true;
CurrentColor = objData;
BindColors();
}
else if (e.CommandName == "DeleteColor")
{
try
{
Color objData = new Color();
objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
objData.MarkAsDeleted();
objData.Save();
CurrentColor = null;
BindColors();
}
catch (Exception ex)
{
uipanelError.Visible = true;
}
}
}
示例2: Save
private void Save(Color[,] colors, int height, int width)
{
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "RandomColorsGenerator.png");
colors.Save(width, height, path);
}
示例3: uiLinkButtonOK_Click
protected void uiLinkButtonOK_Click(object sender, EventArgs e)
{
Color color = new Color();
if (CurrentColor == null)
color.AddNew();
else
color = CurrentColor;
color.ColorNameEng = uiTextBoxEnName.Text;
color.ColorNameAr = uiTextBoxArName.Text;
color.ColorCode = uiTextBoxColorCode.Text;
color.Save();
ClearFields();
CurrentColor = null;
uiPanelEditCat.Visible = false;
uiPanelAllCats.Visible = true;
BindColors();
}