コード例 #1
0
 void ReleaseDesignerOutlets()
 {
     if (CalendarButton != null)
     {
         CalendarButton.Dispose();
         CalendarButton = null;
     }
     if (FavoritesButton != null)
     {
         FavoritesButton.Dispose();
         FavoritesButton = null;
     }
     if (NavBar != null)
     {
         NavBar.Dispose();
         NavBar = null;
     }
     if (NutritionButton != null)
     {
         NutritionButton.Dispose();
         NutritionButton = null;
     }
     if (ProfileButton != null)
     {
         ProfileButton.Dispose();
         ProfileButton = null;
     }
     if (WorkoutsButton != null)
     {
         WorkoutsButton.Dispose();
         WorkoutsButton = null;
     }
 }
コード例 #2
0
ファイル: ListSettingsView.cs プロジェクト: showmap/smartwalk
        private void InitializeStyle()
        {
            BackgroundView.BarTintColor = Background;
            Separator.Color             = ThemeColors.HeaderBackground.GetDarker(0.4f);

            SortByLabel.Font      = Theme.OrgEventHeaderFont;
            SortByLabel.TextColor = Light;

            SortBySegments.SetTitleTextAttributes(
                new UITextAttributes {
                Font      = Theme.OrgEventHeaderFont,
                TextColor = Light
            },
                UIControlState.Highlighted);
            SortBySegments.SetTitleTextAttributes(
                new UITextAttributes {
                Font      = Theme.OrgEventHeaderFont,
                TextColor = Light
            },
                UIControlState.Normal);
            SortBySegments.TintColor = Light;

            FavoritesButton.Font = Theme.OrgEventHeaderFont;
            FavoritesButton.SetTitleColor(Light, UIControlState.Normal);
            FavoritesButton.SetImage(ThemeIcons.StarSmall, UIControlState.Normal);
            FavoritesButton.TintColor          = Light;
            FavoritesButton.Layer.BorderWidth  = 0.9f;
            FavoritesButton.Layer.CornerRadius = 4;
            FavoritesButton.Layer.BorderColor  = Light.CGColor;

            FavoritesButton.TouchDown += (sender, e) =>
                                         FavoritesButton.BackgroundColor = ThemeColors.ContentLightBackground.ColorWithAlpha(0.2f);
            FavoritesButton.TouchUpInside  += (sender, e) => UpdateFavoritesState();
            FavoritesButton.TouchUpOutside += (sender, e) => UpdateFavoritesState();
        }
コード例 #3
0
 private void SeutpShadows()
 {
     InfoButton.AddShadow();
     OrdersButton.AddShadow();
     FavoritesButton.AddShadow();
     SecurityButton.AddShadow();
 }
コード例 #4
0
ファイル: ListSettingsView.cs プロジェクト: showmap/smartwalk
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            SortBySegments.SetTitle(Localization.Name, 0);
            SortBySegments.SetTitle(Localization.Time, 1);

            SortByLabel.Text = Localization.OrderBy;
            // HACK: A space for a gap between start and caption
            FavoritesButton.SetTitle(" " + Localization.Favorites, UIControlState.Normal);

            InitializeStyle();
        }
コード例 #5
0
ファイル: ListSettingsView.cs プロジェクト: showmap/smartwalk
 private void UpdateFavoritesState()
 {
     UIView.Animate(UIConstants.AnimationDuration,
                    () =>
     {
         if (ShowOnlyFavotires)
         {
             FavoritesButton.SetTitleColor(Background, UIControlState.Normal);
             FavoritesButton.TintColor       = Background;
             FavoritesButton.BackgroundColor = Light;
         }
         else
         {
             FavoritesButton.SetTitleColor(Light, UIControlState.Normal);
             FavoritesButton.TintColor       = Light;
             FavoritesButton.BackgroundColor = UIColor.Clear;
         }
     });
 }
コード例 #6
0
        void ReleaseDesignerOutlets()
        {
            if (ContentView != null)
            {
                ContentView.Dispose();
                ContentView = null;
            }

            if (BackgroundView != null)
            {
                BackgroundView.Dispose();
                BackgroundView = null;
            }

            if (FavoritesButton != null)
            {
                FavoritesButton.Dispose();
                FavoritesButton = null;
            }

            if (Separator != null)
            {
                Separator.Dispose();
                Separator = null;
            }

            if (SortByLabel != null)
            {
                SortByLabel.Dispose();
                SortByLabel = null;
            }

            if (SortBySegments != null)
            {
                SortBySegments.Dispose();
                SortBySegments = null;
            }
        }