示例#1
0
        public ActionResult Connect(ConnectViewModel viewModel)
        {
            Session.Clear();

            var connectionInfo = viewModel.ToConnectionInfo();
            var client         = new Ldap.LdapClient(connectionInfo);

            using (var entry = client.GetNativeEntry(viewModel.BaseDn))
            {
                try
                {
                    // trigger LDAP BIND
                    entry.RefreshCache();
                    // cache LdapConnection info
                    Session[Keys.SessionData.ConnectionInfo] = connectionInfo;
                }
                catch (COMException ex)
                {
                    TempData[Keys.TempData.AlertDanger] = "<strong>Error</strong> " + ex.Message;
                    return(RedirectToAction("connect", new { host = viewModel.Host, port = viewModel.Port, baseDn = viewModel.BaseDn, userDn = viewModel.UserDn }));
                }
            }

            return(RedirectToAction("index"));
        }
示例#2
0
 /// <summary>
 /// Initialises a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 ///
 /// <param name="logger">The logger.</param>
 /// <param name="handler">The camera handler.</param>
 public HomeController(ILogger <HomeController> logger, CameraHandler handler)
 {
     this._logger                  = logger;
     this.cameraHandler            = handler;
     this.connectViewModel         = new();
     this.connectViewModel.Cameras = this.cameraHandler.Connection;
 }
 public ConnectPage()
 {
     InitializeComponent();
     On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
     BindingContext    = _viewModel = new ConnectViewModel();
     RoomName.Keyboard = Keyboard.Create(KeyboardFlags.None);
 }
示例#4
0
 public ConnectPage(ClientViewModel frame, Window parentWindow, LoggedClient loggedClient,
                    LoginSessionClient loginSessionNetworkClient, Character character)
 {
     InitializeComponent();
     ViewModel   = new ConnectViewModel(frame, parentWindow, loggedClient, loginSessionNetworkClient, character);
     DataContext = ViewModel;
 }
示例#5
0
        public ConnectPage()
        {
            InitializeComponent();
            BindingContext = new ConnectViewModel();

            (BindingContext as ConnectViewModel).GoToPage += (sender, arg) => { this.GoToPage(arg); };
        }
示例#6
0
        /// <summary>
        /// Initializes a new instance of the MainForm class
        /// </summary>
        public MainForm()
        {
            this.InitializeComponent();

            this.viewModel = Service.Instance.MainViewModel;
            this.viewModel.TransponderMessage += this.ViewModel_TransponderMessage;
            this.viewModel.BarcodeMessage     += this.ViewModel_BarcodeMessage;
            this.viewModel.ResponseLine       += this.ViewModel_ResponseLine;

            // TODO: this.viewModel.PropertyChanged
            this.connectViewModel = Service.Instance.ConnectViewModel;
            this.connectViewModel.PropertyChanged += this.ConnectViewModel_PropertyChanged;

            // Create a menu of session values
            this.querySessionComboBox.DataSource = Enum.GetValues(typeof(QuerySession));

            // Use the description when displaying to the user
            this.querySessionComboBox.FormattingEnabled = true;
            this.querySessionComboBox.Format           += delegate(object sender, ListControlConvertEventArgs e)
            {
                e.Value = ((QuerySession)e.Value).Description();
            };

            this.queryTargetComboBox.DataSource        = Enum.GetValues(typeof(QueryTarget));
            this.queryTargetComboBox.FormattingEnabled = true;
            this.queryTargetComboBox.Format           += delegate(object sender, ListControlConvertEventArgs e)
            {
                e.Value = ((QueryTarget)e.Value).Description();
            };

            this.Load += this.Form_Load;
        }
