/// <summary> /// Displays the dialog with a given <paramref name="queueIndex"/> (SQLite database ID number). /// </summary> /// <param name="conn">A reference to a <see cref="SQLiteConnection"/> class instance.</param> /// <param name="queueIndex">The index of the queue snapshot (SQLite database ID number).</param> /// <returns><c>true</c> if the user chose to accept the changes made to the queue snapshot, <c>false</c> otherwise.</returns> public static bool Execute(ref SQLiteConnection conn, int queueIndex) { FormModifySavedQueue frm = new FormModifySavedQueue { queueIndex = queueIndex, conn = conn }; frm.GetQueue(); using (SQLiteCommand command = new SQLiteCommand(conn)) { command.CommandText = "SELECT SNAPSHOTNAME FROM QUEUE_SNAPSHOT WHERE ID = " + queueIndex + " "; frm.Text = DBLangEngine.GetStatMessage("msgModifyQueueCaption", "Modify saved queue [{0}]|A text to display in the window title where a saved queue is being modified", Convert.ToString(command.ExecuteScalar())); } if (frm.ShowDialog() == DialogResult.OK) { frm.SaveQueue(); return(true); } return(false); }
// the user wants to modify the selected queue in detail.. private void tsbModifySavedQueue_Click(object sender, EventArgs e) { FormModifySavedQueue.Execute(ref conn, QueueId); }