コード例 #1
0
ファイル: ActivatableNotesForm.cs プロジェクト: Sense2015/VST
        private void AddNotes()
        {
            var size = ClientSize;

            foreach (var quote in quotes)
            {
                var note = new NoteControl();
                note.Text      = quote;
                note.BackColor = colorsApprovedByTheNotesAuthority[_random.Next(colorsApprovedByTheNotesAuthority.Count)];
                note.Location  = new Point(_random.Next(size.Width - note.Width), _random.Next(size.Height - note.Height));

                Controls.Add(note);
            }
        }
コード例 #2
0
        private void AddNotes()
        {
            var size = ClientSize;

            foreach (var quote in quotes)
            {
                var note = new NoteControl();
                note.Text = quote;
                note.BackColor = colorsApprovedByTheNotesAuthority[_random.Next(colorsApprovedByTheNotesAuthority.Count)];
                note.Location = new Point(_random.Next(size.Width - note.Width), _random.Next(size.Height - note.Height));

                Controls.Add(note);
            }
        }