示例#7
0
        public async Task JoinRoom(PlayerViewModel request)
        {
            request.ConnectionId = Context.ConnectionId;
            if (!string.IsNullOrEmpty(request.UID))
            {
                var expiredRooms = rooms.Where(r => r.StartDate.HasValue).ToList();
                expiredRooms.ForEach(r => rooms.Remove(r));

                var connectingUser = await PlayerViewModel.JoinRoomAsync_v2(request, rooms);

                if (connectingUser.IsSucceed)
                {
                    string ip = Context.Connection.RemoteIpAddress.ToString();
                    connectingUser.Data.IsOnline = true;
                    connectingUser.Data.Ip       = ip;
                    var data = new ConnectViewModel()
                    {
                        Player = connectingUser.Data,
                        Others = PlayerViewModel.Repository.GetModelListBy(p => p.Uid != connectingUser.Data.UID &&
                                                                           p.Room == connectingUser.Data.Room && !string.IsNullOrEmpty(p.ConnectionId)).Data
                    };
                    SendToClient(data, GameReponseKey.JoinRoom, Context.ConnectionId);
                    SendToGroup(data.Player, GameReponseKey.NewMember, data.Player.Room, false);
                    if (connectingUser.Data.CurrentRoom.Players.Count >= 4)
                    {
                        SendToAll(connectingUser.Data.CurrentRoom, GameReponseKey.RoomStarted);
                    }
                    await UpdateOnlineStatus(connectingUser.Data);
                }
                else
                {
                    await Clients.Client(Context.ConnectionId).SendAsync(receiveMethod, connectingUser);
                }
            }
        }
        public CableLengthPopupWindow(ConnectViewModel connect)
        {
            this.connect = connect;
            InitializeComponent();

            Uzunluk.Text = this.connect.Uzunluk.ToString();
        }
示例#9
0
        public async Task CreateRoom(PlayerViewModel request)
        {
            request.ConnectionId = Context.ConnectionId;
            if (!string.IsNullOrEmpty(request.UID))
            {
                var connectingUser = await PlayerViewModel.CreateRoomAsync(request, rooms);

                if (connectingUser.IsSucceed)
                {
                    string ip = Context.Connection.RemoteIpAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6
                        ? Context.Connection.RemoteIpAddress.MapToIPv6().ToString()
                        : Context.Connection.RemoteIpAddress.MapToIPv4().ToString();
                    connectingUser.Data.IsOnline = true;
                    connectingUser.Data.Ip       = ip;
                    var data = new ConnectViewModel()
                    {
                        Player = connectingUser.Data,
                        Others = PlayerViewModel.Repository.GetModelListBy(p => p.Uid != connectingUser.Data.UID &&
                                                                           p.Room == connectingUser.Data.Room && !string.IsNullOrEmpty(p.ConnectionId)).Data
                    };
                    SendToClient(data, GameReponseKey.CreateRoom, Context.ConnectionId);
                    SendToAll(data.Player.CurrentRoom, GameReponseKey.NewRoom, true, false);
                    await UpdateOnlineStatus(connectingUser.Data);
                }
                else
                {
                    await Clients.Client(Context.ConnectionId).SendAsync(receiveMethod, connectingUser);
                }
            }
        }
示例#10
0
        public async Task Join(PlayerViewModel request)
        {
            string errorMsg = string.Empty;

            request.ConnectionId = Context.ConnectionId;
            if (!string.IsNullOrEmpty(request.UID))
            {
                var expiredRooms = rooms.Where(r => r.TimeRemain < 300).ToList();
                expiredRooms.ForEach(r => rooms.Remove(r));

                var connectingUser = await PlayerViewModel.JoinGameAsync(request, rooms);

                if (connectingUser.IsSucceed)
                {
                    string ip = Context.Connection.RemoteIpAddress.ToString();
                    connectingUser.Data.IsOnline = true;
                    connectingUser.Data.Ip       = ip;

                    var data = new ConnectViewModel()
                    {
                        Player = connectingUser.Data,
                        Others = PlayerViewModel.Repository.GetModelListBy(p => p.Uid != connectingUser.Data.UID &&
                                                                           p.Room == connectingUser.Data.Room && !string.IsNullOrEmpty(p.ConnectionId)).Data
                    };
                    SendToClient(data, GameReponseKey.Connect, Context.ConnectionId);
                    await UpdateOnlineStatus(connectingUser.Data);
                }
                else
                {
                    await Clients.Client(Context.ConnectionId).SendAsync(receiveMethod, connectingUser);
                }
            }
        }
示例#11
0
 internal ConnectWindow(ConnectViewModel viewModel)
 {
     InitializeComponent();
     DataContext = ViewModel = viewModel;
     ViewModel.PropertyChanged += OnPropertyChanged;
     CancellationTokenSource    = new CancellationTokenSource();
 }
