예제 #1
0
        private void DataGridTridionMapping_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (sender == null)
            {
                return;
            }

            DataGrid grid = sender as DataGrid;

            if (grid != null && grid.SelectedItems != null && grid.SelectedItems.Count == 1)
            {
                TridionFolderInfo tridionFolder = grid.SelectedItem as TridionFolderInfo;
                if (tridionFolder != null)
                {
                    SelectTridionTreeNodeDialogWindow dialog = new SelectTridionTreeNodeDialogWindow();
                    dialog.TridionSelectorMode = TridionSelectorMode.Folder;
                    dialog.TridionFolder       = tridionFolder;
                    dialog.CurrentMapping      = this.CurrentMapping;
                    bool res = dialog.ShowDialog() == true;
                    if (res)
                    {
                        CollectionViewSource.GetDefaultView(this.dataGridTridionMapping.ItemsSource).Refresh();
                    }
                }
            }
        }
 private void btnAddTridionFolder_Click(object sender, RoutedEventArgs e)
 {
     SelectTridionTreeNodeDialogWindow dialog = new SelectTridionTreeNodeDialogWindow();
     dialog.TridionSelectorMode = TridionSelectorMode.Folder;
     dialog.TridionFolder = new TridionFolderInfo();
     dialog.CurrentMapping = this.CurrentMapping;
     bool res = dialog.ShowDialog() == true;
     if (res)
     {
         this.CurrentMapping.TridionFolders.Add(dialog.TridionFolder);
         CollectionViewSource.GetDefaultView(this.dataGridTridionMapping.ItemsSource).Refresh();
     }
 }
예제 #3
0
        private void btnAddTridionFolder_Click(object sender, RoutedEventArgs e)
        {
            SelectTridionTreeNodeDialogWindow dialog = new SelectTridionTreeNodeDialogWindow();

            dialog.TridionSelectorMode = TridionSelectorMode.Folder;
            dialog.TridionFolder       = new TridionFolderInfo();
            dialog.CurrentMapping      = this.CurrentMapping;
            bool res = dialog.ShowDialog() == true;

            if (res)
            {
                this.CurrentMapping.TridionFolders.Add(dialog.TridionFolder);
                CollectionViewSource.GetDefaultView(this.dataGridTridionMapping.ItemsSource).Refresh();
            }
        }
        private void DataGridTridionMapping_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (sender == null)
                return;

            DataGrid grid = sender as DataGrid;
            if (grid != null && grid.SelectedItems != null && grid.SelectedItems.Count == 1)
            {
                TridionFolderInfo tridionFolder = grid.SelectedItem as TridionFolderInfo;
                if (tridionFolder != null)
                {
                    SelectTridionTreeNodeDialogWindow dialog = new SelectTridionTreeNodeDialogWindow();
                    dialog.TridionSelectorMode = TridionSelectorMode.Folder;
                    dialog.TridionFolder = tridionFolder;
                    dialog.CurrentMapping = this.CurrentMapping;
                    bool res = dialog.ShowDialog() == true;
                    if (res)
                    {
                        CollectionViewSource.GetDefaultView(this.dataGridTridionMapping.ItemsSource).Refresh();
                    }
                }
            }
        }