private void Button_Click(object sender, RoutedEventArgs e)
        {
            string patekaKonf = "";     
            string verFile = "";
            byte[] verZip = null;
            AppMum mojApp;
            Kurir kr = new Kurir();
            Recept mojRecept = new Recept(DateTime.Now.AddMonths(-4));
            //patekaKonf=@"C:\VerIBprep\Konfig.xml";
            patekaKonf ="Konfig.xml";
            //mojRecept.addSqlObj(TipProceduri.Fn);
            //mojRecept.addSqlObj(TipProceduri.Fix);
            mojRecept.addFileObj(TipFajlovi.XML);
            mojRecept.addFileObj(TipFajlovi.CristalRpt);
            mojApp = new AppMum(Aplikacii.WTRG, mojRecept, kr, patekaKonf);
            if (kr.DaliEVoRed)
            {
                mojApp.NapraviVerzija(ref verZip, ref verFile);
            }


            txtInfo.TextWrapping = TextWrapping.Wrap;
            txtErr.TextWrapping = TextWrapping.Wrap;
            txtInfo.IsReadOnly = true;
            txtErr.IsReadOnly = true;
            txtInfo.Text = kr.VratiInfo();
            txtErr.Text = kr.VratiGreski();
            
        }
        static void Main(string[] args)
        {
            string verFile = "";
            byte[] verZip = null;
            AppMum mojApp;
            Kurir kr = new Kurir();
            //AppMum mojApp = new AppMum(Aplikacii.WTRGKS,kr);
            //mojApp.NapraviVerzija(ref verZip,ref verFile);
            //File.WriteAllBytes(verFile, verZip);
            //Console.ReadLine();

            //mojApp = new AppMum(Aplikacii.WTRG, kr);
            //mojApp.NapraviVerzija(ref verZip, ref verFile);
            //File.WriteAllBytes(verFile, verZip);
            //Console.ReadLine();

            Recept mojRecept = new Recept(DateTime.Now.AddMonths(-4));

            //mojRecept.addSqlObj(TipProceduri.Fn);
            //mojRecept.addSqlObj(TipProceduri.Fix);
            mojRecept.addFileObj(TipFajlovi.XML);
            mojRecept.addFileObj(TipFajlovi.CristalRpt);

            mojApp = new AppMum(Aplikacii.WTRG, mojRecept, kr,"");
            mojApp.NapraviVerzija(ref verZip, ref verFile);
            File.WriteAllBytes(verFile, verZip);
            

            Console.ReadLine();
        }
 private Recept srediForma(FormCollection form)
 {
     Recept _tmp = new Recept();
     DateTime _verDatum = DateTime.ParseExact(form["tbDatum"].ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
     _tmp.DatumVerzija = _verDatum;
     _tmp.FilterPoDatum = true;
     foreach(string kluc in form.Keys)
     {
         srediRecept(kluc, form[kluc],ref  _tmp);
     }
     return _tmp;
 }
 private void srediRecept(string kluc,string vrednost,ref Recept recApp)
 {
     if (vrednost == null || vrednost=="false")
         return;
     switch(kluc)
     {
         case "rbCFMA":
             {
                 recApp.Aplikacija = Aplikacii.WTRG;
                 break;
             }
         case "rbCFMAKS":
             {
                 recApp.Aplikacija = Aplikacii.WTRGKS;
                 break;
             }
         case "rbAPT5MK":
             {
                 recApp.Aplikacija = Aplikacii.APT5MK;
                 break;
             }
         case "cbExe":
             {
                 recApp.addFileObj(TipFajlovi.EXE);
                 break;
             }
         case "cbXml":
             {
                 recApp.addFileObj(TipFajlovi.XML);
                 break;
             }
         case "cbRpt":
             {
                 recApp.addFileObj(TipFajlovi.CristalRpt);
                 break;
             }
         case "cbDll":
             {
                 recApp.addFileObj(TipFajlovi.DLL);
                 break;
             }
         case "cbIco":
             {
                 recApp.addFileObj(TipFajlovi.IKONI);
                 break;
             }
         case "cbSqlUpg":
             {
                 recApp.addFileObj(TipFajlovi.SQL);
                 break;
             }
         case "cbSqlSp":
             {
                 recApp.addSqlObj(TipProceduri.SP);
                 break;
             }
         case "cbSqlRK":
             {
                 recApp.addSqlObj(TipProceduri.RK);
                 break;
             }
         case "cbSqlFix":
             {
                 recApp.addSqlObj(TipProceduri.Fix);
                 break;
             }
         case "cbSqlFn":
             {
                 recApp.addSqlObj(TipProceduri.Fn);
                 break;
             }
         case "cbSqlTrig":
             {
                 recApp.addSqlObj(TipProceduri.Trigeri);
                 break;
             }
         default:
             break;
     }
 }