Ejemplo n.º 1
0
 public WindowController(MainWindow mainWindow)
 {
     this.mainWindow = mainWindow;
     mainWindow.setLists(nodeList, domainList, subnetworkList, connectionList);
     cableHandler = new CloudCableHandler(connectionList, CLOUDPORT);
     managHandler = new ManagementHandler(MANAGPORT, nodeConnectionPort);
 }
Ejemplo n.º 2
0
        //public Domain(Point from, Point to, int name)
        //{
        //    this.pointFrom = from;
        //    this.pointTo = to;
        //    Size = new Size(pointTo.X - pointFrom.X, pointTo.Y - pointFrom.Y);

        //    //TO DO ???

        //    //containedPoints = new List<Point>();
        //    //int xFrom = from.X >= to.X ? from.X:to.X;
        //    //int xTo = from.X >= to.X ? to.X : from.X;
        //    //int yFrom = from.Y >= to.Y ? from.Y : to.Y;
        //    //int yTo = from.Y >= to.Y ? to.Y : from.Y;
        //    //this.width = xFrom - xTo;
        //    //this.height = yFrom - yTo;
        //    //while (xFrom >= xTo)
        //    //{
        //    //    containedPoints.Add(new Point(xFrom, yFrom));
        //    //    containedPoints.Add(new Point(xFrom, yTo));
        //    //    xFrom -= GAP;
        //    //}
        //    //xFrom = from.X >= to.X ? from.X : to.X;
        //    //while (yFrom > yTo)
        //    //{
        //    //    yFrom -= GAP;
        //    //    containedPoints.Add(new Point(xFrom, yFrom));
        //    //    containedPoints.Add(new Point(xTo, yFrom));
        //    //}
        //}

        internal void setupManagement(int mANAGPORT, int v)
        {
            this.NccPort           = PortAggregation.NccPort;
            this.ManagementNccPort = PortAggregation.ManagementNccListener;
            managementHandler      = new ManagementHandler(mANAGPORT, v, this.ManagementNccPort);
            this.ManagementPort    = v;

            ProcessStartInfo startInfo = new ProcessStartInfo("ControlNCC.exe");

            startInfo.WindowStyle = ProcessWindowStyle.Minimized;

            startInfo.Arguments = name + " " + this.NccPort + " " + this.ManagementNccPort;
            this.ProcessHandle  = Process.Start(startInfo);

            startInfo             = new ProcessStartInfo("ControlCCRC.exe");
            startInfo.WindowStyle = ProcessWindowStyle.Minimized;
            this.ControlPort      = PortAggregation.CcRcPort;
            startInfo.Arguments   = this.ControlPort + " " + name + " " + this.NccPort + " t";
            this.ProcessHandle    = Process.Start(startInfo);
            Thread.Sleep(50);
            Program.SwitchToThisWindow(Process.GetCurrentProcess().MainWindowHandle, true);
        }