private void CreateTextBoxes(Matrix matrix, WrapPanel wp, ref TextBox[,] TextBoxDim, ref Cells[,] cellsDim)
        {
            const double MARGIN = 1d;
            const double WIDTH = 40d;
            const double HEIGHT = 40d;
            int i = 0;
            wp.Width = matrix.columns * WIDTH + 2*MARGIN*matrix.columns;
            wp.Height = matrix.rows * HEIGHT + 2 * MARGIN * matrix.rows;
            foreach (Vector vector in matrix)
            {
                for (int j = 0; j < vector.length; j++)
                {
                    TextBoxDim[i,j] = new TextBox();
                    TextBoxDim[i,j].Width = WIDTH;
                    TextBoxDim[i,j].Height = HEIGHT;
                    TextBoxDim[i,j].Margin = new Thickness(MARGIN);
                    TextBoxDim[i,j].Text = vector[j].ToString();
                    
                    TextBoxDim[i,j].SetValue(Grid.ColumnProperty, j);
                    TextBoxDim[i,j].SetValue(Grid.RowProperty, i);
                    wp.Children.Add(TextBoxDim[i, j]);

                    cellsDim[i, j] = new Cells();
                    cellsDim[i, j].Value = matrix[i, j];
                    Binding myBinding = new Binding("Value");
                    myBinding.Source = cellsDim[i,j];
                    myBinding.Mode = BindingMode.TwoWay;
                    TextBoxDim[i, j].SetBinding(TextBox.TextProperty, myBinding);
                }
                i++;
            }
        }
 private void CreateTextBlockses(Matrix matrix, WrapPanel wp, ref TextBlock[,] TextBlockDim)
 {
     const double MARGIN = 1d;
     const double WIDTH = 40d;
     const double HEIGHT = 40d;
     int i = 0;
     wp.Width = matrix.columns * WIDTH + 2 * MARGIN * matrix.columns;
     wp.Height = matrix.rows * HEIGHT + 2 * MARGIN * matrix.rows;
     foreach (Vector vector in matrix)
     {
         for (int j = 0; j < vector.length; j++)
         {
             TextBlockDim[i, j] = new TextBlock();
             TextBlockDim[i, j].Width = WIDTH;
             TextBlockDim[i, j].Height = HEIGHT;
             TextBlockDim[i, j].Margin = new Thickness(MARGIN);
             TextBlockDim[i, j].Text = vector[j].ToString();
             TextBlockDim[i, j].Background = Brushes.White;
             TextBlockDim[i, j].SetValue(Grid.ColumnProperty, j);
             TextBlockDim[i, j].SetValue(Grid.RowProperty, i);
             wp.Children.Add(TextBlockDim[i, j]);
         }
         i++;
     }
 }
        public LevelSelectionScreen(Scenario scenario)
        {
            background = GameResources.Content.Load<Texture2D>("Sprites/UI/background");

            Texture2D[] buttonTextures = {GameResources.Content.Load<Texture2D>("Sprites/UI/Menu/shortLocked"),
                                 GameResources.Content.Load<Texture2D>("Sprites/UI/Menu/shortUnlocked") };
            wrapPanel = new WrapPanel()
                            {
                                ButtonTexture =
                                    GameResources.Content.Load<Texture2D>("Sprites/UI/Menu/shortButtonBackground"),
                                Font = GameResources.Content.Load<SpriteFont>("Fonts/forque"),
                                Origin = Vector2.Zero,
                                Position = Vector2.Zero
                            };

            wrapPanel.Init(1, 10, buttonTextures, 100, 100);
        }
Esempio n. 4
0
        public void Lays_Out_Horizontally_On_A_Single_Line()
        {
            var target = new WrapPanel()
                         {
                             Width = 200,
                             Children = new Controls
                                        {
                                            new Border { Height = 50, Width = 100 },
                                            new Border { Height = 50, Width = 100 },
                                        }
                         };

            target.Measure(Size.Infinity);
            target.Arrange(new Rect(target.DesiredSize));

            Assert.Equal(new Size(200, 50), target.Bounds.Size);
            Assert.Equal(new Rect(0, 0, 100, 50), target.Children[0].Bounds);
            Assert.Equal(new Rect(100, 0, 100, 50), target.Children[1].Bounds);
        }
Esempio n. 5
0
        public void Lays_Out_Vertically_On_Separate_Lines()
        {
            var target = new WrapPanel()
                         {
                             Orientation = Orientation.Vertical,
                             Height = 60,
                             Children = new Controls
                                        {
                                            new Border { Height = 50, Width = 100 },
                                            new Border { Height = 50, Width = 100 },
                                        }
                         };

            target.Measure(Size.Infinity);
            target.Arrange(new Rect(target.DesiredSize));

            Assert.Equal(new Size(200, 60), target.Bounds.Size);
            Assert.Equal(new Rect(0, 0, 100, 50), target.Children[0].Bounds);
            Assert.Equal(new Rect(100, 0, 100, 50), target.Children[1].Bounds);
        }
Esempio n. 6
0
        /// <summary>
        /// For the given bitmap renders filtered thumbnails for each filter in given list and populates
        /// the given wrap panel with the them.
        /// 
        /// For quick rendering, renders 10 thumbnails synchronously and then releases the calling thread.
        /// </summary>
        /// <param name="bitmap">Source bitmap to be filtered</param>
        /// <param name="side">Side length of square thumbnails to be generated</param>
        /// <param name="list">List of filters to be used, one per each thumbnail to be generated</param>
        /// <param name="panel">Wrap panel to be populated with the generated thumbnails</param>
        private async Task RenderThumbnailsAsync(Bitmap bitmap, int side, List<FilterModel> list, WrapPanel panel)
        {
            using (BitmapImageSource source = new BitmapImageSource(bitmap))
            using (FilterEffect effect = new FilterEffect(source))
            {
                foreach (FilterModel filter in list)
                {
                    effect.Filters = filter.Components;

                    WriteableBitmap writeableBitmap = new WriteableBitmap(side, side);

                    using (WriteableBitmapRenderer renderer = new WriteableBitmapRenderer(effect, writeableBitmap))
                    {
                        await renderer.RenderAsync();

                        writeableBitmap.Invalidate();

                        PhotoThumbnail photoThumbnail = new PhotoThumbnail()
                        {
                            Bitmap = writeableBitmap,
                            Text = filter.Name,
                            Width = side,
                            Margin = new Thickness(6)
                        };

                        photoThumbnail.Tap += (object sender, System.Windows.Input.GestureEventArgs e) =>
                        {
                            App.PhotoModel.ApplyFilter(filter);
                            App.PhotoModel.Dirty = true;

                            NavigationService.GoBack();
                        };

                        panel.Children.Add(photoThumbnail);
                    }
                }
            }
        }
        private async Task AddSubscriptionPanel(Subscription sub)
        {
            var channel = await sub.GetChannel();

            _ = Dispatcher.InvokeAsync(() =>
            {
                int row = SubscriptionsGrid.RowDefinitions.Count;
                RowDefinition rowDefinition = new RowDefinition
                {
                    Height = GridLength.Auto,
                };
                SubscriptionsGrid.RowDefinitions.Add(rowDefinition);

                Image logo = new Image
                {
                    MaxWidth          = 120,
                    MaxHeight         = 120,
                    Width             = 98,
                    Height            = 98,
                    Margin            = new Thickness(2),
                    Source            = new BitmapImage(new Uri(channel.LogoUrl)),
                    VerticalAlignment = VerticalAlignment.Top
                };
                Grid.SetColumn(logo, 0);
                Grid.SetRow(logo, row);
                SubscriptionsGrid.Children.Add(logo);


                TextBlock description = new TextBlock
                {
                    Height            = 40,
                    Width             = double.NaN,
                    FontSize          = 14,
                    VerticalAlignment = VerticalAlignment.Top
                };
                description.Inlines.Add(string.Concat(FindResource("PlaylistTitle"), channel.Title, "\n"));
                description.Inlines.Add(string.Concat(FindResource("LastVideoDownloadDate"), sub.LatestVideoDownloaded.ToLocalTime().ToShortDateString()));
                Grid.SetColumn(description, 1);
                Grid.SetRow(description, row);
                SubscriptionsGrid.Children.Add(description);

                StackPanel buttonsPanel = new StackPanel
                {
                    VerticalAlignment = VerticalAlignment.Center
                };
                Grid.SetColumn(buttonsPanel, 2);
                Grid.SetRow(buttonsPanel, row);
                SubscriptionsGrid.Children.Add(buttonsPanel);

                Tile settingsButton = new Tile
                {
                    Height = double.NaN,
                    Width  = double.NaN,
                    Margin = new Thickness(2.5),
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment   = VerticalAlignment.Center
                },
                removeButton = new Tile
                {
                    Height = double.NaN,
                    Width  = double.NaN,
                    Margin = new Thickness(2.5),
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment   = VerticalAlignment.Center
                };

                removeButton.Click += (s, e) =>
                {
                    rowDefinition.Height = new GridLength(0);
                    Subscriptions.Remove(Subscriptions.FirstOrDefault(x => x.ChannelId.Equals(sub.ChannelId)));
                };

                settingsButton.Click += (s, e) =>
                {
                    GlobalConsts.LoadFlyoutPage(new SubscriptionSettings(sub));
                };

                buttonsPanel.Children.Add(settingsButton);
                buttonsPanel.Children.Add(removeButton);

                WrapPanel settingsButtonWrapPanel = new WrapPanel(), removeButtonWrapPanel = new WrapPanel();

                //Settings button
                PackIconModern settingsButtonIcon = new PackIconModern
                {
                    Kind   = PackIconModernKind.Cogs,
                    Width  = 35,
                    Height = 35,
                    Margin = new Thickness(5)
                };
                TextBlock settingsButtonTextBlock = new TextBlock
                {
                    Text = $"{FindResource("Settings")}",
                    VerticalAlignment = VerticalAlignment.Center,
                    FontSize          = 16,
                    Margin            = new Thickness(2.5, 5, 7.5, 5)
                };
                settingsButtonWrapPanel.Children.Add(settingsButtonIcon);
                settingsButtonWrapPanel.Children.Add(settingsButtonTextBlock);
                settingsButton.Content = settingsButtonWrapPanel;

                //Remove button
                PackIconModern removeButtonIcon = new PackIconModern
                {
                    Kind   = PackIconModernKind.Close,
                    Width  = 35,
                    Height = 35,
                    Margin = new Thickness(5)
                };
                TextBlock removeButtonTextBlock = new TextBlock
                {
                    Text = $"{FindResource("Remove")}",
                    VerticalAlignment = VerticalAlignment.Center,
                    FontSize          = 16,
                    Margin            = new Thickness(2.5, 5, 7.5, 5)
                };
                removeButtonWrapPanel.Children.Add(removeButtonIcon);
                removeButtonWrapPanel.Children.Add(removeButtonTextBlock);
                removeButton.Content = removeButtonWrapPanel;

                GridScrollViewer.Height = GlobalConsts.Current.ActualHeight - 300;
                GridScrollViewer.UpdateLayout();
            });
        }
        private void LoadIMG(IEnumerable<imageData> images)
        {
            panel.Children.Clear();
            foreach (var image in images)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        ImageSource source = new BitmapImage(image.imageUri);
                        Image control = new Image();
                        control.DoubleTap += image_DoubleTap;
                        control.Name = image.imageUri.ToString();
                        control.Height = 60;
                        control.Width = 60;
                        control.Source = source;
                        control.Margin = new System.Windows.Thickness(10, 10, 10, 10);

                        WrapPanel wrap = new WrapPanel();
                        wrap.Children.Add(control);
                        wrap.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                        wrap.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                        panel.Children.Add(wrap);
                    });
            }
        }
Esempio n. 9
0
        private void Start()
        {
            // Window options
            Title  = "OnlyFans";
            Width  = 1000;
            Height = 800;
            WindowStartupLocation = WindowStartupLocation.CenterScreen;

            // Scrolling
            ScrollViewer root = new ScrollViewer();

            root.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            Content = root;

            // Main grid
            Grid grid = new Grid();

            root.Content = grid;
            grid.Margin  = new Thickness(5);
            grid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            grid.RowDefinitions.Add(new RowDefinition());

            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(2, GridUnitType.Star)
            });
            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });

            //Store header text
            TextBlock titleText = new TextBlock
            {
                Text       = "OnlyFans",
                Margin     = new Thickness(20),
                FontFamily = new FontFamily("Comic Sans MS"),
                FontSize   = 25,
            };

            grid.Children.Add(titleText);
            Grid.SetColumn(titleText, 0);
            Grid.SetRow(titleText, 0);

            //Store products
            WrapPanel productPanel = ProductList();

            grid.Children.Add(productPanel);
            Grid.SetColumn(productPanel, 0);
            Grid.SetRow(productPanel, 1);

            //Cart header Text
            TextBlock cartHeaderText = new TextBlock
            {
                Text       = "Cart",
                Margin     = new Thickness(20),
                FontFamily = new FontFamily("Comic Sans MS"),
                FontSize   = 25,
            };

            grid.Children.Add(cartHeaderText);
            Grid.SetColumn(cartHeaderText, 1);
            Grid.SetRow(cartHeaderText, 0);

            //Cart items
            WrapPanel cartPanel = CartList();

            grid.Children.Add(cartPanel);
            Grid.SetColumn(cartPanel, 1);
            Grid.SetRow(cartPanel, 1);

            LoadShoppingCart();
        }
