public void CopyFrom(Preferences source) { if (source == null) return; this.PythonPath = source.PythonPath; this.InstallPath = source.InstallPath; this.BrowserPath = source.BrowserPath; this.EMail = source.EMail; this.Applications = source.Applications; }
void FmMain_Load(object sender, EventArgs e) { ImageList stImageList = new ImageList(); stImageList.Images.Add(ApplicationStatus.Off.ToString(), GoogleAppEngineLauncher.Properties.Resources.Off); stImageList.Images.Add(ApplicationStatus.On.ToString(), GoogleAppEngineLauncher.Properties.Resources.On); this.listApp.FullRowSelect = true; this.listApp.SmallImageList = stImageList; this.listApp.SelectedIndexChanged += new EventHandler(listApp_SelectedIndexChanged); engine = GoogleAppEngine.GoogleAppEngine.CreateInstance(); string path = System.Windows.Forms.Application.StartupPath + @"\pref.xml"; pref = new Preferences(); pref.PreferencesChanged += new Preferences.PreferencesChangedEnventHandler(pref_PreferencesChanged); pref.Load(path); doAppyPreferences(); updateApplicationList(); }
void pref_PreferencesChanged(object sender, Preferences.PreferencesChangedEventArgs e) { doAppyPreferences(); }
static public bool Open(string pathName) { singleToneInstance = new Preferences(); return singleToneInstance.Load(pathName); }