private void Connect()
        {
            if (string.IsNullOrEmpty(CmBxPrjName.Text))
            {
                MessageBox.Show(
                    "The projects field cannot be empty, please, either write an project name manualy or use the refresh button in setting form to fetch sub project list",
                    "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else if (connectToolStripMenuItem.Enabled)
            {
                if (VarGlobale.ConfirmWarn == true)
                {
                    MessageBox.Show("We are going to generate lot of web traffic, so be patient before see all value, of course it depand of your internet connection performance and OpenSuse server status/aviability."
                                    /*+ Environment.NewLine + "I will made an automatic refresh evry 5 minutes."*/, "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                //splitContainer1.Panel2.Controls.Clear();
                panelProjects.Controls.Clear();
                if (BckGrdWorkerDll.IsBusy == false)
                {
                    BckGrdWorkerDll.RunWorkerAsync("PkgList");
                }
                ItemCheckState(true);
            }

            FontSkinManager();
        }
 private void SetListPkg(StringBuilder XmlListPkg)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.listViewPckg.InvokeRequired)
     {
         SetListPkgCallback d = new SetListPkgCallback(SetListPkg);
         this.listViewPckg.Invoke(d, XmlListPkg);
     }
     else
     {
         //if(!VarGlobal.LessVerbose)Console.WriteLine(XmlListPkg.ToString());
         List <string> Result = ReadXml.GetValue(XmlListPkg.ToString(), "directory", "entry");
         VarGlobale.PkgList = (object[])Result.ToArray();
         if (Result.Count > 0)
         {
             listViewPckg.Items.Clear();
             foreach (string item in Result)
             {
                 listViewPckg.Items.Add(item);
             }
         }
         BckGrdWorkerDll.RunWorkerAsync("buildRepositoriesMeta");
         FontSkinManager();
     }
 }
 private void WritePrjMeta()
 {
     Cursor = Cursors.WaitCursor;
     MessageBox.Show(PutSourceProjectMeta.PutProjectMeta(
                         VarGlobale.MetaPrjXmlFs).ToString(), "Result Info",
                     MessageBoxButtons.OK, MessageBoxIcon.Information);
     panelProjects.Controls.Clear();
     if (BckGrdWorkerDll.IsBusy == false)
     {
         BckGrdWorkerDll.RunWorkerAsync("PkgList");
     }
     Cursor = Cursors.Default;
 }
 private void BtnDisConnect_Click(object sender, EventArgs e)
 {
     BckGrdWorkerDll.CancelAsync();
     // Loop on TabPages
     for (int index = 0; index < tabControl1.TabPages.Count; index++)
     {
         tabControl1.SelectedIndex = index;
         CloseCurTab();
     }
     listViewPckg.Items.Clear();
     listViewPrjInf.Items.Clear();
     //splitContainer1.Panel2.Controls.Clear();
     panelProjects.Controls.Clear();
     ItemCheckState(false);
     VarGlobal.NetEvManager.DoSomething("Disconnected");
 }
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     foreach (TabPage item in tabControl1.TabPages)
     {
         try
         {
             if (item.Name != "TabPgMain")
             {
                 ((Ctrl.BuildPkg)item.Controls[0]).CancelTrafic();
             }
         }
         catch (Exception Ex)
         {
             if (!VarGlobal.LessVerbose)
             {
                 Console.WriteLine(Ex.Message);
             }
         }
         BckGrdWorkerDll.CancelAsync();
     }
     try
     {
         if (CmBxPrjName.AutoCompleteCustomSource.Count > 0)
         {
             GenericXmlSerializer.Serialize(CmBxPrjName.AutoCompleteCustomSource,
                                            VarGlobale.BookMarks);
         }
     }
     catch (Exception Ex)
     {
         if (!VarGlobal.LessVerbose)
         {
             Console.WriteLine("{0}{1}{2}", Ex.Message, Environment.NewLine,
                               Ex.StackTrace);
         }
     }
     Application.ExitThread();
     this.Dispose(true);
 }