Esempio n. 10
0
        public UserRecordCheck()
        {
            InitializeComponent();

            try
            {
                sortname = int.Parse(Application.Current.Properties["sortnamee"].ToString());
            }
            catch
            {
                sortname = 0;
            }
            try
            {
                sortfin = int.Parse(Application.Current.Properties["sortfinn"].ToString());
            }
            catch
            {
                sortfin = 0;
            }

            if (!(sortname == 0) && !(sortname == 1))
            {
                yuzaname.Background = Brushes.RoyalBlue;
                if (sortname == 2)
                {
                    yuzaname.Content = "▲";
                }
                else if (sortname == 3)
                {
                    yuzaname.Content = "▼";
                }
            }
            else
            {
                if (!(sortfin == 0))
                {
                    yuzaname.Background = Brushes.Gainsboro;
                }
                else
                {
                    yuzaname.Background = Brushes.Coral;
                }
                if (sortname == 0)
                {
                    yuzaname.Content = "▲";
                }
                else if (sortname == 1)
                {
                    yuzaname.Content = "▼";
                }
            }

            if (!(sortfin == 0))
            {
                finlog.Background = Brushes.RoyalBlue;
                if (sortfin == 1)
                {
                    finlog.Content = "▲";
                }
                else if (sortfin == 2)
                {
                    finlog.Content = "▼";
                }
            }
            else
            {
                finlog.Background = Brushes.Gainsboro;
                finlog.Content    = "▲";
            }

            Label[]  label  = new Label[labelNum];
            Button[] button = new Button[buttonNum];

            WrapPanel backbuttons = new WrapPanel();

            Button top_b = new Button()
            {
                Content = "トップ画面", FontSize = 30, Margin = new Thickness(100, 50, 0, 0), Width = 250, Height = 100, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, ClickMode = ClickMode.Press
            };

            top_b.Click += bmodo;
            backbuttons.Children.Add(top_b);

            Button logout_b = new Button()
            {
                Content = "ログアウト", FontSize = 30, Margin = new Thickness(100, 50, 0, 0), Width = 250, Height = 100, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, ClickMode = ClickMode.Press
            };

            logout_b.Click += bout;
            backbuttons.Children.Add(logout_b);

            grid5.Children.Add(backbuttons);

            t_id = int.Parse(Application.Current.Properties["u_id"].ToString());

            DBConnect.Connect("kasiihara.db");

            DBConnect.ExecuteReader("SELECT COUNT(*) as num FROM t_user");
            DBConnect.Reader.Read();
            grid5.Height = 1080 + (int.Parse(DBConnect.Reader[0].ToString()) - 4) * 124;


            if (sortname == 0)
            {
                if (sortfin == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_id";
                }
                else if (sortfin == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate";
                }
                else if (sortfin == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate DESC";
                }
            }
            else if (sortname == 1)
            {
                if (sortfin == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_id DESC";
                }
                else if (sortfin == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate";
                }
                else if (sortfin == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate DESC";
                }
            }
            else if (sortname == 2)
            {
                if (sortfin == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana";
                }
                else if (sortfin == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana, fainal_logindate";
                }
                else if (sortfin == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana, fainal_logindate DESC";
                }
            }
            else if (sortname == 3)
            {
                if (sortfin == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC";
                }
                else if (sortfin == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC, fainal_logindate";
                }
                else if (sortfin == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC, fainal_logindate DESC";
                }
            }


            DBConnect.ExecuteReader(SQL);

            while (DBConnect.Reader.Read())
            {
                label[Lnum] = new Label()
                {
                    Content = DBConnect.Reader[1].ToString(), FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 124, Margin = new Thickness(238, 534.253 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 487, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                grid5.Children.Add(label[Lnum]);
                Lnum++;
                if (!DBConnect.Reader[5].ToString().Equals(""))
                {
                    label[Lnum] = new Label()
                    {
                        Content = DBConnect.Reader[5].ToString(), FontSize = 45, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 124, Margin = new Thickness(725, 534.253 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 487, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                    };
                    grid5.Children.Add(label[Lnum]);
                    Lnum++;
                }
                else
                {
                    label[Lnum] = new Label()
                    {
                        Content = "", FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 124, Margin = new Thickness(725, 534.253 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 487, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                    };
                    grid5.Children.Add(label[Lnum]);
                    Lnum++;
                }

                button[ButtonNum] = new Button()
                {
                    Content = "", FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 90, Margin = new Thickness(1227, 551.253 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 442.8, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                button[ButtonNum].Tag    = DBConnect.Reader[0];
                button[ButtonNum].Click += record;
                grid5.Children.Add(button[ButtonNum]);
                ButtonNum++;


                heightm += 124;
            }

            DBConnect.Dispose();
        }
Esempio n. 11
0
 private void InitializeComponent() {
     this.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     this.SetResourceReference(SoundManager.SoundsProperty, "Sounds");
     InitializeElementResources(this);
     // backgroundGrid element
     this.backgroundGrid = new Grid();
     this.Content = this.backgroundGrid;
     this.backgroundGrid.Name = "backgroundGrid";
     this.backgroundGrid.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     // e_0 element
     this.e_0 = new StackPanel();
     this.backgroundGrid.Children.Add(this.e_0);
     this.e_0.Name = "e_0";
     this.e_0.Height = 120F;
     this.e_0.IsHitTestVisible = true;
     this.e_0.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.e_0.VerticalAlignment = VerticalAlignment.Bottom;
     LinearGradientBrush e_0_Background = new LinearGradientBrush();
     e_0_Background.StartPoint = new PointF(0.5F, 0F);
     e_0_Background.EndPoint = new PointF(0.5F, 1F);
     e_0_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F));
     e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 70, 150, 255), 1F));
     e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.517F));
     e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.204F));
     this.e_0.Background = e_0_Background;
     this.e_0.Orientation = Orientation.Horizontal;
     // e_1 element
     this.e_1 = new StackPanel();
     this.e_0.Children.Add(this.e_1);
     this.e_1.Name = "e_1";
     this.e_1.Height = 100F;
     this.e_1.VerticalAlignment = VerticalAlignment.Bottom;
     this.e_1.Orientation = Orientation.Horizontal;
     // txtDay element
     this.txtDay = new TextBlock();
     this.e_1.Children.Add(this.txtDay);
     this.txtDay.Name = "txtDay";
     this.txtDay.Margin = new Thickness(5F, 75F, 5F, 0F);
     Binding binding_txtDay_Text = new Binding("DaysElapsedValue");
     this.txtDay.SetBinding(TextBlock.TextProperty, binding_txtDay_Text);
     // progTime element
     this.progTime = new ProgressBar();
     this.e_1.Children.Add(this.progTime);
     this.progTime.Name = "progTime";
     this.progTime.Height = 20F;
     this.progTime.Width = 200F;
     this.progTime.Margin = new Thickness(5F, 70F, 5F, 0F);
     Binding binding_progTime_Maximum = new Binding("MaxHours");
     this.progTime.SetBinding(ProgressBar.MaximumProperty, binding_progTime_Maximum);
     Binding binding_progTime_Value = new Binding("TimeElapsedValue");
     this.progTime.SetBinding(ProgressBar.ValueProperty, binding_progTime_Value);
     // e_2 element
     this.e_2 = new Border();
     this.e_1.Children.Add(this.e_2);
     this.e_2.Name = "e_2";
     this.e_2.Height = 22F;
     this.e_2.Width = 32F;
     this.e_2.Margin = new Thickness(0F, 70F, 0F, 0F);
     this.e_2.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F);
     Binding binding_e_2_BorderBrush = new Binding("Speed0Colour");
     this.e_2.SetBinding(Border.BorderBrushProperty, binding_e_2_BorderBrush);
     // e_3 element
     this.e_3 = new Button();
     this.e_2.Child = this.e_3;
     this.e_3.Name = "e_3";
     this.e_3.Height = 20F;
     this.e_3.Width = 30F;
     this.e_3.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F);
     this.e_3.Content = "II";
     Binding binding_e_3_IsEnabled = new Binding("IsUIEnabled");
     this.e_3.SetBinding(Button.IsEnabledProperty, binding_e_3_IsEnabled);
     Binding binding_e_3_Command = new Binding("Speed0Command");
     this.e_3.SetBinding(Button.CommandProperty, binding_e_3_Command);
     // e_4 element
     this.e_4 = new Border();
     this.e_1.Children.Add(this.e_4);
     this.e_4.Name = "e_4";
     this.e_4.Height = 22F;
     this.e_4.Width = 32F;
     this.e_4.Margin = new Thickness(0F, 70F, 0F, 0F);
     this.e_4.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F);
     Binding binding_e_4_BorderBrush = new Binding("Speed1Colour");
     this.e_4.SetBinding(Border.BorderBrushProperty, binding_e_4_BorderBrush);
     // e_5 element
     this.e_5 = new Button();
     this.e_4.Child = this.e_5;
     this.e_5.Name = "e_5";
     this.e_5.Height = 20F;
     this.e_5.Width = 30F;
     this.e_5.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F);
     this.e_5.Content = ">";
     Binding binding_e_5_IsEnabled = new Binding("IsUIEnabled");
     this.e_5.SetBinding(Button.IsEnabledProperty, binding_e_5_IsEnabled);
     Binding binding_e_5_Command = new Binding("Speed1Command");
     this.e_5.SetBinding(Button.CommandProperty, binding_e_5_Command);
     // e_6 element
     this.e_6 = new Border();
     this.e_1.Children.Add(this.e_6);
     this.e_6.Name = "e_6";
     this.e_6.Height = 22F;
     this.e_6.Width = 32F;
     this.e_6.Margin = new Thickness(0F, 70F, 0F, 0F);
     this.e_6.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F);
     Binding binding_e_6_BorderBrush = new Binding("Speed2Colour");
     this.e_6.SetBinding(Border.BorderBrushProperty, binding_e_6_BorderBrush);
     // e_7 element
     this.e_7 = new Button();
     this.e_6.Child = this.e_7;
     this.e_7.Name = "e_7";
     this.e_7.Height = 20F;
     this.e_7.Width = 30F;
     this.e_7.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F);
     this.e_7.Content = ">>";
     Binding binding_e_7_IsEnabled = new Binding("IsUIEnabled");
     this.e_7.SetBinding(Button.IsEnabledProperty, binding_e_7_IsEnabled);
     Binding binding_e_7_Command = new Binding("Speed2Command");
     this.e_7.SetBinding(Button.CommandProperty, binding_e_7_Command);
     // e_8 element
     this.e_8 = new Border();
     this.e_1.Children.Add(this.e_8);
     this.e_8.Name = "e_8";
     this.e_8.Height = 22F;
     this.e_8.Width = 32F;
     this.e_8.Margin = new Thickness(0F, 70F, 0F, 0F);
     this.e_8.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F);
     Binding binding_e_8_BorderBrush = new Binding("Speed3Colour");
     this.e_8.SetBinding(Border.BorderBrushProperty, binding_e_8_BorderBrush);
     // e_9 element
     this.e_9 = new Button();
     this.e_8.Child = this.e_9;
     this.e_9.Name = "e_9";
     this.e_9.Height = 20F;
     this.e_9.Width = 30F;
     this.e_9.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F);
     this.e_9.Content = ">>>";
     Binding binding_e_9_IsEnabled = new Binding("IsUIEnabled");
     this.e_9.SetBinding(Button.IsEnabledProperty, binding_e_9_IsEnabled);
     Binding binding_e_9_Command = new Binding("Speed3Command");
     this.e_9.SetBinding(Button.CommandProperty, binding_e_9_Command);
     // e_10 element
     this.e_10 = new StackPanel();
     this.e_0.Children.Add(this.e_10);
     this.e_10.Name = "e_10";
     this.e_10.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_10_DataContext = new Binding("PlanetBuildingsData");
     this.e_10.SetBinding(StackPanel.DataContextProperty, binding_e_10_DataContext);
     Binding binding_e_10_Visibility = new Binding("InfoVisibility");
     this.e_10.SetBinding(StackPanel.VisibilityProperty, binding_e_10_Visibility);
     // e_11 element
     this.e_11 = new Border();
     this.e_10.Children.Add(this.e_11);
     this.e_11.Name = "e_11";
     this.e_11.Height = 45F;
     this.e_11.Margin = new Thickness(5F, 0F, 0F, 0F);
     this.e_11.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.e_11.VerticalAlignment = VerticalAlignment.Bottom;
     this.e_11.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     LinearGradientBrush e_11_BorderBrush = new LinearGradientBrush();
     e_11_BorderBrush.StartPoint = new PointF(0.5F, 0F);
     e_11_BorderBrush.EndPoint = new PointF(0.5F, 1F);
     e_11_BorderBrush.SpreadMethod = GradientSpreadMethod.Pad;
     e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F));
     e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.387F));
     this.e_11.BorderBrush = e_11_BorderBrush;
     this.e_11.BorderThickness = new Thickness(2F, 2F, 2F, 2F);
     Binding binding_e_11_Visibility = new Binding("HasBuildQueue");
     this.e_11.SetBinding(Border.VisibilityProperty, binding_e_11_Visibility);
     // e_12 element
     this.e_12 = new StackPanel();
     this.e_11.Child = this.e_12;
     this.e_12.Name = "e_12";
     this.e_12.HorizontalAlignment = HorizontalAlignment.Stretch;
     LinearGradientBrush e_12_Background = new LinearGradientBrush();
     e_12_Background.StartPoint = new PointF(0.5F, 0F);
     e_12_Background.EndPoint = new PointF(0.5F, 1F);
     e_12_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_12_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_12_Background.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F));
     e_12_Background.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.263F));
     this.e_12.Background = e_12_Background;
     this.e_12.Orientation = Orientation.Horizontal;
     // e_13 element
     this.e_13 = new Button();
     this.e_12.Children.Add(this.e_13);
     this.e_13.Name = "e_13";
     this.e_13.Height = 40F;
     this.e_13.Width = 40F;
     this.e_13.Opacity = 0F;
     this.e_13.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     Binding binding_e_13_IsEnabled = new Binding("IsUIEnabled");
     this.e_13.SetBinding(Button.IsEnabledProperty, binding_e_13_IsEnabled);
     // e_14 element
     this.e_14 = new Border();
     this.e_12.Children.Add(this.e_14);
     this.e_14.Name = "e_14";
     this.e_14.Height = 40F;
     this.e_14.Margin = new Thickness(-40F, 0F, 0F, -5F);
     this.e_14.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.e_14.VerticalAlignment = VerticalAlignment.Bottom;
     this.e_14.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     LinearGradientBrush e_14_BorderBrush = new LinearGradientBrush();
     e_14_BorderBrush.StartPoint = new PointF(0.5F, 0F);
     e_14_BorderBrush.EndPoint = new PointF(0.5F, 1F);
     e_14_BorderBrush.SpreadMethod = GradientSpreadMethod.Pad;
     e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F));
     e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.237F));
     this.e_14.BorderBrush = e_14_BorderBrush;
     this.e_14.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F);
     // e_15 element
     this.e_15 = new Image();
     this.e_14.Child = this.e_15;
     this.e_15.Name = "e_15";
     this.e_15.Height = 40F;
     this.e_15.Width = 40F;
     Binding binding_e_15_Source = new Binding("BuildQueueCurrentImage");
     this.e_15.SetBinding(Image.SourceProperty, binding_e_15_Source);
     // e_16 element
     this.e_16 = new ProgressBar();
     this.e_12.Children.Add(this.e_16);
     this.e_16.Name = "e_16";
     this.e_16.Height = 10F;
     this.e_16.Width = 43F;
     this.e_16.Margin = new Thickness(-43F, 0F, 0F, -5F);
     this.e_16.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_16_Maximum = new Binding("QueueItemMaxBuildTime");
     this.e_16.SetBinding(ProgressBar.MaximumProperty, binding_e_16_Maximum);
     Binding binding_e_16_Value = new Binding("CurrentQueueItemElapsedTime");
     this.e_16.SetBinding(ProgressBar.ValueProperty, binding_e_16_Value);
     // e_17 element
     this.e_17 = new ListBox();
     this.e_12.Children.Add(this.e_17);
     this.e_17.Name = "e_17";
     this.e_17.Height = 35F;
     this.e_17.Width = 200F;
     this.e_17.Margin = new Thickness(0F, 0F, 0F, -5F);
     this.e_17.VerticalAlignment = VerticalAlignment.Bottom;
     this.e_17.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     Func<UIElement, UIElement> e_17_iptFunc = e_17_iptMethod;
     ControlTemplate e_17_ipt = new ControlTemplate(e_17_iptFunc);
     this.e_17.ItemsPanel = e_17_ipt;
     Grid.SetColumn(this.e_17, 0);
     ScrollViewer.SetVerticalScrollBarVisibility(this.e_17, ScrollBarVisibility.Hidden);
     Binding binding_e_17_IsEnabled = new Binding("IsUIEnabled");
     this.e_17.SetBinding(ListBox.IsEnabledProperty, binding_e_17_IsEnabled);
     Binding binding_e_17_ItemsSource = new Binding("BuildQueue");
     this.e_17.SetBinding(ListBox.ItemsSourceProperty, binding_e_17_ItemsSource);
     Binding binding_e_17_SelectedIndex = new Binding("SelectedBuildQueueItem");
     this.e_17.SetBinding(ListBox.SelectedIndexProperty, binding_e_17_SelectedIndex);
     // e_19 element
     this.e_19 = new DockPanel();
     this.backgroundGrid.Children.Add(this.e_19);
     this.e_19.Name = "e_19";
     this.e_19.Height = 120F;
     this.e_19.IsHitTestVisible = true;
     this.e_19.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.e_19.VerticalAlignment = VerticalAlignment.Top;
     LinearGradientBrush e_19_Background = new LinearGradientBrush();
     e_19_Background.StartPoint = new PointF(0.5F, 0F);
     e_19_Background.EndPoint = new PointF(0.5F, 1F);
     e_19_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F));
     e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 1F));
     e_19_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 0F));
     e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.364F));
     e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.758F));
     this.e_19.Background = e_19_Background;
     this.e_19.LastChildFill = false;
     Binding binding_e_19_IsEnabled = new Binding("IsUIEnabled");
     this.e_19.SetBinding(DockPanel.IsEnabledProperty, binding_e_19_IsEnabled);
     // btnMoney element
     this.btnMoney = new Button();
     this.e_19.Children.Add(this.btnMoney);
     this.btnMoney.Name = "btnMoney";
     this.btnMoney.Height = 25F;
     this.btnMoney.Width = 150F;
     this.btnMoney.Margin = new Thickness(15F, 10F, 0F, 0F);
     this.btnMoney.HorizontalAlignment = HorizontalAlignment.Left;
     this.btnMoney.VerticalAlignment = VerticalAlignment.Top;
     this.btnMoney.Opacity = 0.8F;
     this.btnMoney.BorderBrush = new SolidColorBrush(new ColorW(255, 255, 255, 255));
     this.btnMoney.Content = "";
     Binding binding_btnMoney_IsEnabled = new Binding("IsUIEnabled");
     this.btnMoney.SetBinding(Button.IsEnabledProperty, binding_btnMoney_IsEnabled);
     Binding binding_btnMoney_Command = new Binding("MoneyCommand");
     this.btnMoney.SetBinding(Button.CommandProperty, binding_btnMoney_Command);
     // e_20 element
     this.e_20 = new Border();
     this.e_19.Children.Add(this.e_20);
     this.e_20.Name = "e_20";
     this.e_20.Height = 25F;
     this.e_20.Width = 150F;
     this.e_20.IsHitTestVisible = false;
     this.e_20.Margin = new Thickness(-150F, 10F, 0F, 0F);
     this.e_20.HorizontalAlignment = HorizontalAlignment.Left;
     this.e_20.VerticalAlignment = VerticalAlignment.Top;
     this.e_20.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     this.e_20.BorderBrush = new SolidColorBrush(new ColorW(255, 228, 59, 255));
     this.e_20.BorderThickness = new Thickness(1F, 1F, 1F, 1F);
     // e_21 element
     this.e_21 = new TextBlock();
     this.e_20.Child = this.e_21;
     this.e_21.Name = "e_21";
     this.e_21.Height = 25F;
     this.e_21.Width = 150F;
     this.e_21.IsHitTestVisible = false;
     this.e_21.Margin = new Thickness(5F, 5F, 0F, 0F);
     this.e_21.HorizontalAlignment = HorizontalAlignment.Center;
     this.e_21.VerticalAlignment = VerticalAlignment.Center;
     this.e_21.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     this.e_21.Padding = new Thickness(5F, 0F, 5F, 0F);
     Binding binding_e_21_Text = new Binding("MoneyText");
     this.e_21.SetBinding(TextBlock.TextProperty, binding_e_21_Text);
     // txtNet element
     this.txtNet = new TextBlock();
     this.e_19.Children.Add(this.txtNet);
     this.txtNet.Name = "txtNet";
     this.txtNet.Height = 20F;
     this.txtNet.Width = 50F;
     this.txtNet.Margin = new Thickness(2F, 0F, 0F, 80F);
     this.txtNet.Foreground = new SolidColorBrush(new ColorW(255, 228, 59, 255));
     ToolTipService.SetInitialShowDelay(this.txtNet, 0);
     Binding binding_txtNet_Text = new Binding("NetText");
     this.txtNet.SetBinding(TextBlock.TextProperty, binding_txtNet_Text);
     // btnMenu element
     this.btnMenu = new Button();
     this.e_19.Children.Add(this.btnMenu);
     this.btnMenu.Name = "btnMenu";
     this.btnMenu.Height = 45F;
     this.btnMenu.Width = 45F;
     this.btnMenu.Margin = new Thickness(0F, 0F, 10F, 0F);
     this.btnMenu.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.btnMenu.VerticalAlignment = VerticalAlignment.Top;
     this.btnMenu.Opacity = 0F;
     DockPanel.SetDock(this.btnMenu, Dock.Right);
     Binding binding_btnMenu_IsEnabled = new Binding("IsUIEnabled");
     this.btnMenu.SetBinding(Button.IsEnabledProperty, binding_btnMenu_IsEnabled);
     Binding binding_btnMenu_Command = new Binding("PauseCommand");
     this.btnMenu.SetBinding(Button.CommandProperty, binding_btnMenu_Command);
     // Gear element
     this.Gear = new Image();
     this.e_19.Children.Add(this.Gear);
     this.Gear.Name = "Gear";
     this.Gear.Height = 45F;
     this.Gear.Width = 45F;
     this.Gear.IsHitTestVisible = false;
     this.Gear.Margin = new Thickness(0F, 0F, -45F, 0F);
     this.Gear.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.Gear.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Gear_bm = new BitmapImage();
     Gear_bm.TextureAsset = "ImagesUI\\gear";
     this.Gear.Source = Gear_bm;
     this.Gear.Stretch = Stretch.UniformToFill;
     DockPanel.SetDock(this.Gear, Dock.Right);
     // e_22 element
     this.e_22 = new ListBox();
     this.e_19.Children.Add(this.e_22);
     this.e_22.Name = "e_22";
     this.e_22.Height = 55F;
     this.e_22.Margin = new Thickness(10F, -60F, 0F, 0F);
     this.e_22.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     Func<UIElement, UIElement> e_22_iptFunc = e_22_iptMethod;
     ControlTemplate e_22_ipt = new ControlTemplate(e_22_iptFunc);
     this.e_22.ItemsPanel = e_22_ipt;
     this.e_22.ItemsSource = Get_e_22_Items();
     Binding binding_e_22_IsEnabled = new Binding("IsUIEnabled");
     this.e_22.SetBinding(ListBox.IsEnabledProperty, binding_e_22_IsEnabled);
     Binding binding_e_22_SelectedIndex = new Binding("SelectedResourcesIndex");
     this.e_22.SetBinding(ListBox.SelectedIndexProperty, binding_e_22_SelectedIndex);
     // e_32 element
     this.e_32 = new StackPanel();
     this.backgroundGrid.Children.Add(this.e_32);
     this.e_32.Name = "e_32";
     this.e_32.Width = 190F;
     this.e_32.IsHitTestVisible = true;
     this.e_32.Margin = new Thickness(0F, 150F, 0F, 130F);
     this.e_32.HorizontalAlignment = HorizontalAlignment.Left;
     this.e_32.VerticalAlignment = VerticalAlignment.Stretch;
     LinearGradientBrush e_32_Background = new LinearGradientBrush();
     e_32_Background.StartPoint = new PointF(0F, 1F);
     e_32_Background.EndPoint = new PointF(1F, 1F);
     e_32_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F));
     e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 1F));
     e_32_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 0F));
     e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.664F));
     e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.864F));
     this.e_32.Background = e_32_Background;
     this.e_32.Orientation = Orientation.Vertical;
     Binding binding_e_32_Visibility = new Binding("InfoVisibility");
     this.e_32.SetBinding(StackPanel.VisibilityProperty, binding_e_32_Visibility);
     // txtOwner element
     this.txtOwner = new TextBlock();
     this.e_32.Children.Add(this.txtOwner);
     this.txtOwner.Name = "txtOwner";
     this.txtOwner.Margin = new Thickness(0F, 5F, 25F, 5F);
     this.txtOwner.TextWrapping = TextWrapping.Wrap;
     Binding binding_txtOwner_Text = new Binding("OwnedBy");
     this.txtOwner.SetBinding(TextBlock.TextProperty, binding_txtOwner_Text);
     // txtSysID element
     this.txtSysID = new TextBlock();
     this.e_32.Children.Add(this.txtSysID);
     this.txtSysID.Name = "txtSysID";
     this.txtSysID.Margin = new Thickness(0F, 5F, 25F, 5F);
     this.txtSysID.TextWrapping = TextWrapping.Wrap;
     Binding binding_txtSysID_Text = new Binding("SystemName");
     this.txtSysID.SetBinding(TextBlock.TextProperty, binding_txtSysID_Text);
     // txtNumPlanets element
     this.txtNumPlanets = new TextBlock();
     this.e_32.Children.Add(this.txtNumPlanets);
     this.txtNumPlanets.Name = "txtNumPlanets";
     this.txtNumPlanets.Margin = new Thickness(0F, 5F, 25F, 5F);
     this.txtNumPlanets.TextWrapping = TextWrapping.Wrap;
     Binding binding_txtNumPlanets_Text = new Binding("NumberPlanets");
     this.txtNumPlanets.SetBinding(TextBlock.TextProperty, binding_txtNumPlanets_Text);
     // txtPlanets element
     this.txtPlanets = new TextBlock();
     this.e_32.Children.Add(this.txtPlanets);
     this.txtPlanets.Name = "txtPlanets";
     this.txtPlanets.Margin = new Thickness(0F, 5F, 25F, 5F);
     this.txtPlanets.Text = "Planets List: ";
     this.txtPlanets.TextWrapping = TextWrapping.Wrap;
     // comboPlanets element
     this.comboPlanets = new ComboBox();
     this.e_32.Children.Add(this.comboPlanets);
     this.comboPlanets.Name = "comboPlanets";
     this.comboPlanets.Focusable = false;
     this.comboPlanets.Margin = new Thickness(0F, 5F, 55F, 5F);
     Binding binding_comboPlanets_IsEnabled = new Binding("IsUIEnabled");
     this.comboPlanets.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlanets_IsEnabled);
     Binding binding_comboPlanets_ItemsSource = new Binding("PlanetsList");
     this.comboPlanets.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlanets_ItemsSource);
     Binding binding_comboPlanets_SelectedItem = new Binding("PlanetSelectedIndex");
     this.comboPlanets.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlanets_SelectedItem);
     Binding binding_comboPlanets_IsDropDownOpen = new Binding("PlanetsComboBoxDropDownOpen");
     this.comboPlanets.SetBinding(ComboBox.IsDropDownOpenProperty, binding_comboPlanets_IsDropDownOpen);
     // btnViewPlanetInfo element
     this.btnViewPlanetInfo = new Button();
     this.e_32.Children.Add(this.btnViewPlanetInfo);
     this.btnViewPlanetInfo.Name = "btnViewPlanetInfo";
     this.btnViewPlanetInfo.Margin = new Thickness(0F, 5F, 55F, 5F);
     this.btnViewPlanetInfo.Content = "Toggle Planet Info";
     Binding binding_btnViewPlanetInfo_IsEnabled = new Binding("IsUIEnabled");
     this.btnViewPlanetInfo.SetBinding(Button.IsEnabledProperty, binding_btnViewPlanetInfo_IsEnabled);
     Binding binding_btnViewPlanetInfo_Command = new Binding("PlanetInfoCommand");
     this.btnViewPlanetInfo.SetBinding(Button.CommandProperty, binding_btnViewPlanetInfo_Command);
     // txtStations element
     this.txtStations = new TextBlock();
     this.e_32.Children.Add(this.txtStations);
     this.txtStations.Name = "txtStations";
     this.txtStations.Margin = new Thickness(0F, 5F, 25F, 5F);
     this.txtStations.Text = "Space Stations List: ";
     this.txtStations.TextWrapping = TextWrapping.Wrap;
     // comboStations element
     this.comboStations = new ComboBox();
     this.e_32.Children.Add(this.comboStations);
     this.comboStations.Name = "comboStations";
     this.comboStations.Focusable = false;
     this.comboStations.Margin = new Thickness(0F, 5F, 55F, 5F);
     Binding binding_comboStations_IsEnabled = new Binding("IsUIEnabled");
     this.comboStations.SetBinding(ComboBox.IsEnabledProperty, binding_comboStations_IsEnabled);
     Binding binding_comboStations_ItemsSource = new Binding("StationsList");
     this.comboStations.SetBinding(ComboBox.ItemsSourceProperty, binding_comboStations_ItemsSource);
     Binding binding_comboStations_SelectedItem = new Binding("StationsSelectedIndex");
     this.comboStations.SetBinding(ComboBox.SelectedItemProperty, binding_comboStations_SelectedItem);
     Binding binding_comboStations_IsDropDownOpen = new Binding("StationsComboBoxDropDownOpen");
     this.comboStations.SetBinding(ComboBox.IsDropDownOpenProperty, binding_comboStations_IsDropDownOpen);
     // btnViewStationsInfo element
     this.btnViewStationsInfo = new Button();
     this.e_32.Children.Add(this.btnViewStationsInfo);
     this.btnViewStationsInfo.Name = "btnViewStationsInfo";
     this.btnViewStationsInfo.Margin = new Thickness(0F, 5F, 55F, 5F);
     this.btnViewStationsInfo.Content = "Toggle Station Info";
     Binding binding_btnViewStationsInfo_IsEnabled = new Binding("IsUIEnabled");
     this.btnViewStationsInfo.SetBinding(Button.IsEnabledProperty, binding_btnViewStationsInfo_IsEnabled);
     Binding binding_btnViewStationsInfo_Command = new Binding("StationInfoCommand");
     this.btnViewStationsInfo.SetBinding(Button.CommandProperty, binding_btnViewStationsInfo_Command);
     // e_33 element
     this.e_33 = new StackPanel();
     this.backgroundGrid.Children.Add(this.e_33);
     this.e_33.Name = "e_33";
     this.e_33.Height = 143F;
     this.e_33.Width = 180F;
     this.e_33.Margin = new Thickness(0F, 0F, 0F, 120F);
     this.e_33.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_33.VerticalAlignment = VerticalAlignment.Bottom;
     LinearGradientBrush e_33_Background = new LinearGradientBrush();
     e_33_Background.StartPoint = new PointF(0F, 1F);
     e_33_Background.EndPoint = new PointF(1F, 1F);
     e_33_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_33_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F));
     e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F));
     e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F));
     this.e_33.Background = e_33_Background;
     this.e_33.Orientation = Orientation.Vertical;
     Binding binding_e_33_Visibility = new Binding("miniMapVisibility");
     this.e_33.SetBinding(StackPanel.VisibilityProperty, binding_e_33_Visibility);
     // e_34 element
     this.e_34 = new WrapPanel();
     this.e_33.Children.Add(this.e_34);
     this.e_34.Name = "e_34";
     this.e_34.Margin = new Thickness(55F, 16F, 15F, 0F);
     Binding binding_e_34_DataContext = new Binding("MiniMapData");
     this.e_34.SetBinding(WrapPanel.DataContextProperty, binding_e_34_DataContext);
     // e_35 element
     this.e_35 = new Button();
     this.e_34.Children.Add(this.e_35);
     this.e_35.Name = "e_35";
     this.e_35.Height = 22F;
     this.e_35.Width = 22F;
     this.e_35.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_35, 0);
     Binding binding_e_35_ToolTip = new Binding("btn1TT");
     this.e_35.SetBinding(Button.ToolTipProperty, binding_e_35_ToolTip);
     Binding binding_e_35_IsEnabled = new Binding("IsUIEnabled");
     this.e_35.SetBinding(Button.IsEnabledProperty, binding_e_35_IsEnabled);
     Binding binding_e_35_Command = new Binding("btn1Command");
     this.e_35.SetBinding(Button.CommandProperty, binding_e_35_Command);
     // e_36 element
     this.e_36 = new TextBlock();
     this.e_35.Content = this.e_36;
     this.e_36.Name = "e_36";
     this.e_36.IsHitTestVisible = false;
     this.e_36.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_36_Foreground = new Binding("btn1Colour");
     this.e_36.SetBinding(TextBlock.ForegroundProperty, binding_e_36_Foreground);
     Binding binding_e_36_Text = new Binding("btn1Text");
     this.e_36.SetBinding(TextBlock.TextProperty, binding_e_36_Text);
     // e_37 element
     this.e_37 = new Button();
     this.e_34.Children.Add(this.e_37);
     this.e_37.Name = "e_37";
     this.e_37.Height = 22F;
     this.e_37.Width = 22F;
     this.e_37.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_37, 0);
     Binding binding_e_37_ToolTip = new Binding("btn2TT");
     this.e_37.SetBinding(Button.ToolTipProperty, binding_e_37_ToolTip);
     Binding binding_e_37_IsEnabled = new Binding("IsUIEnabled");
     this.e_37.SetBinding(Button.IsEnabledProperty, binding_e_37_IsEnabled);
     Binding binding_e_37_Command = new Binding("btn2Command");
     this.e_37.SetBinding(Button.CommandProperty, binding_e_37_Command);
     // e_38 element
     this.e_38 = new TextBlock();
     this.e_37.Content = this.e_38;
     this.e_38.Name = "e_38";
     this.e_38.IsHitTestVisible = false;
     this.e_38.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_38_Foreground = new Binding("btn2Colour");
     this.e_38.SetBinding(TextBlock.ForegroundProperty, binding_e_38_Foreground);
     Binding binding_e_38_Text = new Binding("btn2Text");
     this.e_38.SetBinding(TextBlock.TextProperty, binding_e_38_Text);
     // e_39 element
     this.e_39 = new Button();
     this.e_34.Children.Add(this.e_39);
     this.e_39.Name = "e_39";
     this.e_39.Height = 22F;
     this.e_39.Width = 22F;
     this.e_39.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_39, 0);
     Binding binding_e_39_ToolTip = new Binding("btn3TT");
     this.e_39.SetBinding(Button.ToolTipProperty, binding_e_39_ToolTip);
     Binding binding_e_39_IsEnabled = new Binding("IsUIEnabled");
     this.e_39.SetBinding(Button.IsEnabledProperty, binding_e_39_IsEnabled);
     Binding binding_e_39_Command = new Binding("btn3Command");
     this.e_39.SetBinding(Button.CommandProperty, binding_e_39_Command);
     // e_40 element
     this.e_40 = new TextBlock();
     this.e_39.Content = this.e_40;
     this.e_40.Name = "e_40";
     this.e_40.IsHitTestVisible = false;
     this.e_40.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_40_Foreground = new Binding("btn3Colour");
     this.e_40.SetBinding(TextBlock.ForegroundProperty, binding_e_40_Foreground);
     Binding binding_e_40_Text = new Binding("btn3Text");
     this.e_40.SetBinding(TextBlock.TextProperty, binding_e_40_Text);
     // e_41 element
     this.e_41 = new Button();
     this.e_34.Children.Add(this.e_41);
     this.e_41.Name = "e_41";
     this.e_41.Height = 22F;
     this.e_41.Width = 22F;
     this.e_41.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_41, 0);
     Binding binding_e_41_ToolTip = new Binding("btn4TT");
     this.e_41.SetBinding(Button.ToolTipProperty, binding_e_41_ToolTip);
     Binding binding_e_41_IsEnabled = new Binding("IsUIEnabled");
     this.e_41.SetBinding(Button.IsEnabledProperty, binding_e_41_IsEnabled);
     Binding binding_e_41_Command = new Binding("btn4Command");
     this.e_41.SetBinding(Button.CommandProperty, binding_e_41_Command);
     // e_42 element
     this.e_42 = new TextBlock();
     this.e_41.Content = this.e_42;
     this.e_42.Name = "e_42";
     this.e_42.IsHitTestVisible = false;
     this.e_42.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_42_Foreground = new Binding("btn4Colour");
     this.e_42.SetBinding(TextBlock.ForegroundProperty, binding_e_42_Foreground);
     Binding binding_e_42_Text = new Binding("btn4Text");
     this.e_42.SetBinding(TextBlock.TextProperty, binding_e_42_Text);
     // e_43 element
     this.e_43 = new Button();
     this.e_34.Children.Add(this.e_43);
     this.e_43.Name = "e_43";
     this.e_43.Height = 22F;
     this.e_43.Width = 22F;
     this.e_43.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_43, 0);
     Binding binding_e_43_ToolTip = new Binding("btn5TT");
     this.e_43.SetBinding(Button.ToolTipProperty, binding_e_43_ToolTip);
     Binding binding_e_43_IsEnabled = new Binding("IsUIEnabled");
     this.e_43.SetBinding(Button.IsEnabledProperty, binding_e_43_IsEnabled);
     Binding binding_e_43_Command = new Binding("btn5Command");
     this.e_43.SetBinding(Button.CommandProperty, binding_e_43_Command);
     // e_44 element
     this.e_44 = new TextBlock();
     this.e_43.Content = this.e_44;
     this.e_44.Name = "e_44";
     this.e_44.IsHitTestVisible = false;
     this.e_44.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_44_Foreground = new Binding("btn5Colour");
     this.e_44.SetBinding(TextBlock.ForegroundProperty, binding_e_44_Foreground);
     Binding binding_e_44_Text = new Binding("btn5Text");
     this.e_44.SetBinding(TextBlock.TextProperty, binding_e_44_Text);
     // e_45 element
     this.e_45 = new Button();
     this.e_34.Children.Add(this.e_45);
     this.e_45.Name = "e_45";
     this.e_45.Height = 22F;
     this.e_45.Width = 22F;
     this.e_45.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_45, 0);
     Binding binding_e_45_ToolTip = new Binding("btn6TT");
     this.e_45.SetBinding(Button.ToolTipProperty, binding_e_45_ToolTip);
     Binding binding_e_45_IsEnabled = new Binding("IsUIEnabled");
     this.e_45.SetBinding(Button.IsEnabledProperty, binding_e_45_IsEnabled);
     Binding binding_e_45_Command = new Binding("btn6Command");
     this.e_45.SetBinding(Button.CommandProperty, binding_e_45_Command);
     // e_46 element
     this.e_46 = new TextBlock();
     this.e_45.Content = this.e_46;
     this.e_46.Name = "e_46";
     this.e_46.IsHitTestVisible = false;
     this.e_46.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_46_Foreground = new Binding("btn6Colour");
     this.e_46.SetBinding(TextBlock.ForegroundProperty, binding_e_46_Foreground);
     Binding binding_e_46_Text = new Binding("btn6Text");
     this.e_46.SetBinding(TextBlock.TextProperty, binding_e_46_Text);
     // e_47 element
     this.e_47 = new Button();
     this.e_34.Children.Add(this.e_47);
     this.e_47.Name = "e_47";
     this.e_47.Height = 22F;
     this.e_47.Width = 22F;
     this.e_47.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_47, 0);
     Binding binding_e_47_ToolTip = new Binding("btn7TT");
     this.e_47.SetBinding(Button.ToolTipProperty, binding_e_47_ToolTip);
     Binding binding_e_47_IsEnabled = new Binding("IsUIEnabled");
     this.e_47.SetBinding(Button.IsEnabledProperty, binding_e_47_IsEnabled);
     Binding binding_e_47_Command = new Binding("btn7Command");
     this.e_47.SetBinding(Button.CommandProperty, binding_e_47_Command);
     // e_48 element
     this.e_48 = new TextBlock();
     this.e_47.Content = this.e_48;
     this.e_48.Name = "e_48";
     this.e_48.IsHitTestVisible = false;
     this.e_48.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_48_Foreground = new Binding("btn7Colour");
     this.e_48.SetBinding(TextBlock.ForegroundProperty, binding_e_48_Foreground);
     Binding binding_e_48_Text = new Binding("btn7Text");
     this.e_48.SetBinding(TextBlock.TextProperty, binding_e_48_Text);
     // e_49 element
     this.e_49 = new Button();
     this.e_34.Children.Add(this.e_49);
     this.e_49.Name = "e_49";
     this.e_49.Height = 22F;
     this.e_49.Width = 22F;
     this.e_49.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_49, 0);
     Binding binding_e_49_ToolTip = new Binding("btn8TT");
     this.e_49.SetBinding(Button.ToolTipProperty, binding_e_49_ToolTip);
     Binding binding_e_49_IsEnabled = new Binding("IsUIEnabled");
     this.e_49.SetBinding(Button.IsEnabledProperty, binding_e_49_IsEnabled);
     Binding binding_e_49_Command = new Binding("btn8Command");
     this.e_49.SetBinding(Button.CommandProperty, binding_e_49_Command);
     // e_50 element
     this.e_50 = new TextBlock();
     this.e_49.Content = this.e_50;
     this.e_50.Name = "e_50";
     this.e_50.IsHitTestVisible = false;
     this.e_50.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_50_Foreground = new Binding("btn8Colour");
     this.e_50.SetBinding(TextBlock.ForegroundProperty, binding_e_50_Foreground);
     Binding binding_e_50_Text = new Binding("btn8Text");
     this.e_50.SetBinding(TextBlock.TextProperty, binding_e_50_Text);
     // e_51 element
     this.e_51 = new Button();
     this.e_34.Children.Add(this.e_51);
     this.e_51.Name = "e_51";
     this.e_51.Height = 22F;
     this.e_51.Width = 22F;
     this.e_51.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_51, 0);
     Binding binding_e_51_ToolTip = new Binding("btn9TT");
     this.e_51.SetBinding(Button.ToolTipProperty, binding_e_51_ToolTip);
     Binding binding_e_51_IsEnabled = new Binding("IsUIEnabled");
     this.e_51.SetBinding(Button.IsEnabledProperty, binding_e_51_IsEnabled);
     Binding binding_e_51_Command = new Binding("btn9Command");
     this.e_51.SetBinding(Button.CommandProperty, binding_e_51_Command);
     // e_52 element
     this.e_52 = new TextBlock();
     this.e_51.Content = this.e_52;
     this.e_52.Name = "e_52";
     this.e_52.IsHitTestVisible = false;
     this.e_52.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_52_Foreground = new Binding("btn9Colour");
     this.e_52.SetBinding(TextBlock.ForegroundProperty, binding_e_52_Foreground);
     Binding binding_e_52_Text = new Binding("btn9Text");
     this.e_52.SetBinding(TextBlock.TextProperty, binding_e_52_Text);
     // e_53 element
     this.e_53 = new Button();
     this.e_34.Children.Add(this.e_53);
     this.e_53.Name = "e_53";
     this.e_53.Height = 22F;
     this.e_53.Width = 22F;
     this.e_53.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_53, 0);
     Binding binding_e_53_ToolTip = new Binding("btn10TT");
     this.e_53.SetBinding(Button.ToolTipProperty, binding_e_53_ToolTip);
     Binding binding_e_53_IsEnabled = new Binding("IsUIEnabled");
     this.e_53.SetBinding(Button.IsEnabledProperty, binding_e_53_IsEnabled);
     Binding binding_e_53_Command = new Binding("btn10Command");
     this.e_53.SetBinding(Button.CommandProperty, binding_e_53_Command);
     // e_54 element
     this.e_54 = new TextBlock();
     this.e_53.Content = this.e_54;
     this.e_54.Name = "e_54";
     this.e_54.IsHitTestVisible = false;
     this.e_54.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_54_Foreground = new Binding("btn10Colour");
     this.e_54.SetBinding(TextBlock.ForegroundProperty, binding_e_54_Foreground);
     Binding binding_e_54_Text = new Binding("btn10Text");
     this.e_54.SetBinding(TextBlock.TextProperty, binding_e_54_Text);
     // e_55 element
     this.e_55 = new Button();
     this.e_34.Children.Add(this.e_55);
     this.e_55.Name = "e_55";
     this.e_55.Height = 22F;
     this.e_55.Width = 22F;
     this.e_55.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_55, 0);
     Binding binding_e_55_ToolTip = new Binding("btn11TT");
     this.e_55.SetBinding(Button.ToolTipProperty, binding_e_55_ToolTip);
     Binding binding_e_55_IsEnabled = new Binding("IsUIEnabled");
     this.e_55.SetBinding(Button.IsEnabledProperty, binding_e_55_IsEnabled);
     Binding binding_e_55_Command = new Binding("btn11Command");
     this.e_55.SetBinding(Button.CommandProperty, binding_e_55_Command);
     // e_56 element
     this.e_56 = new TextBlock();
     this.e_55.Content = this.e_56;
     this.e_56.Name = "e_56";
     this.e_56.IsHitTestVisible = false;
     this.e_56.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_56_Foreground = new Binding("btn11Colour");
     this.e_56.SetBinding(TextBlock.ForegroundProperty, binding_e_56_Foreground);
     Binding binding_e_56_Text = new Binding("btn11Text");
     this.e_56.SetBinding(TextBlock.TextProperty, binding_e_56_Text);
     // e_57 element
     this.e_57 = new Button();
     this.e_34.Children.Add(this.e_57);
     this.e_57.Name = "e_57";
     this.e_57.Height = 22F;
     this.e_57.Width = 22F;
     this.e_57.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_57, 0);
     Binding binding_e_57_ToolTip = new Binding("btn12TT");
     this.e_57.SetBinding(Button.ToolTipProperty, binding_e_57_ToolTip);
     Binding binding_e_57_IsEnabled = new Binding("IsUIEnabled");
     this.e_57.SetBinding(Button.IsEnabledProperty, binding_e_57_IsEnabled);
     Binding binding_e_57_Command = new Binding("btn12Command");
     this.e_57.SetBinding(Button.CommandProperty, binding_e_57_Command);
     // e_58 element
     this.e_58 = new TextBlock();
     this.e_57.Content = this.e_58;
     this.e_58.Name = "e_58";
     this.e_58.IsHitTestVisible = false;
     this.e_58.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_58_Foreground = new Binding("btn12Colour");
     this.e_58.SetBinding(TextBlock.ForegroundProperty, binding_e_58_Foreground);
     Binding binding_e_58_Text = new Binding("btn12Text");
     this.e_58.SetBinding(TextBlock.TextProperty, binding_e_58_Text);
     // e_59 element
     this.e_59 = new Button();
     this.e_34.Children.Add(this.e_59);
     this.e_59.Name = "e_59";
     this.e_59.Height = 22F;
     this.e_59.Width = 22F;
     this.e_59.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_59, 0);
     Binding binding_e_59_ToolTip = new Binding("btn13TT");
     this.e_59.SetBinding(Button.ToolTipProperty, binding_e_59_ToolTip);
     Binding binding_e_59_IsEnabled = new Binding("IsUIEnabled");
     this.e_59.SetBinding(Button.IsEnabledProperty, binding_e_59_IsEnabled);
     Binding binding_e_59_Command = new Binding("btn13Command");
     this.e_59.SetBinding(Button.CommandProperty, binding_e_59_Command);
     // e_60 element
     this.e_60 = new TextBlock();
     this.e_59.Content = this.e_60;
     this.e_60.Name = "e_60";
     this.e_60.IsHitTestVisible = false;
     this.e_60.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_60_Foreground = new Binding("btn13Colour");
     this.e_60.SetBinding(TextBlock.ForegroundProperty, binding_e_60_Foreground);
     Binding binding_e_60_Text = new Binding("btn13Text");
     this.e_60.SetBinding(TextBlock.TextProperty, binding_e_60_Text);
     // e_61 element
     this.e_61 = new Button();
     this.e_34.Children.Add(this.e_61);
     this.e_61.Name = "e_61";
     this.e_61.Height = 22F;
     this.e_61.Width = 22F;
     this.e_61.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_61, 0);
     Binding binding_e_61_ToolTip = new Binding("btn14TT");
     this.e_61.SetBinding(Button.ToolTipProperty, binding_e_61_ToolTip);
     Binding binding_e_61_IsEnabled = new Binding("IsUIEnabled");
     this.e_61.SetBinding(Button.IsEnabledProperty, binding_e_61_IsEnabled);
     Binding binding_e_61_Command = new Binding("btn14Command");
     this.e_61.SetBinding(Button.CommandProperty, binding_e_61_Command);
     // e_62 element
     this.e_62 = new TextBlock();
     this.e_61.Content = this.e_62;
     this.e_62.Name = "e_62";
     this.e_62.IsHitTestVisible = false;
     this.e_62.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_62_Foreground = new Binding("btn14Colour");
     this.e_62.SetBinding(TextBlock.ForegroundProperty, binding_e_62_Foreground);
     Binding binding_e_62_Text = new Binding("btn14Text");
     this.e_62.SetBinding(TextBlock.TextProperty, binding_e_62_Text);
     // e_63 element
     this.e_63 = new Button();
     this.e_34.Children.Add(this.e_63);
     this.e_63.Name = "e_63";
     this.e_63.Height = 22F;
     this.e_63.Width = 22F;
     this.e_63.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_63, 0);
     Binding binding_e_63_ToolTip = new Binding("btn15TT");
     this.e_63.SetBinding(Button.ToolTipProperty, binding_e_63_ToolTip);
     Binding binding_e_63_IsEnabled = new Binding("IsUIEnabled");
     this.e_63.SetBinding(Button.IsEnabledProperty, binding_e_63_IsEnabled);
     Binding binding_e_63_Command = new Binding("btn15Command");
     this.e_63.SetBinding(Button.CommandProperty, binding_e_63_Command);
     // e_64 element
     this.e_64 = new TextBlock();
     this.e_63.Content = this.e_64;
     this.e_64.Name = "e_64";
     this.e_64.IsHitTestVisible = false;
     this.e_64.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_64_Foreground = new Binding("btn15Colour");
     this.e_64.SetBinding(TextBlock.ForegroundProperty, binding_e_64_Foreground);
     Binding binding_e_64_Text = new Binding("btn15Text");
     this.e_64.SetBinding(TextBlock.TextProperty, binding_e_64_Text);
     // e_65 element
     this.e_65 = new Button();
     this.e_34.Children.Add(this.e_65);
     this.e_65.Name = "e_65";
     this.e_65.Height = 22F;
     this.e_65.Width = 22F;
     this.e_65.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_65, 0);
     Binding binding_e_65_ToolTip = new Binding("btn16TT");
     this.e_65.SetBinding(Button.ToolTipProperty, binding_e_65_ToolTip);
     Binding binding_e_65_IsEnabled = new Binding("IsUIEnabled");
     this.e_65.SetBinding(Button.IsEnabledProperty, binding_e_65_IsEnabled);
     Binding binding_e_65_Command = new Binding("btn16Command");
     this.e_65.SetBinding(Button.CommandProperty, binding_e_65_Command);
     // e_66 element
     this.e_66 = new TextBlock();
     this.e_65.Content = this.e_66;
     this.e_66.Name = "e_66";
     this.e_66.IsHitTestVisible = false;
     this.e_66.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_66_Foreground = new Binding("btn16Colour");
     this.e_66.SetBinding(TextBlock.ForegroundProperty, binding_e_66_Foreground);
     Binding binding_e_66_Text = new Binding("btn16Text");
     this.e_66.SetBinding(TextBlock.TextProperty, binding_e_66_Text);
     // e_67 element
     this.e_67 = new Button();
     this.e_34.Children.Add(this.e_67);
     this.e_67.Name = "e_67";
     this.e_67.Height = 22F;
     this.e_67.Width = 22F;
     this.e_67.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_67, 0);
     Binding binding_e_67_ToolTip = new Binding("btn17TT");
     this.e_67.SetBinding(Button.ToolTipProperty, binding_e_67_ToolTip);
     Binding binding_e_67_IsEnabled = new Binding("IsUIEnabled");
     this.e_67.SetBinding(Button.IsEnabledProperty, binding_e_67_IsEnabled);
     Binding binding_e_67_Command = new Binding("btn17Command");
     this.e_67.SetBinding(Button.CommandProperty, binding_e_67_Command);
     // e_68 element
     this.e_68 = new TextBlock();
     this.e_67.Content = this.e_68;
     this.e_68.Name = "e_68";
     this.e_68.IsHitTestVisible = false;
     this.e_68.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_68_Foreground = new Binding("btn17Colour");
     this.e_68.SetBinding(TextBlock.ForegroundProperty, binding_e_68_Foreground);
     Binding binding_e_68_Text = new Binding("btn17Text");
     this.e_68.SetBinding(TextBlock.TextProperty, binding_e_68_Text);
     // e_69 element
     this.e_69 = new Button();
     this.e_34.Children.Add(this.e_69);
     this.e_69.Name = "e_69";
     this.e_69.Height = 22F;
     this.e_69.Width = 22F;
     this.e_69.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_69, 0);
     Binding binding_e_69_ToolTip = new Binding("btn18TT");
     this.e_69.SetBinding(Button.ToolTipProperty, binding_e_69_ToolTip);
     Binding binding_e_69_IsEnabled = new Binding("IsUIEnabled");
     this.e_69.SetBinding(Button.IsEnabledProperty, binding_e_69_IsEnabled);
     Binding binding_e_69_Command = new Binding("btn18Command");
     this.e_69.SetBinding(Button.CommandProperty, binding_e_69_Command);
     // e_70 element
     this.e_70 = new TextBlock();
     this.e_69.Content = this.e_70;
     this.e_70.Name = "e_70";
     this.e_70.IsHitTestVisible = false;
     this.e_70.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_70_Foreground = new Binding("btn18Colour");
     this.e_70.SetBinding(TextBlock.ForegroundProperty, binding_e_70_Foreground);
     Binding binding_e_70_Text = new Binding("btn18Text");
     this.e_70.SetBinding(TextBlock.TextProperty, binding_e_70_Text);
     // e_71 element
     this.e_71 = new Button();
     this.e_34.Children.Add(this.e_71);
     this.e_71.Name = "e_71";
     this.e_71.Height = 22F;
     this.e_71.Width = 22F;
     this.e_71.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_71, 0);
     Binding binding_e_71_ToolTip = new Binding("btn19TT");
     this.e_71.SetBinding(Button.ToolTipProperty, binding_e_71_ToolTip);
     Binding binding_e_71_IsEnabled = new Binding("IsUIEnabled");
     this.e_71.SetBinding(Button.IsEnabledProperty, binding_e_71_IsEnabled);
     Binding binding_e_71_Command = new Binding("btn19Command");
     this.e_71.SetBinding(Button.CommandProperty, binding_e_71_Command);
     // e_72 element
     this.e_72 = new TextBlock();
     this.e_71.Content = this.e_72;
     this.e_72.Name = "e_72";
     this.e_72.IsHitTestVisible = false;
     this.e_72.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_72_Foreground = new Binding("btn19Colour");
     this.e_72.SetBinding(TextBlock.ForegroundProperty, binding_e_72_Foreground);
     Binding binding_e_72_Text = new Binding("btn19Text");
     this.e_72.SetBinding(TextBlock.TextProperty, binding_e_72_Text);
     // e_73 element
     this.e_73 = new Button();
     this.e_34.Children.Add(this.e_73);
     this.e_73.Name = "e_73";
     this.e_73.Height = 22F;
     this.e_73.Width = 22F;
     this.e_73.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_73, 0);
     Binding binding_e_73_ToolTip = new Binding("btn20TT");
     this.e_73.SetBinding(Button.ToolTipProperty, binding_e_73_ToolTip);
     Binding binding_e_73_IsEnabled = new Binding("IsUIEnabled");
     this.e_73.SetBinding(Button.IsEnabledProperty, binding_e_73_IsEnabled);
     Binding binding_e_73_Command = new Binding("btn20Command");
     this.e_73.SetBinding(Button.CommandProperty, binding_e_73_Command);
     // e_74 element
     this.e_74 = new TextBlock();
     this.e_73.Content = this.e_74;
     this.e_74.Name = "e_74";
     this.e_74.IsHitTestVisible = false;
     this.e_74.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_74_Foreground = new Binding("btn20Colour");
     this.e_74.SetBinding(TextBlock.ForegroundProperty, binding_e_74_Foreground);
     Binding binding_e_74_Text = new Binding("btn20Text");
     this.e_74.SetBinding(TextBlock.TextProperty, binding_e_74_Text);
     // e_75 element
     this.e_75 = new Button();
     this.e_34.Children.Add(this.e_75);
     this.e_75.Name = "e_75";
     this.e_75.Height = 22F;
     this.e_75.Width = 22F;
     this.e_75.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_75, 0);
     Binding binding_e_75_ToolTip = new Binding("btn21TT");
     this.e_75.SetBinding(Button.ToolTipProperty, binding_e_75_ToolTip);
     Binding binding_e_75_IsEnabled = new Binding("IsUIEnabled");
     this.e_75.SetBinding(Button.IsEnabledProperty, binding_e_75_IsEnabled);
     Binding binding_e_75_Command = new Binding("btn21Command");
     this.e_75.SetBinding(Button.CommandProperty, binding_e_75_Command);
     // e_76 element
     this.e_76 = new TextBlock();
     this.e_75.Content = this.e_76;
     this.e_76.Name = "e_76";
     this.e_76.IsHitTestVisible = false;
     this.e_76.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_76_Foreground = new Binding("btn21Colour");
     this.e_76.SetBinding(TextBlock.ForegroundProperty, binding_e_76_Foreground);
     Binding binding_e_76_Text = new Binding("btn21Text");
     this.e_76.SetBinding(TextBlock.TextProperty, binding_e_76_Text);
     // e_77 element
     this.e_77 = new Button();
     this.e_34.Children.Add(this.e_77);
     this.e_77.Name = "e_77";
     this.e_77.Height = 22F;
     this.e_77.Width = 22F;
     this.e_77.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_77, 0);
     Binding binding_e_77_ToolTip = new Binding("btn22TT");
     this.e_77.SetBinding(Button.ToolTipProperty, binding_e_77_ToolTip);
     Binding binding_e_77_IsEnabled = new Binding("IsUIEnabled");
     this.e_77.SetBinding(Button.IsEnabledProperty, binding_e_77_IsEnabled);
     Binding binding_e_77_Command = new Binding("btn22Command");
     this.e_77.SetBinding(Button.CommandProperty, binding_e_77_Command);
     // e_78 element
     this.e_78 = new TextBlock();
     this.e_77.Content = this.e_78;
     this.e_78.Name = "e_78";
     this.e_78.IsHitTestVisible = false;
     this.e_78.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_78_Foreground = new Binding("btn22Colour");
     this.e_78.SetBinding(TextBlock.ForegroundProperty, binding_e_78_Foreground);
     Binding binding_e_78_Text = new Binding("btn22Text");
     this.e_78.SetBinding(TextBlock.TextProperty, binding_e_78_Text);
     // e_79 element
     this.e_79 = new Button();
     this.e_34.Children.Add(this.e_79);
     this.e_79.Name = "e_79";
     this.e_79.Height = 22F;
     this.e_79.Width = 22F;
     this.e_79.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_79, 0);
     Binding binding_e_79_ToolTip = new Binding("btn23TT");
     this.e_79.SetBinding(Button.ToolTipProperty, binding_e_79_ToolTip);
     Binding binding_e_79_IsEnabled = new Binding("IsUIEnabled");
     this.e_79.SetBinding(Button.IsEnabledProperty, binding_e_79_IsEnabled);
     Binding binding_e_79_Command = new Binding("btn23Command");
     this.e_79.SetBinding(Button.CommandProperty, binding_e_79_Command);
     // e_80 element
     this.e_80 = new TextBlock();
     this.e_79.Content = this.e_80;
     this.e_80.Name = "e_80";
     this.e_80.IsHitTestVisible = false;
     this.e_80.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_80_Foreground = new Binding("btn23Colour");
     this.e_80.SetBinding(TextBlock.ForegroundProperty, binding_e_80_Foreground);
     Binding binding_e_80_Text = new Binding("btn23Text");
     this.e_80.SetBinding(TextBlock.TextProperty, binding_e_80_Text);
     // e_81 element
     this.e_81 = new Button();
     this.e_34.Children.Add(this.e_81);
     this.e_81.Name = "e_81";
     this.e_81.Height = 22F;
     this.e_81.Width = 22F;
     this.e_81.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_81, 0);
     Binding binding_e_81_ToolTip = new Binding("btn24TT");
     this.e_81.SetBinding(Button.ToolTipProperty, binding_e_81_ToolTip);
     Binding binding_e_81_IsEnabled = new Binding("IsUIEnabled");
     this.e_81.SetBinding(Button.IsEnabledProperty, binding_e_81_IsEnabled);
     Binding binding_e_81_Command = new Binding("btn24Command");
     this.e_81.SetBinding(Button.CommandProperty, binding_e_81_Command);
     // e_82 element
     this.e_82 = new TextBlock();
     this.e_81.Content = this.e_82;
     this.e_82.Name = "e_82";
     this.e_82.IsHitTestVisible = false;
     this.e_82.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_82_Foreground = new Binding("btn24Colour");
     this.e_82.SetBinding(TextBlock.ForegroundProperty, binding_e_82_Foreground);
     Binding binding_e_82_Text = new Binding("btn24Text");
     this.e_82.SetBinding(TextBlock.TextProperty, binding_e_82_Text);
     // e_83 element
     this.e_83 = new Button();
     this.e_34.Children.Add(this.e_83);
     this.e_83.Name = "e_83";
     this.e_83.Height = 22F;
     this.e_83.Width = 22F;
     this.e_83.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0));
     ToolTipService.SetInitialShowDelay(this.e_83, 0);
     Binding binding_e_83_ToolTip = new Binding("btn25TT");
     this.e_83.SetBinding(Button.ToolTipProperty, binding_e_83_ToolTip);
     Binding binding_e_83_IsEnabled = new Binding("IsUIEnabled");
     this.e_83.SetBinding(Button.IsEnabledProperty, binding_e_83_IsEnabled);
     Binding binding_e_83_Command = new Binding("btn25Command");
     this.e_83.SetBinding(Button.CommandProperty, binding_e_83_Command);
     // e_84 element
     this.e_84 = new TextBlock();
     this.e_83.Content = this.e_84;
     this.e_84.Name = "e_84";
     this.e_84.IsHitTestVisible = false;
     this.e_84.Margin = new Thickness(-5F, -5F, -5F, -5F);
     Binding binding_e_84_Foreground = new Binding("btn25Colour");
     this.e_84.SetBinding(TextBlock.ForegroundProperty, binding_e_84_Foreground);
     Binding binding_e_84_Text = new Binding("btn25Text");
     this.e_84.SetBinding(TextBlock.TextProperty, binding_e_84_Text);
     // e_85 element
     this.e_85 = new Button();
     this.backgroundGrid.Children.Add(this.e_85);
     this.e_85.Name = "e_85";
     this.e_85.Height = 17F;
     this.e_85.Width = 139F;
     this.e_85.Margin = new Thickness(0F, 0F, 0F, 246F);
     this.e_85.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_85.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_85_IsEnabled = new Binding("IsUIEnabled");
     this.e_85.SetBinding(Button.IsEnabledProperty, binding_e_85_IsEnabled);
     Binding binding_e_85_Command = new Binding("MiniMapUpPressed");
     this.e_85.SetBinding(Button.CommandProperty, binding_e_85_Command);
     // e_86 element
     this.e_86 = new Image();
     this.e_85.Content = this.e_86;
     this.e_86.Name = "e_86";
     this.e_86.Height = 12F;
     this.e_86.Width = 88F;
     this.e_86.Margin = new Thickness(0F, 0F, 5F, 0F);
     this.e_86.HorizontalAlignment = HorizontalAlignment.Right;
     BitmapImage e_86_bm = new BitmapImage();
     e_86_bm.TextureAsset = "ImagesUI\\arrowU";
     this.e_86.Source = e_86_bm;
     // e_87 element
     this.e_87 = new Button();
     this.backgroundGrid.Children.Add(this.e_87);
     this.e_87.Name = "e_87";
     this.e_87.Height = 17F;
     this.e_87.Width = 139F;
     this.e_87.Margin = new Thickness(0F, 0F, 0F, 120F);
     this.e_87.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_87.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_87_IsEnabled = new Binding("IsUIEnabled");
     this.e_87.SetBinding(Button.IsEnabledProperty, binding_e_87_IsEnabled);
     Binding binding_e_87_Command = new Binding("MiniMapDownPressed");
     this.e_87.SetBinding(Button.CommandProperty, binding_e_87_Command);
     // e_88 element
     this.e_88 = new Image();
     this.e_87.Content = this.e_88;
     this.e_88.Name = "e_88";
     this.e_88.Height = 12F;
     this.e_88.Width = 88F;
     this.e_88.Margin = new Thickness(5F, 0F, 0F, 0F);
     this.e_88.HorizontalAlignment = HorizontalAlignment.Right;
     BitmapImage e_88_bm = new BitmapImage();
     e_88_bm.TextureAsset = "ImagesUI\\arrowD";
     this.e_88.Source = e_88_bm;
     // e_89 element
     this.e_89 = new Button();
     this.backgroundGrid.Children.Add(this.e_89);
     this.e_89.Name = "e_89";
     this.e_89.Height = 109F;
     this.e_89.Width = 17F;
     this.e_89.Margin = new Thickness(0F, 0F, 122F, 137F);
     this.e_89.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_89.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_89_IsEnabled = new Binding("IsUIEnabled");
     this.e_89.SetBinding(Button.IsEnabledProperty, binding_e_89_IsEnabled);
     Binding binding_e_89_Command = new Binding("MiniMapLeftPressed");
     this.e_89.SetBinding(Button.CommandProperty, binding_e_89_Command);
     // e_90 element
     this.e_90 = new Image();
     this.e_89.Content = this.e_90;
     this.e_90.Name = "e_90";
     this.e_90.Height = 88F;
     this.e_90.Width = 12F;
     this.e_90.Margin = new Thickness(0F, 3F, 0F, 0F);
     this.e_90.HorizontalAlignment = HorizontalAlignment.Right;
     BitmapImage e_90_bm = new BitmapImage();
     e_90_bm.TextureAsset = "ImagesUI\\arrowL";
     this.e_90.Source = e_90_bm;
     // e_91 element
     this.e_91 = new Button();
     this.backgroundGrid.Children.Add(this.e_91);
     this.e_91.Name = "e_91";
     this.e_91.Height = 109F;
     this.e_91.Width = 17F;
     this.e_91.Margin = new Thickness(0F, 0F, 0F, 137F);
     this.e_91.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_91.VerticalAlignment = VerticalAlignment.Bottom;
     Binding binding_e_91_IsEnabled = new Binding("IsUIEnabled");
     this.e_91.SetBinding(Button.IsEnabledProperty, binding_e_91_IsEnabled);
     Binding binding_e_91_Command = new Binding("MiniMapRightPressed");
     this.e_91.SetBinding(Button.CommandProperty, binding_e_91_Command);
     // e_92 element
     this.e_92 = new Image();
     this.e_91.Content = this.e_92;
     this.e_92.Name = "e_92";
     this.e_92.Height = 88F;
     this.e_92.Width = 12F;
     this.e_92.Margin = new Thickness(0F, 0F, 0F, 3F);
     this.e_92.HorizontalAlignment = HorizontalAlignment.Right;
     BitmapImage e_92_bm = new BitmapImage();
     e_92_bm.TextureAsset = "ImagesUI\\arrowR";
     this.e_92.Source = e_92_bm;
     // txtSector element
     this.txtSector = new TextBlock();
     this.backgroundGrid.Children.Add(this.txtSector);
     this.txtSector.Name = "txtSector";
     this.txtSector.Height = 20F;
     this.txtSector.Width = 135F;
     this.txtSector.Margin = new Thickness(0F, 0F, 0F, 270F);
     this.txtSector.HorizontalAlignment = HorizontalAlignment.Right;
     this.txtSector.VerticalAlignment = VerticalAlignment.Bottom;
     LinearGradientBrush txtSector_Background = new LinearGradientBrush();
     txtSector_Background.StartPoint = new PointF(0F, 1F);
     txtSector_Background.EndPoint = new PointF(1F, 1F);
     txtSector_Background.SpreadMethod = GradientSpreadMethod.Pad;
     txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F));
     txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F));
     txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F));
     this.txtSector.Background = txtSector_Background;
     this.txtSector.TextAlignment = TextAlignment.Right;
     this.txtSector.TextWrapping = TextWrapping.Wrap;
     Binding binding_txtSector_Text = new Binding("CurrentSector");
     this.txtSector.SetBinding(TextBlock.TextProperty, binding_txtSector_Text);
     // e_93 element
     this.e_93 = new StackPanel();
     this.backgroundGrid.Children.Add(this.e_93);
     this.e_93.Name = "e_93";
     this.e_93.Width = 175F;
     this.e_93.Margin = new Thickness(0F, 140F, 0F, 0F);
     this.e_93.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_93.VerticalAlignment = VerticalAlignment.Top;
     LinearGradientBrush e_93_Background = new LinearGradientBrush();
     e_93_Background.StartPoint = new PointF(0F, 1F);
     e_93_Background.EndPoint = new PointF(1F, 1F);
     e_93_Background.SpreadMethod = GradientSpreadMethod.Pad;
     e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F));
     e_93_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F));
     e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F));
     e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F));
     this.e_93.Background = e_93_Background;
     this.e_93.Orientation = Orientation.Vertical;
     // txtPlayerName element
     this.txtPlayerName = new TextBlock();
     this.e_93.Children.Add(this.txtPlayerName);
     this.txtPlayerName.Name = "txtPlayerName";
     this.txtPlayerName.Margin = new Thickness(55F, 0F, 0F, 10F);
     this.txtPlayerName.TextWrapping = TextWrapping.Wrap;
     Binding binding_txtPlayerName_Text = new Binding("PlayerName");
     this.txtPlayerName.SetBinding(TextBlock.TextProperty, binding_txtPlayerName_Text);
     // txtPlayerSystems element
     this.txtPlayerSystems = new TextBlock();
     this.e_93.Children.Add(this.txtPlayerSystems);
     this.txtPlayerSystems.Name = "txtPlayerSystems";
     this.txtPlayerSystems.Margin = new Thickness(55F, 0F, 0F, 0F);
     this.txtPlayerSystems.Text = "Controlled Systems";
     this.txtPlayerSystems.TextWrapping = TextWrapping.Wrap;
     // comboPlayerSystems element
     this.comboPlayerSystems = new ComboBox();
     this.e_93.Children.Add(this.comboPlayerSystems);
     this.comboPlayerSystems.Name = "comboPlayerSystems";
     this.comboPlayerSystems.Focusable = false;
     this.comboPlayerSystems.Margin = new Thickness(55F, 5F, 0F, 5F);
     Binding binding_comboPlayerSystems_IsEnabled = new Binding("IsUIEnabled");
     this.comboPlayerSystems.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlayerSystems_IsEnabled);
     Binding binding_comboPlayerSystems_ItemsSource = new Binding("PlayerSystemsList");
     this.comboPlayerSystems.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlayerSystems_ItemsSource);
     Binding binding_comboPlayerSystems_SelectedItem = new Binding("PlayerSystemsSelectedIndex");
     this.comboPlayerSystems.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlayerSystems_SelectedItem);
     // btnJumpSys element
     this.btnJumpSys = new Button();
     this.e_93.Children.Add(this.btnJumpSys);
     this.btnJumpSys.Name = "btnJumpSys";
     this.btnJumpSys.Margin = new Thickness(55F, 0F, 0F, 10F);
     this.btnJumpSys.Content = "Jump to system";
     Binding binding_btnJumpSys_IsEnabled = new Binding("IsUIEnabled");
     this.btnJumpSys.SetBinding(Button.IsEnabledProperty, binding_btnJumpSys_IsEnabled);
     Binding binding_btnJumpSys_Command = new Binding("JumpSystemCommand");
     this.btnJumpSys.SetBinding(Button.CommandProperty, binding_btnJumpSys_Command);
     // txtPlayerPlanets element
     this.txtPlayerPlanets = new TextBlock();
     this.e_93.Children.Add(this.txtPlayerPlanets);
     this.txtPlayerPlanets.Name = "txtPlayerPlanets";
     this.txtPlayerPlanets.Margin = new Thickness(55F, 0F, 0F, 0F);
     this.txtPlayerPlanets.Text = "Controlled Planets:";
     this.txtPlayerPlanets.TextWrapping = TextWrapping.Wrap;
     // comboPlayerPlanets element
     this.comboPlayerPlanets = new ComboBox();
     this.e_93.Children.Add(this.comboPlayerPlanets);
     this.comboPlayerPlanets.Name = "comboPlayerPlanets";
     this.comboPlayerPlanets.Focusable = false;
     this.comboPlayerPlanets.Margin = new Thickness(55F, 5F, 0F, 5F);
     Binding binding_comboPlayerPlanets_IsEnabled = new Binding("IsUIEnabled");
     this.comboPlayerPlanets.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlayerPlanets_IsEnabled);
     Binding binding_comboPlayerPlanets_ItemsSource = new Binding("PlayerPlanetsList");
     this.comboPlayerPlanets.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlayerPlanets_ItemsSource);
     Binding binding_comboPlayerPlanets_SelectedItem = new Binding("PlayerPlanetsSelectedIndex");
     this.comboPlayerPlanets.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlayerPlanets_SelectedItem);
     // btnJumpPlanet element
     this.btnJumpPlanet = new Button();
     this.e_93.Children.Add(this.btnJumpPlanet);
     this.btnJumpPlanet.Name = "btnJumpPlanet";
     this.btnJumpPlanet.Margin = new Thickness(55F, 0F, 0F, 10F);
     this.btnJumpPlanet.Content = "Jump to planet";
     Binding binding_btnJumpPlanet_IsEnabled = new Binding("IsUIEnabled");
     this.btnJumpPlanet.SetBinding(Button.IsEnabledProperty, binding_btnJumpPlanet_IsEnabled);
     Binding binding_btnJumpPlanet_Command = new Binding("JumpPlanetCommand");
     this.btnJumpPlanet.SetBinding(Button.CommandProperty, binding_btnJumpPlanet_Command);
     // PlanetInfoTabs element
     this.PlanetInfoTabs = new TabControl();
     this.backgroundGrid.Children.Add(this.PlanetInfoTabs);
     this.PlanetInfoTabs.Name = "PlanetInfoTabs";
     this.PlanetInfoTabs.IsHitTestVisible = true;
     this.PlanetInfoTabs.Margin = new Thickness(180F, 130F, 176F, 130F);
     this.PlanetInfoTabs.HorizontalAlignment = HorizontalAlignment.Stretch;
     this.PlanetInfoTabs.VerticalAlignment = VerticalAlignment.Stretch;
     this.PlanetInfoTabs.Background = new SolidColorBrush(new ColorW(0, 0, 0, 191));
     this.PlanetInfoTabs.ItemsSource = Get_PlanetInfoTabs_Items();
     Binding binding_PlanetInfoTabs_Visibility = new Binding("PlanetTabControlVisibility");
     this.PlanetInfoTabs.SetBinding(TabControl.VisibilityProperty, binding_PlanetInfoTabs_Visibility);
     Binding binding_PlanetInfoTabs_SelectedIndex = new Binding("SelectedTab");
     this.PlanetInfoTabs.SetBinding(TabControl.SelectedIndexProperty, binding_PlanetInfoTabs_SelectedIndex);
     // e_235 element
     this.e_235 = new Canvas();
     this.backgroundGrid.Children.Add(this.e_235);
     this.e_235.Name = "e_235";
     this.e_235.Height = 100F;
     this.e_235.Width = 220F;
     this.e_235.Margin = new Thickness(180F, 260F, 0F, 0F);
     this.e_235.HorizontalAlignment = HorizontalAlignment.Left;
     this.e_235.VerticalAlignment = VerticalAlignment.Top;
     this.e_235.Background = new SolidColorBrush(new ColorW(33, 32, 32, 204));
     Binding binding_e_235_DataContext = new Binding("InfoTabData");
     this.e_235.SetBinding(Canvas.DataContextProperty, binding_e_235_DataContext);
     Binding binding_e_235_Visibility = new Binding("ShowPlanetsPopup");
     this.e_235.SetBinding(Canvas.VisibilityProperty, binding_e_235_Visibility);
     // e_236 element
     this.e_236 = new StackPanel();
     this.e_235.Children.Add(this.e_236);
     this.e_236.Name = "e_236";
     this.e_236.Orientation = Orientation.Vertical;
     // e_237 element
     this.e_237 = new TextBlock();
     this.e_236.Children.Add(this.e_237);
     this.e_237.Name = "e_237";
     this.e_237.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_237_Text = new Binding("PNameText");
     this.e_237.SetBinding(TextBlock.TextProperty, binding_e_237_Text);
     // e_238 element
     this.e_238 = new TextBlock();
     this.e_236.Children.Add(this.e_238);
     this.e_238.Name = "e_238";
     this.e_238.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_238_Text = new Binding("PTierText");
     this.e_238.SetBinding(TextBlock.TextProperty, binding_e_238_Text);
     // e_239 element
     this.e_239 = new TextBlock();
     this.e_236.Children.Add(this.e_239);
     this.e_239.Name = "e_239";
     this.e_239.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_239_Text = new Binding("PPopulationText");
     this.e_239.SetBinding(TextBlock.TextProperty, binding_e_239_Text);
     // e_240 element
     this.e_240 = new TextBlock();
     this.e_236.Children.Add(this.e_240);
     this.e_240.Name = "e_240";
     this.e_240.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_240_Text = new Binding("POwnerText");
     this.e_240.SetBinding(TextBlock.TextProperty, binding_e_240_Text);
     // e_241 element
     this.e_241 = new Canvas();
     this.backgroundGrid.Children.Add(this.e_241);
     this.e_241.Name = "e_241";
     this.e_241.Height = 100F;
     this.e_241.Width = 220F;
     this.e_241.Margin = new Thickness(0F, 0F, 180F, 130F);
     this.e_241.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_241.VerticalAlignment = VerticalAlignment.Bottom;
     this.e_241.Background = new SolidColorBrush(new ColorW(33, 32, 32, 204));
     Binding binding_e_241_Visibility = new Binding("ShowSystemsPopup");
     this.e_241.SetBinding(Canvas.VisibilityProperty, binding_e_241_Visibility);
     // e_242 element
     this.e_242 = new StackPanel();
     this.e_241.Children.Add(this.e_242);
     this.e_242.Name = "e_242";
     this.e_242.Orientation = Orientation.Vertical;
     // e_243 element
     this.e_243 = new TextBlock();
     this.e_242.Children.Add(this.e_243);
     this.e_243.Name = "e_243";
     this.e_243.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_243_Text = new Binding("SNameText");
     this.e_243.SetBinding(TextBlock.TextProperty, binding_e_243_Text);
     // e_244 element
     this.e_244 = new TextBlock();
     this.e_242.Children.Add(this.e_244);
     this.e_244.Name = "e_244";
     this.e_244.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_244_Text = new Binding("SNumPlanetsText");
     this.e_244.SetBinding(TextBlock.TextProperty, binding_e_244_Text);
     // e_245 element
     this.e_245 = new TextBlock();
     this.e_242.Children.Add(this.e_245);
     this.e_245.Name = "e_245";
     this.e_245.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_245_Text = new Binding("SOwnerText");
     this.e_245.SetBinding(TextBlock.TextProperty, binding_e_245_Text);
     // e_246 element
     this.e_246 = new Canvas();
     this.backgroundGrid.Children.Add(this.e_246);
     this.e_246.Name = "e_246";
     this.e_246.Height = 400F;
     this.e_246.Width = 255F;
     this.e_246.Margin = new Thickness(222F, 60F, 0F, 0F);
     this.e_246.HorizontalAlignment = HorizontalAlignment.Left;
     this.e_246.VerticalAlignment = VerticalAlignment.Top;
     Grid.SetRowSpan(this.e_246, 2);
     Binding binding_e_246_Visibility = new Binding("ResourceDropDownVisible");
     this.e_246.SetBinding(Canvas.VisibilityProperty, binding_e_246_Visibility);
     // e_247 element
     this.e_247 = new Grid();
     this.e_246.Children.Add(this.e_247);
     this.e_247.Name = "e_247";
     this.e_247.Height = 400F;
     this.e_247.Width = 255F;
     this.e_247.IsHitTestVisible = true;
     this.e_247.Background = new SolidColorBrush(new ColorW(33, 32, 32, 247));
     RowDefinition row_e_247_0 = new RowDefinition();
     row_e_247_0.Height = new GridLength(1F, GridUnitType.Auto);
     this.e_247.RowDefinitions.Add(row_e_247_0);
     RowDefinition row_e_247_1 = new RowDefinition();
     row_e_247_1.Height = new GridLength(1F, GridUnitType.Auto);
     this.e_247.RowDefinitions.Add(row_e_247_1);
     ColumnDefinition col_e_247_0 = new ColumnDefinition();
     col_e_247_0.Width = new GridLength(54F, GridUnitType.Pixel);
     this.e_247.ColumnDefinitions.Add(col_e_247_0);
     ColumnDefinition col_e_247_1 = new ColumnDefinition();
     col_e_247_1.Width = new GridLength(150F, GridUnitType.Pixel);
     this.e_247.ColumnDefinitions.Add(col_e_247_1);
     ColumnDefinition col_e_247_2 = new ColumnDefinition();
     col_e_247_2.Width = new GridLength(50F, GridUnitType.Pixel);
     this.e_247.ColumnDefinitions.Add(col_e_247_2);
     Binding binding_e_247_Visibility = new Binding("ResourceDropDownVisible");
     this.e_247.SetBinding(Grid.VisibilityProperty, binding_e_247_Visibility);
     // e_248 element
     this.e_248 = new StackPanel();
     this.e_247.Children.Add(this.e_248);
     this.e_248.Name = "e_248";
     Grid.SetColumn(this.e_248, 0);
     Grid.SetRow(this.e_248, 1);
     Binding binding_e_248_Visibility = new Binding("MetalResourcesVisible");
     this.e_248.SetBinding(StackPanel.VisibilityProperty, binding_e_248_Visibility);
     // aluminium1 element
     this.aluminium1 = new Image();
     this.e_248.Children.Add(this.aluminium1);
     this.aluminium1.Name = "aluminium1";
     this.aluminium1.Height = 40F;
     this.aluminium1.Margin = new Thickness(0F, 15F, 0F, 0F);
     this.aluminium1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage aluminium1_bm = new BitmapImage();
     aluminium1_bm.TextureAsset = "ImagesUI\\aluminium_res";
     this.aluminium1.Source = aluminium1_bm;
     // copper1 element
     this.copper1 = new Image();
     this.e_248.Children.Add(this.copper1);
     this.copper1.Name = "copper1";
     this.copper1.Height = 40F;
     this.copper1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.copper1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage copper1_bm = new BitmapImage();
     copper1_bm.TextureAsset = "ImagesUI\\copper_res";
     this.copper1.Source = copper1_bm;
     // iron1 element
     this.iron1 = new Image();
     this.e_248.Children.Add(this.iron1);
     this.iron1.Name = "iron1";
     this.iron1.Height = 40F;
     this.iron1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.iron1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage iron1_bm = new BitmapImage();
     iron1_bm.TextureAsset = "ImagesUI\\iron_res";
     this.iron1.Source = iron1_bm;
     // lead1 element
     this.lead1 = new Image();
     this.e_248.Children.Add(this.lead1);
     this.lead1.Name = "lead1";
     this.lead1.Height = 40F;
     this.lead1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.lead1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage lead1_bm = new BitmapImage();
     lead1_bm.TextureAsset = "ImagesUI\\lead_res";
     this.lead1.Source = lead1_bm;
     // magnesium1 element
     this.magnesium1 = new Image();
     this.e_248.Children.Add(this.magnesium1);
     this.magnesium1.Name = "magnesium1";
     this.magnesium1.Height = 40F;
     this.magnesium1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.magnesium1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage magnesium1_bm = new BitmapImage();
     magnesium1_bm.TextureAsset = "ImagesUI\\magnesium_res";
     this.magnesium1.Source = magnesium1_bm;
     // titanium1 element
     this.titanium1 = new Image();
     this.e_248.Children.Add(this.titanium1);
     this.titanium1.Name = "titanium1";
     this.titanium1.Height = 40F;
     this.titanium1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.titanium1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage titanium1_bm = new BitmapImage();
     titanium1_bm.TextureAsset = "ImagesUI\\titanium_res";
     this.titanium1.Source = titanium1_bm;
     // zinc1 element
     this.zinc1 = new Image();
     this.e_248.Children.Add(this.zinc1);
     this.zinc1.Name = "zinc1";
     this.zinc1.Height = 40F;
     this.zinc1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.zinc1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage zinc1_bm = new BitmapImage();
     zinc1_bm.TextureAsset = "ImagesUI\\zinc_res";
     this.zinc1.Source = zinc1_bm;
     // steel1 element
     this.steel1 = new Image();
     this.e_248.Children.Add(this.steel1);
     this.steel1.Name = "steel1";
     this.steel1.Height = 40F;
     this.steel1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.steel1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage steel1_bm = new BitmapImage();
     steel1_bm.TextureAsset = "ImagesUI\\zinc_res";
     this.steel1.Source = steel1_bm;
     // brass1 element
     this.brass1 = new Image();
     this.e_248.Children.Add(this.brass1);
     this.brass1.Name = "brass1";
     this.brass1.Height = 40F;
     this.brass1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.brass1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage brass1_bm = new BitmapImage();
     brass1_bm.TextureAsset = "ImagesUI\\zinc_res";
     this.brass1.Source = brass1_bm;
     // e_249 element
     this.e_249 = new StackPanel();
     this.e_247.Children.Add(this.e_249);
     this.e_249.Name = "e_249";
     Grid.SetColumn(this.e_249, 1);
     Grid.SetRow(this.e_249, 1);
     Binding binding_e_249_DataContext = new Binding("ResourcesDropdownData");
     this.e_249.SetBinding(StackPanel.DataContextProperty, binding_e_249_DataContext);
     Binding binding_e_249_Visibility = new Binding("MetalResourcesVisible");
     this.e_249.SetBinding(StackPanel.VisibilityProperty, binding_e_249_Visibility);
     // e_250 element
     this.e_250 = new TextBlock();
     this.e_249.Children.Add(this.e_250);
     this.e_250.Name = "e_250";
     this.e_250.Margin = new Thickness(0F, 27F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_250, 0);
     Binding binding_e_250_ToolTip = new Binding("AluminiumDeductions");
     this.e_250.SetBinding(TextBlock.ToolTipProperty, binding_e_250_ToolTip);
     Binding binding_e_250_Text = new Binding("AluminiumResource");
     this.e_250.SetBinding(TextBlock.TextProperty, binding_e_250_Text);
     // e_251 element
     this.e_251 = new TextBlock();
     this.e_249.Children.Add(this.e_251);
     this.e_251.Name = "e_251";
     this.e_251.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_251, 0);
     Binding binding_e_251_ToolTip = new Binding("CopperDeductions");
     this.e_251.SetBinding(TextBlock.ToolTipProperty, binding_e_251_ToolTip);
     Binding binding_e_251_Text = new Binding("CopperResource");
     this.e_251.SetBinding(TextBlock.TextProperty, binding_e_251_Text);
     // e_252 element
     this.e_252 = new TextBlock();
     this.e_249.Children.Add(this.e_252);
     this.e_252.Name = "e_252";
     this.e_252.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_252, 0);
     Binding binding_e_252_ToolTip = new Binding("IronDeductions");
     this.e_252.SetBinding(TextBlock.ToolTipProperty, binding_e_252_ToolTip);
     Binding binding_e_252_Text = new Binding("IronResource");
     this.e_252.SetBinding(TextBlock.TextProperty, binding_e_252_Text);
     // e_253 element
     this.e_253 = new TextBlock();
     this.e_249.Children.Add(this.e_253);
     this.e_253.Name = "e_253";
     this.e_253.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_253, 0);
     Binding binding_e_253_ToolTip = new Binding("LeadDeductions");
     this.e_253.SetBinding(TextBlock.ToolTipProperty, binding_e_253_ToolTip);
     Binding binding_e_253_Text = new Binding("LeadResource");
     this.e_253.SetBinding(TextBlock.TextProperty, binding_e_253_Text);
     // e_254 element
     this.e_254 = new TextBlock();
     this.e_249.Children.Add(this.e_254);
     this.e_254.Name = "e_254";
     this.e_254.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_254, 0);
     Binding binding_e_254_ToolTip = new Binding("MagnesiumDeductions");
     this.e_254.SetBinding(TextBlock.ToolTipProperty, binding_e_254_ToolTip);
     Binding binding_e_254_Text = new Binding("MagnesiumResource");
     this.e_254.SetBinding(TextBlock.TextProperty, binding_e_254_Text);
     // e_255 element
     this.e_255 = new TextBlock();
     this.e_249.Children.Add(this.e_255);
     this.e_255.Name = "e_255";
     this.e_255.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_255, 0);
     Binding binding_e_255_ToolTip = new Binding("TitaniumDeductions");
     this.e_255.SetBinding(TextBlock.ToolTipProperty, binding_e_255_ToolTip);
     Binding binding_e_255_Text = new Binding("TitaniumResource");
     this.e_255.SetBinding(TextBlock.TextProperty, binding_e_255_Text);
     // e_256 element
     this.e_256 = new TextBlock();
     this.e_249.Children.Add(this.e_256);
     this.e_256.Name = "e_256";
     this.e_256.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_256, 0);
     Binding binding_e_256_ToolTip = new Binding("ZincDeductions");
     this.e_256.SetBinding(TextBlock.ToolTipProperty, binding_e_256_ToolTip);
     Binding binding_e_256_Text = new Binding("ZincResource");
     this.e_256.SetBinding(TextBlock.TextProperty, binding_e_256_Text);
     // e_257 element
     this.e_257 = new TextBlock();
     this.e_249.Children.Add(this.e_257);
     this.e_257.Name = "e_257";
     this.e_257.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_257, 0);
     Binding binding_e_257_ToolTip = new Binding("SteelDeductions");
     this.e_257.SetBinding(TextBlock.ToolTipProperty, binding_e_257_ToolTip);
     Binding binding_e_257_Text = new Binding("SteelResource");
     this.e_257.SetBinding(TextBlock.TextProperty, binding_e_257_Text);
     // e_258 element
     this.e_258 = new TextBlock();
     this.e_249.Children.Add(this.e_258);
     this.e_258.Name = "e_258";
     this.e_258.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_258, 0);
     Binding binding_e_258_ToolTip = new Binding("BrassDeductions");
     this.e_258.SetBinding(TextBlock.ToolTipProperty, binding_e_258_ToolTip);
     Binding binding_e_258_Text = new Binding("BrassResource");
     this.e_258.SetBinding(TextBlock.TextProperty, binding_e_258_Text);
     // e_259 element
     this.e_259 = new StackPanel();
     this.e_247.Children.Add(this.e_259);
     this.e_259.Name = "e_259";
     this.e_259.Margin = new Thickness(5F, 0F, 0F, 0F);
     Grid.SetColumn(this.e_259, 0);
     Grid.SetRow(this.e_259, 1);
     Binding binding_e_259_Visibility = new Binding("PreciousResourcesVisibility");
     this.e_259.SetBinding(StackPanel.VisibilityProperty, binding_e_259_Visibility);
     // silver1 element
     this.silver1 = new Image();
     this.e_259.Children.Add(this.silver1);
     this.silver1.Name = "silver1";
     this.silver1.Height = 40F;
     this.silver1.Margin = new Thickness(0F, 15F, 0F, 0F);
     this.silver1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage silver1_bm = new BitmapImage();
     silver1_bm.TextureAsset = "ImagesUI\\silver_res";
     this.silver1.Source = silver1_bm;
     // gold1 element
     this.gold1 = new Image();
     this.e_259.Children.Add(this.gold1);
     this.gold1.Name = "gold1";
     this.gold1.Height = 40F;
     this.gold1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.gold1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage gold1_bm = new BitmapImage();
     gold1_bm.TextureAsset = "ImagesUI\\gold_res";
     this.gold1.Source = gold1_bm;
     // platinum1 element
     this.platinum1 = new Image();
     this.e_259.Children.Add(this.platinum1);
     this.platinum1.Name = "platinum1";
     this.platinum1.Height = 40F;
     this.platinum1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.platinum1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage platinum1_bm = new BitmapImage();
     platinum1_bm.TextureAsset = "ImagesUI\\platinum_res";
     this.platinum1.Source = platinum1_bm;
     // diamond1 element
     this.diamond1 = new Image();
     this.e_259.Children.Add(this.diamond1);
     this.diamond1.Name = "diamond1";
     this.diamond1.Height = 40F;
     this.diamond1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.diamond1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage diamond1_bm = new BitmapImage();
     diamond1_bm.TextureAsset = "ImagesUI\\diamond_res";
     this.diamond1.Source = diamond1_bm;
     // e_260 element
     this.e_260 = new StackPanel();
     this.e_247.Children.Add(this.e_260);
     this.e_260.Name = "e_260";
     Grid.SetColumn(this.e_260, 1);
     Grid.SetRow(this.e_260, 1);
     Binding binding_e_260_DataContext = new Binding("ResourcesDropdownData");
     this.e_260.SetBinding(StackPanel.DataContextProperty, binding_e_260_DataContext);
     Binding binding_e_260_Visibility = new Binding("PreciousResourcesVisibility");
     this.e_260.SetBinding(StackPanel.VisibilityProperty, binding_e_260_Visibility);
     // e_261 element
     this.e_261 = new TextBlock();
     this.e_260.Children.Add(this.e_261);
     this.e_261.Name = "e_261";
     this.e_261.Margin = new Thickness(0F, 27F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_261, 0);
     Binding binding_e_261_ToolTip = new Binding("SilverDeductions");
     this.e_261.SetBinding(TextBlock.ToolTipProperty, binding_e_261_ToolTip);
     Binding binding_e_261_Text = new Binding("SilverResource");
     this.e_261.SetBinding(TextBlock.TextProperty, binding_e_261_Text);
     // e_262 element
     this.e_262 = new TextBlock();
     this.e_260.Children.Add(this.e_262);
     this.e_262.Name = "e_262";
     this.e_262.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_262, 0);
     Binding binding_e_262_ToolTip = new Binding("GoldDeductions");
     this.e_262.SetBinding(TextBlock.ToolTipProperty, binding_e_262_ToolTip);
     Binding binding_e_262_Text = new Binding("GoldResource");
     this.e_262.SetBinding(TextBlock.TextProperty, binding_e_262_Text);
     // e_263 element
     this.e_263 = new TextBlock();
     this.e_260.Children.Add(this.e_263);
     this.e_263.Name = "e_263";
     this.e_263.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_263, 0);
     Binding binding_e_263_ToolTip = new Binding("PlatinumDeductions");
     this.e_263.SetBinding(TextBlock.ToolTipProperty, binding_e_263_ToolTip);
     Binding binding_e_263_Text = new Binding("PlatinumResource");
     this.e_263.SetBinding(TextBlock.TextProperty, binding_e_263_Text);
     // e_264 element
     this.e_264 = new TextBlock();
     this.e_260.Children.Add(this.e_264);
     this.e_264.Name = "e_264";
     this.e_264.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_264, 0);
     Binding binding_e_264_ToolTip = new Binding("DiamondDeductions");
     this.e_264.SetBinding(TextBlock.ToolTipProperty, binding_e_264_ToolTip);
     Binding binding_e_264_Text = new Binding("DiamondResource");
     this.e_264.SetBinding(TextBlock.TextProperty, binding_e_264_Text);
     // e_265 element
     this.e_265 = new StackPanel();
     this.e_247.Children.Add(this.e_265);
     this.e_265.Name = "e_265";
     Grid.SetColumn(this.e_265, 0);
     Grid.SetRow(this.e_265, 1);
     Binding binding_e_265_Visibility = new Binding("FuelsResourcesVisibility");
     this.e_265.SetBinding(StackPanel.VisibilityProperty, binding_e_265_Visibility);
     // coal1 element
     this.coal1 = new Image();
     this.e_265.Children.Add(this.coal1);
     this.coal1.Name = "coal1";
     this.coal1.Height = 40F;
     this.coal1.Margin = new Thickness(0F, 15F, 0F, 0F);
     this.coal1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage coal1_bm = new BitmapImage();
     coal1_bm.TextureAsset = "ImagesUI\\coal_res";
     this.coal1.Source = coal1_bm;
     // oil1 element
     this.oil1 = new Image();
     this.e_265.Children.Add(this.oil1);
     this.oil1.Name = "oil1";
     this.oil1.Height = 40F;
     this.oil1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.oil1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage oil1_bm = new BitmapImage();
     oil1_bm.TextureAsset = "ImagesUI\\oil_res";
     this.oil1.Source = oil1_bm;
     // NaturalGas1 element
     this.NaturalGas1 = new Image();
     this.e_265.Children.Add(this.NaturalGas1);
     this.NaturalGas1.Name = "NaturalGas1";
     this.NaturalGas1.Height = 40F;
     this.NaturalGas1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.NaturalGas1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage NaturalGas1_bm = new BitmapImage();
     NaturalGas1_bm.TextureAsset = "ImagesUI\\gas_res";
     this.NaturalGas1.Source = NaturalGas1_bm;
     // Uranium1 element
     this.Uranium1 = new Image();
     this.e_265.Children.Add(this.Uranium1);
     this.Uranium1.Name = "Uranium1";
     this.Uranium1.Height = 40F;
     this.Uranium1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Uranium1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Uranium1_bm = new BitmapImage();
     Uranium1_bm.TextureAsset = "ImagesUI\\uranium_res";
     this.Uranium1.Source = Uranium1_bm;
     // Thorium1 element
     this.Thorium1 = new Image();
     this.e_265.Children.Add(this.Thorium1);
     this.Thorium1.Name = "Thorium1";
     this.Thorium1.Height = 40F;
     this.Thorium1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Thorium1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Thorium1_bm = new BitmapImage();
     Thorium1_bm.TextureAsset = "ImagesUI\\thorium_res";
     this.Thorium1.Source = Thorium1_bm;
     // Propane1 element
     this.Propane1 = new Image();
     this.e_265.Children.Add(this.Propane1);
     this.Propane1.Name = "Propane1";
     this.Propane1.Height = 40F;
     this.Propane1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Propane1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Propane1_bm = new BitmapImage();
     Propane1_bm.TextureAsset = "ImagesUI\\propane_res";
     this.Propane1.Source = Propane1_bm;
     // Biomass1 element
     this.Biomass1 = new Image();
     this.e_265.Children.Add(this.Biomass1);
     this.Biomass1.Name = "Biomass1";
     this.Biomass1.Height = 40F;
     this.Biomass1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Biomass1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Biomass1_bm = new BitmapImage();
     Biomass1_bm.TextureAsset = "ImagesUI\\biomass_res";
     this.Biomass1.Source = Biomass1_bm;
     // Hydrogen1 element
     this.Hydrogen1 = new Image();
     this.e_265.Children.Add(this.Hydrogen1);
     this.Hydrogen1.Name = "Hydrogen1";
     this.Hydrogen1.Height = 40F;
     this.Hydrogen1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Hydrogen1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Hydrogen1_bm = new BitmapImage();
     Hydrogen1_bm.TextureAsset = "ImagesUI\\hydrogen_res";
     this.Hydrogen1.Source = Hydrogen1_bm;
     // e_266 element
     this.e_266 = new StackPanel();
     this.e_247.Children.Add(this.e_266);
     this.e_266.Name = "e_266";
     Grid.SetColumn(this.e_266, 1);
     Grid.SetRow(this.e_266, 1);
     Binding binding_e_266_DataContext = new Binding("ResourcesDropdownData");
     this.e_266.SetBinding(StackPanel.DataContextProperty, binding_e_266_DataContext);
     Binding binding_e_266_Visibility = new Binding("FuelsResourcesVisibility");
     this.e_266.SetBinding(StackPanel.VisibilityProperty, binding_e_266_Visibility);
     // e_267 element
     this.e_267 = new TextBlock();
     this.e_266.Children.Add(this.e_267);
     this.e_267.Name = "e_267";
     this.e_267.Margin = new Thickness(0F, 27F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_267, 0);
     Binding binding_e_267_ToolTip = new Binding("CoalDeductions");
     this.e_267.SetBinding(TextBlock.ToolTipProperty, binding_e_267_ToolTip);
     Binding binding_e_267_Text = new Binding("CoalResource");
     this.e_267.SetBinding(TextBlock.TextProperty, binding_e_267_Text);
     // e_268 element
     this.e_268 = new TextBlock();
     this.e_266.Children.Add(this.e_268);
     this.e_268.Name = "e_268";
     this.e_268.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_268, 0);
     Binding binding_e_268_ToolTip = new Binding("OilDeductions");
     this.e_268.SetBinding(TextBlock.ToolTipProperty, binding_e_268_ToolTip);
     Binding binding_e_268_Text = new Binding("OilResource");
     this.e_268.SetBinding(TextBlock.TextProperty, binding_e_268_Text);
     // e_269 element
     this.e_269 = new TextBlock();
     this.e_266.Children.Add(this.e_269);
     this.e_269.Name = "e_269";
     this.e_269.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_269, 0);
     Binding binding_e_269_ToolTip = new Binding("NaturalGasDeductions");
     this.e_269.SetBinding(TextBlock.ToolTipProperty, binding_e_269_ToolTip);
     Binding binding_e_269_Text = new Binding("NaturalGasResource");
     this.e_269.SetBinding(TextBlock.TextProperty, binding_e_269_Text);
     // e_270 element
     this.e_270 = new TextBlock();
     this.e_266.Children.Add(this.e_270);
     this.e_270.Name = "e_270";
     this.e_270.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_270, 0);
     Binding binding_e_270_ToolTip = new Binding("UraniumDeductions");
     this.e_270.SetBinding(TextBlock.ToolTipProperty, binding_e_270_ToolTip);
     Binding binding_e_270_Text = new Binding("UraniumResource");
     this.e_270.SetBinding(TextBlock.TextProperty, binding_e_270_Text);
     // e_271 element
     this.e_271 = new TextBlock();
     this.e_266.Children.Add(this.e_271);
     this.e_271.Name = "e_271";
     this.e_271.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_271, 0);
     Binding binding_e_271_ToolTip = new Binding("ThoriumDeductions");
     this.e_271.SetBinding(TextBlock.ToolTipProperty, binding_e_271_ToolTip);
     Binding binding_e_271_Text = new Binding("ThoriumResource");
     this.e_271.SetBinding(TextBlock.TextProperty, binding_e_271_Text);
     // e_272 element
     this.e_272 = new TextBlock();
     this.e_266.Children.Add(this.e_272);
     this.e_272.Name = "e_272";
     this.e_272.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_272, 0);
     Binding binding_e_272_ToolTip = new Binding("PropaneDeductions");
     this.e_272.SetBinding(TextBlock.ToolTipProperty, binding_e_272_ToolTip);
     Binding binding_e_272_Text = new Binding("PropaneResource");
     this.e_272.SetBinding(TextBlock.TextProperty, binding_e_272_Text);
     // e_273 element
     this.e_273 = new TextBlock();
     this.e_266.Children.Add(this.e_273);
     this.e_273.Name = "e_273";
     this.e_273.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_273, 0);
     Binding binding_e_273_ToolTip = new Binding("BiomassDeductions");
     this.e_273.SetBinding(TextBlock.ToolTipProperty, binding_e_273_ToolTip);
     Binding binding_e_273_Text = new Binding("BiomassResource");
     this.e_273.SetBinding(TextBlock.TextProperty, binding_e_273_Text);
     // e_274 element
     this.e_274 = new TextBlock();
     this.e_266.Children.Add(this.e_274);
     this.e_274.Name = "e_274";
     this.e_274.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_274, 0);
     Binding binding_e_274_ToolTip = new Binding("HydrogenDeductions");
     this.e_274.SetBinding(TextBlock.ToolTipProperty, binding_e_274_ToolTip);
     Binding binding_e_274_Text = new Binding("HydrogenResource");
     this.e_274.SetBinding(TextBlock.TextProperty, binding_e_274_Text);
     // e_275 element
     this.e_275 = new StackPanel();
     this.e_247.Children.Add(this.e_275);
     this.e_275.Name = "e_275";
     Grid.SetColumn(this.e_275, 0);
     Grid.SetRow(this.e_275, 1);
     Binding binding_e_275_Visibility = new Binding("MiscResourcesVisibility");
     this.e_275.SetBinding(StackPanel.VisibilityProperty, binding_e_275_Visibility);
     // Timber1 element
     this.Timber1 = new Image();
     this.e_275.Children.Add(this.Timber1);
     this.Timber1.Name = "Timber1";
     this.Timber1.Height = 40F;
     this.Timber1.Margin = new Thickness(0F, 15F, 0F, 0F);
     this.Timber1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Timber1_bm = new BitmapImage();
     Timber1_bm.TextureAsset = "ImagesUI\\timber_res";
     this.Timber1.Source = Timber1_bm;
     // Food1 element
     this.Food1 = new Image();
     this.e_275.Children.Add(this.Food1);
     this.Food1.Name = "Food1";
     this.Food1.Height = 40F;
     this.Food1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Food1_bm = new BitmapImage();
     Food1_bm.TextureAsset = "ImagesUI\\livestock_res";
     this.Food1.Source = Food1_bm;
     // CleanWater1 element
     this.CleanWater1 = new Image();
     this.e_275.Children.Add(this.CleanWater1);
     this.CleanWater1.Name = "CleanWater1";
     this.CleanWater1.Height = 40F;
     this.CleanWater1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.CleanWater1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage CleanWater1_bm = new BitmapImage();
     CleanWater1_bm.TextureAsset = "ImagesUI\\water_res";
     this.CleanWater1.Source = CleanWater1_bm;
     // Plastic1 element
     this.Plastic1 = new Image();
     this.e_275.Children.Add(this.Plastic1);
     this.Plastic1.Name = "Plastic1";
     this.Plastic1.Height = 40F;
     this.Plastic1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Plastic1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Plastic1_bm = new BitmapImage();
     Plastic1_bm.TextureAsset = "ImagesUI\\plastic_res";
     this.Plastic1.Source = Plastic1_bm;
     // Fabric1 element
     this.Fabric1 = new Image();
     this.e_275.Children.Add(this.Fabric1);
     this.Fabric1.Name = "Fabric1";
     this.Fabric1.Height = 40F;
     this.Fabric1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Fabric1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Fabric1_bm = new BitmapImage();
     Fabric1_bm.TextureAsset = "ImagesUI\\fabric_res";
     this.Fabric1.Source = Fabric1_bm;
     // Oxygen1 element
     this.Oxygen1 = new Image();
     this.e_275.Children.Add(this.Oxygen1);
     this.Oxygen1.Name = "Oxygen1";
     this.Oxygen1.Height = 40F;
     this.Oxygen1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Oxygen1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Oxygen1_bm = new BitmapImage();
     Oxygen1_bm.TextureAsset = "ImagesUI\\oxygen_res";
     this.Oxygen1.Source = Oxygen1_bm;
     // Medecine1 element
     this.Medecine1 = new Image();
     this.e_275.Children.Add(this.Medecine1);
     this.Medecine1.Name = "Medecine1";
     this.Medecine1.Height = 40F;
     this.Medecine1.Margin = new Thickness(0F, 0F, 0F, 0F);
     this.Medecine1.VerticalAlignment = VerticalAlignment.Top;
     BitmapImage Medecine1_bm = new BitmapImage();
     Medecine1_bm.TextureAsset = "ImagesUI\\water_res";
     this.Medecine1.Source = Medecine1_bm;
     // e_276 element
     this.e_276 = new StackPanel();
     this.e_247.Children.Add(this.e_276);
     this.e_276.Name = "e_276";
     Grid.SetColumn(this.e_276, 1);
     Grid.SetRow(this.e_276, 1);
     Binding binding_e_276_DataContext = new Binding("ResourcesDropdownData");
     this.e_276.SetBinding(StackPanel.DataContextProperty, binding_e_276_DataContext);
     Binding binding_e_276_Visibility = new Binding("MiscResourcesVisibility");
     this.e_276.SetBinding(StackPanel.VisibilityProperty, binding_e_276_Visibility);
     // e_277 element
     this.e_277 = new TextBlock();
     this.e_276.Children.Add(this.e_277);
     this.e_277.Name = "e_277";
     this.e_277.Margin = new Thickness(0F, 27F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_277, 0);
     Binding binding_e_277_ToolTip = new Binding("TimberDeductions");
     this.e_277.SetBinding(TextBlock.ToolTipProperty, binding_e_277_ToolTip);
     Binding binding_e_277_Text = new Binding("TimberResource");
     this.e_277.SetBinding(TextBlock.TextProperty, binding_e_277_Text);
     // e_278 element
     this.e_278 = new TextBlock();
     this.e_276.Children.Add(this.e_278);
     this.e_278.Name = "e_278";
     this.e_278.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_278, 0);
     Binding binding_e_278_ToolTip = new Binding("FoodDeductions");
     this.e_278.SetBinding(TextBlock.ToolTipProperty, binding_e_278_ToolTip);
     Binding binding_e_278_Text = new Binding("FoodResource");
     this.e_278.SetBinding(TextBlock.TextProperty, binding_e_278_Text);
     // e_279 element
     this.e_279 = new TextBlock();
     this.e_276.Children.Add(this.e_279);
     this.e_279.Name = "e_279";
     this.e_279.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_279, 0);
     Binding binding_e_279_ToolTip = new Binding("WaterDeductions");
     this.e_279.SetBinding(TextBlock.ToolTipProperty, binding_e_279_ToolTip);
     Binding binding_e_279_Text = new Binding("WaterResource");
     this.e_279.SetBinding(TextBlock.TextProperty, binding_e_279_Text);
     // e_280 element
     this.e_280 = new TextBlock();
     this.e_276.Children.Add(this.e_280);
     this.e_280.Name = "e_280";
     this.e_280.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_280, 0);
     Binding binding_e_280_ToolTip = new Binding("PlasticDeductions");
     this.e_280.SetBinding(TextBlock.ToolTipProperty, binding_e_280_ToolTip);
     Binding binding_e_280_Text = new Binding("PlasticResource");
     this.e_280.SetBinding(TextBlock.TextProperty, binding_e_280_Text);
     // e_281 element
     this.e_281 = new TextBlock();
     this.e_276.Children.Add(this.e_281);
     this.e_281.Name = "e_281";
     this.e_281.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_281, 0);
     Binding binding_e_281_ToolTip = new Binding("FabricDeductions");
     this.e_281.SetBinding(TextBlock.ToolTipProperty, binding_e_281_ToolTip);
     Binding binding_e_281_Text = new Binding("FabricResource");
     this.e_281.SetBinding(TextBlock.TextProperty, binding_e_281_Text);
     // e_282 element
     this.e_282 = new TextBlock();
     this.e_276.Children.Add(this.e_282);
     this.e_282.Name = "e_282";
     this.e_282.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_282, 0);
     Binding binding_e_282_ToolTip = new Binding("OxygenDeductions");
     this.e_282.SetBinding(TextBlock.ToolTipProperty, binding_e_282_ToolTip);
     Binding binding_e_282_Text = new Binding("OxygenResource");
     this.e_282.SetBinding(TextBlock.TextProperty, binding_e_282_Text);
     // e_283 element
     this.e_283 = new TextBlock();
     this.e_276.Children.Add(this.e_283);
     this.e_283.Name = "e_283";
     this.e_283.Margin = new Thickness(0F, 24F, 0F, 0F);
     ToolTipService.SetInitialShowDelay(this.e_283, 0);
     Binding binding_e_283_ToolTip = new Binding("MedecineDeductions");
     this.e_283.SetBinding(TextBlock.ToolTipProperty, binding_e_283_ToolTip);
     Binding binding_e_283_Text = new Binding("MedecineResource");
     this.e_283.SetBinding(TextBlock.TextProperty, binding_e_283_Text);
     // e_284 element
     this.e_284 = new Button();
     this.e_247.Children.Add(this.e_284);
     this.e_284.Name = "e_284";
     this.e_284.HorizontalAlignment = HorizontalAlignment.Right;
     this.e_284.Content = "Close";
     Grid.SetColumn(this.e_284, 2);
     Grid.SetRow(this.e_284, 0);
     Binding binding_e_284_IsEnabled = new Binding("IsUIEnabled");
     this.e_284.SetBinding(Button.IsEnabledProperty, binding_e_284_IsEnabled);
     Binding binding_e_284_Command = new Binding("ResourceGridClosed");
     this.e_284.SetBinding(Button.CommandProperty, binding_e_284_Command);
     // e_285 element
     this.e_285 = new StackPanel();
     this.backgroundGrid.Children.Add(this.e_285);
     this.e_285.Name = "e_285";
     this.e_285.Height = 370F;
     this.e_285.Width = 210F;
     this.e_285.Margin = new Thickness(0F, 200F, 0F, 0F);
     this.e_285.HorizontalAlignment = HorizontalAlignment.Center;
     this.e_285.VerticalAlignment = VerticalAlignment.Top;
     this.e_285.Background = new SolidColorBrush(new ColorW(33, 32, 32, 247));
     Binding binding_e_285_Visibility = new Binding("IsPaused");
     this.e_285.SetBinding(StackPanel.VisibilityProperty, binding_e_285_Visibility);
     // e_286 element
     this.e_286 = new Button();
     this.e_285.Children.Add(this.e_286);
     this.e_286.Name = "e_286";
     this.e_286.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_286.Content = "Resume";
     Binding binding_e_286_Command = new Binding("ResumeCommand");
     this.e_286.SetBinding(Button.CommandProperty, binding_e_286_Command);
     // e_287 element
     this.e_287 = new Button();
     this.e_285.Children.Add(this.e_287);
     this.e_287.Name = "e_287";
     this.e_287.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_287.Content = "Save";
     Binding binding_e_287_Command = new Binding("SaveCommand");
     this.e_287.SetBinding(Button.CommandProperty, binding_e_287_Command);
     // e_288 element
     this.e_288 = new Button();
     this.e_285.Children.Add(this.e_288);
     this.e_288.Name = "e_288";
     this.e_288.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_288.Content = "Load";
     Binding binding_e_288_Command = new Binding("LoadCommand");
     this.e_288.SetBinding(Button.CommandProperty, binding_e_288_Command);
     // e_289 element
     this.e_289 = new Button();
     this.e_285.Children.Add(this.e_289);
     this.e_289.Name = "e_289";
     this.e_289.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_289.Content = "Options";
     Binding binding_e_289_Command = new Binding("OptionsCommand");
     this.e_289.SetBinding(Button.CommandProperty, binding_e_289_Command);
     // e_290 element
     this.e_290 = new Button();
     this.e_285.Children.Add(this.e_290);
     this.e_290.Name = "e_290";
     this.e_290.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_290.Content = "Quit To Menu";
     Binding binding_e_290_Command = new Binding("QuitMenuCommand");
     this.e_290.SetBinding(Button.CommandProperty, binding_e_290_Command);
     // e_291 element
     this.e_291 = new Button();
     this.e_285.Children.Add(this.e_291);
     this.e_291.Name = "e_291";
     this.e_291.Margin = new Thickness(5F, 5F, 5F, 5F);
     this.e_291.Content = "Quit To Windows";
     Binding binding_e_291_Command = new Binding("QuitWindowsCommand");
     this.e_291.SetBinding(Button.CommandProperty, binding_e_291_Command);
     // e_292 element
     this.e_292 = new TextBlock();
     this.e_285.Children.Add(this.e_292);
     this.e_292.Name = "e_292";
     this.e_292.Text = "Game Details:";
     this.e_292.TextAlignment = TextAlignment.Center;
     ImageManager.Instance.AddImage("ImagesUI\\gear");
     ImageManager.Instance.AddImage("ImagesUI\\iron_res");
     ImageManager.Instance.AddImage("ImagesUI\\gold_res");
     ImageManager.Instance.AddImage("ImagesUI\\oil_res");
     ImageManager.Instance.AddImage("ImagesUI\\livestock_res");
     ImageManager.Instance.AddImage("ImagesUI\\arrowU");
     ImageManager.Instance.AddImage("ImagesUI\\arrowD");
     ImageManager.Instance.AddImage("ImagesUI\\arrowL");
     ImageManager.Instance.AddImage("ImagesUI\\arrowR");
     ImageManager.Instance.AddImage("ImagesUI\\aluminium_res");
     ImageManager.Instance.AddImage("ImagesUI\\copper_res");
     ImageManager.Instance.AddImage("ImagesUI\\lead_res");
     ImageManager.Instance.AddImage("ImagesUI\\magnesium_res");
     ImageManager.Instance.AddImage("ImagesUI\\titanium_res");
     ImageManager.Instance.AddImage("ImagesUI\\zinc_res");
     ImageManager.Instance.AddImage("ImagesUI\\silver_res");
     ImageManager.Instance.AddImage("ImagesUI\\platinum_res");
     ImageManager.Instance.AddImage("ImagesUI\\diamond_res");
     ImageManager.Instance.AddImage("ImagesUI\\coal_res");
     ImageManager.Instance.AddImage("ImagesUI\\gas_res");
     ImageManager.Instance.AddImage("ImagesUI\\uranium_res");
     ImageManager.Instance.AddImage("ImagesUI\\thorium_res");
     ImageManager.Instance.AddImage("ImagesUI\\timber_res");
     ImageManager.Instance.AddImage("ImagesUI\\crops_res");
     ImageManager.Instance.AddImage("ImagesUI\\water_res");
     ImageManager.Instance.AddImage("ImagesUI\\propane_res");
     ImageManager.Instance.AddImage("ImagesUI\\biomass_res");
     ImageManager.Instance.AddImage("ImagesUI\\hydrogen_res");
     ImageManager.Instance.AddImage("ImagesUI\\plastic_res");
     ImageManager.Instance.AddImage("ImagesUI\\fabric_res");
     ImageManager.Instance.AddImage("ImagesUI\\oxygen_res");
     FontManager.Instance.AddFont("Segoe UI", 12F, FontStyle.Regular, "Segoe_UI_9_Regular");
     FontManager.Instance.AddFont("Segoe UI", 12F, FontStyle.Regular, "Segoe_UI_9_Regular");
 }