示例#12
0
        public async Task <IActionResult> Connect(ConnectViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var shareToken = _db.ShareTokens.FindById(model.Token);

            if (shareToken == null)
            {
                ModelState.AddModelError(nameof(model.Token), "Invalid PIN!");
                return(View(model));
            }

            var session = _db.Sessions.FindById(shareToken.SessionId);

            if (session == null)
            {
                ModelState.AddModelError(nameof(model.Token), "The Session does not exist!");
                return(View(model));
            }

            // Ready to join,
            // Delete the Token
            _db.ShareTokens.Delete(model.Token);
            await _hub.HideSharePanel(session.Id);

            TempData[nameof(Data.Session.Id)]             = session.Id;
            TempData[nameof(Data.Session.IdVerification)] = session.IdVerification;

            return(RedirectToAction(nameof(NewSession)));
            //return Session(session.Id, session.IdVerification);
        }
示例#13
0
        public IActionResult Connect(ConnectViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var shareToken = _db.ShareTokens.FindById(model.Token);

            if (shareToken == null)
            {
                ModelState.AddModelError(nameof(model.Token), "Invalid PIN!");
                return(View(model));
            }

            var session = _db.Sessions.FindById(shareToken.SessionId);

            if (session == null)
            {
                ModelState.AddModelError(nameof(model.Token), "The Session does not exist!");
                return(View(model));
            }

            // Ready to join,
            // Delete the Token
            _db.ShareTokens.Delete(model.Token);
            _hub.HideSharePanel(session.Id);

            return(Session(session.Id, session.IdVerification));
        }
示例#14
0
        public async Task <IActionResult> Connect(ConnectViewModel connectViewModel)
        {
            this._logger.LogInformation("Connect Post");
            this.cameraHandler.SetConnection(connectViewModel.Cameras);
            this.connectViewModel.Cameras    = connectViewModel.Cameras;
            this.connectViewModel.DeviceInfo = await this.cameraHandler.GetDeviceInfo();

            return(this.View("Connect", this.connectViewModel));
        }
        public IActionResult Index(string token, long expiresAt)
        {
            var viewModel = new ConnectViewModel
            {
                Token           = token,
                ExpiresAt       = expiresAt,
                AddonHostOrigin = this.configuration.GetValue <string>(AzureServiceKeys.ADDON_HOST_ORIGIN)
            };

            return(this.View(viewModel));
        }
        private async Task <string> GetConnectionString(ConnectViewModel connect)
        {
            using (var client = new HttpClient())
            {
                var response = await client.GetAsync(String.Format("{0}/ReportApi/GetDataConnectKey?account={1}&dataConnect={2}", connect.ApiUrl, connect.AccountApiKey, connect.DatabaseApiKey));

                response.EnsureSuccessStatusCode();

                var content = await response.Content.ReadAsStringAsync();

                return(DotNetReportHelper.GetConnectionString(content.Replace("\"", "")));
            }
        }
示例#17
0
        public ConnectView()
        {
            // Position window in the center of the screen
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

            InitializeComponent();
            ConnectViewModel connectViewModel = new ConnectViewModel();

            // Data binding
            DataContext = connectViewModel;

            // Hide window after pass
            connectViewModel.ButtonClicked += this.Hide;
        }
示例#18
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext                     = new ConnectViewModel();
     Listeners.MatchStart           += new EventHandler(ActivateMatchState);
     Listeners.MatchAbort           += new EventHandler(ActivateLobbyState);
     Listeners.IsWaiting            += new EventHandler(ActivateIsWaitingState);
     Listeners.IsOnTurn             += new EventHandler(SetTurnBatch);
     Listeners.OnlineUsers          += new EventHandler(SetOnlineBatch);
     Listeners.ChatroomSwitched     += new EventHandler(SetChatBatch);
     Listeners.ScoreBroadcast       += new EventHandler(SetScoreBatch);
     LobbyView.LobbyViewInitialized += new EventHandler(ActivateLobbyState);
     MouseDown += Window_MouseDown;
 }
