Exemple #1
0
        public void QuickLoad()
        {
            int countStrings = 0;
            int countTabs    = 0;

            foreach (string key in this.inputDict.StringKeys)
            {
                ++countStrings;
            }
            foreach (string key in this.inputDict.ArrayKeys)
            {
                ++countTabs;
            }
            if (countTabs > 0)
            {
                if (countStrings > 0)
                {
                    DictSaisieLibre dsl = new DictSaisieLibre(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                    dsl.PreviousPage = this;
                    IDictProcess nextPage = dsl;
                    foreach (string key in this.inputDict.ArrayKeys)
                    {
                        bool            makeTab = true;
                        o2Mate.ILegende legende = this.inputDict.Legendes.GetLegendeByName(key);
                        // si le tableau n'est pas libre alors on ne l'affiche pas
                        if (legende != null && !legende.Free)
                        {
                            makeTab = false;
                        }
                        if (makeTab)
                        {
                            DictSaisieTableau tab = new DictSaisieTableau(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc, key);
                            tab.Load();
                            nextPage.NextPage = tab;
                            tab.PreviousPage  = nextPage;
                            nextPage          = tab;
                        }
                    }
                    dsl.Load();
                    dsl.Navigate();
                }
                else
                {
                    IDictProcess      nextPage = this;
                    DictSaisieTableau tab      = null;
                    foreach (string key in this.inputDict.ArrayKeys)
                    {
                        bool            makeTab = true;
                        o2Mate.ILegende legende = this.inputDict.Legendes.GetLegendeByName(key);
                        // si le tableau n'est pas libre alors on ne l'affiche pas
                        if (legende != null && !legende.Free)
                        {
                            makeTab = false;
                        }
                        if (makeTab)
                        {
                            tab = new DictSaisieTableau(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc, key);
                            tab.Load();
                            nextPage.NextPage = tab;
                            tab.PreviousPage  = nextPage;
                            nextPage          = tab;
                        }
                    }
                    if (tab != null)
                    {
                        tab.Navigate();
                    }
                }
            }
            else if (countStrings > 0)
            {
                DictSaisieLibre dsl = new DictSaisieLibre(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                dsl.Load();
                dsl.PreviousPage = this;
                dsl.Navigate();
            }
        }
Exemple #2
0
        void DictBienvenue_Create(object sender, System.Windows.Forms.HtmlElementEventArgs e)
        {
            int countStrings = 0;
            int countTabs    = 0;

            foreach (string key in this.inputDict.StringKeys)
            {
                ++countStrings;
            }
            foreach (string key in this.inputDict.ArrayKeys)
            {
                ++countTabs;
            }
            if (countTabs > 0)
            {
                if (countStrings > 0)
                {
                    DictSaisieLibre dsl = new DictSaisieLibre(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                    dsl.PreviousPage = this;
                    IDictProcess nextPage = dsl;
                    foreach (string key in this.inputDict.ArrayKeys)
                    {
                        bool            makeTab = true;
                        o2Mate.ILegende legende = this.inputDict.Legendes.GetLegendeByName(key);
                        // si le tableau n'est pas libre alors on ne l'affiche pas
                        if (legende != null && !legende.Free)
                        {
                            makeTab = false;
                        }
                        if (makeTab)
                        {
                            DictSaisieTableau tab = new DictSaisieTableau(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc, key);
                            tab.Load();
                            nextPage.NextPage = tab;
                            tab.PreviousPage  = nextPage;
                            nextPage          = tab;
                        }
                    }
                    nextPage.NextPage = new DictExecute(this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                    nextPage.NextPage.Load();
                    dsl.Load();
                    dsl.Navigate();
                }
                else
                {
                    IDictProcess nextPage = this;
                    foreach (string key in this.inputDict.ArrayKeys)
                    {
                        bool            makeTab = true;
                        o2Mate.ILegende legende = this.inputDict.Legendes.GetLegendeByName(key);
                        // si le tableau n'est pas libre alors on ne l'affiche pas
                        if (legende != null && !legende.Free)
                        {
                            makeTab = false;
                        }
                        if (makeTab)
                        {
                            DictSaisieTableau tab = new DictSaisieTableau(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc, key);
                            tab.Load();
                            nextPage.NextPage = tab;
                            tab.PreviousPage  = nextPage;
                            nextPage          = tab;
                        }
                    }
                    nextPage.NextPage = new DictExecute(this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                    nextPage.NextPage.Load();
                    this.NextPage.Navigate();
                }
            }
            else if (countStrings > 0)
            {
                DictSaisieLibre dsl = new DictSaisieLibre(null, null, this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                dsl.PreviousPage = this;
                dsl.NextPage     = new DictExecute(this.web, this.inputDict, this.outputDict, this.fileNameSrc);
                dsl.NextPage.Load();
                dsl.Load();
                dsl.Navigate();
            }
        }