Exemplo n.º 1
0
        private void StackPanelMainInfo_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            double height = e.NewSize.Height;

            if (double.IsInfinity(height) || double.IsNaN(height))
            {
                return;
            }
            this.wallPanel.DeltaOffset   = -height;
            this.canvasBackground.Height = height;
            this.canvasBackground.Children.Clear();
            Rectangle rect = new Rectangle();
            double    num  = height;

            rect.Height = num;
            Thickness thickness = new Thickness(0.0);

            rect.Margin = thickness;
            double width = e.NewSize.Width;

            rect.Width = width;
            SolidColorBrush solidColorBrush = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            rect.Fill = (Brush)solidColorBrush;
            foreach (UIElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
            {
                this.canvasBackground.Children.Add(coverByRectangle);
            }
        }
Exemplo n.º 2
0
        private void GridContent_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            Size newSize1 = e.NewSize;
            // ISSUE: explicit reference operation
            double height = ((Size)@newSize1).Height;

            if (double.IsInfinity(height) || double.IsNaN(height))
            {
                return;
            }
            ((FrameworkElement)this.canvasBackground).Height = (height);
            ((PresentationFrameworkCollection <UIElement>)((Panel)this.canvasBackground).Children).Clear();
            Rectangle rect = new Rectangle();
            double    num  = height;

            ((FrameworkElement)rect).Height = (num);
            Thickness thickness = new Thickness(0.0);

            ((FrameworkElement)rect).Margin = (thickness);
            Size newSize2 = e.NewSize;
            // ISSUE: explicit reference operation
            double width = ((Size)@newSize2).Width;

            ((FrameworkElement)rect).Width = (width);
            SolidColorBrush solidColorBrush = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            ((Shape)rect).Fill = ((Brush)solidColorBrush);
            using (List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ((PresentationFrameworkCollection <UIElement>)((Panel)this.canvasBackground).Children).Add((UIElement)enumerator.Current);
                }
            }
        }
Exemplo n.º 3
0
 protected override void GenerateChildren()
 {
     base.GenerateChildren();
     this.CreateMenu();
     this._mvm.PropertyChanged += new PropertyChangedEventHandler(this._mvm_PropertyChanged);
     if (this._calloutPath == null)
     {
         return;
     }
     this.UpdateFill();
     ((UIElement)this._selectionPath).Visibility = this._mvm.SelectionMarkVisibility;
     this.Children.Add((FrameworkElement)this._selectionPath);
     this.Children.Add((FrameworkElement)this._calloutPath);
     List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(this._bubbleRect).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             this.Children.Add((FrameworkElement)enumerator.Current);
         }
     }
     finally
     {
         enumerator.Dispose();
     }
 }
Exemplo n.º 4
0
        private void StackPanelMainInfo_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            double height = e.NewSize.Height;

            if (double.IsInfinity(height) || double.IsNaN(height))
            {
                return;
            }
            this.wallPanel.DeltaOffset   = -height;
            this.canvasBackground.Height = height;
            this.canvasBackground.Children.Clear();
            Rectangle rect = new Rectangle();

            rect.Height = height;
            rect.Margin = new Thickness(0.0);
            rect.Width  = e.NewSize.Width;
            rect.Fill   = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];
            using (List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    this.canvasBackground.Children.Add(enumerator.Current);
                }
            }
        }
Exemplo n.º 5
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            this.CreateMenu();
            Rectangle rect        = new Rectangle();
            double    fixedHeight = this.FixedHeight;
            Thickness margin1     = this.Margin;
            // ISSUE: explicit reference operation
            double top  = margin1.Top;
            double num1 = fixedHeight + top;

            ((FrameworkElement)rect).Height = num1;
            double    num2    = 0.0;
            Thickness margin2 = this.Margin;
            // ISSUE: explicit reference operation
            double    num3       = -((Thickness)@margin2).Top;
            double    num4       = 0.0;
            double    num5       = 0.0;
            Thickness thickness1 = new Thickness(num2, num3, num4, num5);

            ((FrameworkElement)rect).Margin = thickness1;
            double num6 = 480.0;

            ((FrameworkElement)rect).Width = num6;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            ((Shape)rect).Fill = ((Brush)solidColorBrush1);
            List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    this.Children.Add((FrameworkElement)enumerator.Current);
                }
            }
            finally
            {
                enumerator.Dispose();
            }
            if (!this._showDivideLine)
            {
                return;
            }
            Rectangle       rectangle        = new Rectangle();
            SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneNewsDividerBrush"] as SolidColorBrush;

            ((Shape)rectangle).Fill = ((Brush)solidColorBrush2);
            double num7 = 480.0;

            ((FrameworkElement)rectangle).Width = num7;
            double num8 = 16.0;

            ((FrameworkElement)rectangle).Height = num8;
            Thickness thickness2 = new Thickness(0.0, this.FixedHeight - 16.0, 0.0, 0.0);

            ((FrameworkElement)rectangle).Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
        }
