コード例 #1
0
        private void shortPathAlgSelectedValueChanged(object sender, EventArgs e)
        {
            ShortPathColorAlg spca
                = this.shortPathAlgCMB.SelectedItem as ShortPathColorAlg;

            if (spca != null)
            {
                this.shortPathDirectedCHK.Checked = spca.Directed;
                this.shortPathReversedCHK.Checked = spca.Reversed;
                spca.RefreshAlgorithm(this.mScene);
            }
        }
コード例 #2
0
        private void shortPathReversedCheckedChanged(object sender, EventArgs e)
        {
            ShortPathColorAlg spca
                = this.shortPathAlgCMB.SelectedItem as ShortPathColorAlg;

            if (spca != null && spca.Reversed != this.shortPathReversedCHK.Checked)
            {
                spca.Reversed = this.shortPathReversedCHK.Checked;
                spca.IsDirty  = true;
                spca.RefreshAlgorithm(this.mScene);
            }
        }
コード例 #3
0
 private void sceneNodeMouseUp(CircleNode obj)
 {
     if (this.bShortPathOn)
     {
         // Force the selected shortest path algorithm
         // to color the shortest path between last two nodes
         // in the scene's MouseUpHistory
         ShortPathColorAlg spca = this.shortPathAlgCMB.SelectedItem as ShortPathColorAlg;
         if (spca != null)
         {
             spca.ColorShortestPath(this.mScene);
         }
     }
 }
コード例 #4
0
 private void shortPathOnOffClick(object sender, EventArgs e)
 {
     this.bShortPathOn           = !this.bShortPathOn;
     this.shortPathOnOffBTN.Text = this.bShortPathOn ? "Off" : "On";
     if (this.bShortPathOn)
     {
         ShortPathColorAlg spca
             = this.shortPathAlgCMB.SelectedItem as ShortPathColorAlg;
         if (spca != null)
         {
             spca.RefreshAlgorithm(this.mScene);
         }
         //this.shortPathAlgCMB.Enabled = false;
         //this.shortPathDirectedCHK.Enabled = false;
         //this.shortPathReversedCHK.Enabled = false;
     }
     else
     {
         //this.shortPathAlgCMB.Enabled = true;
         //this.shortPathDirectedCHK.Enabled = true;
         //this.shortPathReversedCHK.Enabled = true;
     }
 }