コード例 #1
0
 private void BrowseButton_Click(object sender, EventArgs e)
 {
     DialogResult result = FolderDialog.ShowDialog();
     if (result==System.Windows.Forms.DialogResult.OK)
     {
         _projectManager = new ProjectManager(FolderDialog.SelectedPath);
         _simulation =
             new ParticleSimulation<NodeRenderer, LineRenderer>(0, 0, RenderPanel.Width
                       , RenderPanel.Height
                       , DEFAULT_GRAVITY
                       , DEFAULT_FRICTION_CONSTANT
                       , DEFAULT_STATIC_FRICTION
                       , DEFAULT_SHORT_RESTING_LENGTH
                       , DEFAULT_SPRING_CONSTANT
                       , ForceDissipationFunctionFactory.LinearDissipationFunction(DEFAULT_REPELLANT_FORCE));
         BuildParticles();
         RenderTimer.Enabled = true;
         RenderTimer.Start();
     }
 }
コード例 #2
0
 public void ResolveDependancies(ProjectManager pm)
 {
     foreach (string s in _dependancies)
     {
         Project p = pm.GetProject(s);
         if (p!=null)
         {
             _resolvedDependancies.Add(p);
         }
     }
 }