示例#19
0
        public void UpdateAgAkisFromConnect(ConnectViewModel connect, bool isDelete)
        {
            if (isDelete)
            {
                connect.ToConnector.AgAkisList.Clear();
            }
            else
            {
                if (connect.FromConnector.AgAkisList != null && connect.FromConnector.AgAkisList.Count() != 0)
                {
                    connect.ToConnector.AgAkisList = new List <AgAkis>();
                    connect.ToConnector.AgAkisList.Clear();
                    foreach (var agAkis in connect.FromConnector.AgAkisList)
                    {
                        var agAkisTemp = new AgAkis();
                        agAkisTemp.Id                     = Guid.NewGuid();
                        agAkisTemp.AgArayuzuId            = connect.ToConnector.UniqueId;
                        agAkisTemp.Yuk                    = agAkis.Yuk;
                        agAkisTemp.AgAkisTipiId           = agAkis.AgAkisTipiId;
                        agAkisTemp.AgAkisTipiAdi          = agAkis.AgAkisTipiAdi;
                        agAkisTemp.IliskiliAgArayuzuId    = agAkis.IliskiliAgArayuzuId;
                        agAkisTemp.IliskiliAgArayuzuAdi   = agAkis.IliskiliAgArayuzuAdi;
                        agAkisTemp.VarisNoktasiIdNameList = agAkis.VarisNoktasiIdNameList;
                        agAkisTemp.FromNodeUniqueId       = agAkis.FromNodeUniqueId;

                        connect.ToConnector.AgAkisList.Add(agAkisTemp);
                        connect.AgYuku = connect.ToConnector.AgAkisList.Select(x => x.Yuk).Sum();
                    }
                }
            }

            if (connect.ToConnector.Node.TypeId == (int)TipEnum.AgAnahtari)
            {
                foreach (var output in connect.ToConnector.Node.Transitions.Items)
                {
                    var list = output.AgAkisList.Where(x => x.IliskiliAgArayuzuId == connect.ToConnector.UniqueId).ToList();

                    foreach (var item in list)
                    {
                        output.AgAkisList.Remove(item);
                    }

                    if (output.Connect != null)
                    {
                        output.Connect.AgYuku = output.AgAkisList.Select(s => s.Yuk).Sum();
                        UpdateAgAkisFromConnect(output.Connect, false);
                    }
                }
            }
        }
示例#20
0
        public async Task <IActionResult> Connect(ConnectViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var shareToken = _db.ShareTokens.FindById(model.Token);

            if (shareToken == null)
            {
                ModelState.AddModelError(nameof(model.Token), "Invalid PIN!");
                return(View(model));
            }

            var session = _db.Sessions.FindById(shareToken.SessionId);

            if (session == null)
            {
                ModelState.AddModelError(nameof(model.Token), "The Session does not exist!");
                return(View(model));
            }

            // Ready to join,
            // Delete the Token
            _db.ShareTokens.Delete(model.Token);

            if (model.NoJs && !session.IsLiteSession)
            {
                await ConvertToLiteSession(session.Id, session.IdVerification);

                session.IsLiteSession = true;
            }

            if (session.IsLiteSession)
            {
                await _hub.AddSessionNotification(session.Id, "A new device has been connected!", true);

                return(RedirectToAction(nameof(LiteSession), new { id1 = session.Id, id2 = session.IdVerification }));
            }

            await _hub.HideSharePanel(session.Id);

            TempData[nameof(Data.Session.Id)]             = session.Id;
            TempData[nameof(Data.Session.IdVerification)] = session.IdVerification;

            return(RedirectToAction(nameof(NewSession)));
            //return Session(session.Id, session.IdVerification);
        }
示例#21
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            this.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            // ignore SSL certificate errors
            ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) => true;

            this.connectViewModel = new ConnectViewModel();
            Task <ServiceContext> connectTask = connectViewModel.ConnectToServiceAsync();

            connectTask.OnSuccess(this.OnConnectionSuccessful);
            connectTask.OnCanceled(this.OnConnectionCanceled);
        }
