private SQLiteParameter[] GetSqlParameters() { List <SQLiteParameter> SqlParmColl = new List <SQLiteParameter>(); try { SqlParmColl.Add(CommonDB.AddSqlParm("@ID", ID, DbType.Int64)); SqlParmColl.Add(CommonDB.AddSqlParm("@DisplayID", DisplayID, DbType.Int64)); SqlParmColl.Add(CommonDB.AddSqlParm("@oIndex", oIndex, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@DlgType", DlgType, DbType.Byte)); SqlParmColl.Add(CommonDB.AddSqlParm("@DlgIndex", DlgIndex, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@Left", Left, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@Right", Right, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@Top", Top, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@Bottom", Bottom, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@ScanTime", ScanTime, DbType.Int16)); SqlParmColl.Add(CommonDB.AddSqlParm("@ViewLable", ViewLable, DbType.Boolean)); SqlParmColl.Add(CommonDB.AddSqlParm("@Index", Index, DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@BackColor", BackColor.ToArgb(), DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@TrendColor", TrendColor.ToArgb(), DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@TrendWidth", TrendWidth, DbType.Int16)); SqlParmColl.Add(CommonDB.AddSqlParm("@Fill", Fill, DbType.Boolean)); SqlParmColl.Add(CommonDB.AddSqlParm("@Font", Font, DbType.String)); SqlParmColl.Add(CommonDB.AddSqlParm("@FontColor", FontColor.ToArgb(), DbType.Int32)); SqlParmColl.Add(CommonDB.AddSqlParm("@LastRev", LastRev, DbType.Boolean)); SqlParmColl.Add(CommonDB.AddSqlParm("@CompiledExp", CompiledExp, DbType.Binary)); SqlParmColl.Add(CommonDB.AddSqlParm("@validexpression", validexpression, DbType.Boolean)); return(SqlParmColl.ToArray()); } catch (SQLiteException Exc) { throw Exc; } }
private async void StackCollorDemo_ItemClick(object sender, ItemClickEventArgs e) { TrendColor item = (TrendColor)e.ClickedItem; try { var fileSaveTrendColor = await ApplicationData.Current.LocalFolder.GetFileAsync("UserDefaultTrendColor.txt"); await FileIO.WriteTextAsync(fileSaveTrendColor, item.LinkColor); } catch (Exception) { var fileSaveTrendColor = await ApplicationData.Current.LocalFolder.CreateFileAsync("UserDefaultTrendColor.txt"); await FileIO.WriteTextAsync(fileSaveTrendColor, item.LinkColor); } GetBoolSave = "1"; try { var fileSaveBool = await ApplicationData.Current.LocalFolder.GetFileAsync("UserDefaultBool.txt"); await FileIO.WriteTextAsync(fileSaveBool, GetBoolSave.ToString()); } catch (Exception) { var fileSaveBool = await ApplicationData.Current.LocalFolder.CreateFileAsync("UserDefaultBool.txt"); await FileIO.WriteTextAsync(fileSaveBool, GetBoolSave.ToString()); } SetTheme.Text = "Set Theme " + item.NameColor + " Success!!!"; showNotifi.Visibility = Visibility.Visible; await Task.Delay(1000); SetTheme.Text = "Please reset application!!!"; await Task.Delay(2000); showNotifi.Visibility = Visibility.Collapsed; }
/// <summary> /// Initializes a new instance of the <see cref="TrendColorViewModel"/> class. /// </summary> /// <param name="color">The color.</param> public TrendColorViewModel(TrendColor color) { this._trendColor = color; this._title = "Set Color"; }
public static string EnumToString(TrendColor color) { string result; return(EnumsToString.TryGetValue(color, out result) ? result : "Black"); }