private void ruleTextBox_TextChanged(object sender, EventArgs e) { titleLabel.Text = "Manage Rules"; titleLabel.BackColor = Color.FromArgb(64, 64, 0); availableTitlePictureBox.Show(); if (db.infoAvailable(tableName, "where Title = '" + ruleAndActionTextBox.Text + "'") | string.IsNullOrEmpty(ruleAndActionTextBox.Text)) { availableTitlePictureBox.Image = My.Resources.Resources.icon_available; createUpdateTouchButton.Show(); } else { availableTitlePictureBox.Image = My.Resources.Resources.icon_not_available; createUpdateTouchButton.Show(); } }
private void tamplateTitleTextBox_TextChanged(object sender, EventArgs e) { availableTitle.Show(); titleLabel.BackColor = Color.FromArgb(0, 64, 64); if (My.MyProject.Forms.FrmDisplayTemplates.isupdate) { titleLabel.Text = "Update message template"; } else { titleLabel.Text = "Create new message template"; } if (!string.IsNullOrEmpty(tamplateTitleTextBox.Text)) { if (My.MyProject.Forms.FrmDisplayTemplates.isupdate & !My.MyProject.Forms.FrmDisplayTemplates.previousTitle.Equals(tamplateTitleTextBox.Text) | My.MyProject.Forms.FrmDisplayTemplates.isupdate == false) { string condition = "where Title = '" + tamplateTitleTextBox.Text + "'"; if (db.infoAvailable("[Message Templates]", condition)) { availableTitle.Image = My.Resources.Resources.icon_available; isNewTitle = true; } else { availableTitle.Image = My.Resources.Resources.icon_not_available; isNewTitle = false; } } else { availableTitle.Hide(); isNewTitle = true; } } else { availableTitle.Image = My.Resources.Resources.icon_not_available; isNewTitle = false; } }