Exemplo n.º 1
0
        private void button12_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();
            int count             = na.EndreMappeskiller("__", "_");

            MessageBox.Show(count.ToString() + " erstatninger gjort");
        }
Exemplo n.º 2
0
        private void button10_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            na.PrefixAllDirectories("na__");
            MessageBox.Show("Done");
        }
Exemplo n.º 3
0
        private void button11_Click(object sender, EventArgs e)
        {
            // Sjekk links

            NasjonalArkitektur na = new NasjonalArkitektur();
            int count             = na.SjekkAsciidocLinks();

            MessageBox.Show(count.ToString() + " link problemer funnet");


/*
 *
 *          // test
 *          List<string> urls = AsciidocFile.ExtractUrls("abcd http://www.vg.no Hei Erik http://www.dagbladet.no[Dagbladet] Hei igjen Erik");
 *          if (urls.Count < 1)
 *              MessageBox.Show("No urls");
 *          else
 *              MessageBox.Show("Found " + urls.Count + " urls");
 *
 *          //test
 *          for (int i = 1; i < 10; i++)
 *          {
 *              AsciidocFile.URLExists("http://www.vvvvvvg.no");
 *
 *          }
 *          for (int i = 1; i < 10; i++)
 *          {
 *              AsciidocFile.URLExists("http://www.vg.no");
 *              AsciidocFile.URLExists("http://www.aftenposten.no");
 *              AsciidocFile.URLExists("http://www.nrk.no");
 *              AsciidocFile.URLExists("https://www.difi.no/");
 *          }
 *
 */
        }
Exemplo n.º 4
0
        private void button15_Click(object sender, EventArgs e)
        {
            // create .adocassets file in all media dirs

            NasjonalArkitektur na = new NasjonalArkitektur();
            int count             = na.fixAdocassets();

            MessageBox.Show(count.ToString() + " files added");
        }
Exemplo n.º 5
0
        private void button13_Click(object sender, EventArgs e)
        {
            // Sjekk image links

            NasjonalArkitektur na = new NasjonalArkitektur();
            int count             = na.SjekkAsciidocImages();

            MessageBox.Show(count.ToString() + " image link problemer funnet");
        }
Exemplo n.º 6
0
        private void button7_Click(object sender, EventArgs e)
        {
            // Sjekk include paths

            NasjonalArkitektur na = new NasjonalArkitektur();

            int count = na.SjekkAsciidocIncludes();

            MessageBox.Show(count.ToString() + " include-problemer funnet");
        }
Exemplo n.º 7
0
        private void button16_Click(object sender, EventArgs e)
        {
            // sjekk url links

            NasjonalArkitektur na = new NasjonalArkitektur();

            //int count = na.SjekkAsciidocLinks();
            //MessageBox.Show(count.ToString() + " url link problemer funnet");

            MessageBox.Show("Yet to be implemented");
        }
Exemplo n.º 8
0
        private void button9_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            string textToFind      = "na_";
            string replacementText = "nab_";


            int count = na.RenameDirectories(textToFind, replacementText);

            MessageBox.Show(count.ToString() + " erstatninger utført");
        }
Exemplo n.º 9
0
        private void button6_Click(object sender, EventArgs e)
        {
            // Flatten directory strructure
            NasjonalArkitektur na = new NasjonalArkitektur();

            if (na.FlattenPaths())
            {
                MessageBox.Show("Completed successfully");
            }
            else
            {
                MessageBox.Show("Completed with exception");
            }
        }
Exemplo n.º 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            try
            {
                na.OppdaterFellesFiler();
                MessageBox.Show("Oppdatering ferdig");
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message + " - exiting...");
                Application.Exit();
            }
        }
Exemplo n.º 11
0
        private void button8_Click_1(object sender, EventArgs e)
        {
            // Søk
            NasjonalArkitektur na = new NasjonalArkitektur();


            //string textToFind = "link:./";
            //string textToFind = "include::";

            string textToFind = "TBD.";



            int count = na.SøkTekstIAlleFiler(textToFind);

            MessageBox.Show(count.ToString() + " occurences found");
        }
Exemplo n.º 12
0
        private void button2_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            /*
             * string textToFind = ":imagesdir@: ./images";
             * string replacementText = "";
             */

            /* 2
             * string textToFind = ":imagesdir:";
             * string replacementText = ":imagesdir@:";
             */
            /* 3
             * string textToFind = ":imagesdir!:";
             * string replacementText = "";
             */
            /*
             * string textToFind = ".../felles";
             * string replacementText = "../felles";
             */

            /* 5
             * string textToFind = "image:";
             * string replacementText = "image:./images/";
             */

            /*
             * string textToFind = "image:./images/./images";
             * string replacementText = "image:./images";
             */

            /*
             * string textToFind = "image:./images/../felles/images";
             * string replacementText = "image:../felles/images/";
             */
            /* 99
             * textToFind = "include::./felles/includes/standardheader.adoc[]";
             * replacementText = "include::./felles/includes/standardheader.adoc[]";
             */


            //string textToFind = "ifndef::standardheader_included[]" + Environment.NewLine +
            //                    "include::../na__felles/includes/standardheader.adoc[]" + Environment.NewLine +
            //                    "include::../na__felles/includes/commonlinks1.adoc[]" + Environment.NewLine +
            //                    "endif::[]";

            //string textToFind = "https://nasjonal-arkitektur.github.io";
            //string replacementText = "https://doc.difi.no/nasjonal-arkitektur";

            //string textToFind = "https://github.com/nasjonal-arkitektur/nasjonal-arkitektur.github.io";
            //string replacementText = "https://github.com/difi/nasjonal_arkitektur";

            string textToFind      = "image:../nab_felles/media/";
            string replacementText = "image:../plattform_felles/media/";



            int count = na.ErstattTekstIAlleFiler(textToFind, replacementText);

            MessageBox.Show(count.ToString() + " erstatninger utført");
        }
Exemplo n.º 13
0
 private void button5_Click(object sender, EventArgs e)
 {
     // Finn lange filbaner
     NasjonalArkitektur na = new NasjonalArkitektur();
     List <string>      filesWithLongPaths = na.ListFileswithLongPathsRecursive();
 }
Exemplo n.º 14
0
        private void button4_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            na.RenameMainFiles();
        }
Exemplo n.º 15
0
        private void button3_Click(object sender, EventArgs e)
        {
            NasjonalArkitektur na = new NasjonalArkitektur();

            na.GenerateHtml();
        }