Example #1
0
 public void ScrapInactived(object sender, ScrapEventArgs e)
 {
     if (this.optSetuna.Scrap.InactiveAlphaChange)
     {
         e.scrap.InactiveOpacity = 1.0 - (((double)this.optSetuna.Scrap.InactiveAlphaValue) / 100.0);
     }
     else
     {
         e.scrap.InactiveOpacity = e.scrap.ActiveOpacity;
     }
     bool inactiveLineChange = this.optSetuna.Scrap.InactiveLineChange;
 }
Example #2
0
 public void ScrapInactiveMouseOver(object sender, ScrapEventArgs e)
 {
     if (this.optSetuna.Scrap.MouseOverAlphaChange)
     {
         e.scrap.RollOverOpacity = 1.0 - (((double)this.optSetuna.Scrap.MouseOverAlphaValue) / 100.0);
     }
     else
     {
         e.scrap.RollOverOpacity = e.scrap.ActiveOpacity;
     }
     bool mouseOverLineChange = this.optSetuna.Scrap.MouseOverLineChange;
 }
Example #3
0
        void IScrapRemovedListener.ScrapRemoved(object sender, ScrapEventArgs e)
        {
            var scrap     = e.scrap;
            var cacheItem = scrap?.CacheItem;

            if (cacheItem == null)
            {
                return;
            }

            scrap.CacheItem = null;
            cacheItem.Delete();
        }
Example #4
0
        void IScrapStyleRemovedListener.ScrapStyleRemoved(object sender, ScrapEventArgs e)
        {
            var scrap     = e.scrap;
            var cacheItem = scrap?.CacheItem;

            if (cacheItem == null)
            {
                return;
            }

            cacheItem.Style = new Style(0, new System.Drawing.Point(0, 0));
            cacheItem.SaveInfo();
        }
Example #5
0
        void IScrapImageChangedListener.ScrapImageChanged(object sender, ScrapEventArgs e)
        {
            var scrap     = e.scrap;
            var cacheItem = scrap?.CacheItem;
            var image     = scrap?.Image;

            if (cacheItem == null || image == null)
            {
                return;
            }

            cacheItem.SaveImage(image);
        }
Example #6
0
        void IScrapLocationChangedListener.ScrapLocationChanged(object sender, ScrapEventArgs e)
        {
            var scrap     = e.scrap;
            var cacheItem = scrap?.CacheItem;

            if (cacheItem == null)
            {
                return;
            }

            cacheItem.Position = scrap.Location;
            cacheItem.SaveInfo();
        }
Example #7
0
        public void ScrapCreated(object sender, ScrapEventArgs e)
        {
            CStyle style = this.optSetuna.FindStyle(this.optSetuna.Scrap.CreateStyleID);

            if (style != null)
            {
                e.scrap.Initialized = false;
                style.Apply(ref e.scrap);
            }
            else
            {
                e.scrap.Initialized = true;
            }
        }
Example #8
0
        void IScrapStyleAppliedListener.ScrapStyleApplied(object sender, ScrapEventArgs e)
        {
            var scrap     = e.scrap;
            var styleID   = scrap?.StyleID ?? 0;
            var cacheItem = scrap?.CacheItem;

            if (cacheItem == null || styleID == 0)
            {
                return;
            }

            cacheItem.Style = new Style(styleID, scrap.StyleClickPoint);
            cacheItem.SaveInfo();
        }
Example #9
0
        void IScrapAddedListener.ScrapAdded(object sender, ScrapEventArgs e)
        {
            var scrap = e.scrap;

            // 已经绑定缓存则忽略
            if (scrap.CacheItem != null)
            {
                return;
            }

            var style = new Style
            {
                ID         = scrap.StyleID,
                ClickPoint = scrap.StyleClickPoint
            };

            var cacheItem = CacheItem.Create(scrap.DateTime, scrap.Image, scrap.Location, style);

            scrap.CacheItem = cacheItem;
        }
Example #10
0
 public void ScrapRemoved(object sender, ScrapEventArgs e)
 {
 }
Example #11
0
 public void ScrapAdded(object sender, ScrapEventArgs e)
 {
 }
Example #12
0
 public void ScrapActivated(object sender, ScrapEventArgs e)
 {
     bool inactiveAlphaChange = this.optSetuna.Scrap.InactiveAlphaChange;
     bool inactiveLineChange  = this.optSetuna.Scrap.InactiveLineChange;
 }