void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 18 "..\..\GrafControl.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Load);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 19 "..\..\GrafControl.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.generate);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 20 "..\..\GrafControl.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.construieste);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 21 "..\..\GrafControl.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.save);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 22 "..\..\GrafControl.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Sterge);
     
     #line default
     #line hidden
     return;
     case 6:
     this.graf_grid = ((System.Windows.Controls.Canvas)(target));
     return;
     case 7:
     this.toolbox = ((System.Windows.Controls.Grid)(target));
     return;
     case 8:
     this.graf_nod_but = ((System.Windows.Controls.Button)(target));
     return;
     case 9:
     this.muchie1 = ((APM_WPF.Muchie)(target));
     return;
     case 10:
     this.invbut = ((System.Windows.Controls.Button)(target));
     return;
     case 11:
     this.aranjarebut = ((System.Windows.Controls.Button)(target));
     
     #line 33 "..\..\GrafControl.xaml"
     this.aranjarebut.Click += new System.Windows.RoutedEventHandler(this.AutoArange);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #2
0
 Nod other(Muchie muchie)
 {
     if (muchie.x == nextSelected)
         return muchie.y;
     else
         return muchie.x;
 }
Пример #3
0
 int cmp(Muchie a, Muchie b)
 {
     return a.dist.CompareTo(b.dist);
 }
Пример #4
0
        public Muchie new_muchie(Nod n1, Nod n2, int dist = 0)
        {
            if (muchii.FindAll(muci => muci.x == n1 && muci.y == n2 || muci.x == n2 && muci.y == n1).Count != 0) return null;
            Muchie muc = new Muchie(n1, n2, dist, myCanvas, this);

            n1.vec.Add(muc);
            n2.vec.Add(muc);
            muchii.Add(muc);
            myCanvas.Children.Add(muc);

            muc.Actual_Pos();
        
            n1.IsEnabled = true;
            n2.IsEnabled = true;

            return muc;
        }