示例#22
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.MainTitle.Content = this.group.Name + " Detayı";
            foreach (var groupedNode in group.NodeList)
            {
                NodesCanvas.ViewModel.Nodes.Add(groupedNode);

                foreach (var output in groupedNode.Transitions.Items)
                {
                    foreach (var internalConnect in group.InternalConnectList)
                    {
                        if (internalConnect.FromConnector == output)
                        {
                            ConnectViewModel connect = new ConnectViewModel(NodesCanvas.ViewModel, output);
                            connect.ToConnector           = internalConnect.ToConnector;
                            connect.FromConnector.Connect = connect;
                            connect.AgYuku                   = internalConnect.AgYuku;
                            connect.GucMiktari               = internalConnect.GucMiktari;
                            connect.KabloKesitOnerisi        = internalConnect.KabloKesitOnerisi;
                            connect.Uzunluk                  = internalConnect.Uzunluk;
                            connect.FromConnector.AgAkisList = internalConnect.FromConnector.AgAkisList;
                            connect.ToConnector.AgAkisList   = internalConnect.ToConnector.AgAkisList;
                            NodesCanvas.ViewModel.Connects.Add(connect);
                        }
                    }
                }

                foreach (var input in groupedNode.InputList)
                {
                    foreach (var internalConnect in group.InternalConnectList)
                    {
                        if (internalConnect.ToConnector == input)
                        {
                            ConnectViewModel connect = new ConnectViewModel(NodesCanvas.ViewModel, internalConnect.FromConnector);
                            connect.ToConnector           = input;
                            connect.FromConnector.Connect = connect;
                            connect.AgYuku                   = internalConnect.AgYuku;
                            connect.GucMiktari               = internalConnect.GucMiktari;
                            connect.KabloKesitOnerisi        = internalConnect.KabloKesitOnerisi;
                            connect.Uzunluk                  = internalConnect.Uzunluk;
                            connect.FromConnector.AgAkisList = internalConnect.FromConnector.AgAkisList;
                            connect.ToConnector.AgAkisList   = internalConnect.ToConnector.AgAkisList;
                            NodesCanvas.ViewModel.Connects.Add(connect);
                        }
                    }
                }
            }
        }
示例#23
0
        public ActionResult Connect(string host, int?port, string baseDn, string userDn, string password, bool?anon)
        {
            var viewModel = new ConnectViewModel
            {
                Host     = host,
                Port     = port.HasValue ? port.Value : 389,
                BaseDn   = baseDn,
                UserDn   = userDn,
                Password = password
            };

            if (!String.IsNullOrEmpty(viewModel.Password) || (anon.HasValue && anon.Value))
            {
                return(Connect(viewModel));
            }

            return(View(viewModel));
        }
        public ActionResult ConnectBiometric(ConnectViewModel model) //this is one page bale localhost:portnum/DownloadData/ConnectBiometric << pwde kani localhost:portnum/DownloadData/Index
        {
            bool x = false;

            try
            {
                device                 = new Device();
                device.DN              = 1;
                device.Model           = "A-C030";
                device.ConnectionModel = 5;

                device.IpAddress         = model.IpAddress;
                device.IpPort            = int.Parse(model.Port);
                device.CommunicationType = CommunicationType.Tcp;
                deviceConnection         = DeviceConnection.CreateConnection(ref device);
                System.Diagnostics.Debug.WriteLine(deviceConnection.Open());

                if (deviceConnection.Open() > 0)
                {
                    deviceEty                  = new DeviceComEty();
                    deviceEty.Device           = device;
                    deviceEty.DeviceConnection = deviceConnection;
                    x = true;
                }
                else
                {
                    TempData["msg"] = "<script>alert('Connection Failed');</script>";
                    x = false;
                }
            }
            catch (Exception ex)
            {
                TempData["msg"] = "<script>alert('ex');</script>";
            }

            if (x == true)
            {
                return(View());
            }
            else
            {
                return(View("Index"));
            }
        }
 private string GetConnectionString(ConnectViewModel model)
 {
     if (model.IntegratedSecurity == true)
     {
         return
             ("Provider=" + "sqloledb" +
              ";Data Source=" + model.ServerName +
              ";Initial Catalog=" + model.InitialCatalog +
              ";Integrated Security=SSPI;");
     }
     else
     {
         return
             ("Provider=" + "sqloledb" +
              ";Password="******";User ID=" + model.UserName +
              ";Data Source=" + model.ServerName +
              ";Initial Catalog=" + model.InitialCatalog);
     }
 }
        private async Task <string> GetConnectionString(ConnectViewModel connect)
        {
            using (var client = new HttpClient())
            {
                var response = await client.GetAsync(String.Format("{0}/ReportApi/GetDataConnectKey?account={1}&dataConnect={2}", ConfigurationManager.AppSettings["dotNetReport.apiUrl"], connect.AccountApiKey, connect.DatabaseApiKey));

                response.EnsureSuccessStatusCode();

                var content = await response.Content.ReadAsStringAsync();

                var connString = ConfigurationManager.ConnectionStrings[content.Replace("\"", "")].ConnectionString;

                if (!connString.ToLower().StartsWith("provider"))
                {
                    connString = "Provider=sqloledb;" + connString;
                }

                return(connString);
            }
        }
