private void button2_Click(object sender, RoutedEventArgs e)
        {
            try
                {
                    string status;
                    Manifest m = new Manifest();
                    m.setManifestDir("../../Manifests");
                    if (checkBox1.IsChecked == true)
                        status = "OPEN";
                    else if (m.hadOpenDependency(listBox3.Items))
                    {
                        status = "PENDING";
                    }
                    else
                        status = "CLOSED";

                    FileInfo file = new FileInfo(textBox1.Text);
                    IList dependencies = listBox3.Items;

                    //Generate the Manifest File of the currently being checked in package
                    FileInfo xml = m.CreateManifest(file, dependencies, status, username);
                    if (file != null)
                    {
                        int ver = client.CheckInPackages(file);
                        int xmlver = ver;//client.CheckInPackages(xml);
                        string filename = file.Name + "-" + ver.ToString();
                        string xmlname = xml.Name + "-" + xmlver.ToString();
                        //bool result= U.Upload(filename);
                        int tempver = xmlver - 1;
                        bool result = client.IsRI(xml.Name + "-" + tempver, username);
                        if (result)
                        {
                            FileTransfer f = new FileTransfer();
                            f.FileUpload(file, filename, client);
                            f.FileUpload(xml, xmlname, client);
                            listBox1.Items.Clear();
                            listBox2.Items.Clear();
                            listBox3.Items.Clear();
                            checkBox1.IsChecked = false;
                            PopulateListBox();
                            m.DeleteManifests();

                            listBox3.IsEnabled = false;

                        }
                        else
                        {
                            MessageBox.Show("User Needs to Be RI to do a check In");

                        }
                        button2.IsEnabled = false;
                        textBox1.Clear();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
        }
        static void Main(string[] args)
        {
            Console.WriteLine("==========================");
            Console.WriteLine("Testing Manifest Generator");
            Console.WriteLine("==========================");
            Console.WriteLine("========================================================================");
            Console.WriteLine("Generating XML manifest for MANIFEST.cs at Location ../../Manifest/");
            Console.WriteLine("==========================================================================");
            Manifest man = new Manifest();
            List<string> i=new List<string>();
            DirectoryInfo di;
            man.setTestFile("./Test.cs-1");
            FileInfo test = new FileInfo(man.getTestFile());
            i.Add(test.Name);
            man.setManifestDir("../../Manifests");

            if (!Directory.Exists(man.getManDir()))
                di = Directory.CreateDirectory(man.getManDir());
            else
                di = new DirectoryInfo(man.getManDir());

            FileInfo f=new FileInfo("../../Manifest.cs");
            man.CreateManifest(f, i, "CLOSED", "mukund");

            bool result=man.hadOpenDependency(i);
            if (result == false)
            {
                Console.WriteLine("MANIFEST.cs has No OPEN DEPENDENCIES ");
            }

            string option="";
            Console.WriteLine("DELETE MANIFESTS (Y/N)?");
            option=Console.ReadLine();
            if (option == "Y")
            {
                man.DeleteManifests();
                Console.WriteLine("Manifest file Deleted");
            }
        }