Exemplo n.º 1
0
        internal static void Initialize()
        {
            for (int i = 1; i <= StageMania.MAX_COLUMNS; i++)
            {
                for (int f = 0; f < (int)ManiaLayoutsFor.LengthOfEnum; f++)
                {
                    LayoutListMania ll        = layoutsFor[i, f] = new LayoutListMania(i, (ManiaLayoutsFor)f);
                    string          forString = layoutForToString((ManiaLayoutsFor)f);

                    try
                    {
                        object l;
                        if (ConfigManager.Configuration.TryGetValue(@"ManiaLayouts" + i.ToString() + 'K' + forString, out l))
                        {
                            ll.Add(l.ToString());
                        }
                    }
                    catch { }
                    try
                    {
                        object s;
                        if (ConfigManager.Configuration.TryGetValue(@"ManiaLayoutSelected" + i.ToString() + 'K' + forString, out s))
                        {
                            ll.Selected = int.Parse(s.ToString());
                        }
                    }
                    catch { }
                }
            }
        }
Exemplo n.º 2
0
 internal static void WriteConfiguration()
 {
     for (int i = 1; i <= StageMania.MAX_COLUMNS; i++)
     {
         for (int f = 0; f < (int)ManiaLayoutsFor.LengthOfEnum; f++)
         {
             LayoutListMania ll = layoutsFor[i, f];
             string          layouts;
             if (!String.IsNullOrEmpty(layouts = ll.ToString()))
             {
                 string forString = layoutForToString((ManiaLayoutsFor)f);
                 ConfigManager.Configuration[@"ManiaLayouts" + i.ToString() + 'K' + forString]        = layouts;
                 ConfigManager.Configuration[@"ManiaLayoutSelected" + i.ToString() + 'K' + forString] = ll.Selected.ToString();
             }
         }
     }
 }