示例#1
0
        public ApplicationCanvas()
        {
            r.Fill = Brushes.Red;
            r.AttachTo(this);
            r.MoveTo(8, 8);
            this.SizeChanged += (s, e) => r.SizeTo(this.Width - 16.0, this.Height - 16.0);

            t.AttachTo(this);

            var Gray = Colors.Gray;

            var x = new Dictionary <Color, Image>
            {
                { Gray, null }
            };



            var xe = new __Enumerator <Color, Image>(x);

            while (xe.MoveNext())
            {
                var item = xe.Current;
                t.Text += new { item.Key }.ToString();
            }

            //foreach (var v in x)

            //while (xe.MoveNext())
            //{
            //    var v = xe.Current;

            //    // wtf?
            //    var Key = v.Key;
            //    t.Text += new { Key }.ToString();

            //}

            //            Implementation not found for type import :
            //type: System.Collections.Generic.Dictionary`2+KeyCollection[[System.Windows.Media.Color, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[System.Windows.Controls.Image, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
            //method: Enumerator GetEnumerator()
            //Did you forget to add the [Script] attribute?


            Test(Gray, x);
            t.Text += "|";

            TestGeneric(Gray, x);
        }
示例#2
0
 public __Dictionary()
 {
     var x = new __Enumerator();
 }