Exemplo n.º 6
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            this.CreateMenu();
            this.HookUpEvents();
            if (this._showBackground)
            {
                Rectangle rect        = new Rectangle();
                double    fixedHeight = this.FixedHeight;
                rect.Height = fixedHeight;
                Thickness thickness = new Thickness();
                rect.Margin = thickness;
                double num = 480.0;
                rect.Width = num;
                SolidColorBrush solidColorBrush = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];
                rect.Fill = (Brush)solidColorBrush;
                foreach (FrameworkElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
                {
                    this.Children.Add(coverByRectangle);
                }
            }
            if (!this._preview || !this._showDivideLine)
            {
                return;
            }
            Rectangle       rectangle        = new Rectangle();
            SolidColorBrush solidColorBrush1 = this._isFeedbackItem ? Application.Current.Resources["PhoneTableSeparatorBrush"] as SolidColorBrush : Application.Current.Resources["PhoneNewsDividerBrush"] as SolidColorBrush;

            rectangle.Fill = (Brush)solidColorBrush1;
            double num1 = 480.0;

            rectangle.Width = num1;
            double dividerHeight = this.DividerHeight;

            rectangle.Height = dividerHeight;
            Thickness thickness1 = new Thickness(0.0, this.FixedHeight - this.DividerHeight, 0.0, 0.0);

            rectangle.Margin = thickness1;
            this.Children.Add((FrameworkElement)rectangle);
            if (!this._showEarlierReplies)
            {
                return;
            }
            EarlierRepliesUC earlierRepliesUc = new EarlierRepliesUC();
            Thickness        thickness2       = new Thickness(0.0, this.FixedHeight - this.DividerHeight, 0.0, 0.0);

            earlierRepliesUc.Margin = thickness2;
            this.Children.Add((FrameworkElement)earlierRepliesUc);
        }
Exemplo n.º 7
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            if (this._headerItem != null)
            {
                this._headerItem.SetMenu(this.GenerateMenuItems());
            }
            Rectangle rect        = new Rectangle();
            double    fixedHeight = this.FixedHeight;
            Thickness margin      = this.Margin;
            double    top1        = margin.Top;
            double    num1        = fixedHeight + top1;

            rect.Height = num1;
            double left = 0.0;

            margin = this.Margin;
            double    top2       = -margin.Top;
            double    right      = 0.0;
            double    bottom     = 0.0;
            Thickness thickness1 = new Thickness(left, top2, right, bottom);

            rect.Margin = thickness1;
            double num2 = 480.0;

            rect.Width = num2;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            rect.Fill = (Brush)solidColorBrush1;
            foreach (FrameworkElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
            {
                this.Children.Add(coverByRectangle);
            }
            Rectangle       rectangle        = new Rectangle();
            SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneNewsDividerBrush"] as SolidColorBrush;

            rectangle.Fill = (Brush)solidColorBrush2;
            double num3 = 480.0;

            rectangle.Width = num3;
            double num4 = 16.0;

            rectangle.Height = num4;
            Thickness thickness2 = new Thickness(0.0, this.FixedHeight - 16.0, 0.0, 0.0);

            rectangle.Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
        }
Exemplo n.º 8
0
        protected override void GenerateChildren()
        {
            Rectangle rect        = new Rectangle();
            double    fixedHeight = this.FixedHeight;

            ((FrameworkElement)rect).Height = fixedHeight;
            Thickness thickness1 = new Thickness();

            ((FrameworkElement)rect).Margin = thickness1;
            double width1 = this.Width;

            ((FrameworkElement)rect).Width = width1;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            ((Shape)rect).Fill = ((Brush)solidColorBrush1);
            List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    this.Children.Add((FrameworkElement)enumerator.Current);
                }
            }
            finally
            {
                enumerator.Dispose();
            }
            Rectangle rectangle = new Rectangle();

            rectangle.Width  = this.Width;
            rectangle.Height = 2.0;
            SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneTableSeparatorBrush"] as SolidColorBrush;

            ((Shape)rectangle).Fill = ((Brush)solidColorBrush2);
            Thickness thickness2 = new Thickness(0.0, this.FixedHeight - 2.0, 0.0, 0.0);

            rectangle.Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
            if (this._userNotTemplate == null)
            {
                return;
            }
            this._userNotTemplate.LoadImages();
            this.Children.Add(this._userNotTemplate);
        }
