Ejemplo n.º 1
0
        private void BuildPreferences()
        {
            conf_ns         = "sync";
            manually_manage = dap.CreateSchema <bool> (conf_ns, "enabled", true,
                                                       Catalog.GetString("Manually manage this device"),
                                                       Catalog.GetString("Manually managing your device means you can drag and drop items onto the device, and manually remove them.")
                                                       );

            auto_sync = dap.CreateSchema <bool> (conf_ns, "auto_sync", false,
                                                 Catalog.GetString("Automatically sync the device when plugged in or when the libraries change"),
                                                 Catalog.GetString("Begin synchronizing the device as soon as the device is plugged in or the libraries change.")
                                                 );

            dap_prefs_section = new Section("dap", Catalog.GetString("Sync Preferences"), 0);
            pref_sections.Add(dap_prefs_section);

            manually_manage_pref = dap_prefs_section.Add(manually_manage);
            manually_manage_pref.ShowDescription = true;
            manually_manage_pref.ShowLabel       = false;
            manually_manage_pref.ValueChanged   += OnManuallyManageChanged;

            auto_sync_pref = dap_prefs_section.Add(auto_sync);
            auto_sync_pref.ValueChanged += OnAutoSyncChanged;

            //manually_manage_pref.Changed += OnEnabledChanged;
            //auto_sync_pref.Changed += delegate { OnUpdated (); };
            //OnEnabledChanged (null);
        }
Ejemplo n.º 2
0
        private void BuildPreferences()
        {
            conf_ns = "sync";
            LegacyManuallyManage = dap.CreateSchema <bool> (conf_ns, "enabled", false, "", "");

            auto_sync = dap.CreateSchema <bool> (conf_ns, "auto_sync", false,
                                                 Catalog.GetString("Sync when first plugged in and when the libraries change"),
                                                 Catalog.GetString("Begin synchronizing the device as soon as the device is plugged in or the libraries change.")
                                                 );

            sync_prefs = new Section("sync", Catalog.GetString("Sync Preferences"), 0);
            pref_sections.Add(sync_prefs);

            sync_prefs.Add(new VoidPreference("library-options"));

            auto_sync_pref = sync_prefs.Add(auto_sync);
            auto_sync_pref.ValueChanged += OnAutoSyncChanged;
        }