Ejemplo n.º 1
0
        private static string getString(ModoNomenclatura m, int numero)
        {
            switch (m)
            {
            case ModoNomenclatura.GregoMaiusculo:
                return(getStringFromNumber(gregoMaiusculo, numero));

            case ModoNomenclatura.GregoMinusculo:
                return(getStringFromNumber(gregoMinusculo, numero));

            case ModoNomenclatura.CirilicoMaiusculo:
                return(getStringFromNumber(cirilicoMaiusculo, numero));

            case ModoNomenclatura.CirilicoMinusculo:
                return(getStringFromNumber(cirilicoMinusculo, numero));

            case ModoNomenclatura.LatinoMaiusculo:
                return(getStringFromNumber(latinoMaiusculo, numero));

            case ModoNomenclatura.LatinoMinusculo:
                return(getStringFromNumber(latinoMinusculo, numero));

            case ModoNomenclatura.Romano:
                return(ToRomanNumeral((ushort)numero));

            default:
                return("" + numero);
            }
        }
Ejemplo n.º 2
0
        private void updateSliders()
        {
            if (TLMSingleton.isIPTLoaded)
            {
                m_lineBudgetSlidersTitle.parent.isVisible = false;
                return;
            }


            TLMConfigWarehouse.ConfigIndex transportType = tsd.toConfigIndex();
            ModoNomenclatura mnPrefixo = (ModoNomenclatura)TLMConfigWarehouse.getCurrentConfigInt(TLMConfigWarehouse.ConfigIndex.PREFIX | transportType);

            uint[] multipliers;
            IBudgetableExtension bte;
            uint idx;

            var tsdRef = tsd;

            idx         = (uint)SelectedPrefix;
            bte         = TLMLineUtils.getExtensionFromTransportSystemDefinition(ref tsdRef);
            multipliers = bte.GetBudgetsMultiplier(idx);

            m_lineBudgetSlidersTitle.text = string.Format(Locale.Get("TLM_BUDGET_MULTIPLIER_TITLE_PREFIX"), idx > 0 ? TLMUtils.getStringFromNumber(TLMUtils.getStringOptionsForPrefix(mnPrefixo), (int)idx + 1) : Locale.Get("TLM_UNPREFIXED"), TLMConfigWarehouse.getNameForTransportType(tsdRef.toConfigIndex()));


            bool budgetPerHourEnabled = multipliers.Length == 8;

            m_disableBudgetPerHour.isVisible = budgetPerHourEnabled;
            m_enableBudgetPerHour.isVisible  = !budgetPerHourEnabled && tsdRef.hasVehicles();
            for (int i = 0; i < m_budgetSliders.Length; i++)
            {
                UILabel budgetSliderLabel = m_budgetSliders[i].transform.parent.GetComponentInChildren <UILabel>();
                if (i == 0)
                {
                    if (multipliers.Length == 1)
                    {
                        budgetSliderLabel.prefix = Locale.Get("TLM_BUDGET_MULTIPLIER_PERIOD_LABEL_ALL");
                    }
                    else
                    {
                        budgetSliderLabel.prefix = Locale.Get("TLM_BUDGET_MULTIPLIER_PERIOD_LABEL", 0);
                    }
                }
                else
                {
                    m_budgetSliders[i].isEnabled        = budgetPerHourEnabled;
                    m_budgetSliders[i].parent.isVisible = budgetPerHourEnabled;
                }

                if (i < multipliers.Length)
                {
                    m_budgetSliders[i].value = multipliers[i] / 100f;
                }
            }
        }
        protected void ReloadPrefixFilter()
        {
            ConfigIndex tsdCi = Singleton <T> .instance.GetTSD().toConfigIndex();

            ModoNomenclatura prefixMn = TLMUtils.GetPrefixModoNomenclatura(tsdCi);

            if (prefixMn != m_modoNomenclaturaCache)
            {
                List <string> filterOptions = TLMUtils.getPrefixesOptions(tsdCi);
                if (HasRegionalPrefixFilter)
                {
                    filterOptions.Add(Locale.Get("TLM_REGIONAL"));
                }
                m_prefixFilter.items         = filterOptions.ToArray();
                m_prefixFilter.isVisible     = filterOptions.Count >= 3;
                m_prefixFilter.selectedIndex = 0;
                m_modoNomenclaturaCache      = prefixMn;
            }
        }
