/// <summary> /// Edits the label. /// </summary> /// <param name="model">The model.</param> /// <param name="userId">The user identifier.</param> /// <returns></returns> public async Task <bool> EditLabel(EditLabel model, int userId) { try { SqlConnection connection = DBConnection(); SqlCommand command = StoreProcedureConnection("spEditLabel", connection); connection.Open(); command.Parameters.AddWithValue("Id", model.Id); command.Parameters.AddWithValue("LabelName", model.LabelName); command.Parameters.AddWithValue("UserId", userId); command.Parameters.AddWithValue("ModifiedDateTime", DateTime.Now); int result = await command.ExecuteNonQueryAsync(); connection.Close(); if (result != 0) { return(true); } else { return(false); }; } catch (Exception e) { throw e; } }
private void CreateHelperForms() { searchWindow = new Search(num, searchEffectNames, name.Items); labelWindow = new EditLabel(name, num, "Sprites", true); new ToolTipLabel(this, baseConvertor, helpTips); toolTip1.InitialDelay = 0; }
private void CreateHelperForms() { toolTipLabel = new ToolTipLabel(this, baseConvertor, helpTips); labelWindow = new EditLabel(name, num, "Battle Events", true); byteEditor = new ByteEditor(new ApplyBinaryChangesFunction(ApplyBinaryChanges), false); byteEditor.ToggleButton = toggleByteEditor; byteEditor.Owner = this; }
void InitializeView() { if (!IsClue && Value == 0) { foreach (int number in Enumerable.Range(1, StaticSudoku.Dimension)) { Label marking = new Label(); marking.Name = string.Format("Candidate{0}", number); marking.Font = Font_CandidatesView; marking.AutoSize = true; marking.Margin = new Padding(0); marking.Padding = new Padding(1, 0, 2, 0); marking.Text = Candidates.Contains(number) ? number.ToString() : " "; marking.Click += new EventHandler( delegate { Pencil(marking, this, number); } ); //marking.BackColor = Color.White; Controls.Add(marking); } } //EditLabel clue = new EditLabel(); Label clue = new Label(); clue.Name = string.Format("Clue"); clue.Margin = new Padding(0); clue.Font = Font_ClueView; clue.AutoSize = false; //clue.BackColor = Color.DarkRed; clue.Size = new Size(49, 41); clue.TextAlign = ContentAlignment.MiddleCenter; Controls.Add(clue); Paint_Clue(); EditLabel guess = new EditLabel(); guess.Name = string.Format("Guess"); guess.Margin = new Padding(0); guess.Font = Font_GuessView; guess.AutoSize = false; guess.Size = new Size(49, 41); guess.TextAlign = ContentAlignment.MiddleCenter; guess.TextChanged += guessTextChanged; Controls.Add(guess); Paint_Guess(); Dock = DockStyle.Fill; Margin = new Padding(0); Padding = new Padding(0); }
public async Task <IActionResult> EditLabel(EditLabel model) { var userId = TokenUserId(); if (await labels.EditLabel(model, userId)) { string status = "Label edited"; return(Ok(new { status, userId, model })); } else { string status = "Label did not edited"; return(BadRequest(new { status, userId, model })); } }
void guessTextChanged(object sender, EventArgs e) { EditLabel source = (EditLabel)sender; int newValue = 0; if (!int.TryParse(source.Text, out newValue)) { this.Value = 0; source.Text = string.Empty; } else { this.Value = newValue; } }
// Constructor public OwnerForm() { InitializeComponent(); InitializeListControls(); Do.AddShortcut(toolStrip3, Keys.Control | Keys.S, new EventHandler(save_Click)); Do.AddShortcut(toolStrip3, Keys.F1, helpTips); Do.AddShortcut(toolStrip3, Keys.F2, baseConvertor); new ToolTipLabel(this, baseConvertor, helpTips); LoadProperties(); LoadTimingTwo(); if (settings.RememberLastIndex) { Index = settings.LastSpell; } labelWindow = new EditLabel(name, num, "Spells", false); // this.History = new History(this, name, num); }
private void CreateHelperForms() { new ToolTipLabel(this, baseConvertor, helpTips); labelWindow = new EditLabel(name, num, "Attacks", false); }
private void CreateHelperForms() { labelWindow = new EditLabel(name, num, "Monsters", false); toolTip1.InitialDelay = 0; new ToolTipLabel(this, baseConvertor, helpTips); }
private void CreateHelperForms() { searchWindow = new Search(sampleNum, searchNames, sampleName.Items); labelWindow = new EditLabel(sampleName, sampleNum, "Samples", true); }
/// <summary> /// Edits the label. /// </summary> /// <param name="model">The model.</param> /// <param name="userId">The user identifier.</param> /// <returns></returns> public async Task <bool> EditLabel(EditLabel model, int userId) { return(await labels.EditLabel(model, userId)); }
private void CreateHelperForms() { labelWindow = new EditLabel(name, null, "Shops", true); }
private void CreateHelperForms() { toolTip1.InitialDelay = 0; labelWindow = new EditLabel(name, null, "World Maps", true); }
private void CreateHelperForms() { searchWindow = new Search(num, search, name.Items); labelWindow = new EditLabel(name, num, "Formations", false); }
private void CreateHelperForms() { toolTip1.InitialDelay = 0; labelWindow = new EditLabel(name, num, "Battlefields", true); new ToolTipLabel(this, baseConvertor, helpTips); }
private void CreateHelperForms() { editLabelForm = new EditLabel(name, num, "Items", false); }
// Initialization private void CreateHelperForms() { searchWindow = new Search(num, search, new PerformSearchFunction(PerformSearch), typeof(TextBox)); labelWindow = new EditLabel(null, num, "Dialogues", false); }
private void CreateHelperForms() { searchWindow = new Search(num, search, new PerformSearchFunction(PerformSearch), typeof(TreeView)); labelWindow = new EditLabel(null, num, "Packs", false); }