Esempio n. 12
0
        // Panel for showing items in cart and more
        private WrapPanel CartList()
        {
            WrapPanel cartWrapPanel = new WrapPanel
            {
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment   = VerticalAlignment.Top,
                Width  = 200,
                Margin = new Thickness(20)
            };

            itemsInCartListBox = new ListBox
            {
                VerticalContentAlignment = VerticalAlignment.Center,
                Margin = new Thickness(5),
                Width  = 200
            };
            cartWrapPanel.Children.Add(itemsInCartListBox);

            // Enter a coupon
            TextBlock couponTextBlock = new TextBlock
            {
                Text       = "Enter coupon:",
                FontFamily = new FontFamily("Comic Sans MS")
            };

            cartWrapPanel.Children.Add(couponTextBlock);

            couponTextBox = new TextBox
            {
                VerticalContentAlignment = VerticalAlignment.Center,
                Margin    = new Thickness(5),
                MaxLength = 10,
                Width     = 80
            };
            cartWrapPanel.Children.Add(couponTextBox);

            // Button for removing selected item in cart
            var removeSelectedItemFromCartButton = new Button
            {
                Content    = "Remove selected item from Cart",
                FontFamily = new FontFamily("Comic Sans MS"),
                Width      = 200
            };

            removeSelectedItemFromCartButton.Click += RemoveSelectedItemFromCartOnClick;
            cartWrapPanel.Children.Add(removeSelectedItemFromCartButton);

            // Button for saving items in cart
            var saveCartButton = new Button
            {
                Content    = "Save Cart",
                FontFamily = new FontFamily("Comic Sans MS"),
                Width      = 70,
            };

            saveCartButton.Click += SaveCartToCSVOnClick;
            cartWrapPanel.Children.Add(saveCartButton);

            // Button for removing all items in cart
            var clearCartButton = new Button
            {
                Content    = "Clear Cart",
                FontFamily = new FontFamily("Comic Sans MS"),
                Width      = 70,
            };

            clearCartButton.Click += ClearCartOnClick;
            cartWrapPanel.Children.Add(clearCartButton);

            // Button for checkout items in cart
            var checkoutCartButton = new Button
            {
                Content    = "Checkout",
                FontFamily = new FontFamily("Comic Sans MS"),
                Width      = 140,
            };

            checkoutCartButton.Click += CheckoutCartOnClick;
            cartWrapPanel.Children.Add(checkoutCartButton);

            cartPriceTextBlock = new TextBlock
            {
                TextWrapping = TextWrapping.Wrap,
                FontFamily   = new FontFamily("Comic Sans MS")
            };
            cartWrapPanel.Children.Add(cartPriceTextBlock);

            return(cartWrapPanel);
        }
        //creates the info panel for the airliner type
        private ScrollViewer createAirlinerTypePanel()
        {
            ScrollViewer scroller = new ScrollViewer();

            scroller.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            scroller.VerticalScrollBarVisibility   = ScrollBarVisibility.Auto;
            scroller.MaxHeight = GraphicsHelpers.GetContentHeight() / 2;
            scroller.Margin    = new Thickness(0, 10, 0, 0);

            AirlinerType airliner = this.Airliner.Airliner.Type;

            StackPanel panelAirlinerType = new StackPanel();

            TextBlock txtHeader = new TextBlock();

            txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            txtHeader.SetResourceReference(TextBlock.BackgroundProperty, "HeaderBackgroundBrush");
            txtHeader.TextAlignment = TextAlignment.Left;
            txtHeader.FontWeight    = FontWeights.Bold;
            txtHeader.Text          = Translator.GetInstance().GetString("PageFleetAirliner", "1001");

            panelAirlinerType.Children.Add(txtHeader);

            ListBox lbQuickInfo = new ListBox();

            lbQuickInfo.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
            lbQuickInfo.SetResourceReference(ListBox.ItemTemplateProperty, "QuickInfoItem");

            panelAirlinerType.Children.Add(lbQuickInfo);

            WrapPanel panelAirlinerName = new WrapPanel();

            Image imgAirlinerImage = new Image();

            imgAirlinerImage.Source     = new BitmapImage(new Uri(@"/Data/images/info.png", UriKind.RelativeOrAbsolute));
            imgAirlinerImage.Height     = 16;
            imgAirlinerImage.Tag        = airliner;
            imgAirlinerImage.Visibility = airliner.Image == null || airliner.Image.Length < 2 ? Visibility.Collapsed : Visibility.Visible;
            imgAirlinerImage.Margin     = new Thickness(5, 0, 0, 0);
            imgAirlinerImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(imgAirlinerImage_MouseDown);

            RenderOptions.SetBitmapScalingMode(imgAirlinerImage, BitmapScalingMode.HighQuality);

            panelAirlinerName.Children.Add(UICreator.CreateTextBlock(airliner.Name));
            panelAirlinerName.Children.Add(imgAirlinerImage);

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1002"), panelAirlinerName));

            ContentControl ccManufactorer = new ContentControl();

            ccManufactorer.SetResourceReference(ContentControl.ContentTemplateProperty, "ManufactorerCountryItem");
            ccManufactorer.Content = airliner.Manufacturer;

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1003"), ccManufactorer));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1004"), UICreator.CreateTextBlock(new TextUnderscoreConverter().Convert(airliner.Body, null, null, null).ToString())));

            string range = string.Format("{0:0.##} {1}", new NumberToUnitConverter().Convert(airliner.Range), new StringToLanguageConverter().Convert("km."));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1005"), UICreator.CreateTextBlock(string.Format("{1} ({0})", new TextUnderscoreConverter().Convert(airliner.RangeType), range))));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1006"), UICreator.CreateTextBlock(new TextUnderscoreConverter().Convert(airliner.Engine, null, null, null).ToString())));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1007"), UICreator.CreateTextBlock(new NumberMeterToUnitConverter().Convert(airliner.Wingspan).ToString())));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1008"), UICreator.CreateTextBlock(new NumberMeterToUnitConverter().Convert(airliner.Length).ToString())));


            if (airliner.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger)
            {
                lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1009"), UICreator.CreateTextBlock(((AirlinerPassengerType)airliner).MaxSeatingCapacity.ToString())));//SeatingCapacity.ToString())));
                lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1010"), UICreator.CreateTextBlock(((AirlinerPassengerType)airliner).MaxAirlinerClasses.ToString())));
            }

            if (airliner.TypeAirliner == AirlinerType.TypeOfAirliner.Cargo)
            {
                lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1031"), UICreator.CreateTextBlock(new CargoSizeConverter().Convert(airliner).ToString())));
            }

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1011"), UICreator.CreateTextBlock(new NumberMeterToUnitConverter().Convert(airliner.MinRunwaylength).ToString())));

            if (airliner.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger)
            {
                string crewRequirements = string.Format(Translator.GetInstance().GetString("PageFleetAirliner", "1012"), airliner.CockpitCrew, ((AirlinerPassengerType)airliner).CabinCrew);
                lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1013"), UICreator.CreateTextBlock(crewRequirements)));
            }
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1014"), UICreator.CreateTextBlock(string.Format("{0:0.##} {1}", new NumberToUnitConverter().Convert(airliner.CruisingSpeed), new StringToLanguageConverter().Convert("km/t")))));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1015"), UICreator.CreateTextBlock(string.Format("{0:0.###} {1}", new FuelConsumptionToUnitConverter().Convert(airliner.FuelConsumption), new StringToLanguageConverter().Convert("l/seat/km")))));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1027"), UICreator.CreateTextBlock(string.Format("{0:0.#} {1}", new FuelUnitGtLConverter().Convert(airliner.FuelCapacity), new StringToLanguageConverter().Convert("gallons")))));

            if (!this.Airliner.HasRoute && this.Airliner.Purchased != FleetAirliner.PurchasedType.Leased && this.Airliner.Airliner.Airline.IsHuman && this.Airliner.Airliner.Type.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger)
            {
                Button btnConvertToCargo = new Button();
                btnConvertToCargo.Uid = "1032";
                btnConvertToCargo.SetResourceReference(Button.StyleProperty, "RoundedButton");
                btnConvertToCargo.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                btnConvertToCargo.Margin  = new Thickness(0, 5, 0, 0);
                btnConvertToCargo.Height  = Double.NaN;
                btnConvertToCargo.Width   = Double.NaN;
                btnConvertToCargo.Content = Translator.GetInstance().GetString("PageFleetAirliner", btnConvertToCargo.Uid);
                btnConvertToCargo.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
                btnConvertToCargo.Click += btnConvertToCargo_Click;

                panelAirlinerType.Children.Add(btnConvertToCargo);
            }


            scroller.Content = panelAirlinerType;

            return(scroller);
        }
        //creates the quick info panel for the fleet airliner
        private ScrollViewer createQuickInfoPanel()
        {
            ScrollViewer scroller = new ScrollViewer();

            scroller.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            scroller.VerticalScrollBarVisibility   = ScrollBarVisibility.Auto;
            scroller.MaxHeight = GraphicsHelpers.GetContentHeight() / 3;

            StackPanel panelInfo = new StackPanel();

            TextBlock txtHeader = new TextBlock();

            txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            txtHeader.SetResourceReference(TextBlock.BackgroundProperty, "HeaderBackgroundBrush");
            txtHeader.TextAlignment = TextAlignment.Left;
            txtHeader.FontWeight    = FontWeights.Bold;
            txtHeader.Text          = Translator.GetInstance().GetString("PageFleetAirliner", "1030");

            panelInfo.Children.Add(txtHeader);

            DockPanel grdQuickInfo = new DockPanel();

            grdQuickInfo.Margin = new Thickness(0, 5, 0, 0);

            panelInfo.Children.Add(grdQuickInfo);

            Image imgLogo = new Image();

            imgLogo.Source = new BitmapImage(new Uri(this.Airliner.Airliner.Airline.Profile.Logo, UriKind.RelativeOrAbsolute));
            imgLogo.Width  = 110;
            imgLogo.Margin = new Thickness(0, 0, 5, 0);
            imgLogo.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            RenderOptions.SetBitmapScalingMode(imgLogo, BitmapScalingMode.HighQuality);
            grdQuickInfo.Children.Add(imgLogo);

            StackPanel panelQuickInfo = new StackPanel();

            grdQuickInfo.Children.Add(panelQuickInfo);

            ListBox lbQuickInfo = new ListBox();

            lbQuickInfo.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
            lbQuickInfo.SetResourceReference(ListBox.ItemTemplateProperty, "QuickInfoItem");

            panelQuickInfo.Children.Add(lbQuickInfo);

            DockPanel panelName = new DockPanel();

            txtName = UICreator.CreateTextBlock(this.Airliner.Name);
            txtName.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            panelName.Children.Add(txtName);

            Image imgEditName = new Image();

            imgEditName.Source = new BitmapImage(new Uri(@"/Data/images/edit.png", UriKind.RelativeOrAbsolute));
            imgEditName.Width  = 16;

            RenderOptions.SetBitmapScalingMode(imgEditName, BitmapScalingMode.HighQuality);

            Button btnEditName = new Button();

            btnEditName.Background = Brushes.Transparent;
            btnEditName.Margin     = new Thickness(5, 0, 0, 0);
            btnEditName.Visibility = Visibility.Collapsed;// this.Airliner.Airliner.Airline.IsHuman ? Visibility.Visible : System.Windows.Visibility.Collapsed;
            //btnEditName.Click += new RoutedEventHandler(btnEditName_Click);
            btnEditName.Content = imgEditName;

            panelName.Children.Add(btnEditName);

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1002"), panelName));

            DockPanel panelOwner = new DockPanel();

            TextBlock lnkOwner = UICreator.CreateLink(this.Airliner.Airliner.Airline.Profile.Name);

            lnkOwner.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            ((Hyperlink)lnkOwner.Inlines.FirstInline).Click += new RoutedEventHandler(PageFleetAirliner_Click);

            panelOwner.Children.Add(lnkOwner);

            Image imgEditOwner = new Image();

            imgEditOwner.Source = new BitmapImage(new Uri(@"/Data/images/edit.png", UriKind.RelativeOrAbsolute));
            imgEditOwner.Width  = 16;
            RenderOptions.SetBitmapScalingMode(imgEditOwner, BitmapScalingMode.HighQuality);

            Button btnEditOwner = new Button();

            btnEditOwner.Background = Brushes.Transparent;
            btnEditOwner.Margin     = new Thickness(5, 0, 0, 0);
            btnEditOwner.Visibility = this.Airliner.Airliner.Airline.IsHuman && this.Airliner.Status == FleetAirliner.AirlinerStatus.Stopped && GameObject.GetInstance().MainAirline.Subsidiaries.Count > 0 && !this.Airliner.HasRoute ? Visibility.Visible : System.Windows.Visibility.Collapsed;
            btnEditOwner.Click     += new RoutedEventHandler(btnEditOwner_Click);
            btnEditOwner.Content    = imgEditOwner;

            panelOwner.Children.Add(btnEditOwner);

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1017"), panelOwner));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1025"), UICreator.CreateTextBlock(this.Airliner.PurchasedDate.ToShortDateString())));

            DockPanel panelHomeBase = new DockPanel();

            Button btnEditHomeBase = new Button();

            btnEditHomeBase.Background = Brushes.Transparent;
            btnEditHomeBase.Click     += new RoutedEventHandler(btnEditHomeBase_Click);
            btnEditHomeBase.Margin     = new Thickness(0, 0, 5, 0);

            Image imgEdit = new Image();

            imgEdit.Source = new BitmapImage(new Uri(@"/Data/images/edit.png", UriKind.RelativeOrAbsolute));
            imgEdit.Width  = 16;
            RenderOptions.SetBitmapScalingMode(imgEdit, BitmapScalingMode.HighQuality);

            btnEditHomeBase.Visibility = this.Airliner.Airliner.Airline.IsHuman ? Visibility.Visible : System.Windows.Visibility.Collapsed;

            btnEditHomeBase.Content = imgEdit;

            panelHomeBase.Children.Add(btnEditHomeBase);

            lblAirport            = new ContentControl();
            lblAirport.MouseDown += new MouseButtonEventHandler(lblAirport_MouseDown);
            lblAirport.SetResourceReference(ContentControl.ContentTemplateProperty, "AirportCountryItem");
            lblAirport.Content = this.Airliner.Homebase;

            panelHomeBase.Children.Add(lblAirport);

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1018"), panelHomeBase));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1019"), UICreator.CreateTextBlock(string.Format(Translator.GetInstance().GetString("PageFleetAirliner", "1020"), this.Airliner.Airliner.BuiltDate.ToShortDateString(), this.Airliner.Airliner.Age))));
            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1021"), UICreator.CreateTextBlock(this.Airliner.Airliner.TailNumber)));

            TextBlock txtFlown = UICreator.CreateTextBlock(string.Format("{0:0.##} {1}", new NumberToUnitConverter().Convert(this.Airliner.Airliner.Flown), new StringToLanguageConverter().Convert("km.")));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1022"), txtFlown));

            TextBlock txtSinceService = UICreator.CreateTextBlock(string.Format("{0:0.##} {1}", new NumberToUnitConverter().Convert(this.Airliner.Airliner.LastServiceCheck), new StringToLanguageConverter().Convert("km.")));

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1023"), txtSinceService));

            WrapPanel panelCoordinates = new WrapPanel();

            Image imgMap = new Image();

            imgMap.Source     = new BitmapImage(new Uri(@"/Data/images/map.png", UriKind.RelativeOrAbsolute));
            imgMap.Height     = 16;
            imgMap.MouseDown += new MouseButtonEventHandler(imgMap_MouseDown);
            RenderOptions.SetBitmapScalingMode(imgMap, BitmapScalingMode.HighQuality);

            imgMap.Margin = new Thickness(2, 0, 0, 0);
            panelCoordinates.Children.Add(imgMap);


            TextBlock txtCurrentRoute = UICreator.CreateTextBlock(this.Airliner.HasRoute && this.Airliner.CurrentFlight != null ? string.Format("{0} - {1}", this.Airliner.CurrentFlight.Entry.DepartureAirport.Profile.Name, this.Airliner.CurrentFlight.Entry.Destination.Airport.Profile.Name) : "-");

            txtCurrentRoute.Margin = new Thickness(5, 0, 0, 0);
            panelCoordinates.Children.Add(txtCurrentRoute);

            lbQuickInfo.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PageFleetAirliner", "1024"), panelCoordinates));

            scroller.Content = panelInfo;

            return(scroller);
        }
