public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var colorControl = new ColorSettingsControl(true)
                                   {
                                       Caption = "Tile color".Localize(),
                                       ARGBValue = _tileColor,
                                   };
            controls.Add(colorControl);
            bindingManager.Bind(this, "TileColor", colorControl, "ARGBValue");

            var imgControl = new ImageSettingsControl()
                                 {
                                     Caption = "Button background".Localize(),
                                     Value = TileImage,
                                 };
            controls.Add(imgControl);
            bindingManager.Bind(this, "TileImage", imgControl, "Value");

            return controls;
        }
示例#2
0
        public virtual ICollection<UIElement> EditControls(FleuxControlPage settingsPage, BindingManager bindingManager)
        {
            var controls = new List<UIElement>();

            var ctrLockScreenImage = new ImageSettingsControl
                                         {
                                             Caption = "Lock screen background",
                                         };
            controls.Add(ctrLockScreenImage);
            bindingManager.Bind(this, "Background", ctrLockScreenImage, "Value", true);

            var formatControl = new SelectSettingsControl
                                    {
                                        Caption = "Date format",
                                        Items = _dateSamples,
                                    };
            controls.Add(formatControl);
            bindingManager.Bind(this, "DateSampleIndex", formatControl, "SelectedIndex", true);

            var flagControl = new FlagSettingsControl
                                  {
                                      Caption = "24-Hours",
                                  };
            controls.Add(flagControl);
            bindingManager.Bind(this, "Is24Hour", flagControl, "Value", true);
            /*****************************************************************************************************/
            // Top Bar
            /* Блокируем нет пока иконок черного цвета
            var TopBarWhiteIconflagControl = new FlagSettingsControl { Caption = "TopBar white Icon", };
            controls.Add(TopBarWhiteIconflagControl);
            bindingManager.Bind(this, "TopBarWhiteIcon", TopBarWhiteIconflagControl, "Value", true);*/

            var TopBarColorBatteryflagControl = new FlagSettingsControl { Caption = "TopBar color battery", };
            controls.Add(TopBarColorBatteryflagControl);
            bindingManager.Bind(this, "TopBarColorBattery", TopBarColorBatteryflagControl, "Value", true);

            var TopBarFontColorControl = new ColorSettingsControl(true) { Caption = "TopBar time color", };
            controls.Add(TopBarFontColorControl);
            bindingManager.Bind(this, "TopBarFontColorIndex", TopBarFontColorControl, "Value", true);
            /*****************************************************************************************************/
            // Media Player
            var PlayerWhiteIconflagControl = new FlagSettingsControl { Caption = "Player white icon", };
            controls.Add(PlayerWhiteIconflagControl);
            bindingManager.Bind(this, "PlayerWhiteIcon", PlayerWhiteIconflagControl, "Value", true);

            var PlayerFontColorControl = new ColorSettingsControl(true) { Caption = "Player text color", };
            controls.Add(PlayerFontColorControl);
            bindingManager.Bind(this, "PlayerFontColorIndex", PlayerFontColorControl, "Value", true);
            /*****************************************************************************************************/
            // Date Time
            /* Пока не сделал отображение будильника
            var DateTimeWhiteIconflagControl = new FlagSettingsControl { Caption = "Alarm white icon", };
            controls.Add(DateTimeWhiteIconflagControl);
            bindingManager.Bind(this, "DateTimeWhiteIcon", DateTimeWhiteIconflagControl, "Value", true);*/

            var DateTimeFontColorControl = new ColorSettingsControl(true) { Caption = "Date text color", };
            controls.Add(DateTimeFontColorControl);
            bindingManager.Bind(this, "DateTimeFontColorIndex", DateTimeFontColorControl, "Value", true);
            /*****************************************************************************************************/
            // Appointment
            var AppointmentWhiteIconflagControl = new FlagSettingsControl { Caption = "Appointment white icon", };
            controls.Add(AppointmentWhiteIconflagControl);
            bindingManager.Bind(this, "AppointmentWhiteIcon", AppointmentWhiteIconflagControl, "Value", true);

            var AppointmentFontColorControl = new ColorSettingsControl(true) { Caption = "Appointment text color", };
            controls.Add(AppointmentFontColorControl);
            bindingManager.Bind(this, "AppointmentFontColorIndex", AppointmentFontColorControl, "Value", true);
            /*****************************************************************************************************/
            // Status
            var StatusWhiteIconflagControl = new FlagSettingsControl { Caption = "Status white icon", };
            controls.Add(StatusWhiteIconflagControl);
            bindingManager.Bind(this, "StatusWhiteIcon", StatusWhiteIconflagControl, "Value", true);

            var StatusFontColorControl = new ColorSettingsControl(true) { Caption = "Status text color", };
            controls.Add(StatusFontColorControl);
            bindingManager.Bind(this, "StatusFontColorIndex", StatusFontColorControl, "Value", true);

            return controls;
        }
