Example #1
0
        public async Task <List <TileViewModel> > GetTilesAsync()
        {
            await Task.Yield();

            if (!File.Exists(AttendeesFileName))
            {
                return(new List <TileViewModel>());
            }

            var tiles = File.ReadAllLines(AttendeesFileName)
                        .Where(x => !string.IsNullOrWhiteSpace(x))
                        .OrderBy(x => x)
                        .Select(x => x.Split('\t'))
                        .Select(x => new TileViewModel(
                                    name: x[0],
                                    attendeeId: x[1],
                                    remoteImageUri: null,
                                    // Randomize colour value
                                    color: new SolidColorBrush(RandomColor.GetColor(ColorScheme.Random, Luminosity.Bright))
                                    )).ToList();

            foreach (var tile in tiles)
            {
                tile.LoadImage(ImageFolder);
            }

            return(tiles);
        }
Example #2
0
 public FColorful()
 {
     InitializeComponent();
     uiPanel11.FillColor = uiPanel11.RectColor = RandomColor.GetColor(ColorScheme.Random, Luminosity.Bright);
     uiLabel2.Text       = "RGB: " + uiPanel11.FillColor.R + ", " + uiPanel11.FillColor.G + ", " + uiPanel11.FillColor.B;
 }
 private void OnCollisionEnter(Collision collision)
 {
     cubyRenderer = collision.gameObject.GetComponent <Renderer>();
     cubyRenderer.material.color = randomColor.GetColor();
     randomColor.changeColor();
 }
Example #4
0
 private void uiPanel11_Click(object sender, System.EventArgs e)
 {
     uiPanel11.FillColor = uiPanel11.RectColor = RandomColor.GetColor(ColorScheme.Random, Luminosity.Bright);
     uiLabel2.Text       = "RGB: " + uiPanel11.FillColor.R + ", " + uiPanel11.FillColor.G + ", " + uiPanel11.FillColor.B;
     UIStyles.InitColorful(uiPanel11.FillColor, Color.White);
 }
Example #5
0
 private void AssignRandomColor(Site s)
 {
     s.Color = RandomColor.GetColor(ColorScheme.Random, fillCB.Checked ? Luminosity.Light : Luminosity.Dark);
 }