Esempio n. 15
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            WrapPanel pnl = (WrapPanel)upanel.FindName("panel6");

            try { pnl.Background = (Brush)bc.ConvertFrom("red"); } catch { }
        }
Esempio n. 16
0
        private void PrepareForm()
        {
            _wordsStackPanel                  = new StackPanel();
            _listTextBlocksForCheck           = new List <TextBlock>();
            _listOfWordBorders                = new List <Border>();
            _wordsStackPanel.Background       = (SolidColorBrush) new BrushConverter().ConvertFromString("#F2F3F4");
            ForStackPanelScrollViewer.Content = _wordsStackPanel;
            foreach (var term in MatchGame.TermList)
            {
                StackPanel termStackPanel = new StackPanel()
                {
                    Orientation = Orientation.Horizontal
                };
                DockPanel dockPanel = new DockPanel()
                {
                    LastChildFill = true
                };
                WrapPanel wrapPanel            = new WrapPanel();
                TextBlock descriptionTextBlock = new TextBlock()
                {
                    Text          = term.Description,
                    FontSize      = 20,
                    Tag           = term,
                    TextAlignment = TextAlignment.Left,
                    Background    = (SolidColorBrush) new BrushConverter().ConvertFromString("#F9F7A8"),
                    TextWrapping  = TextWrapping.Wrap,
                    Padding       = new Thickness(5, 2, 5, 2),
                    Margin        = new Thickness(10, 10, 5, 0)
                };
                TextBlock placeForWordTextBlock = new TextBlock()
                {
                    AllowDrop         = true,
                    FontSize          = 18,
                    Tag               = term,
                    Background        = new SolidColorBrush(Color.FromRgb(202, 207, 210)),
                    Margin            = new Thickness(15, 10, 10, 0),
                    Width             = 200,
                    TextAlignment     = TextAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Center
                };
                _listTextBlocksForCheck.Add(placeForWordTextBlock);
                placeForWordTextBlock.Drop      += PlaceForWordRectangle_Drop;
                placeForWordTextBlock.MouseDown += PlaceForWordTextBlock_MouseDown;
                wrapPanel.Children.Add(descriptionTextBlock);
                TextBlock correctOrNotSign = new TextBlock()
                {
                    Margin = new Thickness(10, 10, 0, 0),
                    Height = 22,
                    Width  = 22
                };
                termStackPanel.Children.Add(placeForWordTextBlock);
                dockPanel.Children.Add(correctOrNotSign);
                dockPanel.Children.Add(termStackPanel);
                dockPanel.Children.Add(wrapPanel);
                _wordsStackPanel.Children.Add(dockPanel);

                TextBlock wordTextBlock = new TextBlock()
                {
                    Text       = term.Word,
                    FontSize   = 18,
                    Tag        = term,
                    Background = (SolidColorBrush) new BrushConverter().ConvertFromString("#F08080"),
                    Padding    = new Thickness(5, 1, 5, 1)
                };

                Border forTextBlock = new Border()
                {
                    BorderThickness = new Thickness(2),
                    BorderBrush     = new SolidColorBrush(Color.FromRgb(202, 207, 210)),
                    Margin          = new Thickness(10, 10, 0, 0),
                    Child           = wordTextBlock,
                    Tag             = wordTextBlock.Tag
                };

                forTextBlock.MouseDown += ForTextBlock_MouseDown;

                _listOfWordBorders.Add(forTextBlock);
            }
            ShuffleList();
            foreach (var border in _listOfWordBorders)
            {
                WordsWrapPanel.Children.Add(border);
            }
        }
