-
-
Save prabakaranr/540734698ba4343b45286c5eaa996b35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Meeting | |
{ | |
private string _subject; | |
public string Subject | |
{ | |
get => _subject; | |
set | |
{ | |
if (value == _subject) return; | |
_subject = value; | |
switch (_subject) | |
{ | |
case "General Meeting": | |
Color = Xamarin.Forms.Color.FromHex("#7BC667"); | |
break; | |
case "Release Retrospective": | |
Color = Xamarin.Forms.Color.FromHex("#9466F2"); | |
break; | |
case "Sprint Meeting": | |
Color = Xamarin.Forms.Color.FromHex("#37AA97"); | |
break; | |
default: | |
Color = Xamarin.Forms.Color.FromHex("#4C3AB9"); | |
break; | |
} | |
} | |
} | |
public string Location { get; set; } | |
public Xamarin.Forms.Color Color { get; set; } = Xamarin.Forms.Color.FromHex("#7BC667"); | |
public DateTime StartTime { get; set; } | |
public DateTime EndTime { get; set; } | |
public Meeting(string subject, string location, DateTime startTime) | |
{ | |
Subject = subject; | |
Location = location; | |
StartTime = startTime; | |
EndTime = StartTime.AddHours(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for notifying @JogyBlack. I have changed it.