private void AddButton_Click(object sender, EventArgs e)
        {
            EUSiteSetting   siteSetting     = new EUSiteSetting();
            SiteSettingForm siteSettingForm = new SiteSettingForm();

            siteSettingForm.InitializeForm(siteSetting);
            if (siteSettingForm.ShowDialog() == DialogResult.OK)
            {
                Settings.SiteSettings.Add(siteSetting);
                LoadSites();
            }
        }
        private void GeneralConfigurationListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            SiteSetting siteSetting = (SiteSetting)(GeneralConfigurationListBox.SelectedItem as SiteSetting).Clone();

            SiteSettingForm siteSettingForm = new SiteSettingForm();

            siteSettingForm.BindControls(siteSetting);
            if (siteSettingForm.ShowDialog(this, "Site Setting") == true)
            {
                this.AppConfiguration.SiteSettings[siteSetting.ID] = siteSetting;
                RefreshGeneralConfigurationsListBox();
            }
        }
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            SiteSetting siteSetting = new SiteSetting();

            siteSetting.ID = Guid.NewGuid();
            SiteSettingForm siteSettingForm = new SiteSettingForm();

            siteSettingForm.BindControls(siteSetting);
            if (siteSettingForm.ShowDialog(this, "Site Setting") == true)
            {
                this.AppConfiguration.SiteSettings.Add(siteSetting);
                RefreshGeneralConfigurationsListBox();
            }
        }
        private void SitesListBox_DoubleClick(object sender, EventArgs e)
        {
            if (SitesListBox.SelectedItem == null)
            {
                return;
            }
            EUSiteSetting   siteSetting     = (EUSiteSetting)SitesListBox.SelectedItem;
            SiteSettingForm siteSettingForm = new SiteSettingForm();

            siteSettingForm.InitializeForm(siteSetting);
            if (siteSettingForm.ShowDialog() == DialogResult.OK)
            {
                LoadSites();
            }
        }
Example #5
0
 private void SharePointConnectButton_Click(object sender, RoutedEventArgs e)
 {
     SiteSetting siteSetting = new SiteSetting();
     siteSetting.ID = Guid.NewGuid();
     siteSetting.SiteSettingType = SiteSettingTypes.SharePoint;
     SiteSettingForm siteSettingForm = new SiteSettingForm();
     siteSettingForm.BindControls(siteSetting);
     if (siteSettingForm.ShowDialog(this.ParentWindow, Languages.Translate("Site Settings")) == true)
     {
         ConfigurationManager.GetInstance().Configuration.SiteSettings.Add(siteSetting);
         ConfigurationManager.GetInstance().SaveAppConfiguration();
         ApplicationContext.Current.Configuration.SiteSettings = ConfigurationManager.GetInstance().Configuration.SiteSettings;
         List<Sobiens.Connectors.Entities.Folder> folders = new List<Sobiens.Connectors.Entities.Folder>();
         SPWeb folder = new SPWeb(siteSetting.Url, siteSetting.Url, siteSetting.ID, Guid.NewGuid().ToString(), siteSetting.Url, siteSetting.Url, siteSetting.Url);
         folder.Selected = false;
         folders.Add(folder);
         this.Initialize(folders, null);
         this.RefreshNodes();
     }
 }
        private void SiteSettingButton_Click(object sender, RoutedEventArgs e)
        {
            SiteSetting siteSetting = new SiteSetting();

            if (SelectedSiteSetting != null)
            {
                siteSetting = (SiteSetting)SelectedSiteSetting.Clone();
            }
            else
            {
                siteSetting.ID = Guid.NewGuid();
            }
            SiteSettingForm siteSettingForm = new SiteSettingForm();

            siteSettingForm.BindControls(siteSetting);
            if (siteSettingForm.ShowDialog(this.ParentWindow, Languages.Translate("Site Settings")) == true)
            {
                SelectedSiteSetting     = siteSetting;
                SiteSettingTextBox.Text = siteSetting.ToString();
            }
        }