Esempio n. 17
0
        void edit()
        {
            // Ela dönüşüne göre doldurma yapıyordum ancak zaten sıfırdan yapıyor. Bu yüzden kaldırdım.

            if (ElaDonus == false)
            {
                wrpanel = null; Model.pab = 0;
            }

            upanel.Children.Clear();
            Model.cab = 0; // en sonda değişiyor ama sen bilirsin
            OtoUnRG();

            if (bolumler.Count() != tipler.Count())
            {
                Window pencere = Home.Window;
                pencere.Content = new Interfaces.Message("Parts ve Types içerik sayısı birbiriyle uyumsuz, verileri kontrol edin.", MessageType.error);
                pencere.ShowDialog();
            }

            else
            {
                int intager = 1;
                foreach (string tap in bolumler)
                {
                    if ((WrapPanel)upanel.FindName("panel0") == null)
                    {
                        WrapPanel wrpbaslik = new WrapPanel();
                        wrpbaslik.Name = "panel0";
                        RegisterName(wrpbaslik.Name, wrpbaslik);
                        upanel.Children.Add(wrpbaslik);
                    }

                    WrapPanel ana = new WrapPanel();
                    ana.Name = $"panel{intager}";
                    RegisterName(ana.Name, ana);
                    ana.MouseUp    += Ana_MouseUp;
                    ana.MouseMove  += Ana_MouseMove;
                    ana.MouseLeave += Ana_MouseLeave;
                    ana.Cursor      = Cursors.Hand;
                    ana.Margin      = new Thickness(0, 0, 0, 10);
                    ana.Cursor      = Cursors.Hand;
                    ana.Background  = (Brush)bc.ConvertFrom("#e6e6e6");



                    RichTextBox rctyp = new RichTextBox();
                    rctyp.Padding                    = new Thickness(3, 6, 3, 6);
                    rctyp.BorderThickness            = new Thickness(0);
                    rctyp.HorizontalContentAlignment = HorizontalAlignment.Center;
                    rctyp.Background                 = (Brush)bc.ConvertFrom("transparent");
                    rctyp.Width    = 70;
                    rctyp.Height   = 40;
                    rctyp.FontSize = 16;
                    rctyp.Document.Blocks.Clear();
                    rctyp.Document.Blocks.Add(
                        new Paragraph(new Run(
                                          tipler[intager - 1].ToString()
                                          ))
                        );
                    ana.Children.Add(rctyp);

                    RichTextBox rcprt = new RichTextBox();
                    rcprt.BorderThickness          = new Thickness(0);
                    rcprt.Background               = (Brush)bc.ConvertFrom("transparent");
                    rcprt.Width                    = 340;
                    rcprt.Height                   = 40;
                    rcprt.VerticalContentAlignment = VerticalAlignment.Center;
                    rcprt.FontSize                 = 16;

                    rcprt.Document.Blocks.Clear();
                    rcprt.Document.Blocks.Add(
                        new Paragraph(new Run(
                                          bolumler[intager - 1].ToString()
                                          ))
                        );
                    //rcprt.MouseLeave += Rcprt_MouseLeave;
                    ana.Children.Add(rcprt);



                    WrapPanel yakala = new WrapPanel();
                    yakala.Height      = 40;
                    yakala.Width       = 40;
                    yakala.Name        = "Yakala" + intager;
                    yakala.Background  = (Brush)bc.ConvertFrom("transparent");
                    yakala.MouseUp    += Btn_MouseUp;
                    yakala.MouseMove  += Btn_MouseMove;
                    yakala.MouseLeave += Btn_MouseLeave;

                    ana.Children.Add(yakala);



                    upanel.Children.Add(ana);

                    intager++;
                }

                Model.cab = bolumler.Count();
            }
        }