Exemplo n.º 9
0
        protected override void GenerateChildren()
        {
            Rectangle rectangle1 = new Rectangle();
            double    num1       = 480.0;

            ((FrameworkElement)rectangle1).Width = num1;
            double num2 = 2.0;

            ((FrameworkElement)rectangle1).Height = num2;
            SolidColorBrush solidColorBrush1 = Application.Current.Resources["PhoneTableSeparatorBrush"] as SolidColorBrush;

            ((Shape)rectangle1).Fill = ((Brush)solidColorBrush1);
            Thickness thickness1 = new Thickness(-16.0, this._isNotificationComment ? this.FixedHeight : -1.0, 0.0, 0.0);

            ((FrameworkElement)rectangle1).Margin = thickness1;
            Rectangle rectangle2 = rectangle1;

            if (!this._isNotificationComment)
            {
                Rectangle rect = new Rectangle();
                double    num3 = 480.0;
                ((FrameworkElement)rect).Width = num3;
                double num4 = this.FixedHeight + 16.0;
                ((FrameworkElement)rect).Height = num4;
                SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneNewsBackgroundBrush"] as SolidColorBrush;
                ((Shape)rect).Fill = ((Brush)solidColorBrush2);
                Thickness thickness2 = new Thickness(-16.0, 0.0, 0.0, 0.0);
                ((FrameworkElement)rect).Margin = thickness2;
                List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        this.Children.Add((FrameworkElement)enumerator.Current);
                    }
                }
                finally
                {
                    enumerator.Dispose();
                }
                this.Children.Add((FrameworkElement)rectangle2);
            }
            this.PrepareLikesAndReplyView();
            this.UpdateContextMenu();
        }
Exemplo n.º 10
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            this.CreateMenu();
            Rectangle rect = new Rectangle();
            double    num1 = this.FixedHeight + this.Margin.Top;

            rect.Height = num1;
            Thickness thickness1 = new Thickness(0.0, -this.Margin.Top, 0.0, 0.0);

            rect.Margin = thickness1;
            double num2 = 480.0;

            rect.Width = num2;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            rect.Fill = (Brush)solidColorBrush1;
            foreach (FrameworkElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
            {
                this.Children.Add(coverByRectangle);
            }
            if (!this._showDivideLine)
            {
                return;
            }
            Rectangle       rectangle        = new Rectangle();
            SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneNewsDividerBrush"] as SolidColorBrush;

            rectangle.Fill = (Brush)solidColorBrush2;
            double num3 = 480.0;

            rectangle.Width = num3;
            double num4 = 16.0;

            rectangle.Height = num4;
            Thickness thickness2 = new Thickness(0.0, this.FixedHeight - 16.0, 0.0, 0.0);

            rectangle.Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
        }
Exemplo n.º 11
0
        protected override void GenerateChildren()
        {
            Rectangle rect        = new Rectangle();
            double    fixedHeight = this.FixedHeight;

            rect.Height = fixedHeight;
            Thickness thickness1 = new Thickness();

            rect.Margin = thickness1;
            double width1 = this.Width;

            rect.Width = width1;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];

            rect.Fill = (Brush)solidColorBrush1;
            foreach (FrameworkElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
            {
                this.Children.Add(coverByRectangle);
            }
            Rectangle rectangle = new Rectangle();
            double    width2    = this.Width;

            rectangle.Width = width2;
            double num = 2.0;

            rectangle.Height = num;
            SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneTableSeparatorBrush"] as SolidColorBrush;

            rectangle.Fill = (Brush)solidColorBrush2;
            Thickness thickness2 = new Thickness(0.0, this.FixedHeight - 2.0, 0.0, 0.0);

            rectangle.Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
            if (this._userNotTemplate == null)
            {
                return;
            }
            this._userNotTemplate.LoadImages();
            this.Children.Add((FrameworkElement)this._userNotTemplate);
        }