Ejemplo n.º 4
0
        internal static string[] getStringOptionsForPrefix(ModoNomenclatura m, bool showUnprefixed = false, TLMCW.ConfigIndex nameReferenceSystem = TLMCW.ConfigIndex.NIL, bool noneOption = true)
        {
            List <string> saida = new List <string>(new string[noneOption ? 1 : 0]);

            if (showUnprefixed)
            {
                string unprefixedName = Locale.Get("TLM_UNPREFIXED");
                if (nameReferenceSystem != TLMCW.ConfigIndex.NIL)
                {
                    string prefixName = TLMLineUtils.getTransportSystemPrefixName(nameReferenceSystem, 0);
                    if (!string.IsNullOrEmpty(prefixName))
                    {
                        unprefixedName += " - " + prefixName;
                    }
                }
                saida.Add(unprefixedName);
            }
            if (m == ModoNomenclatura.Nenhum)
            {
                return(saida.ToArray());
            }
            switch (m)
            {
            case ModoNomenclatura.GregoMaiusculo:
            case ModoNomenclatura.GregoMaiusculoNumero:
                addToArrayWithName(gregoMaiusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.GregoMinusculo:
            case ModoNomenclatura.GregoMinusculoNumero:
                addToArrayWithName(gregoMinusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.CirilicoMaiusculo:
            case ModoNomenclatura.CirilicoMaiusculoNumero:
                addToArrayWithName(cirilicoMaiusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.CirilicoMinusculo:
            case ModoNomenclatura.CirilicoMinusculoNumero:
                addToArrayWithName(cirilicoMinusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.LatinoMaiusculo:
            case ModoNomenclatura.LatinoMaiusculoNumero:
                addToArrayWithName(latinoMaiusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.LatinoMinusculo:
            case ModoNomenclatura.LatinoMinusculoNumero:
                addToArrayWithName(latinoMinusculo, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.Numero:
                string[] temp = new string[64];
                for (int i = 1; i <= 64; i++)
                {
                    temp[i - 1] = i.ToString();
                }
                addToArrayWithName(temp, saida, nameReferenceSystem);
                break;

            case ModoNomenclatura.Romano:
                string[] tempR = new string[64];
                for (ushort i = 1; i <= 64; i++)
                {
                    tempR[i - 1] = ToRomanNumeral(i);
                }
                addToArrayWithName(tempR, saida, nameReferenceSystem);
                break;
            }
            if (TLMLineUtils.nomenclaturasComNumeros.Contains(m))
            {
                addToArrayWithName(numeros, saida, nameReferenceSystem);
            }
            return(saida.ToArray());
        }
Ejemplo n.º 5
0
        internal static string getString(ModoNomenclatura prefixo, Separador s, ModoNomenclatura sufixo, ModoNomenclatura naoPrefixado, int numero, bool leadingZeros, bool invertPrefixSuffix)
        {
            string prefixoSaida   = "";
            string separadorSaida = "";
            string sufixoSaida    = "";
            int    prefixNum      = 0;

            if (prefixo != ModoNomenclatura.Nenhum)
            {
                prefixNum = numero / 1000;
                if (prefixo == ModoNomenclatura.Romano)
                {
                    prefixoSaida = ToRomanNumeral((ushort)prefixNum);
                }
                else
                {
                    prefixoSaida = getStringFromNumber(getStringOptionsForPrefix(prefixo), prefixNum + 1);
                }
                numero = numero % 1000;
            }

            if (numero > 0)
            {
                if (prefixoSaida != "")
                {
                    switch (s)
                    {
                    case Separador.Barra:
                        separadorSaida = "/";
                        break;

                    case Separador.Espaco:
                        separadorSaida = " ";
                        break;

                    case Separador.Hifen:
                        separadorSaida = "-";
                        break;

                    case Separador.Ponto:
                        separadorSaida = ".";
                        break;

                    case Separador.QuebraLinha:
                        separadorSaida = "\n";
                        break;

                    case Separador.Nenhum:
                        if (prefixo == ModoNomenclatura.Romano)
                        {
                            separadorSaida = "·";
                        }
                        break;
                    }
                }
                switch (prefixo != ModoNomenclatura.Nenhum && prefixNum > 0 ? sufixo : naoPrefixado)
                {
                case ModoNomenclatura.GregoMaiusculo:
                    sufixoSaida = getStringFromNumber(gregoMaiusculo, numero);
                    break;

                case ModoNomenclatura.GregoMinusculo:
                    sufixoSaida = getStringFromNumber(gregoMinusculo, numero);
                    break;

                case ModoNomenclatura.CirilicoMaiusculo:
                    sufixoSaida = getStringFromNumber(cirilicoMaiusculo, numero);
                    break;

                case ModoNomenclatura.CirilicoMinusculo:
                    sufixoSaida = getStringFromNumber(cirilicoMinusculo, numero);
                    break;

                case ModoNomenclatura.LatinoMaiusculo:
                    sufixoSaida = getStringFromNumber(latinoMaiusculo, numero);
                    break;

                case ModoNomenclatura.LatinoMinusculo:
                    sufixoSaida = getStringFromNumber(latinoMinusculo, numero);
                    break;

                case ModoNomenclatura.Romano:
                    sufixoSaida = ToRomanNumeral((ushort)numero);
                    break;

                default:
                    if (leadingZeros && prefixoSaida != "")
                    {
                        sufixoSaida = numero.ToString("D3");
                    }
                    else
                    {
                        sufixoSaida = numero.ToString();
                    }
                    break;
                }

                if (invertPrefixSuffix && sufixo == ModoNomenclatura.Numero && prefixo != ModoNomenclatura.Numero && prefixo != ModoNomenclatura.Romano)
                {
                    return(sufixoSaida + separadorSaida + prefixoSaida);
                }
                else
                {
                    return(prefixoSaida + separadorSaida + sufixoSaida);
                }
            }
            else
            {
                return(prefixoSaida);
            }
        }
Ejemplo n.º 6
0
        internal static List <string> getPrefixesOptions(TLMCW.ConfigIndex transportType, Boolean addDefaults = true)
        {
            transportType &= TLMConfigWarehouse.ConfigIndex.SYSTEM_PART;
            ModoNomenclatura m     = GetPrefixModoNomenclatura(transportType);
            List <string>    saida = new List <string>();

            if (addDefaults)
            {
                saida.AddRange(new string[] { Locale.Get("TLM_ALL"), Locale.Get("TLM_UNPREFIXED") });
            }
            else
            {
                saida.Add("/");
            }
            switch (m)
            {
            case ModoNomenclatura.GregoMaiusculo:
            case ModoNomenclatura.GregoMaiusculoNumero:
                saida.AddRange(gregoMaiusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.GregoMinusculo:
            case ModoNomenclatura.GregoMinusculoNumero:
                saida.AddRange(gregoMinusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.CirilicoMaiusculo:
            case ModoNomenclatura.CirilicoMaiusculoNumero:
                saida.AddRange(cirilicoMaiusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.CirilicoMinusculo:
            case ModoNomenclatura.CirilicoMinusculoNumero:
                saida.AddRange(cirilicoMinusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.LatinoMaiusculo:
            case ModoNomenclatura.LatinoMaiusculoNumero:
                saida.AddRange(latinoMaiusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.LatinoMinusculo:
            case ModoNomenclatura.LatinoMinusculoNumero:
                saida.AddRange(latinoMinusculo.Select(x => x.ToString()));
                break;

            case ModoNomenclatura.Numero:
                for (int i = 1; i <= 64; i++)
                {
                    saida.Add(i.ToString());
                }
                break;

            case ModoNomenclatura.Romano:
                for (ushort i = 1; i <= 64; i++)
                {
                    saida.Add(ToRomanNumeral(i));
                }
                break;
            }
            if (TLMLineUtils.nomenclaturasComNumeros.Contains(m))
            {
                saida.AddRange(numeros.Select(x => x.ToString()));
            }
            return(saida);
        }
Ejemplo n.º 7
0
        public void openLineInfo(ushort lineID)
        {
            if (lineID <= 0)
            {
                return;
            }
            WorldInfoPanel.HideAllWorldInfoPanels();
            linePrefixDropDown.eventSelectedIndexChanged -= saveLineNumber;
            lineNumberLabel.eventLostFocus -= saveLineNumber;

            m_lineIdSelecionado = default(InstanceID);
            m_lineIdSelecionado.TransportLine = lineID;

            TransportLine t          = m_controller.tm.m_lines.m_buffer[(int)lineID];
            ushort        lineNumber = t.m_lineNumber;

            TLMCW.ConfigIndex transportType = TLMCW.getDefinitionForLine(lineID).toConfigIndex();
            ModoNomenclatura  mnPrefixo     = (ModoNomenclatura)TLMCW.getCurrentConfigInt(TLMConfigWarehouse.ConfigIndex.PREFIX | transportType);

            if (mnPrefixo != ModoNomenclatura.Nenhum)
            {
                lineNumberLabel.text             = (lineNumber % 1000).ToString();
                lineNumberLabel.relativePosition = new Vector3(110f, 3f);
                lineNumberLabel.width            = 55;
                linePrefixDropDown.enabled       = false;

                var temp = TLMUtils.getStringOptionsForPrefix(mnPrefixo);
                for (uint i = 0; i < temp.Length; i++)
                {
                    string prefixName = TLMUtils.getTransportSystemPrefixName(transportType, i);
                    if (prefixName != null && prefixName != string.Empty)
                    {
                        temp[(int)i] += " (" + prefixName + ")";
                    }
                }
                linePrefixDropDown.items         = temp;
                linePrefixDropDown.selectedIndex = lineNumber / 1000;
                linePrefixDropDown.enabled       = true;
                lineNumberLabel.maxLength        = 3;
            }
            else
            {
                lineNumberLabel.text             = (lineNumber).ToString();
                lineNumberLabel.relativePosition = new Vector3(80f, 3f);
                lineNumberLabel.width            = 75;
                lineNumberLabel.maxLength        = 4;
                linePrefixDropDown.enabled       = false;
            }



            lineNumberLabel.color = m_controller.tm.GetLineColor(lineID);
            lineNameField.text    = m_controller.tm.GetLineName(lineID);

            lineTransportIconTypeLabel.relativePosition = new Vector3(10f, 12f);
            lineTransportIconTypeLabel.height           = 20;
            lineTransportIconTypeLabel.atlas            = linePrefixDropDown.atlas;
            lineTransportIconTypeLabel.backgroundSprite = PublicTransportWorldInfoPanel.GetVehicleTypeIcon(t.Info.m_transportType);

            lineColorPicker.selectedColor = m_controller.tm.GetLineColor(lineID);

            bool day, night, zeroed;

            TLMLineUtils.getLineActive(ref t, out day, out night, out zeroed);
            if (day && night)
            {
                lineTime.selectedIndex = 0;
            }
            else if (day)
            {
                lineTime.selectedIndex = 1;
            }
            else if (night)
            {
                lineTime.selectedIndex = 2;
            }
            else
            {
                lineTime.selectedIndex = 3;
            }

            m_linearMap.redrawLine();
            Show();
            m_controller.defaultListingLinesPanel.Hide();

            m_autoNameLabel.text     = m_linearMap.autoName;
            vehicleQuantitySet.text  = TLMVehiclesLineManager.instance[this.lineIdSelecionado.TransportLine].ToString();
            vehicleQuantitySet.area  = new Vector4(150, 150, 50, 20);
            vehicleQuantitySet.color = Color.gray;
            linePrefixDropDown.eventSelectedIndexChanged += saveLineNumber;
            lineNumberLabel.eventLostFocus += saveLineNumber;
        }
        private void BindParentChanges()
        {
            m_lineInfo.EventOnLineChanged += (lineId) =>
            {
                TLMUtils.doLog("EventOnLineChanged");
                m_isLoading = true;
                bool isCustomLine             = TLMTransportLineExtension.instance.GetUseCustomConfig(lineId);
                TransportSystemDefinition tsd = TransportSystemDefinition.from(lineId);
                TLMUtils.doLog("tsd = {0}", tsd);
                if (m_lastDef != tsd)
                {
                    foreach (var i in m_checkboxes.Keys)
                    {
                        UnityEngine.Object.Destroy(m_checkboxes[i].gameObject);
                    }
                    m_defaultAssets = tsd.GetTransportExtension().GetAllBasicAssets(0);
                    m_checkboxes    = new Dictionary <string, UICheckBox>();

                    TLMUtils.doLog("m_defaultAssets Size = {0} ({1})", m_defaultAssets?.Count, string.Join(",", m_defaultAssets.Keys?.ToArray() ?? new string[0]));
                    foreach (var i in m_defaultAssets.Keys)
                    {
                        var checkbox = (UICheckBox)m_uiHelper.AddCheckbox(m_defaultAssets[i], false, (x) =>
                        {
                            ushort lineIdx = m_lineInfo.CurrentSelectedId;
                            if (m_isLoading)
                            {
                                return;
                            }
                            if (x)
                            {
                                if (TLMTransportLineExtension.instance.GetUseCustomConfig(lineIdx))
                                {
                                    TLMTransportLineExtension.instance.AddAsset(lineIdx, i);
                                }
                                else
                                {
                                    tsd.GetTransportExtension().AddAsset(TLMLineUtils.getPrefix(lineIdx), i);
                                }
                            }
                            else
                            {
                                if (TLMTransportLineExtension.instance.GetUseCustomConfig(lineIdx))
                                {
                                    TLMTransportLineExtension.instance.RemoveAsset(lineIdx, i);
                                }
                                else
                                {
                                    tsd.GetTransportExtension().RemoveAsset(TLMLineUtils.getPrefix(lineIdx), i);
                                }
                            }
                        });
                        CreateModelCheckBox(i, checkbox);
                        checkbox.label.tooltip              = checkbox.label.text;
                        checkbox.label.textScale            = 0.9f;
                        checkbox.label.transform.localScale = new Vector3(Math.Min((m_mainPanel.width - 50) / checkbox.label.width, 1), 1);
                        m_checkboxes[i] = checkbox;
                    }
                }
                m_lastDef = tsd;
                List <string> selectedAssets;
                if (isCustomLine)
                {
                    selectedAssets = TLMTransportLineExtension.instance.GetAssetList(lineId);
                }
                else
                {
                    selectedAssets = tsd.GetTransportExtension().GetAssetList(TLMLineUtils.getPrefix(lineId));
                }
                TLMUtils.doLog("selectedAssets Size = {0} ({1})", selectedAssets?.Count, string.Join(",", selectedAssets?.ToArray() ?? new string[0]));
                foreach (var i in m_checkboxes.Keys)
                {
                    m_checkboxes[i].isChecked = selectedAssets.Contains(i);
                }

                if (isCustomLine)
                {
                    m_title.text = string.Format(Locale.Get("TLM_ASSET_SELECT_WINDOW_TITLE"), TLMLineUtils.getLineStringId(lineId), TLMConfigWarehouse.getNameForTransportType(tsd.toConfigIndex()));
                }
                else
                {
                    TLMConfigWarehouse.ConfigIndex transportType = tsd.toConfigIndex();
                    ModoNomenclatura mnPrefixo = (ModoNomenclatura)TLMConfigWarehouse.getCurrentConfigInt(TLMConfigWarehouse.ConfigIndex.PREFIX | transportType);
                    var prefix = TLMLineUtils.getPrefix(lineId);
                    m_title.text = string.Format(Locale.Get("TLM_ASSET_SELECT_WINDOW_TITLE_PREFIX"), prefix > 0 ? TLMUtils.getStringFromNumber(TLMUtils.getStringOptionsForPrefix(mnPrefixo), (int)prefix + 1) : Locale.Get("TLM_UNPREFIXED"), TLMConfigWarehouse.getNameForTransportType(tsd.toConfigIndex()));
                }

                m_isLoading = false;
                m_previewPanel.isVisible = false;
            };
        }
Ejemplo n.º 9
0
        private void BindParentChanges()
        {
            TLMTabControllerPrefixList <T> .eventOnPrefixChange += (prefix) =>
            {
                TLMUtils.doLog("EventOnLineChanged");
                TransportSystemDefinition tsd = Singleton <T> .instance.GetTSD();

                if (!tsd.hasVehicles())
                {
                    m_mainPanel.isVisible = false;
                    return;
                }
                m_isLoading = true;
                TLMUtils.doLog("tsd = {0}", tsd);
                if (!loaded)
                {
                    foreach (var i in m_checkboxes.Keys)
                    {
                        UnityEngine.Object.Destroy(m_checkboxes[i].gameObject);
                    }
                    m_defaultAssets = tsd.GetTransportExtension().GetAllBasicAssets(0);
                    m_checkboxes    = new Dictionary <string, UICheckBox>();

                    TLMUtils.doLog("m_defaultAssets Size = {0} ({1})", m_defaultAssets?.Count, string.Join(",", m_defaultAssets.Keys?.ToArray() ?? new string[0]));
                    foreach (var i in m_defaultAssets.Keys)
                    {
                        var checkbox = (UICheckBox)m_uiHelper.AddCheckbox(m_defaultAssets[i], false, (x) =>
                        {
                            if (!m_isLoading)
                            {
                                ushort lineIdx = (ushort)m_parent.SelectedPrefix;
                                if (lineIdx > 100)
                                {
                                    return;
                                }
                                if (x)
                                {
                                    tsd.GetTransportExtension().AddAsset(TLMLineUtils.getPrefix(lineIdx), i);
                                }
                                else
                                {
                                    tsd.GetTransportExtension().RemoveAsset(TLMLineUtils.getPrefix(lineIdx), i);
                                }
                            }
                        });
                        CreateModelCheckBox(i, checkbox);
                        checkbox.label.tooltip              = checkbox.label.text;
                        checkbox.label.textScale            = 0.9f;
                        checkbox.label.transform.localScale = new Vector3(Math.Min((m_mainPanel.width - 50) / checkbox.label.width, 1), 1);
                        m_checkboxes[i] = checkbox;
                    }
                }
                loaded = true;
                List <string> selectedAssets;
                selectedAssets = tsd.GetTransportExtension().GetAssetList((uint)prefix);

                TLMUtils.doLog("selectedAssets Size = {0} ({1})", selectedAssets?.Count, string.Join(",", selectedAssets?.ToArray() ?? new string[0]));
                foreach (var i in m_checkboxes.Keys)
                {
                    m_checkboxes[i].isChecked = selectedAssets.Contains(i);
                }

                TLMConfigWarehouse.ConfigIndex transportType = tsd.toConfigIndex();
                ModoNomenclatura mnPrefixo = (ModoNomenclatura)TLMConfigWarehouse.getCurrentConfigInt(TLMConfigWarehouse.ConfigIndex.PREFIX | transportType);
                m_title.text = string.Format(Locale.Get("TLM_ASSET_SELECT_WINDOW_TITLE_PREFIX"), prefix > 0 ? TLMUtils.getStringFromNumber(TLMUtils.getStringOptionsForPrefix(mnPrefixo), (int)prefix + 1) : Locale.Get("TLM_UNPREFIXED"), TLMConfigWarehouse.getNameForTransportType(tsd.toConfigIndex()));

                m_isLoading = false;
            };
            TLMTabControllerPrefixList <T> .eventOnColorChange += (Color x) => m_lastColor = x;
        }
Ejemplo n.º 10
0
        private static string[] GetStringOptionsForPrefix(ModoNomenclatura m, ref TransportSystemDefinition tsd, bool useNameRefSystem = false, bool showUnprefixed = false, bool noneOption = true)
        {
            var saida = new List <string>(new string[noneOption ? 1 : 0]);

            if (!noneOption)
            {
                string unprefixedName = Locale.Get("K45_TLM_UNPREFIXED");
                if (useNameRefSystem)
                {
                    string prefixName = tsd.GetTransportExtension().GetName(0);
                    if (!string.IsNullOrEmpty(prefixName))
                    {
                        unprefixedName += " - " + prefixName;
                    }
                }
                saida.Add(unprefixedName);
            }
            if (m == ModoNomenclatura.Nenhum)
            {
                return(saida.ToArray());
            }
            switch (m)
            {
            case ModoNomenclatura.GregoMaiusculo:
            case ModoNomenclatura.GregoMaiusculoNumero:
                AddToArrayWithName(gregoMaiusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.GregoMinusculo:
            case ModoNomenclatura.GregoMinusculoNumero:
                AddToArrayWithName(gregoMinusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.CirilicoMaiusculo:
            case ModoNomenclatura.CirilicoMaiusculoNumero:
                AddToArrayWithName(cirilicoMaiusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.CirilicoMinusculo:
            case ModoNomenclatura.CirilicoMinusculoNumero:
                AddToArrayWithName(cirilicoMinusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.LatinoMaiusculo:
            case ModoNomenclatura.LatinoMaiusculoNumero:
                AddToArrayWithName(latinoMaiusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.LatinoMinusculo:
            case ModoNomenclatura.LatinoMinusculoNumero:
                AddToArrayWithName(latinoMinusculo, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.Numero:
                string[] temp = new string[64];
                for (int i = 1; i <= 64; i++)
                {
                    temp[i - 1] = i.ToString();
                }
                AddToArrayWithName(temp, saida, ref tsd, useNameRefSystem);
                break;

            case ModoNomenclatura.Romano:
                string[] tempR = new string[64];
                for (ushort i = 1; i <= 64; i++)
                {
                    tempR[i - 1] = NumberingUtils.ToRomanNumeral(i);
                }
                AddToArrayWithName(tempR, saida, ref tsd, useNameRefSystem);
                break;
            }
            if (TLMLineUtils.nomenclaturasComNumeros.Contains(m))
            {
                AddToArrayWithName(numeros, saida, ref tsd, useNameRefSystem);
            }
            if (!noneOption && !showUnprefixed)
            {
                saida.RemoveAt(0);
            }
            return(saida.ToArray());
        }
Ejemplo n.º 11
0
 public void setLineNumberCircle(int num, ModoNomenclatura pre, Separador s, ModoNomenclatura mn, ModoNomenclatura np, bool zeros, bool invertPrefixSuffix)
 {
     TLMLineUtils.setLineNumberCircleOnRef(num, pre, s, mn, np, zeros, linearMapLineNumber, invertPrefixSuffix);
 }