예제 #1
0
        public void loadFiles(string path)
        {
            Text = "Jabberwocks! - " + path;

            //Remember path
            StreamWriter writer = new StreamWriter(new FileStream(".conf", FileMode.Create));

            writer.Write(path);
            writer.Close();

            Storage.LoadFiles(path);

            //Populate list
            filesComboBox.Items.Clear();
            if (Storage.OpenFiles != null)
            {
                filesComboBox.Items.AddRange(Storage.OpenFiles);

                //Select first
                if (Storage.OpenFiles.Length > 0)
                {
                    filesComboBox.SelectedItem = Storage.OpenFiles[0];
                }
            }

            WinformsUtil.RefreshDataSources();
        }
예제 #2
0
 public static void UpdateDataSource(JsonFormTag.DataSourceType source, string newEntry)
 {
     if (source < JsonFormTag.DataSourceType.PRESET_MOD_COUNT)
     {
         if (!PresetDataSources[(int)source].Contains(newEntry))
         {
             PresetDataSources[(int)source].Add(newEntry);
             WinformsUtil.RefreshDataSources();
         }
     }
 }