Esempio n. 18
0
 private void TPanelBtn_Click(object sender, RoutedEventArgs e)
 {
     Model.pab = 0; wrpanel = null;
     dpanel.Children.Clear(); ResetBGColors();
 }
Esempio n. 19
0
        public MenuSyncVM(WrapPanel paperContentPanel)
        {
            _PaperContentPanel = paperContentPanel;

            _PaperContentPanel.Children.Clear();
        }
Esempio n. 20
0
        public RdsControl(Window window)
        {
            InitializeComponent();
            viewMode = ViewMode.enScaleMode;

            mainWindow = window;

            lastState = new MyWindowState();

            SetMainImageNewPic = this.ViewImage;

            //----------------------Height Animation Maximize
            heightB_Animation              = new DoubleAnimation();
            heightB_Animation.From         = 0;
            heightB_Animation.To           = 20;
            heightB_Animation.FillBehavior = FillBehavior.HoldEnd;
            heightB_Animation.Duration     = new Duration(TimeSpan.FromMilliseconds(100));

            //----------------------Height Animation Minimize
            heightE_Animation              = new DoubleAnimation();
            heightE_Animation.From         = 20;
            heightE_Animation.To           = 0;
            heightE_Animation.FillBehavior = FillBehavior.HoldEnd;
            heightE_Animation.Duration     = new Duration(TimeSpan.FromMilliseconds(100));

            //----------------------Margin Animation Down
            MarginB_Animation              = new ThicknessAnimation();
            MarginB_Animation.From         = new Thickness(0, 0, 0, 0);
            MarginB_Animation.To           = new Thickness(0, 20, 0, 0);
            MarginB_Animation.FillBehavior = FillBehavior.HoldEnd;
            MarginB_Animation.AutoReverse  = false;
            MarginB_Animation.Duration     = new Duration(TimeSpan.FromMilliseconds(100));

            //----------------------Margin Animation UP

            MarginE_Animation              = new ThicknessAnimation();
            MarginE_Animation.From         = new Thickness(0, 20, 0, 0);
            MarginE_Animation.To           = new Thickness(0, 0, 0, 0);
            MarginE_Animation.FillBehavior = FillBehavior.Stop;
            MarginE_Animation.AutoReverse  = false;
            MarginE_Animation.Duration     = new Duration(TimeSpan.FromMilliseconds(100));

            servers = new Dictionary <string, RemoteServer>();

            rdsService = new RdsReceiver(servers);
            rdsService.StartListen();
            MainWind       = this;
            ImageContainer = this.ImgContainer;
            IntPtr hBmp = Images.close_window.GetHbitmap();

            this.Close.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBmp, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            Utils.DeleteObject(hBmp);
            IntPtr hBmp_max = Images.maximize_window.GetHbitmap();

            this.Maximize.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBmp_max, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            Utils.DeleteObject(hBmp_max);
            IntPtr hBmp_keyboardC = Images.control_panel_1.GetHbitmap();

            this.KeyBoardControl.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBmp_keyboardC, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            Utils.DeleteObject(hBmp_keyboardC);
            IntPtr hBmp_arrow = Images._1427375812_double_arrow_down_32.GetHbitmap();

            this.Arrow.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBmp_arrow, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            Utils.DeleteObject(hBmp_arrow);
            IntPtr hBmp_screenMode = Images.display_mac_inv.GetHbitmap();

            this.ScreenMode.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBmp_screenMode, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            Utils.DeleteObject(hBmp_screenMode);
        }
Esempio n. 21
0
        /// <summary>
        /// Details zum Serienbrief auflisten
        /// </summary>
        /// <param name="formletterPatternID"></param>
        private void listFormletterDetails(int formletterPatternID)
        {
            // Baue FormletterPattern Instanz
            FormletterPatternModelDB formletterPatternModel = new FormletterPatternModelDB(formletterPatternID);

            // Liste triviale Eigenschaften auf
            lbName.Content       = formletterPatternModel.name;
            lbSaluationM.Content = formletterPatternModel.saluation_m;
            lbSaluationF.Content = formletterPatternModel.saluation_f;
            lbSaluationN.Content = formletterPatternModel.saluation_n;
            lbFileName.Content   = formletterPatternModel.formletter_filename;

            spPreview.Visibility  = Visibility.Visible;
            btnConfirm.Visibility = Visibility.Visible;

            if (!String.IsNullOrEmpty(formletterPatternModel.letterText))
            {
                Label lbLetterText  = new Label();
                Label lbLetterText1 = new Label();
                lbLetterText.Content  = "Brieftext:";
                lbLetterText1.Content = formletterPatternModel.letterText;
                spLetterText.Children.Add(lbLetterText);
                spLetterText.Children.Add(lbLetterText1);
                spLetterText.Visibility = Visibility.Visible;
            }

            // Liste alle FilterSets / Filter auf
            foreach (var set in formletterPatternModel.filterSetModels)
            {
                Label lb = new Label();
                lb.Content = "Filter-Set: ";
                lb.Width   = 200;
                lb.Margin  = new Thickness(0, 20, 0, 0);
                Label lb1 = new Label();
                lb1.Margin  = new Thickness(0, 20, 0, 0);
                lb1.Content = set.name;
                WrapPanel wp5 = new WrapPanel();
                wp5.Children.Add(lb);
                wp5.Children.Add(lb1);
                spFilterSets.Children.Add(wp5);

                foreach (var filter in set.filterList)
                {
                    Label lbFilter = new Label();
                    lbFilter.Margin  = new Thickness(30, 0, 0, 0);
                    lbFilter.Content = filter.ToString();
                    spFilterSets.Children.Add(lbFilter);
                }
            }

            // Liste Spaltenzuweisungen auf
            Label lbColumnAssignments = new Label();

            lbColumnAssignments.Margin  = new Thickness(0, 30, 0, 0);
            lbColumnAssignments.Content = IniParser.GetSetting("FORMLETTER", "printAssignment");
            spPreview.Children.Add(lbColumnAssignments);

            foreach (var assignment in formletterPatternModel.formletterColumnCsvDocumentAssignments)
            {
                Label lb = new Label();
                lb.Content = assignment.ToString();
                lb.Margin  = new Thickness(30, 0, 0, 0);
                spPreview.Children.Add(lb);
            }
        }
Esempio n. 22
0
        private void Start()
        {
            string[] productImagePath   = { "cat-1.jpg", "cat-2.jpg", "cat-3.jpg", "cat-4.jpg" };
            string   productName        = "Dator";
            string   productDescription = "Contains a CPU, and a whole lot of other stuff.";
            string   productPrice       = "1500";

            // Window options
            Title  = "GUI App";
            Width  = 600;
            Height = 1000;
            WindowStartupLocation = WindowStartupLocation.CenterScreen;

            // Scrolling
            ScrollViewer root = new ScrollViewer();

            root.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            Content = root;

            // Main grid
            StackPanel stack = new StackPanel
            {
                Orientation = Orientation.Vertical,
                Margin      = new Thickness(5)
            };

            root.Content = stack;
            //Grid grid = new Grid();
            //root.Content = grid;
            //grid.Margin = new Thickness(5);

            //grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            //grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            //grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            //grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            //grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            //grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });

            WrapPanel wrap = new WrapPanel
            {
                Orientation = Orientation.Horizontal
            };

            //root.Content = wrap;
            stack.Children.Add(wrap);
            //grid.Children.Add(wrap);
            //Grid.SetColumn(wrap, 0);
            //Grid.SetRow(wrap, 0);

            wrap.Children.Add(CreateProductgrid(productImagePath[0], productName, productDescription, productPrice));
            wrap.Children.Add(CreateProductgrid(productImagePath[1], productName, productDescription, productPrice));
            wrap.Children.Add(CreateProductgrid(productImagePath[2], productName, productDescription, productPrice));
            wrap.Children.Add(CreateProductgrid(productImagePath[3], productName, productDescription, productPrice));

            stack.Children.Add(CreateAddProductGrid(productName, 4));
            stack.Children.Add(CreateAddProductGrid(productName, 2));
            stack.Children.Add(CreateAddProductGrid(productName, 1));
            stack.Children.Add(CreateAddProductGrid(productName, 3));

            Grid cartGrid = new Grid();

            cartGrid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            cartGrid.ColumnDefinitions.Add(new ColumnDefinition());
            cartGrid.ColumnDefinitions.Add(new ColumnDefinition());
            cartGrid.ColumnDefinitions.Add(new ColumnDefinition());
            stack.Children.Add(cartGrid);

            Button saveCartButton = CreateButton("Spara kundvagnen");

            cartGrid.Children.Add(saveCartButton);
            Grid.SetRow(saveCartButton, 0);
            Grid.SetColumn(saveCartButton, 0);

            Button emptyCartButton = CreateButton("Töm kundvagnen");

            cartGrid.Children.Add(emptyCartButton);
            Grid.SetRow(emptyCartButton, 0);
            Grid.SetColumn(emptyCartButton, 1);

            Button confirmOrderButton = CreateButton("Avsluta köp");

            cartGrid.Children.Add(confirmOrderButton);
            Grid.SetRow(confirmOrderButton, 0);
            Grid.SetColumn(confirmOrderButton, 2);

            Grid rebateCodeGrid = new Grid();

            rebateCodeGrid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            rebateCodeGrid.ColumnDefinitions.Add(new ColumnDefinition());
            rebateCodeGrid.ColumnDefinitions.Add(new ColumnDefinition());
            rebateCodeGrid.ColumnDefinitions.Add(new ColumnDefinition());
            stack.Children.Add(rebateCodeGrid);

            Label rebateCodeLabel = CreateLabel("Rabattkod");

            rebateCodeGrid.Children.Add(rebateCodeLabel);
            Grid.SetRow(rebateCodeLabel, 0);
            Grid.SetColumn(rebateCodeLabel, 0);

            TextBox rebateCodeTextBox = new TextBox
            {
                Margin = new Thickness(5)
            };

            rebateCodeGrid.Children.Add(rebateCodeTextBox);
            Grid.SetRow(rebateCodeTextBox, 0);
            Grid.SetColumn(rebateCodeTextBox, 1);

            Button confirmRebateCodeButton = CreateButton("OK");

            rebateCodeGrid.Children.Add(confirmRebateCodeButton);
            Grid.SetRow(confirmRebateCodeButton, 0);
            Grid.SetColumn(confirmRebateCodeButton, 2);

            Grid sumPurchaseGrid = new Grid();

            sumPurchaseGrid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            sumPurchaseGrid.ColumnDefinitions.Add(new ColumnDefinition());
            stack.Children.Add(sumPurchaseGrid);

            int   sumPurchase      = int.Parse(productPrice);
            Label sumPurchaseLabel = CreateLabel("Sum: " + productPrice);

            sumPurchaseGrid.Children.Add(sumPurchaseLabel);
            Grid.SetRow(sumPurchaseLabel, 0);
            Grid.SetColumn(sumPurchaseLabel, 0);
        }
