コード例 #1
0
ファイル: SMSWidget.cs プロジェクト: SeregaPru/metrohome65
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            // sms count method selection
            var ctrUnreadType = new SelectSettingsControl
            {
                Caption = "Unread Count".Localize(),
                Items = new List<object> { "Standart".Localize(), "MTK".Localize() },
            };
            controls.Add(ctrUnreadType);
            bindingManager.Bind(this, "UnreadType", ctrUnreadType, "SelectedIndex", true);

            controls.Add(new Separator());

            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
ファイル: WPPlayer.cs プロジェクト: SeregaPru/metrohome65
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var WhiteIconflagControl = new FlagSettingsControl { Caption = "Player white icon", };
            controls.Add(WhiteIconflagControl);
            bindingManager.Bind(this, "WhiteIcon", WhiteIconflagControl, "Value", true);

            var fontNameControl = new SelectSettingsControl { Caption = "Font Name", Items = _fontNamesData, };
            controls.Add(fontNameControl);
            bindingManager.Bind(this, "FontNameIndex", fontNameControl, "SelectedIndex", true);

            var fontSizeControl = new SelectSettingsControl { Caption = "Font Size", Items = _fontSizesData, };
            controls.Add(fontSizeControl);
            bindingManager.Bind(this, "FontSizeIndex", fontSizeControl, "SelectedIndex", true);

            var fontColorControl = new ColorSettingsControl(true) { Caption = "Font Color", };
            controls.Add(fontColorControl);
            bindingManager.Bind(this, "FontColorIndex", fontColorControl, "Value", true);

            foreach (var control in controls)
                if (control.Name.Contains("Icon"))
                {
                    controls.Remove(control);
                    break;
                }
            foreach (var control in controls)
                if (control.Name.Contains("Caption"))
                {
                    controls.Remove(control);
                    break;
                }

            return controls;
        }
コード例 #4
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());
        }
コード例 #5
0
ファイル: DigitalClock.cs プロジェクト: SeregaPru/metrohome65
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var is24HourControl = new FlagSettingsControl
                                  {
                                      Caption = "24-Hours".Localize(),
                                  };
            controls.Add(is24HourControl);
            bindingManager.Bind(this, "Is24Hour", is24HourControl, "Value", true);

            var showAlarmControl = new FlagSettingsControl
            {
                Caption = "Show alarm".Localize(),
            };
            controls.Add(showAlarmControl);
            bindingManager.Bind(this, "ShowAlarm", showAlarmControl, "Value", true);

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

            var timeFontControl = new FontSettingsControl
                                          {
                                              Caption = "Time Font".Localize(),
                                          };
            controls.Add(timeFontControl);
            bindingManager.Bind(this, "TimeFont", timeFontControl, "Value", true);

            var dateFontControl = new FontSettingsControl
                                          {
                                              Caption = "Date Font".Localize(),
                                          };
            controls.Add(dateFontControl);
            bindingManager.Bind(this, "DateFont", dateFontControl, "Value", true);

            var alarmFontControl = new FontSettingsControl
            {
                Caption = "Alarm Font".Localize(),
            };
            controls.Add(alarmFontControl);
            bindingManager.Bind(this, "AlarmFont", alarmFontControl, "Value", true);

            // hide control for icon / caption selection
            foreach (var control in controls)
                if (control.Name.Contains("Icon"))
                {
                    controls.Remove(control);
                    break;
                }
            foreach (var control in controls)
                if (control.Name.Contains("Caption"))
                {
                    controls.Remove(control);
                    break;
                }
            foreach (var control in controls)
                if (control.Name.Contains("CaptionFont"))
                {
                    controls.Remove(control);
                    break;
                }

            return controls;
        }
コード例 #6
0
ファイル: AdvancedLock.cs プロジェクト: SeregaPru/metrohome65
        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;
        }
コード例 #7
0
        public override ICollection<UIElement> EditControls(FleuxControlPage settingsPage)
        {
            var controls = base.EditControls(settingsPage);
            var bindingManager = new BindingManager();

            var showDateControl = new FlagSettingsControl { Caption = "Show Date".Localize(), };
            controls.Add(showDateControl); bindingManager.Bind(this, "IsShowDate", showDateControl, "Value", true);

            var showCalendarControl = new FlagSettingsControl { Caption = "Show Calendar".Localize(), };
            controls.Add(showCalendarControl); bindingManager.Bind(this, "IsShowCalendar", showCalendarControl, "Value", true);

            var timeScreenControl = new SelectSettingsControl { Caption = "Time Screen", Items = _timeScreensData, };
            controls.Add(timeScreenControl);
            bindingManager.Bind(this, "TimeScreenIndex", timeScreenControl, "SelectedIndex", true);

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

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

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

            foreach (var control in controls)
                if (control.Name.Contains("Icon"))
                {
                    controls.Remove(control);
                    break;
                }

            return controls;
        }