示例#27
0
        private async Task <string> GetConnectionString(ConnectViewModel connect)
        {
            using (var client = new HttpClient())
            {
                var response = await client.GetAsync(String.Format("{0}/ReportApi/GetDataConnectKey?account={1}&dataConnect={2}", connect.ApiUrl, connect.AccountApiKey, connect.DatabaseApiKey));

                response.EnsureSuccessStatusCode();

                var content = await response.Content.ReadAsStringAsync();

                var connString = Startup.StaticConfig.GetConnectionString(content.Replace("\"", ""));
                connString = connString.Replace("Trusted_Connection=True", "");

                if (!connString.ToLower().StartsWith("provider"))
                {
                    connString = "Provider=sqloledb;" + connString;
                }

                return(connString);
            }
        }
        public JsonResult TestSql(ConnectViewModel model)
        {
            var connectionString = GetConnectionString(model);

            using (OleDbConnection conn = new OleDbConnection(connectionString))
            {
                try
                {
                    // test the connection with an open attempt
                    conn.Open();
                    return(Json(new { Success = true, Message = "Connection Attempt Successful." }));
                }
                catch (Exception ex)
                {
                    // inform the user if the connection test failed
                    return(Json(new { Success = false, Message = ex.Message }));
                }
                finally
                {
                    conn.Close();
                    conn.Dispose();
                }
            }
        }
示例#29
0
 public ConnectView()
 {
     InitializeComponent();
     DataContext = new ConnectViewModel(this);
 }