Esempio n. 23
0
        private void Window_Activated(object sender, EventArgs e)
        {
            try
            {
                if (CET.savedataFCustomEST == 1)
                {
                    if (editCustomEST == 1)
                    {
                        var Lines = File.ReadAllLines("EST.txt");
                        int i     = 0;

                        for (; i < Lines.Length; i++)
                        {
                            if (Lines[i] == ((RadioButton)Tsys.SelectedValue).Name.ToString())
                            {
                                int type = Int32.Parse(File.ReadLines("EST.txt").Skip(i + 4).First());

                                Lines[i - 1] = " ";
                                Lines[i + 1] = " ";
                                Lines[i + 2] = " ";
                                Lines[i + 3] = " ";
                                Lines[i + 4] = " ";
                                break;
                            }
                        }
                        var newLines = Lines.Where(line => !line.Contains(((RadioButton)Tsys.SelectedValue).Name.ToString()));
                        var newLineA = newLines.Where(line => !line.Contains(Lines[i - 1]));
                        File.WriteAllLines("EST.txt", newLineA);
                        System.IO.File.Delete(System.IO.Path.Combine("ESTData", ((RadioButton)Tsys.SelectedValue).Name.ToString() + ".txt"));
                        Tsys.Items.Remove(Tsys.SelectedItem);
                        editCustomEST = 0;
                    }
                    WrapPanel   wrapPanel = new WrapPanel();
                    RadioButton rdn       = new RadioButton();
                    if (CET.LoadImagePath.Text != "")
                    {
                        ImageSource image = new ImageSourceConverter().ConvertFromString(CET.LoadImagePath.Text) as ImageSource;
                        wrapPanel.Children.Add(new Image {
                            Source = image, Width = 17, Height = 15
                        });
                    }
                    wrapPanel.Children.Add(new TextBlock {
                        Text = CET.NameET.Text, Foreground = Brushes.White, Name = CET.NameET.Text
                    });
                    rdn.Name     = CET.NameET.Text;
                    rdn.TabIndex = CET.tabindexType;
                    rdn.Content  = wrapPanel;

                    using (StreamWriter w = new StreamWriter("EST.txt", true, Encoding.Default))
                    {
                        w.WriteLine("Name:");
                        w.WriteLine(CET.NameET.Text);
                        w.WriteLine("ImagePath:");
                        w.WriteLine(CET.LoadImagePath.Text);
                        w.WriteLine("TabIndex:");
                        w.WriteLine(CET.tabindexType.ToString());
                    }
                    if (CET.tabindexType > 9)
                    {
                        using (StreamWriter f = new StreamWriter(System.IO.Path.Combine("ESTData", CET.NameET.Text + ".txt")))
                        {
                            f.WriteLine("Buttons:");
                            f.WriteLine(CET.buttonsCount);
                            f.WriteLine("Buttonstype:");
                            f.WriteLine(CET.Btype.SelectedIndex);
                            f.WriteLine("ButtonsColor:");
                            foreach (ListBoxItem fs in CET.ButtonsList.Items)
                            {
                                string str = fs.Background + "";
                                f.WriteLine(str);
                            }
                            f.WriteLine("ButtonsContent:");
                            foreach (ListBoxItem fs in CET.ButtonsList.Items)
                            {
                                string str = fs.Content + "";
                                f.WriteLine(str);
                            }
                            f.WriteLine("ButtonsType:");
                            if (CET.Btype.SelectedIndex == 5)
                            {
                                foreach (ListBoxItem fs in CET.ButtonSupplement.Items)
                                {
                                    string str = fs.Content + "";
                                    f.WriteLine(str);
                                }
                            }
                            else
                            {
                                foreach (ListBoxItem fs in CET.ButtonSupplement.Items)
                                {
                                    string str = "";
                                    f.WriteLine(str);
                                }
                            }
                        }
                    }

                    Tsys.Items.Add(rdn);

                    CET.savedataFCustomEST = 0;
                    CET.LoadImagePath.Clear();
                    CET.NameET.Clear();
                    CET.ButtonsList.Items.Clear();
                    CET.ButtonSupplement.Items.Clear();
                    CET.Add.Content          = "Add";
                    CET.EType.SelectedIndex  = -1;
                    CET.Btype.SelectedIndex  = -1;
                    CET.BCount.SelectedIndex = -1;
                    foreach (UIElement uI in Tsys.Items)
                    {
                        if (uI is RadioButton)
                        {
                            ((RadioButton)uI).Checked += Sys_Checked;
                        }
                    }
                }
            }
            catch (Exception exp)
            {
                Texter.Text = exp.Message;
            }
        }
Esempio n. 24
0
 public VerbPanel(string name) : base(name)
 {
     _wrapPanel = new WrapPanel();
     AddChild(_wrapPanel);
 }
Esempio n. 25
0
        public Settings()
        {
            InitializeComponent();
            this.DataContext = CurrentModel;


            if (debugCheck == 1)
            {
                Debug.IsChecked = true;
                Texter.Clear();
            }
            if (progressbarCheck == 1)
            {
                Pb.IsChecked = true;
                Texter.Clear();
            }

            if (autoCheck == 1)
            {
                Auto.IsChecked = true;
                Type.IsEnabled = false;
                Texter.Clear();
            }
            if (File.ReadAllText(@"EST.txt") != "")
            {
                int strings = System.IO.File.ReadAllLines("EST.txt").Length;
                int str     = 0;
                int data    = strings / 6;
                for (int path = 0; path < data; path++)
                {
                    if (File.ReadLines("EST.txt").Skip(str + path).First() == "")
                    {
                        continue;
                    }
                    else
                    {
                        WrapPanel   wrapPanel = new WrapPanel();
                        RadioButton rdn       = new RadioButton();
                        if (File.ReadLines("EST.txt").Skip(str + 3).First() != "")
                        {
                            ImageSource image = new ImageSourceConverter().ConvertFromString(File.ReadLines("EST.txt").Skip(str + 3).First()) as ImageSource;
                            wrapPanel.Children.Add(new Image {
                                Source = image, Width = 17, Height = 15
                            });
                        }
                        wrapPanel.Children.Add(new TextBlock {
                            Text = File.ReadLines("EST.txt").Skip(str + 1).First(), Foreground = Brushes.White
                        });
                        rdn.TabIndex = Int32.Parse(File.ReadLines("EST.txt").Skip(5).First());
                        rdn.Content  = wrapPanel;
                        rdn.Name     = File.ReadLines("EST.txt").Skip(str + 1).First();
                        Tsys.Items.Add(rdn);
                        str += 6;
                    }
                }
            }

            foreach (UIElement uI in Tsys.Items)
            {
                if (uI is RadioButton)
                {
                    ((RadioButton)uI).Checked += Sys_Checked;
                }
            }
            foreach (UIElement uI in Lang.Items)
            {
                if (uI is RadioButton)
                {
                    ((RadioButton)uI).Checked += Lang_Checked;
                }
            }
        }
Esempio n. 26
0
        // Displays all the products from Products.csv
        private WrapPanel ProductList()
        {
            Fan fan = new Fan();

            WrapPanel wrappanel = new WrapPanel
            {
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment   = VerticalAlignment.Top,
                Width  = 200,
                Margin = new Thickness(20)
            };

            // loops through the products.csv file and displays all the items in it
            try
            {
                foreach (var item in File.ReadAllLines(@"products.csv").Select(a => a.Split(",")))
                {
                    fan.Name        = item[0];
                    fan.Description = item[1];
                    fan.Price       = decimal.Parse(item[2]);
                    fan.ImageName   = item[3];

                    TextBlock productName = new TextBlock
                    {
                        Text       = fan.Name,
                        FontFamily = new FontFamily("Comic Sans MS")
                    };
                    wrappanel.Children.Add(productName);

                    ImageSource imgSource = new BitmapImage(new Uri(@"Images\" + fan.ImageName, UriKind.Relative));
                    Image       image     = new Image
                    {
                        Source = imgSource,
                        Width  = 100,
                        Height = 100,
                    };
                    wrappanel.Children.Add(image);

                    TextBlock productDescription = new TextBlock
                    {
                        Text       = fan.Description,
                        FontFamily = new FontFamily("Comic Sans MS"),
                        Margin     = new Thickness(5),
                    };
                    wrappanel.Children.Add(productDescription);

                    var buyButton = new Button
                    {
                        Content     = "Buy",
                        Tag         = fan.Name,
                        DataContext = fan.Price,
                        FontFamily  = new FontFamily("Comic Sans MS"),
                        Width       = 40,
                    };
                    wrappanel.Children.Add(buyButton);
                    buyButton.Click += AddFanToCart;
                }
            }
            // If there are no products or it cant find the csv file it says "Sorry there are no products"
            catch (Exception)
            {
                TextBlock noProducts = new TextBlock
                {
                    Text       = "Sorry there are no products",
                    FontFamily = new FontFamily("Comic Sans MS"),
                    FontSize   = 15
                };
                wrappanel.Children.Add(noProducts);
            }


            return(wrappanel);
        }
Esempio n. 27
0
        private void drawPieChart(Node node)
        {
            int         i;
            double      sum  = 0;
            List <Pair> data = new List <Pair>();

            for (i = 0; i < node.Properties.Count; i += 2)
            {
                Pair pair = new Pair();
                pair.Name  = node.Properties[i];
                pair.Value = double.Parse(node.Properties[i + 1]);
                data.Add(pair);
                sum += pair.Value;
            }



            Rectangle rectangle = new Rectangle();

            rectangle.Width           = node.Width;
            rectangle.Height          = node.Height;
            rectangle.Fill            = Brushes.White;
            rectangle.Stroke          = Brushes.Black;
            rectangle.StrokeThickness = 1;
            rectangle.MouseDown      += node.OnMouseDown;
            node.UICanvas.Children.Add(rectangle);

            double diameter   = node.Height - 10;
            double radius     = diameter / 2;
            double centerX    = radius + 5;
            double centerY    = radius + 5;
            double startAngle = 0;

            if (data.Count == 0)
            {
                Pair pair = new Pair();
                pair.Name  = "No Data";
                pair.Value = 100;
                data.Add(pair);
                sum += pair.Value;
            }

            WrapPanel wrapPanel = new WrapPanel();

            wrapPanel.Orientation = Orientation.Vertical;
            node.UICanvas.Children.Add(wrapPanel);
            wrapPanel.Margin = new Thickness(diameter + 10, 0, 0, 0);
            wrapPanel.Width  = node.Width - diameter - 10;
            wrapPanel.Height = node.Height;


            List <Color> colors = new List <Color>();

            colors.Add(Colors.Red);
            colors.Add(Colors.Blue);
            colors.Add(Colors.Yellow);
            colors.Add(Colors.Magenta);
            colors.Add(Colors.Green);
            colors.Add(Colors.Gray);

            for (i = 0; i < data.Count; i++)
            {
                double angle         = data[i].Value / sum * 360;
                bool   isMoreThan180 = false;
                if (angle > 180)
                {
                    isMoreThan180 = true;
                }

                Path       path       = new Path();
                PathFigure pathFigure = new PathFigure();
                pathFigure.StartPoint = new Point(centerX, centerY);
                pathFigure.IsClosed   = true;
                pathFigure.IsFilled   = true;

                double startX = radius * Math.Cos(startAngle * Math.PI / 180);
                double startY = radius * Math.Sin(startAngle * Math.PI / 180);
                startX += centerX;
                startY += centerY;

                startAngle -= angle;

                double endX = radius * Math.Cos(startAngle * Math.PI / 180);
                double endY = radius * Math.Sin(startAngle * Math.PI / 180);
                endX += centerX;
                endY += centerY;

                if (data.Count == 1)
                {
                    endY += 0.001;
                }


                PathSegment segment = new LineSegment(new Point(startX, startY), true);
                pathFigure.Segments.Add(segment);

                SweepDirection direction = SweepDirection.Counterclockwise;
                ArcSegment     arc       = new ArcSegment(new Point(endX, endY), new Size(radius, radius), 0, isMoreThan180, direction, true);
                pathFigure.Segments.Add(arc);

                segment = new LineSegment(new Point(centerX, centerY), true);
                pathFigure.Segments.Add(segment);

                List <PathFigure> figures = new List <PathFigure>();
                figures.Add(pathFigure);
                path.Data = new PathGeometry(figures, FillRule.Nonzero, Transform.Identity);

                path.Stroke          = Brushes.White;
                path.StrokeThickness = 2;

                if (angle < 20)
                {
                    path.StrokeThickness = 1;
                }

                Color color = colors[(i % colors.Count)];
                Brush brush = new SolidColorBrush(color);
                path.Fill       = brush;
                path.MouseDown += node.OnMouseDown;

                node.UICanvas.Children.Add(path);

                Border border = new Border();
                border.Background       = brush;
                border.Width            = 15;
                border.Height           = 15;
                border.IsHitTestVisible = false;

                double percent           = data[i].Value / sum * 100;
                int    percentFirstPart  = (int)percent;
                int    percentSecondPart = (int)((percent - percentFirstPart) * 100);
                string percentString     = percentFirstPart.ToString() + "." + percentSecondPart.ToString() + "%";

                Label label = new Label();
                label.Content          = data[i].Name + " : " + percentString;
                label.IsHitTestVisible = false;

                StackPanel stackPanel = new StackPanel();
                stackPanel.Orientation = Orientation.Horizontal;
                stackPanel.Children.Add(border);
                stackPanel.Children.Add(label);
                wrapPanel.Children.Add(stackPanel);
            }
            node.LabelTextBlock.Visibility = Visibility.Collapsed;
        }
Esempio n. 28
0
        private void ShowEquipments(List <Equipment> eqlist)
        {
            SpInv.Children.Clear();

            foreach (Equipment item in eqlist)
            {
                Border br = new Border();
                br.BorderThickness = new Thickness(1);
                br.BorderBrush     = new SolidColorBrush(Colors.Black);
                br.Margin          = new Thickness(0, 0, 0, 10);
                SpInv.Children.Add(br);

                Grid DG = new Grid();
                DG.Width      = 600;
                DG.MinHeight  = 75;
                DG.Background = new SolidColorBrush(Colors.Transparent);
                ColumnDefinition col1 = new ColumnDefinition();
                col1.Width = new GridLength(75);
                ColumnDefinition col2 = new ColumnDefinition();
                col2.Width = new GridLength(425);
                ColumnDefinition col3 = new ColumnDefinition();
                col3.Width = new GridLength(100);
                DG.ColumnDefinitions.Add(col1);
                DG.ColumnDefinitions.Add(col2);
                DG.ColumnDefinitions.Add(col3);
                br.Child = DG;

                Button Delbtn = new Button();
                Grid.SetRow(Delbtn, 0);
                Grid.SetColumn(Delbtn, 2);
                Delbtn.Width               = 60;
                Delbtn.Height              = 20;
                Delbtn.Click              += btnAddToList;
                Delbtn.Tag                 = item._id.ToString();
                Delbtn.Margin              = new Thickness(0, 0, 0, 10);
                Delbtn.Foreground          = Brushes.White;
                Delbtn.Background          = (SolidColorBrush)(new BrushConverter().ConvertFrom("#5FD080"));
                Delbtn.Content             = "Tilføj";
                Delbtn.HorizontalAlignment = HorizontalAlignment.Center;
                Delbtn.VerticalAlignment   = VerticalAlignment.Bottom;
                DG.Children.Add(Delbtn);

                Border brimg = new Border();
                brimg.BorderThickness = new Thickness(1);
                brimg.BorderBrush     = new SolidColorBrush(Colors.Black);
                brimg.Margin          = new Thickness(10, 10, 10, 10);
                Grid.SetColumn(brimg, 0);
                DG.Children.Add(brimg);

                Image img = new Image();

                Category Cat = CatRep.GetById(item._catId);
                string   url = "../Resources/18217764_1871114903128407_1044267123_n.png";
                if (Cat._thumbnail != null)
                {
                    if (!string.IsNullOrWhiteSpace(Cat._thumbnail))
                    {
                        url = Cat._thumbnail;
                    }
                }

                img.Source = new BitmapImage(new Uri(url, UriKind.RelativeOrAbsolute));
                img.Height = 50;
                img.Width  = 50;

                brimg.Child = img;

                StackPanel spcol1 = new StackPanel();
                Grid.SetColumn(spcol1, 1);
                DG.Children.Add(spcol1);

                Label lb = new Label();
                lb.VerticalAlignment = VerticalAlignment.Center;
                lb.Content           = Cat._name;
                lb.FontSize          = 20;
                Grid.SetColumn(lb, 1);
                spcol1.Children.Add(lb);

                WrapPanel wp = new WrapPanel();
                Grid.SetColumn(wp, 1);
                spcol1.Children.Add(wp);

                foreach (KeyValuePair <string, string> val in item._values)
                {
                    Label lb2 = new Label();
                    lb2.VerticalAlignment = VerticalAlignment.Center;
                    lb2.Content           = val.Key + ": " + val.Value;
                    wp.Children.Add(lb2);
                }
            }
        }
Esempio n. 29
0
        public static void ActGenerate()
        {
            var        mainWin          = Application.Current.Windows.Cast <Window>().FirstOrDefault(window => window is MainWindow) as MainWindow;
            WrapPanel  ActionPanel      = new WrapPanel();
            WrapPanel  ButtomPanel      = new WrapPanel();
            StackPanel ActionStackPanel = new StackPanel();
            Button     NewAction        = new Button();
            Button     DeleteAction     = new Button();

            Act = new ListBox();
            DataGrid Info = new DataGrid();


            if (Experts != null)
            {
                foreach (Experiments.Action exp in Experts.Act)
                {
                    Act.Items.Add(exp.name);
                }
            }


            NewAction.Content = "Новое действие";
            NewAction.Margin  = new Thickness(10, 10, 10, 10);
            NewAction.Click  += (i, e) =>
            {
                CreateNewSequationWindow();
            };
            ButtomPanel.Children.Add(NewAction);


            DeleteAction.Content = "Удалить действие";
            DeleteAction.Margin  = new Thickness(10, 10, 10, 10);
            DeleteAction.Click  += (i, e) =>
            {
                DeleteSequationWindow();
            };
            ButtomPanel.Children.Add(DeleteAction);


            Act.Height = 200;
            Act.Width  = 220;
            ActionStackPanel.Children.Add(Act);
            Act.SelectionChanged += (i, e) =>
            {
                try
                {
                    Info.Items.Clear();
                }
                catch { }
                if (Act.SelectedItem != null)
                {
                    List <string>  Atribures;
                    List <MyTable> Content = new List <MyTable>();
                    ActiveAction = Act.SelectedItem.ToString();
                    Atribures    = Scheme.Scheme.getExsistedAtributesNames(ActiveAction);
                    Content      = new List <MyTable>();
                    foreach (string a in Atribures)
                    {
                        Content.Add(new MyTable(a, "1"));
                    }
                    Info.ItemsSource       = Content;
                    Info.Columns[0].Header = "Атрибут";
                    Info.Columns[0].Width  = 200;
                    Info.Columns[1].Header = "Значение";
                    Info.Columns[1].Width  = 200;
                }
            };


            ActionStackPanel.Children.Add(ButtomPanel);
            ActionPanel.Children.Add(ActionStackPanel);
            Info.Height = 240;
            Info.Width  = 440;
            ActionPanel.Children.Add(Info);

            mainWin.Editor.Children.Add(ActionPanel);

            mainWin.SaveProject.Click += (i, e) =>
            {
                List <string> names = new List <string>();
            };
        }
Esempio n. 30
0
        /// <summary>
        /// Wraps the specified framework element.
        /// </summary>
        /// <param name="frameworkElement">The framework element.</param>
        /// <param name="wrapOptions">The wrap options.</param>
        /// <param name="buttons">The buttons to add.</param>
        /// <param name="parentContentControl">The parent content control.</param>
        /// <returns><see cref="Grid"/> that contains the wrapped content.</returns>
        /// <remarks>
        /// The framework element that is passed must be disconnected from the parent first. It is recommended to first check whether a
        /// framework element can be wrapped by using the <see cref="CanBeWrapped"/> method.
        /// This method will automatically handle the disconnecting of the framework element from the parent is the <paramref name="parentContentControl"/>
        /// is passed.
        /// </remarks>
        public static Grid Wrap(FrameworkElement frameworkElement, WrapOptions wrapOptions, DataWindowButton[] buttons, ContentControl parentContentControl)
        {
            Argument.IsNotNull("frameworkElement", frameworkElement);
            Argument.IsNotNull("buttons", buttons);

            if (!string.IsNullOrWhiteSpace(frameworkElement.Name))
            {
                if (frameworkElement.Name.StartsWith(MainContentHolderName))
                {
                    return((Grid)frameworkElement);
                }
            }

#if SILVERLIGHT
            // According to the documentation, no visual tree is garantueed in the Loaded event of the user control.
            // However, as a solution the documentation says you need to manually call ApplyTemplate, so let's do that.
            // For more info, see http://msdn.microsoft.com/en-us/library/ms596558(vs.95)
            var frameworkElementAsControl = frameworkElement as Control;
            if (frameworkElementAsControl != null)
            {
                frameworkElementAsControl.ApplyTemplate();
            }
#endif

            if (parentContentControl != null)
            {
                SetControlContent(parentContentControl, null);
            }

            var mainContent = frameworkElement;

            // Create the outside grid, so the inner grid is never the same as the main content holder
            var outsideGrid = new Grid();
            outsideGrid.Name = MainContentHolderName.GetUniqueControlName();

            if (Application.Current != null)
            {
#if SILVERLIGHT
                // TODO: Fix styles for silverlight
#else
                outsideGrid.Resources.MergedDictionaries.Add(Application.Current.Resources);
#endif
            }

            #region Generate buttons
#if !NETFX_CORE
            if (buttons.Length > 0)
            {
                // Add wrappanel containing the buttons
                var buttonsWrapPanel = new WrapPanel();
                buttonsWrapPanel.Name = ButtonsWrapPanelName;
#if SILVERLIGHT
                buttonsWrapPanel.Style = Application.Current.Resources["DataWindowButtonContainerStyle"] as Style;
#else
                buttonsWrapPanel.SetResourceReference(FrameworkElement.StyleProperty, "DataWindowButtonContainerStyle");
#endif

                foreach (var dataWindowButton in buttons)
                {
                    var button = new Button();
                    if (dataWindowButton.CommandBindingPath != null)
                    {
                        button.SetBinding(ButtonBase.CommandProperty, new Binding(dataWindowButton.CommandBindingPath));
                    }
                    else
                    {
                        button.Command = dataWindowButton.Command;
                    }

                    if (dataWindowButton.ContentBindingPath != null)
                    {
                        Binding contentBinding = new Binding(dataWindowButton.ContentBindingPath);
                        if (dataWindowButton.ContentValueConverter != null)
                        {
                            contentBinding.Converter = dataWindowButton.ContentValueConverter;
                        }
                        button.SetBinding(ButtonBase.ContentProperty, contentBinding);
                    }
                    else
                    {
                        button.Content = dataWindowButton.Text;
                    }

                    if (dataWindowButton.VisibilityBindingPath != null)
                    {
                        Binding visibilityBinding = new Binding(dataWindowButton.VisibilityBindingPath);
                        if (dataWindowButton.VisibilityValueConverter != null)
                        {
                            visibilityBinding.Converter = dataWindowButton.VisibilityValueConverter;
                        }
                        button.SetBinding(ButtonBase.VisibilityProperty, visibilityBinding);
                    }
#if NET
                    button.SetResourceReference(FrameworkElement.StyleProperty, "DataWindowButtonStyle");
                    button.IsDefault = dataWindowButton.IsDefault;
                    button.IsCancel  = dataWindowButton.IsCancel;
#else
                    button.Style = Application.Current.Resources["DataWindowButtonStyle"] as Style;
#endif

                    if (dataWindowButton.IsDefault)
                    {
                        button.Name = DefaultOkButtonName;
                    }
                    else if (dataWindowButton.IsCancel)
                    {
                        button.Name = DefaultCancelButtonName;
                    }

                    buttonsWrapPanel.Children.Add(button);
                }

                // Create dockpanel that will dock the buttons underneath the content
                var subDockPanel = new DockPanel();
                subDockPanel.LastChildFill = true;
                DockPanel.SetDock(buttonsWrapPanel, Dock.Bottom);
                subDockPanel.Children.Add(buttonsWrapPanel);

                // Add actual content
                subDockPanel.Children.Add(frameworkElement);

                // The dockpanel is now the main content
                mainContent = subDockPanel;
            }
#endif
            #endregion

            #region Generate internal grid
            // Create grid
            var internalGrid = new Grid();
            internalGrid.Name = InternalGridName;
            internalGrid.Children.Add(mainContent);

            // Grid is now the main content
            mainContent = internalGrid;
            #endregion

            #region Generate WarningAndErrorValidator
            if (Enum <WrapOptions> .Flags.IsFlagSet(wrapOptions, WrapOptions.GenerateWarningAndErrorValidatorForDataContext))
            {
                // Create warning and error validator
                var warningAndErrorValidator = new WarningAndErrorValidator();
                warningAndErrorValidator.Name = WarningAndErrorValidatorName;
                warningAndErrorValidator.SetBinding(WarningAndErrorValidator.SourceProperty, new Binding());

                // Add to grid
                internalGrid.Children.Add(warningAndErrorValidator);
            }
            #endregion

            #region Generate InfoBarMessageControl
#if !NETFX_CORE
            if (Enum <WrapOptions> .Flags.IsFlagSet(wrapOptions, WrapOptions.GenerateInlineInfoBarMessageControl) ||
                Enum <WrapOptions> .Flags.IsFlagSet(wrapOptions, WrapOptions.GenerateOverlayInfoBarMessageControl))
            {
                // Create info bar message control
                var infoBarMessageControl = new InfoBarMessageControl();
                infoBarMessageControl.Name    = InfoBarMessageControlName;
                infoBarMessageControl.Content = mainContent;

                if (Enum <WrapOptions> .Flags.IsFlagSet(wrapOptions, WrapOptions.GenerateOverlayInfoBarMessageControl))
                {
                    infoBarMessageControl.Mode = InfoBarMessageControlMode.Overlay;
                }

                // This is now the main content
                mainContent = infoBarMessageControl;
            }
#endif
            #endregion

            // Set content of the outside grid
            outsideGrid.Children.Add(mainContent);

            if (parentContentControl != null)
            {
                SetControlContent(parentContentControl, outsideGrid);
            }

            return(outsideGrid);
        }
Esempio n. 31
0
        /// <summary>
        /// 检索框内容改变时的消息响应
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtMain_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (IsInformationsInitialized)
            {
                string str = this.txtMain.Text.Trim();
                if (!string.IsNullOrEmpty(str) && str != this.KeywordTip)
                {
                    this.btnSearch.Visibility = Visibility.Visible;

                    foreach (object obj in this.Recent.Children)
                    {
                        if (obj is ExpanderEx)
                        {
                            ((ExpanderEx)obj).Visibility = Visibility.Collapsed;
                            foreach (Item i in (((ExpanderEx)obj).Content as WrapPanel).Children)
                            {
                                i.Hide();
                            }
                        }
                        else if (obj is Item)
                        {
                            ((Item)obj).Hide();
                        }
                    }

                    str = str.EndsWith(":Path") ? str.Substring(0, str.Length - 4) : str;

                    str = str.EndsWith(":Tag Name") ? str.Substring(0, str.Length - 8) : str;

                    SearchValue = Search.GetInstance().MultiSearch(str);


                    if (SearchValue != null)
                    {
                        if (SearchValue.Count <= 3)
                        {
                            QuickStart = true;
                        }
                        else
                        {
                            QuickStart = false;
                        }


                        foreach (Item i in SearchValue)
                        {
                            if (i.Parent is WrapPanel)
                            {
                                WrapPanel wpTmp = (WrapPanel)i.Parent;
                                if (wpTmp.Parent is ExpanderEx)
                                {
                                    ((ExpanderEx)wpTmp.Parent).IsExpanded = true;
                                    ((ExpanderEx)wpTmp.Parent).Visibility = Visibility.Visible;
                                }
                            }
                            i.Show();
                        }
                    }
                }
                else
                {
                    this.btnSearch.Visibility = Visibility.Collapsed;
                    foreach (object obj in this.Recent.Children)
                    {
                        if (obj is ExpanderEx)
                        {
                            ((ExpanderEx)obj).Visibility = Visibility.Visible;
                            WrapPanel wp = (WrapPanel)((ExpanderEx)obj).Content;

                            if (wp.Children.Count > 0)
                            {
                                foreach (Item i in wp.Children)
                                {
                                    i.Show();
                                }
                            }
                        }
                        else
                        {
                            if (obj is Item)
                            {
                                (obj as Item).Show();
                            }
                        }
                    }
                }
                if (Lastkey == Key.Oem1)
                {
                    if (this.txtMain.Text.EndsWith(":"))
                    {
                        string bit   = "";
                        short  count = 0;
                        for (int i = 0; i < this.txtMain.Text.Length; i++)
                        {
                            bit = this.txtMain.Text.Substring(i, 1);
                            if (bit == ":")
                            {
                                count++;
                            }
                        }
                        if (count == 1)
                        {
                            this.txtMain.Text += "Path";
                            this.txtMain.Select(this.txtMain.Text.Length - 4, 4);
                        }
                        else if (count == 2)
                        {
                            this.txtMain.Text += "Tag Name";
                            this.txtMain.Select(this.txtMain.Text.Length - 8, 8);
                        }
                        Lastkey = Key.None;
                    }
                }
            }
        }
Esempio n. 32
0
        private FrameworkElement CreateTab()
        {
            var snapshotCount = _app.Config.TimeShiftSnapshotCount;

            snapshotCount = Math.Max(snapshotCount, 1);
            snapshotCount = Math.Min(snapshotCount, 8);

            var snapshotCountComboBox = new ComboBox();

            _snapshotCountComboBox = snapshotCountComboBox;
            snapshotCountComboBox.HorizontalAlignment = HorizontalAlignment.Left;
            snapshotCountComboBox.VerticalAlignment   = VerticalAlignment.Top;
            snapshotCountComboBox.Margin = new Thickness(5);
            snapshotCountComboBox.Width  = 40;
            for (var i = 1; i <= 8; ++i)
            {
                snapshotCountComboBox.Items.Add(i);
            }
            snapshotCountComboBox.SelectedIndex = snapshotCount - 1;

            var settingsPanelList = new List <Tuple <FrameworkElement, FrameworkElement> >();

            settingsPanelList.Add(App.CreateTuple("Snapshot Count", snapshotCountComboBox));

            var settingsPanel = WpfHelper.CreateDualColumnPanel(settingsPanelList, 120, 0);

            settingsPanel.HorizontalAlignment = HorizontalAlignment.Center;
            settingsPanel.VerticalAlignment   = VerticalAlignment.Center;

            var settingsGroupBox = new GroupBox();

            settingsGroupBox.Header = "Settings";
            settingsGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            settingsGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            settingsGroupBox.Content             = settingsPanel;

            var goButton = new Button();

            goButton.HorizontalAlignment = HorizontalAlignment.Left;
            goButton.VerticalAlignment   = VerticalAlignment.Top;
            goButton.Content             = "Go!";
            goButton.Width  = 75;
            goButton.Height = 25;
            goButton.Margin = new Thickness(5);
            goButton.Click += (obj, args) => OnGoClicked();

            var actionsGroupBox = new GroupBox();

            actionsGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            actionsGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            actionsGroupBox.Margin  = new Thickness(5);
            actionsGroupBox.Header  = "Actions";
            actionsGroupBox.Content = goButton;

            var helpTextBlock = new TextBlock();

            helpTextBlock.Margin       = new Thickness(5);
            helpTextBlock.TextWrapping = TextWrapping.WrapWithOverflow;
            helpTextBlock.Text         =
                "This modifier will move the position of the non-first-person view players back in time by the specified amount of snapshots.\n" +
                "The main purpose of this is to make the demo look more like what the player whose view was recorded in first-person actually saw, which is desirable for movie-making.\n" +
                "\n" +
                "For LG tracking, 1 snapshot should do.\n" +
                "For rail shots, 1 + (first-person player ping / snapshot duration) should do.\n" +
                "Depending on cpma/q3mme doing the playback and cg_smoothClients being on/off, you might want to add 1 to the snapshot count.";

            var helpGroupBox = new GroupBox();

            helpGroupBox.Margin = new Thickness(5);
            helpGroupBox.Header = "Help";
            helpGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            helpGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            helpGroupBox.Content             = helpTextBlock;

            var rootPanel = new WrapPanel();

            rootPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            rootPanel.VerticalAlignment   = VerticalAlignment.Stretch;
            rootPanel.Margin      = new Thickness(5);
            rootPanel.Orientation = Orientation.Horizontal;
            rootPanel.Children.Add(settingsGroupBox);
            rootPanel.Children.Add(actionsGroupBox);
            rootPanel.Children.Add(helpGroupBox);

            var scrollViewer = new ScrollViewer();

            scrollViewer.HorizontalAlignment = HorizontalAlignment.Stretch;
            scrollViewer.VerticalAlignment   = VerticalAlignment.Stretch;
            scrollViewer.Margin = new Thickness(5);
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
            scrollViewer.VerticalScrollBarVisibility   = ScrollBarVisibility.Auto;
            scrollViewer.Content = rootPanel;

            return(scrollViewer);
        }
Esempio n. 33
0
        /// <summary>
        /// on text changed the text is parsed and texblock and hyperlinkbuttons are created
        /// </summary>
        private void ParseAndCreate()
        {
            // clear contents
            Children.Clear();

            // dont render if empty
            if (String.IsNullOrEmpty(Text))
            {
                return;
            }

            // if there are any phone / mail / twitter / web links then contrinue to create
            if (TextContainsActions(Text, IsTwitterLinkEnabled, CustomSearches))
            {
                // create a wrap panel and loop over all words to add textblocks or hyperlinks
                WrapPanel panel = new WrapPanel();
                string[] values = Text.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                for (int x = 0; x < values.Length; x++)
                {
                    UIElement element = null;

                    // first look for a custom search and replace
                    if (CustomSearches != null && CustomSearches.Count > 0)
                    {
                        foreach (SmartTextBlockCustomSearch search in CustomSearches)
                        {
                            if (search.GetRegexObject().IsMatch(values[x]))
                            {
                                element = CreateCustomItem(values[x], search);
                                break;
                            }
                        }
                    }

                    // otherwise searcg for other matches
                    if (element == null)
                    {
                        if (_mailActionkRegex.IsMatch(values[x]))
                        {
                            element = CreateMailButton(values[x]);
                        }
                        else if (_browserActionRegex.IsMatch(values[x]))
                        {
                            element = CreateBrowserButton(values[x], string.Empty, string.Empty);
                        }
                        else if (_dialerUKActionkRegex.IsMatch(values[x]) || _dialerUSActionkRegex.IsMatch(values[x]))
                        {
                            element = CreateDialerButton(values[x]);
                        }
                        else if (_twitterActionTagRegex.IsMatch(values[x]) && IsTwitterLinkEnabled)
                        {
                            // twitter items will be parsed for hashes and user tags, and will send to the mobile site by default
                            if (values[x].Substring(0, 1) == "#")
                            {
                                string uri = string.Format("http://mobile.twitter.com/searches?q={0}", values[x].Substring(1, values[x].Length - 1));
                                element = CreateTwitterButton(uri, true, values[x]);
                            }
                            else if (values[x].Substring(0, 1) == "@")
                            {
                                string uri = string.Format("http://mobile.twitter.com/{0}", values[x].Replace("@", string.Empty));
                                element = CreateTwitterButton(uri, false, values[x]);
                            }
                        }
                        else
                        {
                            // didnt match any regex so this must not be a link, instead create a textblock
                            element = CreateTextBlock(values[x]);
                        }
                    }

                    // add each child to the wrap panel
                    panel.Children.Add(element);
                }

                Children.Add(panel);
            }
            // other wise just add the 1 textblock
            else
            {
                Children.Add(CreateTextBlock(Text));
            }
        }
Esempio n. 34
0
        /// <summary>
        /// For the given bitmap renders filtered thumbnails for each filter in given list and populates
        /// the given wrap panel with the them.
        /// 
        /// For quick rendering, renders 10 thumbnails synchronously and then releases the calling thread.
        /// </summary>
        /// <param name="bitmap">Source bitmap to be filtered</param>
        /// <param name="side">Side length of square thumbnails to be generated</param>
        /// <param name="list">List of filters to be used, one per each thumbnail to be generated</param>
        /// <param name="panel">Wrap panel to be populated with the generated thumbnails</param>
        private async Task RenderThumbnailsAsync(Bitmap bitmap, int side, List<FilterModel> list, WrapPanel panel)
        {
            using (EditingSession session = new EditingSession(bitmap))
            {
                int i = 0;

                foreach (FilterModel filter in list)
                {
                    WriteableBitmap writeableBitmap = new WriteableBitmap(side, side);

                    foreach (IFilter f in filter.Components)
                    {
                        session.AddFilter(f);
                    }

                    Windows.Foundation.IAsyncAction action = session.RenderToBitmapAsync(writeableBitmap.AsBitmap());

                    i++;

                    if (i % 10 == 0)
                    {
                        // async, give control back to UI before proceeding.
                        await action;
                    }
                    else
                    {
                        // synchroneous, we keep the CPU for ourselves.
                        Task task = action.AsTask();
                        task.Wait();
                    }

                    PhotoThumbnail photoThumbnail = new PhotoThumbnail()
                    {
                        Bitmap = writeableBitmap,
                        Text = filter.Name,
                        Width = side,
                        Margin = new Thickness(6)
                    };

                    photoThumbnail.Tap += (object sender, System.Windows.Input.GestureEventArgs e) =>
                    {
                        App.PhotoModel.ApplyFilter(filter);
                        App.PhotoModel.Dirty = true;

                        NavigationService.GoBack();
                    };

                    panel.Children.Add(photoThumbnail);

                    session.UndoAll();
                }
            }
        }
Esempio n. 35
0
 public static void SetView(IEnumerable <NewsItem> news)
 {
     Items.Clear();
     foreach (var item in news)
     {
         WrapPanel temp = new WrapPanel();
         temp.Orientation = Orientation.Horizontal;
         if (!string.IsNullOrEmpty(item.urlToImage))
         {
             Image image = DownloadRemoteImageFile(item.urlToImage);
             if (image != null)
             {
                 temp.Children.Add(image);
             }
             else
             {
                 temp.Children.Add(new TextBlock(new Run("\t\t\t\t")));
             }
         }
         else
         {
             temp.Children.Add(new TextBlock(new Run("\t\t\t\t")));
         }
         temp.Children.Add(new TextBlock(new Run("        ")));
         Run run = new Run("\n\n\n\n\n" + item.title);
         run.FontSize = 24;
         Hyperlink link = new Hyperlink(run);
         link.IsEnabled  = false;
         link.Foreground = Brushes.DarkBlue;
         try
         {
             if (!string.IsNullOrEmpty(item.url))
             {
                 link.IsEnabled        = true;
                 link.RequestNavigate += (sender, args) => Process.Start(args.Uri.ToString());
                 link.NavigateUri      = new Uri(item.url);
             }
         }
         catch (UriFormatException ex)
         {
             link.IsEnabled = false;
             MessageBox.Show(ex.Message,
                             "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
         TextBlock text = new TextBlock();
         text.FontSize      = 24;
         text.TextAlignment = System.Windows.TextAlignment.Left;
         text.TextWrapping  = System.Windows.TextWrapping.Wrap;
         text.Width         = 550;
         Run addinfo = new Run("\n\n\n\n\n" + item.description);
         addinfo.FontSize = 24;
         text.Inlines.Add(link);
         text.Inlines.Add(addinfo);
         temp.Children.Add(text);
         DateTime dateTime = new DateTime();
         string   time     = "";
         if (DateTime.TryParse(item.publishedAt, out dateTime))
         {
             time = dateTime.ToString();
         }
         temp.Children.Add(new TextBlock(new Run("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
                                                 + item.author + "\n\n" + time)
         {
             FontSize = 24
         })
         {
             FontSize      = 24,
             TextWrapping  = System.Windows.TextWrapping.Wrap,
             TextAlignment = System.Windows.TextAlignment.Left,
             Width         = 220
         });
         Items.Add(temp);
     }
 }
Esempio n. 36
0
        public void Sort()
        {
            _innerStack.Children.Clear();
            _innerStack.Children.Add(NoElementsPlaceholder);
            sortWrapPanels.ForEach(obj => obj.Children.Clear());
            sortWrapPanels.Clear();
            List <FileListItem> sortedFiles  = new List <FileListItem>();
            List <string>       sortElements = new List <string>();

            switch (BoundSortButton.SortMode)
            {
            case SortMode.NameSort:
                sortedFiles  = BoundSortButton.SortDirection == SortDirection.Ascending ? Files.OrderBy(obj => obj.File.Name).ToList() : Files.OrderByDescending(obj => obj.File.Name).ToList();
                sortElements = sortedFiles.Select(obj => obj.File.Name.First().ToString().ToUpper()).Distinct().ToList();

                foreach (string sortElement in sortElements)
                {
                    _innerStack.Children.Add(new FileListSortElementItem(sortElement));

                    List <FileListItem> sortElementItems = Files.Where(obj => obj.File.Name.First().ToString().ToUpper() == sortElement).ToList();

                    WrapPanel sortElementPanel = new WrapPanel()
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch
                    };

                    sortWrapPanels.Add(sortElementPanel);

                    sortElementItems.ForEach(obj => sortElementPanel.Children.Add(obj));
                    _innerStack.Children.Remove(NoElementsPlaceholder);
                    _innerStack.Children.Add(sortElementPanel);
                }
                break;

            case SortMode.DateSort:
                sortedFiles  = BoundSortButton.SortDirection == SortDirection.Ascending ? Files.OrderBy(obj => obj.File.DateAdded).ToList() : Files.OrderByDescending(obj => obj.File.DateAdded).ToList();
                sortElements = sortedFiles.Select(obj => obj.File.DateAdded.ToString("dd.MM.yyyy")).Distinct().ToList();

                foreach (string sortElement in sortElements)
                {
                    _innerStack.Children.Add(new FileListSortElementItem(sortElement));

                    List <FileListItem> sortElementItems = Files.Where(obj => obj.File.DateAdded.ToString("dd.MM.yyyy") == sortElement).ToList();

                    WrapPanel sortElementPanel = new WrapPanel()
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch
                    };

                    sortWrapPanels.Add(sortElementPanel);

                    sortElementItems.ForEach(obj => sortElementPanel.Children.Add(obj));
                    _innerStack.Children.Remove(NoElementsPlaceholder);
                    _innerStack.Children.Add(sortElementPanel);
                }
                break;

            case SortMode.TypeSort:
                sortedFiles  = BoundSortButton.SortDirection == SortDirection.Ascending ? Files.OrderBy(obj => obj.File.Name.Substring(obj.File.Name.LastIndexOf('.'))).ToList() : Files.OrderByDescending(obj => obj.File.Name.Substring(obj.File.Name.LastIndexOf('.'))).ToList();
                sortElements = sortedFiles.Select(obj => obj.File.Name.Substring(obj.File.Name.LastIndexOf('.'))).Distinct().ToList();

                foreach (string sortElement in sortElements)
                {
                    _innerStack.Children.Add(new FileListSortElementItem(sortElement));

                    List <FileListItem> sortElementItems = Files.Where(obj => obj.File.Name.Substring(obj.File.Name.LastIndexOf('.')) == sortElement).ToList();

                    WrapPanel sortElementPanel = new WrapPanel()
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch
                    };

                    sortWrapPanels.Add(sortElementPanel);

                    sortElementItems.ForEach(obj => sortElementPanel.Children.Add(obj));
                    _innerStack.Children.Remove(NoElementsPlaceholder);
                    _innerStack.Children.Add(sortElementPanel);
                }
                break;
            }
        }
