コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Ajay-Zou/ManyFoodZ
        // Load All Setttings from "Settings.bin"
        private void LoadAllSet()
        {
            if (File.Exists(saveAndLoad.settingsFilePath))
            {
                allSets = (AllSettings)saveAndLoad.LoadAll();       // Import AllSettings object containing a hashtable and others settings

                foreach (string s in allSets.userHashtable.Keys)
                    userNameComboBox.Items.Add(s);                  // Display all existing tasks in the hashtable onto the task Listbox
            }
            else                                                    // When the saved "settings.bin" file does not exist
            {
                allSets.userHashtable = new Hashtable();
            }

            deviceParaGrid.DataContext = allSets.basicParas;
        }
コード例 #2
0
ファイル: SaveAndLoad.cs プロジェクト: Ajay-Zou/ManyFoodZ
 public void SaveAll(AllSettings alset)
 {
     BFormatter.save(settingsFilePath, alset);
 }