Beispiel #1
0
        private void renamePodcast_Click(object sender, RoutedEventArgs e)
        {
            VodCast vodcast = podcastList.SelectedItem as VodCast;

            if (vodcast != null)
            {
                var form = new RenameForm(vodcast.Name);
                form.Owner = this;
                var result = form.ShowDialog();
                if (result == true)
                {
                    vodcast.Name = form.tbxName.Text;
                    Kernel.Instance.ItemRepository.SaveItem(vodcast);

                    RefreshPodcasts();

                    foreach (VodCast item in podcastList.Items)
                    {
                        if (item.Name == vodcast.Name)
                        {
                            podcastList.SelectedItem = item;
                            break;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void btnRename_Click(object sender, RoutedEventArgs e)
        {
            var virtualFolder = folderList.SelectedItem as VirtualFolder;

            if (virtualFolder != null)
            {
                var form = new RenameForm(virtualFolder.Name);
                form.Owner = this;
                form.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                var result = form.ShowDialog();
                if (result == true)
                {
                    virtualFolder.Name = form.tbxName.Text;

                    RefreshItems();

                    foreach (VirtualFolder item in folderList.Items)
                    {
                        if (item.Name == virtualFolder.Name)
                        {
                            folderList.SelectedItem = item;
                            break;
                        }
                    }
                }
            }
        }
        private void btnRename_Click(object sender, RoutedEventArgs e)
        {
            var virtualFolder = folderList.SelectedItem as VirtualFolder;
            if (virtualFolder != null)
            {
                var form = new RenameForm(virtualFolder.Name);
                form.Owner = this;
                form.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                var result = form.ShowDialog();
                if (result == true)
                {
                    virtualFolder.Name = form.tbxName.Text;

                    RefreshItems();

                    foreach (VirtualFolder item in folderList.Items)
                    {
                        if (item.Name == virtualFolder.Name)
                        {
                            folderList.SelectedItem = item;
                            break;
                        }
                    }
                }
            }
        }
        private void renamePodcast_Click(object sender, RoutedEventArgs e)
        {
            VodCast vodcast = podcastList.SelectedItem as VodCast;
            if (vodcast != null) {
                var form = new RenameForm(vodcast.Name);
                form.Owner = this;
                var result = form.ShowDialog();
                if (result == true) {
                    vodcast.Name = form.tbxName.Text;
                    Kernel.Instance.ItemRepository.SaveItem(vodcast);

                    RefreshPodcasts();

                    foreach (VodCast item in podcastList.Items) {
                        if (item.Name == vodcast.Name) {
                            podcastList.SelectedItem = item;
                            break;
                        }
                    }
                }
            }
        }
        private void btnRename_Click(object sender, RoutedEventArgs e)
        {
            String CurrentName = String.Empty;
            String NewName = String.Empty;
            String CurrentContext = String.Empty;
            String NewContext = String.Empty;

            var virtualFolder = folderList.SelectedItem as VirtualFolder;
            if (virtualFolder != null)
            {
                CurrentName = virtualFolder.Name;
                CurrentContext = virtualFolder.Path;

                var form = new RenameForm(virtualFolder.Name);
                form.Owner = this;
                form.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                var result = form.ShowDialog();
                if (result == true)
                {
                    virtualFolder.Name = form.tbxName.Text;
                    NewName = virtualFolder.Name;
                    NewContext = virtualFolder.Path;
                    this.RenameVirtualFolderEntryPoint(CurrentName, NewName, CurrentContext, NewContext);

                    RefreshItems();
                    RefreshEntryPoints(false);

                    foreach (VirtualFolder item in folderList.Items)
                    {
                        if (item.Name == virtualFolder.Name)
                        {
                            folderList.SelectedItem = item;
                            break;
                        }
                    }
                }
            }
        }