private void Image_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e) { var list = SP.Children.OfType <JoinRow>().Select(item => item.VM.Name).ToList(); Window Home_Window = App.Current.Windows.OfType <Home>().FirstOrDefault(); AddFolder win = new AddFolder(UserID, UserPWD, list, this.win); var success = win.ShowDialog(); if (success == true) { GetUserFolder.AsyncPOST(UserID, UserPWD, (fd) => { this.Dispatcher.BeginInvoke(new Action(() => { SP.Children.Clear(); if (fd.FolderList.Folder != null) { foreach (FolderDataFolderListFolder item in fd.FolderList.Folder) { SP.Children.Add(new JoinRow(UserID, UserPWD, item, ChangeBackground)); } } })); }); } }
private void Image_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e) { var list = WP.Children.OfType <FolderRoom>().Select(item => item.VM.Name).ToList(); Window Home_Window = App.Current.Windows.OfType <Home>().FirstOrDefault(); AddFolder win = new AddFolder(UserID, UserPWD, list, Home_Window); var success = win.ShowDialog(); if (success == true) { GetUserFolder.AsyncPOST(UserID, UserPWD, (fd) => { this.Dispatcher.BeginInvoke(new Action(() => { WP.Children.Clear(); if (fd.FolderList.Folder != null) { foreach (FolderDataFolderListFolder item in fd.FolderList.Folder) { WP.Children.Add(new FolderRoom(UserID, UserPWD, item, dictEvent, DelCallback, RenameCallback, () => { return(WP.Children.OfType <FolderRoom>().Select(item2 => item2.VM.Name).ToList()); })); } } })); SaveData(fd); }); } }