コード例 #1
0
ファイル: SnappingWindow.cs プロジェクト: Raimusoft/FoxTunes
        public override void InitializeComponent(ICore core)
        {
            this.Adapter = new SnappingAdapter(this.Handle);
            this.Adapter.InitializeComponent(core);
            this.SetHook(this.DefaultHook);

            core.Components.Configuration.GetElement <TextConfigurationElement>(
                WindowSnappingBehaviourConfiguration.SECTION,
                WindowSnappingBehaviourConfiguration.STICKY
                ).ConnectValue(value => this.IsSticky = WindowSnappingBehaviourConfiguration.GetIsSticky(value, this.Adapter.Id));

            lock (Instances)
            {
                Instances.Add(new WeakReference <SnappingWindow>(this));
            }
            OnActiveChanged(this);

            UpdateStickyWindows();

            base.InitializeComponent(core);
        }
コード例 #2
0
 public IEnumerable <ConfigurationSection> GetConfigurationSections()
 {
     return(WindowSnappingBehaviourConfiguration.GetConfigurationSections());
 }