public static MixedRadixSystem Alien() { Dictionary<long, string> symbolDict5 = new Dictionary<long, string>(); Dictionary<long, string> symbolDict4 = new Dictionary<long, string>(); Dictionary<long, string> symbolDict3dots = new Dictionary<long, string>(); Dictionary<long, string> symbolDict3slashes = new Dictionary<long, string>(); int counter = 0; symbolDict4.Add(counter++, " "); symbolDict4.Add(counter++, @"\"); symbolDict4.Add(counter++, "V"); symbolDict4.Add(counter++, "Y"); symbolDict4.Add(counter++, "X"); counter = 0; symbolDict3dots.Add(counter++, " "); symbolDict3dots.Add(counter++, "."); symbolDict3dots.Add(counter++, ","); symbolDict3dots.Add(counter++, ";"); counter = 0; symbolDict3slashes.Add(counter++, " "); symbolDict3slashes.Add(counter++, "\\"); symbolDict3slashes.Add(counter++, "/"); symbolDict3slashes.Add(counter++, "X"); counter = 0; symbolDict5.Add(counter++, " "); symbolDict5.Add(counter++, "|"); symbolDict5.Add(counter++, "L"); symbolDict5.Add(counter++, "C"); symbolDict5.Add(counter++, "E"); symbolDict5.Add(counter++, "8"); List<Dictionary<long, string>> symbolDictionaryList = new List<Dictionary<long, string>>(); symbolDictionaryList.Add(symbolDict5); symbolDictionaryList.Add(symbolDict3dots); symbolDictionaryList.Add(symbolDict4); symbolDictionaryList.Add(symbolDict3slashes); symbolDictionaryList.Add(symbolDict3slashes); symbolDictionaryList.Add(symbolDict3slashes); symbolDictionaryList.Add(symbolDict3slashes); List<long> radixDefinition = new List<long>(); radixDefinition.Add(5); radixDefinition.Add(3); radixDefinition.Add(4); radixDefinition.Add(3); radixDefinition.Add(3); radixDefinition.Add(3); radixDefinition.Add(3); List<RadixNumeral> radii = new List<RadixNumeral>(); radii = MixedRadixSystem.ConvertListToRadixNumeralList(radixDefinition, symbolDictionaryList); MixedRadixSystem result = new MixedRadixSystem(radii); return result; }
void Initialize() { currentNumeralSystem = MixedRadixSystem.Factory.TimeDateRadix52(); currentNumeralSystem.LeftToRight = cbLeftToRight.Checked; panelCustom.Visible = false; listNumberSystems.Items.Add("Base 2"); listNumberSystems.Items.Add("Base 3"); listNumberSystems.Items.Add("Base 5"); listNumberSystems.Items.Add("Base 7"); listNumberSystems.Items.Add("Base 10"); listNumberSystems.Items.Add("Base 12"); listNumberSystems.Items.Add("Base 16"); listNumberSystems.Items.Add("Base 256"); listNumberSystems.Items.Add("60:60:24:7:4:12"); listNumberSystems.Items.Add("60:60:24:360:280000"); listNumberSystems.Items.Add("60:60:24:6:60"); listNumberSystems.Items.Add("1:2:3:4:5:6:7:8:9"); listNumberSystems.Items.Add("3:5:7:11:13:17:19:23:29"); listNumberSystems.Items.Add("2:3:5:8:13:21:34:55:89:144:233"); listNumberSystems.Items.Add("*Hexadecimal"); listNumberSystems.Items.Add("*Symbols9"); listNumberSystems.Items.Add("*Lines"); listNumberSystems.Items.Add("*Alien"); panelRadixChoose.BringToFront(); }
private void btnLoad_Click(object sender, EventArgs e) { string selectedNumberSystem = Convert.ToString(listNumberSystems.SelectedItem); switch (selectedNumberSystem) { case "*Hexadecimal": currentNumeralSystem = MixedRadixSystem.Factory.Hexadecimal(); break; case "*Symbols9": currentNumeralSystem = MixedRadixSystem.Factory.Symbols9(); break; case "*Lines": currentNumeralSystem = MixedRadixSystem.Factory.Lines(); break; case "*Alien": currentNumeralSystem = MixedRadixSystem.Factory.Alien(); break; default: currentNumeralSystem = new MixedRadixSystem(selectedNumberSystem, cbLeftToRight.Checked); break; } UpdateGUI(); }