示例#30
0
        private void Save_Popup(object sender, RoutedEventArgs e)
        {
            var selectedAgArayuzInputItems   = new List <ConnectorViewModel>();
            var selectedGucArayuzInputItems  = new List <ConnectorViewModel>();
            var selectedAgArayuzOutputItems  = new List <ConnectorViewModel>();
            var selectedGucArayuzOutputItems = new List <ConnectorViewModel>();

            selectedAgArayuzInputItems.AddRange(GirdiAgArayuzListBox.SelectedItems.Cast <ConnectorViewModel>());
            selectedGucArayuzInputItems.AddRange(GirdiGucArayuzListBox.SelectedItems.Cast <ConnectorViewModel>());
            selectedAgArayuzOutputItems.AddRange(CiktiAgArayuzListBox.SelectedItems.Cast <ConnectorViewModel>());
            selectedGucArayuzOutputItems.AddRange(CiktiGucArayuzListBox.SelectedItems.Cast <ConnectorViewModel>());

            if (selectedAgArayuzInputItems.Count > 0 || selectedGucArayuzInputItems.Count > 0 || selectedAgArayuzOutputItems.Count > 0 || selectedGucArayuzOutputItems.Count > 0)
            {
                var agInputs = this.node.InputList.Where(x => x.TypeId == (int)TipEnum.AgAnahtariAgArayuzu || x.TypeId == (int)TipEnum.UcBirimAgArayuzu).ToList();
                agInputs = agInputs.Union(selectedAgArayuzInputItems).ToList();

                var gucInputs = this.node.InputList.Where(x => x.TypeId == (int)TipEnum.AgAnahtariGucArayuzu || x.TypeId == (int)TipEnum.UcBirimGucArayuzu || x.TypeId == (int)TipEnum.GucUreticiGucArayuzu).ToList();
                gucInputs = gucInputs.Union(selectedGucArayuzInputItems).ToList();

                var agOutputs = this.node.Transitions.Items.Where(x => x.TypeId == (int)TipEnum.AgAnahtariAgArayuzu || x.TypeId == (int)TipEnum.UcBirimAgArayuzu).ToList();
                agOutputs = agOutputs.Union(selectedAgArayuzOutputItems).ToList();

                var gucOutputs = this.node.Transitions.Items.Where(x => x.TypeId == (int)TipEnum.AgAnahtariGucArayuzu || x.TypeId == (int)TipEnum.UcBirimGucArayuzu || x.TypeId == (int)TipEnum.GucUreticiGucArayuzu).ToList();
                gucOutputs = gucOutputs.Union(selectedGucArayuzOutputItems).ToList();

                this.node.InputList   = new List <ConnectorViewModel>();
                this.node.OutputList  = new List <ConnectorViewModel>();
                this.node.Transitions = new SourceList <ConnectorViewModel>();

                NodeViewModel newNode = new NodeViewModel(this.node.NodesCanvas, this.node.Name, this.node.UniqueId, new Point(), 0, 9);

                var inputList        = new List <ConnectorViewModel>();
                var outputList       = new List <ConnectorViewModel>();
                var connctesToDelete = new List <ConnectViewModel>();
                var connctesToAdd    = new List <ConnectViewModel>();

                int i = 0;
                foreach (var input in agInputs)
                {
                    var inputMain = new ConnectorViewModel(input.NodesCanvas, newNode, input.Name, newNode.Point1.Addition(0, 30 + (i * 20)), input.UniqueId, input.KapasiteId, input.MinKapasite, input.MaxKapasite, input.FizikselOrtamId, null, input.KullanimAmaciId, null, null, null, null, null, null, null, null, input.Label, input.TypeId, input.Id, input.Port, null);
                    inputMain.AgAkisList = input.AgAkisList;
                    inputList.Add(inputMain);
                    i++;

                    var oldConnect = this.node.NodesCanvas.Connects.Where(x => x.ToConnector == input).FirstOrDefault();
                    if (oldConnect != null)
                    {
                        connctesToDelete.Add(oldConnect);
                        ConnectViewModel newConnect = new ConnectViewModel(this.node.NodesCanvas, oldConnect.FromConnector);
                        newConnect.AgYuku            = oldConnect.AgYuku;
                        newConnect.KabloKesitOnerisi = oldConnect.KabloKesitOnerisi;
                        newConnect.GucMiktari        = oldConnect.GucMiktari;
                        newConnect.Uzunluk           = oldConnect.Uzunluk;
                        newConnect.ToConnector       = inputMain;
                        connctesToAdd.Add(newConnect);
                    }
                }

                int count = i;
                i = 0;
                foreach (var input in gucInputs)
                {
                    var inputMain = new ConnectorViewModel(input.NodesCanvas, newNode, input.Name, newNode.Point1.Addition(0, 30 + ((i + count) * 20)), input.UniqueId, null, null, null, null, input.GerilimTipiId, input.KullanimAmaciId,
                                                           input.GirdiDuraganGerilimDegeri1, input.GirdiDuraganGerilimDegeri2, input.GirdiDuraganGerilimDegeri3, input.GirdiMinimumGerilimDegeri, input.GirdiMaksimumGerilimDegeri, input.GirdiTukettigiGucMiktari,
                                                           input.CiktiDuraganGerilimDegeri, input.CiktiUrettigiGucKapasitesi, input.Label, input.TypeId, input.Id, input.Port, null);

                    inputList.Add(inputMain);
                    i++;

                    var oldConnect = this.node.NodesCanvas.Connects.Where(x => x.ToConnector == input).FirstOrDefault();
                    if (oldConnect != null)
                    {
                        connctesToDelete.Add(oldConnect);
                        ConnectViewModel newConnect = new ConnectViewModel(this.node.NodesCanvas, oldConnect.FromConnector);
                        newConnect.AgYuku            = oldConnect.AgYuku;
                        newConnect.KabloKesitOnerisi = oldConnect.KabloKesitOnerisi;
                        newConnect.GucMiktari        = oldConnect.GucMiktari;
                        newConnect.Uzunluk           = oldConnect.Uzunluk;
                        newConnect.ToConnector       = inputMain;
                        connctesToAdd.Add(newConnect);
                    }
                }

                i = 0;
                foreach (var output in agOutputs)
                {
                    var outputMain = new ConnectorViewModel(output.NodesCanvas, newNode, output.Name, newNode.Point1.Addition(80, 54 + (i * 20)), output.UniqueId, output.KapasiteId, output.MinKapasite, output.MaxKapasite, output.FizikselOrtamId, null, output.KullanimAmaciId, null, null, null, null, null, null, null, null, output.Label, output.TypeId, output.Id, output.Port)
                    {
                        Visible = null
                    };

                    outputMain.AgAkisList    = output.AgAkisList;
                    outputMain.KalanKapasite = output.KalanKapasite;
                    i++;
                    outputList.Add(outputMain);

                    var oldConnect = this.node.NodesCanvas.Connects.Where(x => x.FromConnector == output).FirstOrDefault();
                    if (oldConnect != null)
                    {
                        connctesToDelete.Add(oldConnect);
                        ConnectViewModel newConnect = new ConnectViewModel(this.node.NodesCanvas, outputMain);
                        newConnect.AgYuku            = oldConnect.AgYuku;
                        newConnect.KabloKesitOnerisi = oldConnect.KabloKesitOnerisi;
                        newConnect.GucMiktari        = oldConnect.GucMiktari;
                        newConnect.Uzunluk           = oldConnect.Uzunluk;
                        newConnect.ToConnector       = oldConnect.ToConnector;
                        connctesToAdd.Add(newConnect);
                    }
                }

                count = i;
                i     = 0;
                foreach (var output in gucOutputs)
                {
                    var outputMain = new ConnectorViewModel(output.NodesCanvas, newNode, output.Name, newNode.Point1.Addition(80, 54 + ((i + count) * 20)), output.UniqueId, null, null, null, null, output.GerilimTipiId, output.KullanimAmaciId,
                                                            output.GirdiDuraganGerilimDegeri1, output.GirdiDuraganGerilimDegeri2, output.GirdiDuraganGerilimDegeri3, output.GirdiMinimumGerilimDegeri, output.GirdiMaksimumGerilimDegeri, output.GirdiTukettigiGucMiktari,
                                                            output.CiktiDuraganGerilimDegeri, output.CiktiUrettigiGucKapasitesi, output.Label, output.TypeId, output.Id, output.Port)
                    {
                        Visible = null
                    };

                    if (output.TypeId == (int)TipEnum.GucUreticiGucArayuzu && output.KullanimAmaciId == (int)KullanimAmaciEnum.Cikti)
                    {
                        outputMain.KalanKapasite = output.KalanKapasite;
                    }

                    i++;
                    outputList.Add(outputMain);

                    var oldConnect = this.node.NodesCanvas.Connects.Where(x => x.FromConnector == output).FirstOrDefault();
                    if (oldConnect != null)
                    {
                        connctesToDelete.Add(oldConnect);
                        ConnectViewModel newConnect = new ConnectViewModel(this.node.NodesCanvas, outputMain);
                        newConnect.AgYuku            = oldConnect.AgYuku;
                        newConnect.KabloKesitOnerisi = oldConnect.KabloKesitOnerisi;
                        newConnect.GucMiktari        = oldConnect.GucMiktari;
                        newConnect.Uzunluk           = oldConnect.Uzunluk;
                        newConnect.ToConnector       = oldConnect.ToConnector;
                        connctesToAdd.Add(newConnect);
                    }
                }

                this.node.NodesCanvas.Connects.Remove(connctesToDelete);
                this.node.NodesCanvas.Connects.Add(connctesToAdd);

                newNode.InputList  = inputList;
                newNode.OutputList = outputList;
                newNode.AddEmptyConnector();

                this.node.NodesCanvas.Nodes.Remove(this.node);
                this.node.NodesCanvas.Nodes.Add(newNode);
                this.group.InputList  = newNode.InputList;
                this.group.OutputList = newNode.OutputList;
                ClosePopup();
            }
            else
            {
                NotifyInfoPopup nfp = new NotifyInfoPopup();
                nfp.msg.Text = "Lütfen, en az bir arayüz seçiniz.";
                nfp.Owner    = Owner;
                nfp.Show();
            }
        }