Exemplo n.º 12
0
        protected override void GenerateChildren()
        {
            Rectangle rectangle1 = new Rectangle();
            double    num1       = 480.0;

            rectangle1.Width = num1;
            double num2 = 2.0;

            rectangle1.Height = num2;
            SolidColorBrush solidColorBrush1 = Application.Current.Resources["PhoneTableSeparatorBrush"] as SolidColorBrush;

            rectangle1.Fill = (Brush)solidColorBrush1;
            Thickness thickness1 = new Thickness(-16.0, this._isNotificationComment ? this.FixedHeight : -1.0, 0.0, 0.0);

            rectangle1.Margin = thickness1;
            Rectangle rectangle2 = rectangle1;

            if (!this._isNotificationComment)
            {
                Rectangle rect = new Rectangle();
                double    num3 = 480.0;
                rect.Width = num3;
                double num4 = this.FixedHeight + 16.0;
                rect.Height = num4;
                SolidColorBrush solidColorBrush2 = Application.Current.Resources["PhoneNewsBackgroundBrush"] as SolidColorBrush;
                rect.Fill = (Brush)solidColorBrush2;
                Thickness thickness2 = new Thickness(-16.0, 0.0, 0.0, 0.0);
                rect.Margin = thickness2;
                foreach (FrameworkElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
                {
                    this.Children.Add(coverByRectangle);
                }
                this.Children.Add((FrameworkElement)rectangle2);
            }
            this.Children.Add((FrameworkElement)this._imageLike);
            this.Children.Add((FrameworkElement)this._textBlockLike);
            this.UpdateContextMenu();
        }
Exemplo n.º 13
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            this._mvm.PropertyChanged += new PropertyChangedEventHandler(this._mvm_PropertyChanged);
            if (!this._mvm.IsForwarded)
            {
                return;
            }
            Rectangle rect = new Rectangle();//Та самая полоска слева от пересылаемого сообщения

            rect.Fill    = Application.Current.Resources["PhoneNameBlueBrush"] as SolidColorBrush;
            rect.Opacity = 0.5;
            rect.Width   = 3.0;
            rect.Margin  = new Thickness(0.0, this._marginTop, 0.0, 0.0);
            rect.Height  = this._height - this._marginTop;
            using (List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    this.Children.Add(enumerator.Current);
                }
            }
        }
Exemplo n.º 14
0
        private void GridContent_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            Size newSize = e.NewSize;
            // ISSUE: explicit reference operation
            double height = ((Size)@newSize).Height;

            if (double.IsInfinity(height) || double.IsNaN(height))
            {
                return;
            }
            ((FrameworkElement)this.gridBackground).Height = height;
            ((PresentationFrameworkCollection <UIElement>)((Panel)this.gridBackground).Children).Clear();
            Rectangle rectangle = new Rectangle();
            double    num1      = 1.0;

            ((FrameworkElement)rectangle).Width = num1;
            double num2 = height;

            ((FrameworkElement)rectangle).Height = num2;
            SolidColorBrush solidColorBrush1 = (SolidColorBrush)Application.Current.Resources["PhoneAttachmentBorderBrush"];

            ((Shape)rectangle).Fill = ((Brush)solidColorBrush1);
            int num3 = 0;

            ((FrameworkElement)rectangle).VerticalAlignment = ((VerticalAlignment)num3);
            int num4 = 0;

            ((FrameworkElement)rectangle).HorizontalAlignment = ((HorizontalAlignment)num4);
            Rectangle rect1 = rectangle;
            Rectangle rect2 = new Rectangle();
            double    num5  = 1.0;

            ((FrameworkElement)rect2).Width = num5;
            double num6 = height;

            ((FrameworkElement)rect2).Height = num6;
            SolidColorBrush solidColorBrush2 = (SolidColorBrush)Application.Current.Resources["PhoneAttachmentBorderBrush"];

            ((Shape)rect2).Fill = ((Brush)solidColorBrush2);
            int num7 = 0;

            ((FrameworkElement)rect2).VerticalAlignment = ((VerticalAlignment)num7);
            int num8 = 2;

            ((FrameworkElement)rect2).HorizontalAlignment = ((HorizontalAlignment)num8);
            List <Rectangle> rectangleList1 = RectangleHelper.CoverByRectangles(rect1);
            List <Rectangle> rectangleList2 = RectangleHelper.CoverByRectangles(rect2);

            using (List <Rectangle> .Enumerator enumerator = rectangleList1.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ((PresentationFrameworkCollection <UIElement>)((Panel)this.gridBackground).Children).Add((UIElement)enumerator.Current);
                }
            }
            using (List <Rectangle> .Enumerator enumerator = rectangleList2.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ((PresentationFrameworkCollection <UIElement>)((Panel)this.gridBackground).Children).Add((UIElement)enumerator.Current);
                }
            }
        }