本文整理匯總了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();
}