CreateSuggestion.cs

00001 using System;
00002 using System.Collections.Generic;
00003 using System.ComponentModel;
00004 using System.Data;
00005 using System.Drawing;
00006 using System.Text;
00007 using System.Windows.Forms;
00008 using Shared;
00009 
00010 namespace Client
00011 {
00015     public partial class CreateSuggestion : Form
00016     {
00018         private List<int> IDList = new List<int>();
00020         public string Reason = "";
00022         public int Literature = -1;
00023         
00028         public CreateSuggestion(LiteratureInfo[] allLiterature)
00029         {
00030             InitializeComponent();
00031 
00032             foreach (LiteratureInfo info in allLiterature)
00033             {         
00034                 cmbLiterature.Items.Add(info.Title + " - by " + info.author);
00035                 IDList.Add(info.id);
00036             }
00037             cmbLiterature.SelectedIndex = 0;
00038         }
00039 
00045         private void btnCancel_Click(object sender, EventArgs e)
00046         {
00047             Literature = -1;
00048             this.Close();
00049         }
00050 
00056         private void btnCreate_Click(object sender, EventArgs e)
00057         {
00058             Reason = txtReason.Text;
00059             Literature = IDList[cmbLiterature.SelectedIndex];
00060             this.Close();
00061         }
00062     }
00063 }

Generated on Thu Dec 21 06:21:54 2006 for SCRAML by  doxygen 1.5.1-p1