private async void MainWindow_Shown (object sender, EventArgs e) { foreach (var random in randoms) { LogLabel.Text = $"{random.Item1.GetType ().Name} 임의숫자 산출 중"; await Task.Run (() => { randomNumbers.Add (random.Item2, new List<uint> (RANDOM_NUMBER_GENERATE_COUNT)); for (int i = 0; i < RANDOM_NUMBER_GENERATE_COUNT; ++i) { uint r = (uint) random.Item1.Next () % RANDOM_NUMBER_RANGE; randomNumbers [random.Item2].Add (r); if(i % 1000 == 0) { try { Invoke (new Action (() => GraphPictureBox.Refresh ())); } catch { } } } }); LogLabel.Text = $"{random.Item1.GetType ().Name} 임의숫자 산출 종료"; GraphPictureBox.Refresh (); } LogLabel.Text = $"지정된 모든 임의숫자 알고리즘 산출 종료"; }
private void LoadImageFromFile(string imageFile) { GraphPictureBox.Image = new Bitmap(imageFile); GraphPictureBox.Size = m_app.ImageSize; GraphPictureBox.Refresh(); }
private void DrawModeComboBox_SelectedValueChanged (object sender, EventArgs e) { GraphPictureBox.Refresh (); }
private void DetectSamePointCheckBox_CheckedChanged (object sender, EventArgs e) { renderer.DetectSamePoint = DetectSamePointCheckBox.Checked; GraphPictureBox.Refresh (); }
private void MainWindow_Resize (object sender, EventArgs e) { renderer?.ResetBuffer (GraphPictureBox.Width, GraphPictureBox.Height); GraphPictureBox?.Refresh (); }
private void RandomListView_ItemChecked (object sender, ItemCheckedEventArgs e) { GraphPictureBox.Refresh (); }