/// <summary> /// Method to add or remove a character to/from the party list /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void OnCharacter_Clicked(object sender, EventArgs args) { List <Tuple <string, bool> > is_added = new List <Tuple <string, bool> >(); //Create charactermodel from the character selected var button = sender as ImageButton; String characterId = button.CommandParameter as String; CharacterModel data = ViewModel.Dataset.FirstOrDefault(itm => itm.Id == characterId); if (data == null) { return; } if (selectedCharacters.Contains(data)) { BattleEngineViewModel.Instance.PartyCharacterList.Remove(data); selectedCharacters.Remove(data); button.BackgroundColor = Color.Transparent; } //the selected characters list does not contain the character and max not reached else if (BattleEngineViewModel.Instance.PartyCharacterList.Count() < BattleEngineViewModel.Instance.Engine.EngineSettings.MaxNumberPartyCharacters) { //Add character to the instance partcharacterlist BattleEngineViewModel.Instance.PartyCharacterList.Add(data); selectedCharacters.Add(data); button.BackgroundColor = (Color)ColorConverters.FromHex("25a46d"); } UpdateNextButtonState(); }
public SneakersViewModel() { sneakers = new ObservableCollection <Sneakers> { new Sneakers { Name = "NMD_R1 candy", Price = "162", Picture = "https://images.unsplash.com/photo-1595950653106-6c9ebd614d3a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" }, new Sneakers { Name = "NMD_R1 pink white", Price = "142", Picture = "https://images.unsplash.com/photo-1552346154-21d32810aba3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" }, new Sneakers { Name = "NMD_R1 mint pink", Price = "179", Picture = "https://images.unsplash.com/photo-1525966222134-fcfa99b8ae77?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=643&q=80" }, new Sneakers { Name = "NMD_R1 white mint", Price = "154", Picture = "https://images.unsplash.com/photo-1521093470119-a3acdc43374a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" } }; sneakerColor = new ObservableCollection <SneakerColor> { //new SneakerColor { ColorOption = "#819e94" }, //new SneakerColor { ColorOption = "#dde5ed" }, //new SneakerColor { ColorOption = "#d6c2bf" } new SneakerColor { ColorOption = ColorConverters.FromHex("#819e94") }, new SneakerColor { ColorOption = ColorConverters.FromHex("#dde5ed") }, new SneakerColor { ColorOption = ColorConverters.FromHex("#d6c2bf") } }; }
[InlineData("#0AF56C", "#F50A93")] // Lime green & bright purple (but with no limit values) public void GetComplementary(string original, string expected) { var orig = ColorConverters.FromHex(original); var expectedComplement = ColorConverters.FromHex(expected); Assert.Equal(expectedComplement, orig.GetComplementary()); }
public SneakersViewModel() { sneakers = new ObservableCollection <Sneakers> { new Sneakers { Name = "NMD_R1 candy", Price = "162", Picture = "Sneakers1" }, new Sneakers { Name = "NMD_R1 pink white", Price = "142", Picture = "Sneakers2" }, new Sneakers { Name = "NMD_R1 mint pink", Price = "179", Picture = "Sneakers3" }, new Sneakers { Name = "NMD_R1 white mint", Price = "154", Picture = "Sneakers4" } }; sneakerColor = new ObservableCollection <SneakerColor> { //new SneakerColor { ColorOption = "#819e94" }, //new SneakerColor { ColorOption = "#dde5ed" }, //new SneakerColor { ColorOption = "#d6c2bf" } new SneakerColor { ColorOption = ColorConverters.FromHex("#819e94") }, new SneakerColor { ColorOption = ColorConverters.FromHex("#dde5ed") }, new SneakerColor { ColorOption = ColorConverters.FromHex("#d6c2bf") } }; }
public static void ChangeTheme(Theme theme, bool forceTheme = false) { // don't change to the same theme if (theme == CurrentTheme && !forceTheme) { return; } //// clear all the resources var applicationResourceDictionary = Application.Current.Resources; if (theme == Theme.Default) { theme = AppInfo.RequestedTheme == AppTheme.Dark ? Theme.Dark : Theme.Light; } #pragma warning disable IDE0007 // Use implicit type ResourceDictionary newTheme = theme switch #pragma warning restore IDE0007 // Use implicit type { Theme.Light => new LightTheme(), Theme.Dark => new DarkTheme(), _ => new LightTheme(), }; ManuallyCopyThemes(newTheme, applicationResourceDictionary); CurrentTheme = theme; var background = (Color)App.Current.Resources["PrimaryDarkColor"]; var environment = DependencyService.Get <IEnvironment>(); environment?.SetStatusBarColor(ColorConverters.FromHex(background.ToHex()), false); }
public void FromHex(string hex, int a, int r, int g, int b) { var color = ColorConverters.FromHex(hex); Assert.Equal(a, color.A); Assert.Equal(r, color.R); Assert.Equal(g, color.G); Assert.Equal(b, color.B); }
public MainPage() { InitializeComponent(); BarBackgroundColor = ColorConverters.FromHex("#ed8756"); BarTextColor = Color.White; SelectedTabColor = Color.White; UnselectedTabColor = Color.Gray; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return(ColorConverters.FromHex("ff000000")); } return(ColorConverters.FromHex(value.ToString())); }
private string GetColorAsRGB() { System.Drawing.Color hexColor = ColorConverters.FromHex(this.Color.ToHex()); return(String.Format ("rgb({0},{1},{2})", hexColor.R.ToString(), hexColor.G.ToString(), hexColor.B.ToString())); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var colors = System.Convert.ToString(parameter).Split('|'); if ((bool)value) { return(ColorConverters.FromHex(colors[0])); } return(ColorConverters.FromHex(colors[1])); }
public TravelHomeViewModel() { obsanio = new ObservableCollection <int>(); for (int i = 1; i <= 29; i++) { obsanio.Add(i); } travelSchedule = new ObservableCollection <TravelSchedule> { new TravelSchedule { Time = "08:00 AM", Picture = "Place1", Name = "Walking Tour", Adress1 = "191 Sutter St.", Adress2 = "CA 91929", TransportType = "Car", TransportColor = ColorConverters.FromHex("#31bea6") }, new TravelSchedule { Time = "10:00 AM", Picture = "Place2", Name = "LightHouse", Adress1 = "192 Sutter St.", Adress2 = "CA 91929", TransportType = "Walking", TransportColor = ColorConverters.FromHex("#e0995e") }, new TravelSchedule { Time = "01:30 PM", Picture = "Place3", Name = "Beach Tour", Adress1 = "194 Sutter St.", Adress2 = "CA 91929", TransportType = "Motor", TransportColor = ColorConverters.FromHex("#76c2af") }, new TravelSchedule { Time = "04:30 PM", Picture = "Place4", Name = "Island", Adress1 = "200 Sutter St.", Adress2 = "CA 91929", TransportType = "Walking", TransportColor = ColorConverters.FromHex("#e0995e") } }; }
protected override void OnElementChanged(ElementChangedEventArgs <Entry> e) { base.OnElementChanged(e); if (e.NewElement != null) { var view = (CustomEntry)Element; if (view.IsCurvedCornersEnabled) { // creating gradient drawable for the curved background var _gradientBackground = new GradientDrawable(); _gradientBackground.SetShape(ShapeType.Line); _gradientBackground.SetColor(view.BackgroundColor.ToAndroid()); //Control.SetPadding(0, 0, 0, 0); // Thickness of the stroke line //_gradientBackground.SetStroke(view.BorderWidth, view.BorderColor.ToAndroid()); var blueHex = ColorConverters.FromHex("#D4D5D9"); Xamarin.Forms.Color xfColour = blueHex; Android.Graphics.Color greyColor = xfColour.ToAndroid(); _gradientBackground.SetStroke(view.BorderWidth, greyColor); // Radius for the curves //_gradientBackground.SetCornerRadius( // DpToPixels(this.Context, Convert.ToSingle(view.CornerRadius))); // set the background of the //Control.SetBackground(_gradientBackground); } // Set padding for the internal text from border //Control.SetPadding( // (int)DpToPixels(this.Context, Convert.ToSingle(12)), Control.PaddingTop, // (int)DpToPixels(this.Context, Convert.ToSingle(12)), Control.PaddingBottom); } if (Control == null || e.NewElement == null) { return; } if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop) { Control.BackgroundTintList = ColorStateList.ValueOf(Android.Graphics.Color.White); } else { Control.Background.SetColorFilter(Android.Graphics.Color.White, PorterDuff.Mode.SrcAtop); } //IntPtr IntPtrtextViewClass = JNIEnv.FindClass(typeof(TextView)); //IntPtr mCursorDrawableResProperty = JNIEnv.GetFieldID(IntPtrtextViewClass, "mCursorDrawableRes", "I"); //JNIEnv.SetField(Control.Handle, mCursorDrawableResProperty, Resource.Drawable.my_cursor); }
public void SetStatusBarColor(Color color) { // The SetStatusBarcolor is new since API 21 if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { CrossCurrentActivity.Current.Activity.Window.SetStatusBarColor(color.ToAndroid()); var brightness = ColorConverters.FromHex(color.ToHex()).GetBrightness(); Change(brightness >= 0.7); } else { // Here you will just have to set your // color in styles.xml file as shown below. } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { int num = (int)value; if (num == 1) { return((Color)ColorConverters.FromHex("#F7C234")); } else if (num == 2) { return((Color)ColorConverters.FromHex("#04AD6C")); } else { return(Color.Transparent); } }
public void addDragEffectToNode1Currency() { string currencyyparameter = "CurrencyInput"; Grid NewView = new Grid { HeightRequest = 30, Children = { new BoxView { BackgroundColor = Color.Black }, new Grid { BackgroundColor = Color.White, Margin = 2, Children = { new Label { Margin = 0, HeightRequest = 300, WidthRequest = 269, BackgroundColor = ColorConverters.FromHex("#00B0F0"), Text = currencyyparameter, HorizontalOptions = LayoutOptions.Center, HorizontalTextAlignment = Xamarin.Forms.TextAlignment.Center } } } } }; TouchEffect touchEffect = new TouchEffect(); touchEffect.TouchAction += OnTouchEffectActionToNode1Currency; NewView.Effects.Add(touchEffect); MainGrid14.RaiseChild(MainGrid15); absoluteLayout1.Children.Add(NewView); }
protected override void OnElementChanged(ElementChangedEventArgs <SearchBar> e) { base.OnElementChanged(e); if (Control != null) { var plateId = Resources.GetIdentifier("android:id/search_plate", null, null); var plate = Control.FindViewById(plateId); //plate.SetBackgroundColor(Android.Graphics.Color.White); var blueHex = ColorConverters.FromHex("#FFFFFF"); Xamarin.Forms.Color xfColour = blueHex; Android.Graphics.Color whiteColor = xfColour.ToAndroid(); plate.SetBackgroundColor(whiteColor); var searchView = Control; searchView.Iconified = true; searchView.Left = 0; searchView.SetIconifiedByDefault(false); // (Resource.Id.search_mag_icon); is wrong / Xammie bug int searchIconId = Context.Resources.GetIdentifier("android:id/search_mag_icon", null, null); var icon = searchView.FindViewById(searchIconId); (icon as ImageView).SetImageResource(Resource.Drawable.search); } //if (e.NewElement != null) //{ // var searchView = base.Control as SearchView; // //Get the Id for your search icon // int searchIconId = Context.Resources.GetIdentifier("android:id/search", null, null); // ImageView searchViewIcon = (ImageView)searchView.FindViewById<ImageView>(searchIconId); // ViewGroup linearLayoutSearchView = (ViewGroup)searchViewIcon.Parent; // searchViewIcon.SetAdjustViewBounds(true); // //Remove the search icon from the view group and add it once again to place it at the end of the view group elements // linearLayoutSearchView.RemoveView(searchViewIcon); // linearLayoutSearchView.AddView(searchViewIcon); //} }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var result = bool.TryParse(value.ToString(), out bool isRepeat); string repeatIcon1 = "Car"; string repeatIcon2 = "Motor"; Color repeatColor1 = ColorConverters.FromHex("#31bea6"); Color repeatColor2 = ColorConverters.FromHex("#e0995e"); object re = null; if (parameter is string par && !string.IsNullOrWhiteSpace(par)) { if (isRepeat) { if (par.Equals("Icon")) { re = repeatIcon1; } else { re = repeatColor1; } } else { if (par.Equals("Icon")) { re = repeatIcon2; } else { re = repeatColor2; } } } return(re); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return(null); } var colorTitle = value as string; switch (colorTitle) { case "Diagnose": case "DiagnoseICD": return((Color)ColorConverters.FromHex("#045dad")); case "Lab": return((Color)ColorConverters.FromHex("#c1b967")); case "Rad": return((Color)ColorConverters.FromHex("#696969")); case "Medication": return((Color)ColorConverters.FromHex("#fa0000")); case "Operation": return((Color)ColorConverters.FromHex("#04ad6c")); case "Procedure": return((Color)ColorConverters.FromHex("#d198fc")); default: break; } return(null); }
private void CheckBatteryStatus() { if (Battery.ChargeLevel < 0.2) { StatusMessage = "Low battery. Please save changes asap"; if (Battery.State != BatteryState.Charging) { StatusColor = ColorConverters.FromHex("#f2100c"); } else { StatusColor = ColorConverters.FromHsl(62, 96, 46); } if (Battery.EnergySaverStatus == EnergySaverStatus.On) { StatusColor = System.Drawing.Color.Green.MultiplyAlpha(.5f); } } else { StatusMessage = null; } }
public ScheduleViewModel() { schedule = new ObservableCollection <Schedule> { new Schedule { Title = "Breakfast, Food and Cereal", Description = "Yogurt, banana, apple, ...", Hour = "08:30AM", Features = new List <Features> { new Features { Name = "Light", BGColor = ColorConverters.FromHex("#F0FBF3"), TxColor = ColorConverters.FromHex("#74D884") }, new Features { Name = "Energized", BGColor = ColorConverters.FromHex("#FEFBEC"), TxColor = ColorConverters.FromHex("#FCD058") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#FCEEEB"), TxColor = ColorConverters.FromHex("#FE4134") }, new Features { Name = "Healthy", BGColor = ColorConverters.FromHex("#FEFBEC"), TxColor = ColorConverters.FromHex("#74D884") }, new Features { Name = "Comfortable", BGColor = ColorConverters.FromHex("#F0FBF3"), TxColor = ColorConverters.FromHex("#74D884") } } }, new Schedule { Title = "Lunch, Falafel wrap", Description = "Falafel, yogurt, onions, tomatoes ...", Hour = "12:30PM", Features = new List <Features> { new Features { Name = "Energized", BGColor = ColorConverters.FromHex("#FEFBEC"), TxColor = ColorConverters.FromHex("#FCD058") }, new Features { Name = "Light", BGColor = ColorConverters.FromHex("#F0FBF3"), TxColor = ColorConverters.FromHex("#74D884") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#FCEEEB"), TxColor = ColorConverters.FromHex("#FE4134") }, new Features { Name = "Healthy", BGColor = ColorConverters.FromHex("#FEFBEC"), TxColor = ColorConverters.FromHex("#FCD058") }, } }, new Schedule { Title = "Dinner, bean chili", Description = "Brown rice, tomatoes, kidney beans...", Hour = "07:30PM", Features = new List <Features> { new Features { Name = "Light", BGColor = ColorConverters.FromHex("#F0FBF3"), TxColor = ColorConverters.FromHex("#74D884") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#FCEEEB"), TxColor = ColorConverters.FromHex("#FE4134") } } } }; }
public void navigationMain(string to) { switch (to) { case "login": MainPage = new NavigationPage(new LoginPage()) { BarBackgroundColor = ColorConverters.FromHex("#1d96f0"), BarTextColor = Color.White }; break; case "main": MainPage = new NavigationPage(new AddGenre()); break; case "list": MainPage = new NavigationPage(new GenrePage()); break; } }
protected override void OnResume() { var isLoggedIn = App.Current.Properties.ContainsKey("username") && App.Current.Properties.ContainsKey("password"); Console.WriteLine(isLoggedIn); if (!isLoggedIn) { MainPage = new NavigationPage(new LoginPage()) { BarBackgroundColor = ColorConverters.FromHex("#1d96f0"), BarTextColor = Color.White }; } else { MainPage = new NavigationPage(new AddGenre()); } }
public ScheduleViewModel() { schedule = new ObservableCollection <Schedule> { new Schedule { Title = "Breakfast, Food and Cereal", Description = "Kefit, Yogurt, banana, apple, ...", Hour = "08:30 AM", Features = new List <Features> { new Features { Name = "Light", BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { Name = "Energised", BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#fceeeb"), TxColor = ColorConverters.FromHex("#fe4134") }, new Features { Name = "Healthy", BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") }, new Features { Name = "Comfortable", BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") } } }, new Schedule { Title = "Lunch, Falafep wrap", Description = "Falafer, yoghurt, onions, tomatoes ...", Hour = "12:30 PM", Features = new List <Features> { new Features { Name = "Energised", BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") }, new Features { Name = "Light", BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#fceeeb"), TxColor = ColorConverters.FromHex("#fe4134") }, new Features { Name = "Healthy", BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") }, } }, new Schedule { Title = "Dinner, Bean chilli", Description = "Brown rice, Tomatoes, Kidney beans...", Hour = "08:30 PM", Features = new List <Features> { new Features { Name = "Light", BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { Name = "Satisfied", BGColor = ColorConverters.FromHex("#fceeeb"), TxColor = ColorConverters.FromHex("#fe4134") } } } }; }
public void RefreshDatas(NotificationMeasure notification) { try { bloodSugarLevel.SetText(NewMeasureToString(notification), TextView.BufferType.Normal); // compute arrow switch (notification.MeasureTrend) { case MeasureTrend.Constant: ArrowDirection = WidgetArrowDirection.right; break; case MeasureTrend.Decreasing: ArrowDirection = WidgetArrowDirection.diagonal_down_right; break; case MeasureTrend.DecreasingHeavy: ArrowDirection = WidgetArrowDirection.down; break; case MeasureTrend.Increasing: ArrowDirection = WidgetArrowDirection.diagonal_up_right; break; case MeasureTrend.IncreasingHeavy: ArrowDirection = WidgetArrowDirection.up; break; default: ArrowDirection = WidgetArrowDirection.right; break; } //compute color float currentValue = notification.NewMeasure; string color = this.appSettings.COLOR_RED; //Rouge low if (currentValue < notification.MinimumGlucoseTreshold - (notification.MinimumGlucoseTreshold * 25 / 100)) { color = this.appSettings.COLOR_RED; } //Orange foncé low else if (notification.MinimumGlucoseTreshold - (notification.MinimumGlucoseTreshold * 25 / 100) <= currentValue && currentValue < notification.MinimumGlucoseTreshold - (notification.MinimumGlucoseTreshold * 15 / 100)) { color = this.appSettings.COLOR_ORANGE; } //Orange low else if (notification.MinimumGlucoseTreshold - (notification.MinimumGlucoseTreshold * 15 / 100) <= currentValue && currentValue < notification.MinimumGlucoseTreshold) { color = this.appSettings.COLOR_YELLOW; } //Vert else if (notification.MinimumGlucoseTreshold <= currentValue && currentValue < notification.MaximumGlucoseTreshold) { color = this.appSettings.COLOR_GREEN; } //Orange high else if (notification.MaximumGlucoseTreshold <= currentValue && currentValue < notification.MaximumGlucoseTreshold + (notification.MaximumGlucoseTreshold * 20 / 100)) { color = this.appSettings.COLOR_YELLOW; } //Orange foncé high else if (notification.MaximumGlucoseTreshold + (notification.MaximumGlucoseTreshold * 20 / 100) <= currentValue && currentValue < notification.MaximumGlucoseTreshold + (notification.MaximumGlucoseTreshold * 35 / 100)) { color = this.appSettings.COLOR_ORANGE; } //Rouge high else if (notification.MaximumGlucoseTreshold + (notification.MaximumGlucoseTreshold * 35 / 100) <= currentValue) { color = this.appSettings.COLOR_RED; } bloodSugarLevel.SetTextColor(ColorConverters.FromHex(color).ToPlatformColor()); unit.SetTextColor(ColorConverters.FromHex(color).ToPlatformColor()); bloodSugarEvolution.SetTextColor(ColorConverters.FromHex(color).ToPlatformColor()); } catch (Exception e) { Log.Error("MeasureWidgetService", $"RefreshDatas : {e.Message}"); } }
public MyTasksViewModel() { Tasks = new ObservableCollection <TaskModel> { new TaskModel { Title = "National Assembly", Description = "Renovations at the Left Wing of the National Assembly Building", Status = "In Progress", Location = "Abuja, Nigeria", ItemImage = "peopleFive.png", StatusImage = "bulletColor.png", Features = new List <Features> { new Features { DateDetail = "SD: " + DateTime.Now.AddMonths(-2).ToShortDateString(), BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { DateDetail = "DD: " + DateTime.Now.AddMonths(2).AddDays(4).ToShortDateString(), BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") } } }, new TaskModel { Title = "Presidential Quarters", Description = "Complete Building Renovations", Status = "In Progress", Location = "Kano, Nigeria", ItemImage = "peopleOne.png", StatusImage = "bulletColor.png", Features = new List <Features> { new Features { DateDetail = "SD: " + DateTime.Now.AddMonths(-2).ToShortDateString(), BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { DateDetail = "DD: " + DateTime.Now.AddMonths(2).AddDays(4).ToShortDateString(), BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") } } }, new TaskModel { Title = "National Assembly", Description = "Renovations at the Left Wing of the National Assembly Building", Status = "In Progress", Location = "Lagos, Nigeria", ItemImage = "peopleTwo.png", StatusImage = "bulletColor.png", Features = new List <Features> { new Features { DateDetail = "SD: " + DateTime.Now.AddMonths(-2).ToShortDateString(), BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { DateDetail = "DD: " + DateTime.Now.AddMonths(2).AddDays(4).ToShortDateString(), BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") } } }, new TaskModel { Title = "National Assembly", Description = "Renovations at the Left Wing of the National Assembly Building", Status = "In Progress", Location = "Lagos, Nigeria", ItemImage = "peopleThree.png", StatusImage = "bulletGray.png", Features = new List <Features> { new Features { DateDetail = "SD: " + DateTime.Now.AddMonths(-2).ToShortDateString(), BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { DateDetail = "DD: " + DateTime.Now.AddMonths(2).AddDays(4).ToShortDateString(), BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") } } }, new TaskModel { Title = "National Assembly", Description = "Renovations at the Left Wing of the National Assembly Building", Status = "In Progress", Location = "Lagos, Nigeria", ItemImage = "peopleFour.png", StatusImage = "bulletGray.png", Features = new List <Features> { new Features { DateDetail = "SD: " + DateTime.Now.AddMonths(-2).ToShortDateString(), BGColor = ColorConverters.FromHex("#f0fbf3"), TxColor = ColorConverters.FromHex("#74d884") }, new Features { DateDetail = "DD: " + DateTime.Now.AddMonths(2).AddDays(4).ToShortDateString(), BGColor = ColorConverters.FromHex("#fefbec"), TxColor = ColorConverters.FromHex("#fcd058") } } } }; }
private void UpdateStatusBarColor() { var bar = GetStatusBar(); bar.BackgroundColor = ColorConverters.FromHex("#E64A19").ToPlatformColor(); }
public iTextSharp.text.Color GetColor(string Color) { return(new iTextSharp.text.Color(ColorConverters.FromHex(Color))); }