コード例 #1
0
        void projectItemTypeDefinition_ProjectItemAdded(object sender, SharePointProjectItemEventArgs e)
        {
            string message = String.Format("An example project item named {0} was added to the {1} project.",
                                           e.ProjectItem.Name, e.ProjectItem.Project.Name);

            e.ProjectItem.Project.ProjectService.Logger.WriteLine(message, LogCategory.Message);
        }
コード例 #2
0
        void projectItemType_ProjectItemAdded(object sender, SharePointProjectItemEventArgs e)
        {
            ISharePointProjectItem projectItem = (ISharePointProjectItem)sender;
            string message = String.Format("An Event Handler project item named {0} was added to the {1} project.",
                                           projectItem.Name, projectItem.Project.Name);

            projectItem.Project.ProjectService.Logger.WriteLine(message, LogCategory.Message);
        }
コード例 #3
0
        /// <summary>
        /// Handles the ProjectItemInitialized event of the spiType control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SharePointProjectItemEventArgs" /> instance containing the event data.</param>
        private void spiType_ProjectItemInitialized(object sender, SharePointProjectItemEventArgs e)
        {
            if (recentlyAddedItem == e.ProjectItem.Id)
            {
                recentlyAddedItem = Guid.Empty;
                ISharePointProjectItem spi = e.ProjectItem;
                IEnumerable <ISharePointProjectFeature> source = from ISharePointProjectFeature feature
                                                                 in spi.Project.Features
                                                                 where feature.ProjectItems.Contains(spi)
                                                                 select feature;

                if ((source != null) && (source.Count() > 0))
                {
                    foreach (ISharePointProjectFeature feature in source)
                    {
                        feature.ProjectItems.Remove(spi);
                    }
                }
            }
        }
コード例 #4
0
ファイル: CustomAction.cs プロジェクト: lightman2/skiaming
 private void ProjectItemDisposing(object sender, SharePointProjectItemEventArgs e)
 {
     e.ProjectItem.Project.PropertyChanged -= ProjectPropertyChanged;
 }
コード例 #5
0
ファイル: CustomAction.cs プロジェクト: lightman2/skiaming
 private void ProjectItemInitialized(object sender, SharePointProjectItemEventArgs e)
 {
     // 处理项目事件。
     e.ProjectItem.Project.PropertyChanged += ProjectPropertyChanged;
 }
コード例 #6
0
 /// <summary>
 /// Handles the ProjectItemInitialized event of the typeDefinition control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.VisualStudio.SharePoint.SharePointProjectItemEventArgs"/> instance containing the event data.</param>
 void typeDefinition_ProjectItemInitialized(object sender, SharePointProjectItemEventArgs e)
 {
 }
コード例 #7
0
 /// <summary>
 /// Handles the ProjectItemAdded event of the TypeDefinition control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.VisualStudio.SharePoint.SharePointProjectItemEventArgs"/> instance containing the event data.</param>
 void TypeDefinition_ProjectItemAdded(object sender, SharePointProjectItemEventArgs e)
 {
 }
コード例 #8
0
 /// <summary>
 /// Handles the ProjectItemAdded event of the spiType control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="SharePointProjectItemEventArgs" /> instance containing the event data.</param>
 private void spiType_ProjectItemAdded(object sender, SharePointProjectItemEventArgs e)
 {
     recentlyAddedItem = e.ProjectItem.Id;
 }
コード例 #9
0
ファイル: CustomAction.cs プロジェクト: Helen1987/edu
 private void ProjectItemDisposing(object sender, SharePointProjectItemEventArgs e)
 {
     e.ProjectItem.Project.PropertyChanged -= ProjectPropertyChanged;
 }
コード例 #10
0
ファイル: CustomAction.cs プロジェクト: Helen1987/edu
 private void ProjectItemInitialized(object sender, SharePointProjectItemEventArgs e)
 {
     // Handle a project event.
     e.ProjectItem.Project.PropertyChanged += ProjectPropertyChanged;
 }
コード例 #11
0
 private void ProjectItemInitialized(object sender, SharePointProjectItemEventArgs e)
 {
     // Handle a project event.
     e.ProjectItem.Project.PropertyChanged += ProjectPropertyChanged;
 }