Exemple #1
0
        private void WindowPositioningEngineSnapIn_BuildingFeatureList(object sender, FeatureCollectionEventArgs e)
        {
            WindowPositioningEngineSnapIn engine = WindowPositioningEngineSnapIn.Instance;

            foreach (DictionaryEntry entry in engine._listeners)
            {
                WindowPositionListener             wpl        = (WindowPositionListener)entry.Value;
                IWindowPositioningEngineFeaturable featurable = wpl.Target as IWindowPositioningEngineFeaturable;
                if (featurable != null)
                {
                    WindowPositionFeature wpf = new WindowPositionFeature(wpl.Key, "Controls the position and state of the window.", wpl.Target, FeatureActions.ResetToDefault);
                    wpf.Tag = wpl;
                    e.Features.Add(wpf);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the WindowPositioningEngineSnapIn class
        /// </summary>
        public WindowPositioningEngineSnapIn() : base()
        {
            _theInstance = this;

            FeatureEngine.BuildingFeatureList         += new FeatureCollectionEventHandler(WindowPositioningEngineSnapIn_BuildingFeatureList);
            FeatureEngine.BeforeActionTakenForFeature += new FeatureCancelEventHandler(WindowPositioningEngineSnapIn_BeforeActionTakenForFeature);
            FeatureEngine.TakeActionForFeature        += new FeatureEventHandler(WindowPositioningEngineSnapIn_TakeActionForFeature);
            FeatureEngine.AfterActionTakenForFeature  += new FeatureEventHandler(WindowPositioningEngineSnapIn_AfterActionTakenForFeature);

//			base.Install += new SnapInInstallationEventHandler(WindowPositioningEngineSnapIn_Install);
//			base.ReadOptions += new EventHandler(WindowPositioningEngineSnapIn_ReadOptions);
            base.Start += new EventHandler(WindowPositioningEngineSnapIn_Start);
            base.Stop  += new EventHandler(WindowPositioningEngineSnapIn_Stop);
//			base.WriteOptions += new EventHandler(WindowPositioningEngineSnapIn_WriteOptions);
//			base.Uninstall += new EventHandler(WindowPositioningEngineSnapIn_Uninstall);
//			base.Upgrade += new EventHandler(WindowPositioningEngineSnapIn_Upgrade);
        }
		/// <summary>
		/// Initializes a new instance of the WindowPositioningEngineSnapIn class
		/// </summary>
		public WindowPositioningEngineSnapIn() : base()
		{					
			_theInstance = this;

			FeatureEngine.BuildingFeatureList += new FeatureCollectionEventHandler(WindowPositioningEngineSnapIn_BuildingFeatureList);
			FeatureEngine.BeforeActionTakenForFeature += new FeatureCancelEventHandler(WindowPositioningEngineSnapIn_BeforeActionTakenForFeature);
			FeatureEngine.TakeActionForFeature += new FeatureEventHandler(WindowPositioningEngineSnapIn_TakeActionForFeature);
			FeatureEngine.AfterActionTakenForFeature += new FeatureEventHandler(WindowPositioningEngineSnapIn_AfterActionTakenForFeature);

//			base.Install += new SnapInInstallationEventHandler(WindowPositioningEngineSnapIn_Install);
//			base.ReadOptions += new EventHandler(WindowPositioningEngineSnapIn_ReadOptions);
			base.Start += new EventHandler(WindowPositioningEngineSnapIn_Start);
			base.Stop += new EventHandler(WindowPositioningEngineSnapIn_Stop);
//			base.WriteOptions += new EventHandler(WindowPositioningEngineSnapIn_WriteOptions);
//			base.Uninstall += new EventHandler(WindowPositioningEngineSnapIn_Uninstall);
//			base.Upgrade += new EventHandler(WindowPositioningEngineSnapIn_Upgrade);
		}