Exemple #1
0
		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 = $"지정된 모든 임의숫자 알고리즘 산출 종료";
		}
Exemple #2
0
        /// <summary>
        /// Updates graph image
        /// </summary>
        /// <param name="rootNames">Dependency graph source names</param>
        public void GenerateGraphImageForRoots(string[] rootNames)
        {
            if (GraphPictureBox.InvokeRequired)
            {
                GraphPictureBox.Invoke(new MethodInvoker(() => { GenerateGraphImageForRoots(rootNames); }));
                return;
            }

            string dotCode = GenerateGraphForRoots(rootNames);
            Image  img     = GenerateDotGraphImage(dotCode);

            GraphPictureBox.Image = img;
            GraphPictureBox.Size  = img.Size;
            //Size = img.Size;
        }
Exemple #3
0
 private void LoadImageFromFile(string imageFile)
 {
     GraphPictureBox.Image = new Bitmap(imageFile);
     GraphPictureBox.Size  = m_app.ImageSize;
     GraphPictureBox.Refresh();
 }
Exemple #4
0
		private void DrawModeComboBox_SelectedValueChanged (object sender, EventArgs e)
		{
			GraphPictureBox.Refresh ();
		}
Exemple #5
0
		private void DetectSamePointCheckBox_CheckedChanged (object sender, EventArgs e)
		{
			renderer.DetectSamePoint = DetectSamePointCheckBox.Checked;
			GraphPictureBox.Refresh ();
		}
Exemple #6
0
		private void MainWindow_Resize (object sender, EventArgs e)
		{
			renderer?.ResetBuffer (GraphPictureBox.Width, GraphPictureBox.Height);
			GraphPictureBox?.Refresh ();
		}
Exemple #7
0
		private void RandomListView_ItemChecked (object sender, ItemCheckedEventArgs e)
		{
			GraphPictureBox.Refresh ();
		}