Пример #1
0
        public HubSettings()
        {
            Toolbar.Height = 48;
            Image icon = new Image(0, 0, 48, 48, Resources.GetBitmap(Resources.BitmapResources.Settings_48));
            Toolbar.Children.Add(icon);

            Label lbl = new Label(icon.Width + 4, 10, Program.FontCourierNew12, "Настройки") { ForeColor = Program.LabelTextColor };
            Toolbar.Children.Add(lbl);

            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));
            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));
            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));
            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));
            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));
            //RightToolbar.Children.Add(new ToolButton("", new Icon(Program.ImageHome, 22)));

            //StackPanel panel = new StackPanel(Orientation.Vertical);
            ////Root = panel;

            //tabs = new TabControl();
            //panel.Children.Add(tabs);

            //Button btnSave = new Button(Program.FontRegular, "Сохранить", null, Program.ButtonTextColor);
            //btnSave.SetMargin(2);
            //btnSave.VerticalAlignment = VerticalAlignment.Bottom;
            //btnSave.HorizontalAlignment = HorizontalAlignment.Center;
            //btnSave.Background = Program.ButtonBackground;
            //btnSave.Clicked += new EventHandler(btnSave_Clicked);
            //panel.Children.Add(btnSave);

            ////tabs.Height = panel.Parent.Height - btnSave.ImageSize - 10;
            //tabs.VerticalAlignment = VerticalAlignment.Stretch;
            //tabs.HorizontalAlignment = HorizontalAlignment.Stretch;

            ////----------------------------------------
            //tabs.AddTab(CreateTabCommon());
            //tabs.AddTab(CreateTabBoosters());
            //// train operations
            //// accessories & routes
            //// data formats
            //// access control
            ////--------------------------

            //LoadValues();
        }
Пример #2
0
        public ImageDemoPage()
        {
            Image img;
            int size = 64;
            Bitmap bmp = DemoManager.GetBitmap(Resources.BinaryResources.Operation, Bitmap.BitmapImageType.Gif);

            img = new Image(20, 10, size, size, bmp);
            Content.Children.Add(img);

            img = new Image(120, 10, size+100, size, bmp);
            Content.Children.Add(img);

            img = new Image(20, 80, size, size, bmp) { Border = new Pen(Color.Red, 1) };
            Content.Children.Add(img);

            img = new Image(120, 80, size, size, bmp) { Opacity = 80 };
            Content.Children.Add(img);

            img = new Image(240, 80, size, size, bmp) { Opacity = 150, Background = new LinearGradientBrush(Color.LimeGreen, Color.CornflowerBlue) { Opacity = 80 } };
            Content.Children.Add(img);
        }
Пример #3
0
        public ImageDemo()
            : base(0, 0, 0, 0)
        {
            Image img;
            int size = 128;
            Bitmap bmp = Program.GetBitmap(Resources.BinaryResources.Operation, Bitmap.BitmapImageType.Gif);

            img = new Image(20, 10, size, size, bmp);
            Children.Add(img);

            img = new Image(150, 10, size+100, size, bmp);
            Children.Add(img);

            img = new Image(20, 150, size, size, bmp) { Border = new Pen(Color.Red, 2) };
            Children.Add(img);

            img = new Image(150, 150, size, size, bmp) { Opacity = 80 };
            Children.Add(img);

            img = new Image(280, 150, size, size, bmp) { Opacity = 150, Background = new LinearGradientBrush(Color.LimeGreen, Color.CornflowerBlue) { Opacity = 80 } };
            Children.Add(img);
        }