示例#3
0
        public MainSettingsPage(CustomSettingsPage<MainSettings> page)
        {
            _page = page;
            _page.OnApplySettings += (sender, settings) => OnApplySettings(settings);

            //!!Size = new Size(Size.Width - SettingsConsts.PaddingHor * 2, 1);

            // intro
            var txtIntro =
                new TextElement(
                    "Change your phone's background and accent color to match your mood today, this week, or all month.".Localize())
                {
                    Size = new Size(this.Size.Width - 10, 50),
                    Style = new TextStyle(MetroTheme.PhoneFontFamilyNormal, MetroTheme.PhoneFontSizeSmall, MetroTheme.PhoneForegroundBrush),
                    AutoSizeMode = TextElement.AutoSizeModeOptions.WrapText,
                };
            this.AddElement(txtIntro);

            this.AddElement(new Separator());

            // light/dark theme switcher
            var ctrTheme = new SelectSettingsControl
            {
                Caption = "Theme".Localize(),
                Items = new List<object> { "dark".Localize(), "light".Localize() },
            };
            this.AddElement(ctrTheme);
            _page.BindingManager.Bind(this, "ThemeIndex", ctrTheme, "SelectedIndex", true);

            this.AddElement(new Separator());

            // accent color
            var ctrAccent = new ColorSettingsControl(false)
            {
                Caption = "Accent Color".Localize(),
            };
            this.AddElement(ctrAccent);
            _page.BindingManager.Bind(this, "AccentColor", ctrAccent, "Value", true);

            this.AddElement(new Separator());

            // theme background
            var ctrThemeImage = new ImageSettingsControl
            {
                Caption = "Theme background".Localize(),
            };
            this.AddElement(ctrThemeImage);
            _page.BindingManager.Bind(_page.Settings, "ThemeImage", ctrThemeImage, "Value", true);

            this.AddElement(new Separator());

            // full screen
            var ctrFullScreen = new FlagSettingsControl()
            {
                Caption = "Full screen".Localize(),
            };
            this.AddElement(ctrFullScreen);
            _page.BindingManager.Bind(_page.Settings, "FullScreen", ctrFullScreen, "Value", true);

            this.AddElement(new Separator());

            // tile screen style
            var ctrTileTheme = new SelectSettingsControl
            {
                Caption = "Tiles style".Localize(),
                Items = new List<object> { "Windows Phone 7", "Windows 8" },
            };
            this.AddElement(ctrTileTheme);
            _page.BindingManager.Bind(_page.Settings, "TileThemeIndex", ctrTileTheme, "SelectedIndex", true);

            this.AddElement(new Separator());
        }
示例#4
0
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var captionControl = new StringSettingsControl(settingsPage)
                                     {
                                         Caption = "Caption".Localize(),
                                         Name = "Caption",
                                     };
            controls.Add(captionControl);
            bindingManager.Bind(this, "Caption", captionControl, "Value", true);

            var captionFontControl = new FontSettingsControl
            {
                Caption = "Caption Font".Localize(),
                Name = "CaptionFont",
            };
            controls.Add(captionFontControl);
            bindingManager.Bind(this, "CaptionFont", captionFontControl, "Value", true);

            var imgControl = new ImageSettingsControl()
                                 {
                                     Caption = "Icon image".Localize(),
                                     Name = "Icon",
                                 };
            controls.Add(imgControl);
            bindingManager.Bind(this, "IconPath", imgControl, "Value", true);

            return controls;
        }
示例#5
0
        public virtual ICollection<UIElement> EditControls(FleuxControlPage settingsPage, BindingManager bindingManager)
        {
            var controls = new List<UIElement>();

            var ctrLockScreenImage = new ImageSettingsControl
            {
                Caption = _str_lockScreenBackground.Localize(),
            };
            controls.Add(ctrLockScreenImage);
            bindingManager.Bind(this, "Background", ctrLockScreenImage, "Value", true);

            var formatControl = new SelectSettingsControl
            {
                Caption = _str_dateFormat.Localize(),
                Items = _dateSamples,
            };
            controls.Add(formatControl);
            bindingManager.Bind(this, "DateSampleIndex", formatControl, "SelectedIndex", true);

            var flagControl = new FlagSettingsControl
            {
                Caption = _str_is24Hour.Localize(),
            };
            controls.Add(flagControl);
            bindingManager.Bind(this, "Is24Hour", flagControl, "Value", true);

            return controls;
        }
示例#6
0
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var contactControl = new ContactSettingsControl
                                 {
                                     Caption = str_Contact.Localize(),
                                     Value = ContactId,
                                 };
            controls.Add(contactControl);
            bindingManager.Bind(this, "ContactId", contactControl, "Value");

            var imgControl = new ImageSettingsControl()
            {
                Caption = str_AlternateImage.Localize(),
                Value = AlternatePicturePath,
            };
            controls.Add(imgControl);
            bindingManager.Bind(this, "AlternatePicturePath", imgControl, "Value");

            return controls;
        }