Esempio n. 37
0
 private static UIElement e_22_iptMethod(UIElement parent) {
     // e_23 element
     WrapPanel e_23 = new WrapPanel();
     e_23.Parent = parent;
     e_23.Name = "e_23";
     e_23.IsItemsHost = true;
     return e_23;
 }
Esempio n. 38
0
        //public WordCloud(string tagCloudControlClientId, string tagThreshold, string fontFamily, string minimumFontSize, string tagColor,
        //    string tagHoverColor, string backgroundColor)
        //{
        //   //          InitializeComponent();

        //    //  HtmlPage.RegisterScriptableObject("JStoSLBridge", this);	// register our "javascript to silverlight" bridge

        //    IntializeControl(tagCloudControlClientId, tagThreshold, fontFamily, minimumFontSize, tagColor, tagHoverColor, backgroundColor);

        //    InitializeWCFService();
        //}

        /// <summary>
        /// Initializes a new instance of the <see cref="WordCloud" /> class.
        /// </summary>
        //public WordCloud()
        //{
        //}


        public WordCloud(WrapPanel wrapPanel, ObservableCollection <WordCloudWord> cloudWords)
        {
            this.wrapPanel           = wrapPanel;
            this._cloudTagCollection = cloudWords;
            tagCloudService_GetTagsCompleted(cloudWords);
        }
Esempio n. 39
0
        void Folder_GotFocus(object sender, RoutedEventArgs e)
        {
            WrapPanel wp = this.Header as WrapPanel;

            wp.Children[1].Focus();
        }
Esempio n. 40
0
        int sortfin2  = 0; //何もしない、1:昇順 2:降順



        public UserManagiment()
        {
            InitializeComponent();

            try
            {
                sortname2 = int.Parse(Application.Current.Properties["sortname2"].ToString());
            }
            catch
            {
                sortname2 = 0;
            }
            try
            {
                sortfin2 = int.Parse(Application.Current.Properties["sortfinn2"].ToString());
            }
            catch
            {
                sortfin2 = 0;
            }

            if (!(sortname2 == 0) && !(sortname2 == 1))
            {
                yuzaname2.Background = Brushes.RoyalBlue;
                if (sortname2 == 2)
                {
                    yuzaname2.Content = "▲";
                }
                else if (sortname2 == 3)
                {
                    yuzaname2.Content = "▼";
                }
            }
            else
            {
                if (!(sortfin2 == 0))
                {
                    yuzaname2.Background = Brushes.Gainsboro;
                }
                else
                {
                    yuzaname2.Background = Brushes.Coral;
                }
                if (sortname2 == 0)
                {
                    yuzaname2.Content = "▲";
                }
                else if (sortname2 == 1)
                {
                    yuzaname2.Content = "▼";
                }
            }

            if (!(sortfin2 == 0))
            {
                finlog2.Background = Brushes.RoyalBlue;
                if (sortfin2 == 1)
                {
                    finlog2.Content = "▲";
                }
                else if (sortfin2 == 2)
                {
                    finlog2.Content = "▼";
                }
            }
            else
            {
                finlog2.Background = Brushes.Gainsboro;
                finlog2.Content    = "▲";
            }

            Label[]  label  = new Label[labelNum];
            Button[] button = new Button[buttonNum];

            WrapPanel backbuttons = new WrapPanel();

            Button top_b = new Button()
            {
                Content = "トップ画面", FontSize = 30, Margin = new Thickness(100, 50, 0, 0), Width = 250, Height = 100, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, ClickMode = ClickMode.Press
            };

            top_b.Click += bmodo;
            backbuttons.Children.Add(top_b);

            Button logout_b = new Button()
            {
                Content = "ログアウト", FontSize = 30, Margin = new Thickness(100, 50, 0, 0), Width = 250, Height = 100, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, ClickMode = ClickMode.Press
            };

            logout_b.Click += bout;
            backbuttons.Children.Add(logout_b);

            grid7.Children.Add(backbuttons);

            DBConnect.Connect("kasiihara.db");

            DBConnect.ExecuteReader("SELECT COUNT(*) as num FROM t_user");
            DBConnect.Reader.Read();
            grid7.Height = 1080 + (int.Parse(DBConnect.Reader[0].ToString()) - 3) * 124;



            if (sortname2 == 0)
            {
                if (sortfin2 == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_id";
                }
                else if (sortfin2 == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate";
                }
                else if (sortfin2 == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate DESC";
                }
            }

            else if (sortname2 == 1)
            {
                if (sortfin2 == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_id DESC";
                }
                else if (sortfin2 == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate";
                }
                else if (sortfin2 == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY fainal_logindate DESC";
                }
            }
            else if (sortname2 == 2)
            {
                if (sortfin2 == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana";
                }
                else if (sortfin2 == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana, fainal_logindate";
                }
                else if (sortfin2 == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana, fainal_logindate DESC";
                }
            }
            else if (sortname2 == 3)
            {
                if (sortfin2 == 0)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC";
                }
                else if (sortfin2 == 1)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC, fainal_logindate";
                }
                else if (sortfin2 == 2)
                {
                    SQL = "SELECT * FROM t_user ORDER BY user_name_kana DESC, fainal_logindate DESC";
                }
            }

            DBConnect.ExecuteReader(SQL);

            while (DBConnect.Reader.Read())
            {
                label[Lnum] = new Label()
                {
                    Content = DBConnect.Reader[1].ToString(), FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 124, Margin = new Thickness(106.2, 611.053 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 427, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                grid7.Children.Add(label[Lnum]);
                Lnum++;

                label[Lnum] = new Label()
                {
                    Content = DBConnect.Reader[5].ToString(), FontSize = 45, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 124, Margin = new Thickness(533.2, 611.053 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 432, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                grid7.Children.Add(label[Lnum]);
                Lnum++;

                button[ButtonNum] = new Button()
                {
                    Content = "", FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 80, Margin = new Thickness(980, 633.653 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 400, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                button[ButtonNum].Tag    = DBConnect.Reader[0];
                button[ButtonNum].Click += edit;
                grid7.Children.Add(button[ButtonNum]);
                ButtonNum++;

                button[ButtonNum] = new Button()
                {
                    Content = "", FontSize = 60, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Center, Height = 80, Margin = new Thickness(1410, 633.653 + heightm, 0, 0), VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Width = 400, BorderBrush = Brushes.Black, BorderThickness = new Thickness(3)
                };
                button[ButtonNum].Tag    = DBConnect.Reader[0];
                button[ButtonNum].Click += delete;
                grid7.Children.Add(button[ButtonNum]);
                ButtonNum++;

                heightm += 124;
            }

            DBConnect.Dispose();
            try
            {
                judge = int.Parse(Application.Current.Properties["henshuu"].ToString());
            }
            catch
            {
                judge = 0;
            }

            if (judge == 0)
            {
                recivename.Content = " ";
            }
            else if (judge == 1)
            {
                recivechange.Content    = "登録しました!";
                recivechange.Background = Brushes.Azure;
                recivename.Content      = "名前 : " + Application.Current.Properties["rename"].ToString() + "\n名前カナ : " + Application.Current.Properties["rename_kana"].ToString() + "\nユーザID : " + Application.Current.Properties["reid"].ToString() + "\n種別 : 担当者";
                recivename.Background   = Brushes.Azure;
                Application.Current.Properties["henshuu"] = "0";
            }
            else if (judge == 11)
            {
                recivechange.Content    = "登録しました!";
                recivechange.Background = Brushes.Azure;
                recivename.Content      = "名前:" + Application.Current.Properties["rename"].ToString() + "\n名前カナ : " + Application.Current.Properties["rename_kana"].ToString() + "\nユーザID : " + Application.Current.Properties["reid"].ToString() + "\n種別 : 患者";
                recivename.Background   = Brushes.Azure;
                Application.Current.Properties["henshuu"] = "0";
            }
            else if (judge == 2)
            {
                recivechange.Content    = "編集しました!";
                recivechange.Background = Brushes.Azure;
                recivename.Content      = "名前:" + Application.Current.Properties["rename"].ToString() + "\n名前カナ : " + Application.Current.Properties["rename_kana"].ToString() + "\nユーザID : " + Application.Current.Properties["reid"].ToString() + "\n種別 : " + Application.Current.Properties["rename_type"].ToString();
                recivename.Background   = Brushes.Azure;
                Application.Current.Properties["henshuu"] = "0";
            }
            else if (judge == 3)
            {
                recivechange.Content    = "削除しました!";
                recivechange.Background = Brushes.Azure;
                recivename.Content      = "名前:" + Application.Current.Properties["rename"].ToString() + "\n名前カナ : " + Application.Current.Properties["rename_kana"].ToString() + "\nユーザID : " + Application.Current.Properties["reid"].ToString() + "\n種別 : " + Application.Current.Properties["rename_type"].ToString();
                recivename.Background   = Brushes.Azure;
                Application.Current.Properties["henshuu"] = "0";
            }


            Console.WriteLine(judge);
        }
Esempio n. 41
0
 private static UIElement e_17_iptMethod(UIElement parent) {
     // e_18 element
     WrapPanel e_18 = new WrapPanel();
     e_18.Parent = parent;
     e_18.Name = "e_18";
     e_18.IsItemsHost = true;
     e_18.Orientation = Orientation.Vertical;
     return e_18;
 }
    public PageInformation()
    {
        this.Background = Brushes.Transparent;

        WrapPanel panelContent = new WrapPanel();
        panelContent.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
        panelContent.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
        panelContent.Margin = new Thickness(0, 0, 5, 0);

        Image imgLogo = new Image();
        imgLogo.Source = new BitmapImage(new Uri(@"/Data/images/gas-white.png", UriKind.RelativeOrAbsolute));
        imgLogo.Height = 16;
        RenderOptions.SetBitmapScalingMode(imgLogo, BitmapScalingMode.HighQuality);

        panelContent.Children.Add(imgLogo);

        txtGasPrice = UICreator.CreateTextBlock(string.Format("{0}/{1}.", new ValueCurrencyConverter().Convert(new FuelUnitConverter().Convert(GameObject.GetInstance().FuelPrice)), new StringToLanguageConverter().Convert("ltr")));
        txtGasPrice.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
        txtGasPrice.FontWeight = FontWeights.Bold;
        txtGasPrice.Margin = new Thickness(5, 0, 0, 0);

        panelContent.Children.Add(txtGasPrice);

        this.Content = panelContent;

        GameTimer.GetInstance().OnTimeChanged += new GameTimer.TimeChanged(PageInformation_OnTimeChanged);

        this.Unloaded += new RoutedEventHandler(PageInformation_Unloaded);
    }
 public GeneratorShips(List <IShips> shipsGenerator, WrapPanel wrap)
 {
     this.shipsGenerator = shipsGenerator;
     this.wrap           = wrap;
 }