private void DeleteExplorerLocationButton_Click(object sender, RoutedEventArgs e) { ExplorerLocation explorerLocation = (ExplorerLocation)ExplorerLocationListBox.SelectedItem; Configuration.ExplorerConfiguration.ExplorerLocations.Remove(explorerLocation); RefreshExplorerLocationsListBox(); }
private void NewButton_Click(object sender, RoutedEventArgs e) { SiteSetting siteSetting = new SiteSetting(); siteSetting.ID = Guid.NewGuid(); SiteSettingForm siteSettingForm = new SiteSettingForm(); siteSettingForm.BindControls(siteSetting); if (siteSettingForm.ShowDialog(this.ParentWindow, Languages.Translate("Site Settings")) == true) { Configuration.SiteSettings.Add(siteSetting); ExplorerLocation explorerLocation = new ExplorerLocation(); explorerLocation.ID = Guid.NewGuid(); explorerLocation.ApplicationTypes.Add(ApplicationTypes.Excel); explorerLocation.ApplicationTypes.Add(ApplicationTypes.Outlook); explorerLocation.ApplicationTypes.Add(ApplicationTypes.Word); explorerLocation.ApplicationTypes.Add(ApplicationTypes.General); explorerLocation.ShowAll = true; explorerLocation.SiteSettingID = siteSetting.ID; explorerLocation.Folder = ApplicationContext.Current.GetRootFolder(siteSetting); explorerLocation.Folder.Selected = true; explorerLocation.BasicFolderDefinition = explorerLocation.Folder.GetBasicFolderDefinition(); Configuration.ExplorerConfiguration.ExplorerLocations.Add(explorerLocation); LoadSites(); RefreshExplorerLocationsListBox(); } }
private void SelectLocationButton_Click(object sender, RoutedEventArgs e) { ExplorerLocation explorerLocation = (ExplorerLocation)this.Tag; SiteSetting siteSetting = (SiteSetting)SiteSettingComboBox.SelectedItem; Folder rootFolder = null; SiteContentSelections siteContentSelections = new SiteContentSelections(); if (explorerLocation.Folder == null) { rootFolder = new SPWeb(siteSetting.Url, siteSetting.Url, siteSetting.ID, String.Empty, siteSetting.Url, siteSetting.Url); rootFolder.PublicFolder = true; //siteContentSelections.InitializeForm(siteSetting, rootFolder, false, null); siteContentSelections.InitializeForm(siteSetting, rootFolder, true, null); if (siteContentSelections.ShowDialog(this.ParentWindow, Languages.Translate("Site Content Selections")) == true) { explorerLocation.Folder = siteContentSelections.SelectedFolder; explorerLocation.BasicFolderDefinition = explorerLocation.Folder.GetBasicFolderDefinition(); } } else { rootFolder = explorerLocation.Folder; //siteContentSelections.InitializeForm(siteSetting, rootFolder, false, null); siteContentSelections.InitializeForm(siteSetting, rootFolder, true, null); if (siteContentSelections.ShowDialog(this.ParentWindow, Languages.Translate("Site Content Selections")) == true) { explorerLocation.Folder = siteContentSelections.SelectedFolder; explorerLocation.BasicFolderDefinition = explorerLocation.Folder.GetBasicFolderDefinition(); } } }
protected void ParentWindow_OKButtonSelected(object sender, EventArgs e) { ExplorerLocation explorerLocation = (ExplorerLocation)this.Tag; explorerLocation.SiteSettingID = (Guid)SiteSettingComboBox.SelectedValue; explorerLocation.AllowToSelectSubfolders = AllowToSelectSubFoldersCheckBox.IsChecked.Value; explorerLocation.ShowAll = ShowAllRadioButton.IsChecked == true ? true : false; explorerLocation.ApplicationTypes = new List <ApplicationTypes>(); if (GeneralATCheckBox.IsChecked == true) { explorerLocation.ApplicationTypes.Add(ApplicationTypes.General); } if (WordATCheckBox.IsChecked == true) { explorerLocation.ApplicationTypes.Add(ApplicationTypes.Word); } if (ExcelATCheckBox.IsChecked == true) { explorerLocation.ApplicationTypes.Add(ApplicationTypes.Excel); } if (OutlookATCheckBox.IsChecked == true) { explorerLocation.ApplicationTypes.Add(ApplicationTypes.Outlook); } if (explorerLocation.ShowAll == true) { SiteSetting siteSetting = (SiteSetting)SiteSettingComboBox.SelectedItem; explorerLocation.Folder = new SPWeb(siteSetting.Url, siteSetting.Url, siteSetting.ID, String.Empty, siteSetting.Url, siteSetting.Url); explorerLocation.BasicFolderDefinition = explorerLocation.Folder.GetBasicFolderDefinition(); explorerLocation.Folder.Selected = true; } }
private void AddExplorerLocationButton_Click(object sender, RoutedEventArgs e) { ExplorerLocation explorerLocation = new ExplorerLocation(); explorerLocation.ID = Guid.NewGuid(); ExplorerLocationForm explorerLocationForm = new ExplorerLocationForm(); explorerLocationForm.Initialize(Configuration.SiteSettings); explorerLocationForm.BindControls(explorerLocation); if (explorerLocationForm.ShowDialog(null, "New Explorer Location") == true) { Configuration.ExplorerConfiguration.ExplorerLocations.Add(explorerLocation); RefreshExplorerLocationsListBox(); } }
private void ExplorerLocationListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (ExplorerLocationListBox.SelectedItem == null) { return; } ExplorerLocation explorerLocation = (ExplorerLocation)ExplorerLocationListBox.SelectedItem; ExplorerLocationForm explorerLocationForm = new ExplorerLocationForm(); explorerLocationForm.Initialize(Configuration.SiteSettings); explorerLocationForm.BindControls(explorerLocation); if (explorerLocationForm.ShowDialog(null, Languages.Translate("Edit Explorer Location")) == true) { RefreshExplorerLocationsListBox(); } }
protected override void OnLoad() { base.OnLoad(); LoadSiteSettings(); ExplorerLocation explorerLocation = this.Tag as ExplorerLocation; this.SelectedSiteSettingID = explorerLocation.SiteSettingID; if (explorerLocation.ApplicationTypes.Contains(ApplicationTypes.General) == true) { GeneralATCheckBox.IsChecked = true; } if (explorerLocation.ApplicationTypes.Contains(ApplicationTypes.Excel) == true) { ExcelATCheckBox.IsChecked = true; } if (explorerLocation.ApplicationTypes.Contains(ApplicationTypes.Outlook) == true) { OutlookATCheckBox.IsChecked = true; } if (explorerLocation.ApplicationTypes.Contains(ApplicationTypes.Word) == true) { WordATCheckBox.IsChecked = true; } if (explorerLocation.ShowAll == true) { ShowAllRadioButton.IsChecked = true; } else { ShowSelectedRadioButton.IsChecked = true; } this.AllowToSelectSubFoldersCheckBox.IsChecked = explorerLocation.AllowToSelectSubfolders; if (SelectedSiteSettingID != null && SelectedSiteSettingID != Guid.Empty) { SiteSettingComboBox.SelectedValue = SelectedSiteSettingID; } else { if (SiteSettingComboBox.Items.Count > 0) { SiteSettingComboBox.SelectedIndex = 0; } } ShowAllRadioButton_Checked(null, null); /* * if (this.SelectedFolder != null) * { * this.SaveLocationTextBox.Text = this.SelectedFolder.Title; * this.LoadContentTypes(this.SelectedFolder); * } * */ }