コード例 #1
0
ファイル: AdornmentLayer.cs プロジェクト: haise0/dnSurgeon
 public AdornmentLayer(IWpfTextView textView, LayerKind layerKind, MetadataAndOrder <IAdornmentLayersMetadata> info)
 {
     TextView               = textView ?? throw new ArgumentNullException(nameof(textView));
     this.layerKind         = layerKind;
     Info                   = info;
     adornmentLayerElements = new List <AdornmentLayerElement>();
 }
コード例 #2
0
ファイル: AdornmentLayer.cs プロジェクト: manojdjoshi/dnSpy
		public AdornmentLayer(IWpfTextView textView, LayerKind layerKind, MetadataAndOrder<IAdornmentLayersMetadata> info) {
			if (textView == null)
				throw new ArgumentNullException(nameof(textView));
			TextView = textView;
			this.layerKind = layerKind;
			Info = info;
			adornmentLayerElements = new List<AdornmentLayerElement>();
		}
コード例 #3
0
		public AdornmentLayerCollection(IWpfTextView wpfTextView, LayerKind layerKind) {
			this.wpfTextView = wpfTextView ?? throw new ArgumentNullException(nameof(wpfTextView));
			this.layerKind = layerKind;
			adornmentLayers = new List<AdornmentLayer>();
			if (layerKind != LayerKind.Normal)
				ClipToBounds = true;
			wpfTextView.Closed += WpfTextView_Closed;
			wpfTextView.LayoutChanged += WpfTextView_LayoutChanged;
		}
コード例 #4
0
		public AdornmentLayerCollection(IWpfTextView wpfTextView, LayerKind layerKind) {
			if (wpfTextView == null)
				throw new ArgumentNullException(nameof(wpfTextView));
			this.wpfTextView = wpfTextView;
			this.layerKind = layerKind;
			adornmentLayers = new List<AdornmentLayer>();
			if (layerKind != LayerKind.Normal)
				ClipToBounds = true;
			wpfTextView.Closed += WpfTextView_Closed;
			wpfTextView.LayoutChanged += WpfTextView_LayoutChanged;
		}
コード例 #5
0
            public void Unserialize(GMDataReader reader)
            {
                Name    = reader.ReadStringPointerObject();
                ID      = reader.ReadInt32();
                Kind    = (LayerKind)reader.ReadInt32();
                Depth   = reader.ReadInt32();
                OffsetX = reader.ReadSingle(); OffsetY = reader.ReadSingle();
                HSpeed  = reader.ReadSingle(); VSpeed = reader.ReadSingle();
                Visible = reader.ReadWideBoolean();
                switch (Kind)
                {
                case LayerKind.Background:
                    Background = new LayerBackground();
                    Background.Unserialize(reader);
                    break;

                case LayerKind.Instances:
                    Instances = new LayerInstances();
                    Instances.Unserialize(reader);
                    break;

                case LayerKind.Assets:
                    Assets = new LayerAssets();
                    Assets.Unserialize(reader);
                    break;

                case LayerKind.Tiles:
                    Tiles = new LayerTiles();
                    Tiles.Unserialize(reader);
                    break;

                case LayerKind.Effect:
                    Effect = new LayerEffect();
                    Effect.Unserialize(reader);
                    break;

                default:
                    reader.Warnings.Add(new GMWarning($"Unknown layer kind {Kind}"));
                    break;
                }
            }
コード例 #6
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="kind">Kind of layer</param>
		public LayerKindAttribute(LayerKind kind) {
			LayerKind = kind;
		}
コード例 #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="kind">Kind of layer</param>
 public LayerKindAttribute(LayerKind kind) => LayerKind = kind;