本文整理汇总了C#中View.ChangeTextIntoTextBox方法的典型用法代码示例。如果您正苦于以下问题:C# View.ChangeTextIntoTextBox方法的具体用法?C# View.ChangeTextIntoTextBox怎么用?C# View.ChangeTextIntoTextBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View.ChangeTextIntoTextBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDataFromSQL
/// <summary>
/// Method of getting data from SQL.
/// Called from the method RedisOrSQLStorage.
/// </summary>
/// <param name="queryUserStorage">Query our request.</param>
/// <param name="db">Connecting with Redis.</param>
/// <param name="redisIsStarted">The flag to check launched Redis.</param>
/// <param name="logging">Logging class object to create the log.</param>
/// <param name="view">View class object to display the changes.</param>
/// <param name="textboxs">An array of text fields to fill.</param>
private static void GetDataFromSQL(IEnumerable<User> queryUserStorage, IDatabase db, bool redisIsStarted, Logging logging, View.View view, System.Windows.Controls.TextBox[] textboxs)
{
var user = queryUserStorage.ToList();
// Filling fields from SQL.
view.ChangeTextIntoTextBox(textboxs, user[0]);
// Caching in Redis.
if (redisIsStarted)
RedisSetData(db, user, logging);
}
示例2: GetDataFromRedis
/// <summary>
/// Method of getting data from Redis.
/// Called from the method RedisOrSQLStorage.
/// </summary>
/// <param name="value">JSON-string.</param>
/// <param name="view">View class object to display the changes.</param>
/// <param name="textboxs">An array of text fields to fill.</param>
private static void GetDataFromRedis(string value, View.View view, System.Windows.Controls.TextBox[] textboxs)
{
// Convert Json.
value = value.Substring(value.IndexOf("[", StringComparison.Ordinal) + 1);
value = value.Substring(0, value.LastIndexOf("]", StringComparison.Ordinal));
// Deserializing JSON-string.
var u = JsonConvert.DeserializeObject<User>(value);
// Filling in the fields of Redis.
view.ChangeTextIntoTextBox(textboxs, u);
}