Пример #1
0
        public ScreenAppointment(Size _size, bool _white)
        {
            this.Size = _size;
            _listAppointment.Clear(); _indexAppointment = 0;
            _typeColorIcon = "white";
            if (!_white) _typeColorIcon = "black";

            var _style = new TextStyle(_fontName, _fontSize.ToLogic(), _fontColor);
            var _height = FleuxApplication.DummyDrawingGraphics.Style(_style).CalculateMultilineTextHeight("0", 100);

            this.AddElement(_textLocation = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset,_height * 0),
                Size = new Size(this.Size.Width - leftOffset - rightOffset,_height),
                Style = _style,
            });

            this.AddElement(_textSubject = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset, _height * 1),
                Size = new Size(this.Size.Width - leftOffset - rightOffset, _height),
                Style = _style,
            });

            this.AddElement(_textTime = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset, _height * 2),
                Size = new Size(this.Size.Width - leftOffset - rightOffset - 100, _height),
                Style = _style,
            });

            this.AddElement(_textCount = new TextElementAdvanced("")
            {
                Location = new Point(this.Size.Width - 100 + 60, _height * 2),
                Size = new Size(100 - 60, _height),
                Style = _style,
            });

            this.Size = new Size(_size.Width, _height * 3);
        }
Пример #2
0
        public ScreenMedia(Size _size, bool _white)
        {
            this.Size = _size;

            _state.Title = "";
            _state.Album = "";
            _state.Artist = "";
            _state.Cover = "";
            _state.Status = _StatusPlay.Unknown;
            _state.Run = false;
            _state.Volume = 0;
            _state.PlayerName = "";

            _typeColorIcon = "white";
            if (!_white) _typeColorIcon = "black";

            var _dx = _size.Width / 4;

            this.AddElement(_buttonPrev = new TransparentButton(_typeColorIcon + "_rew.png")
            {
                Location = new Point(_dx / 2 + _dx * 0 - 24, _size.Height - 48),
                Size = new Size(48,48),
                TapHandler = p => OnButtonTap(0),
            });

            this.AddElement(_buttonPause = new TransparentButton(_typeColorIcon + "_pause.png")
            {
                Location = new Point(_dx / 2 + _dx * 1 - 24, _size.Height - 48),
                Size = new Size(48, 48),
                TapHandler = p => OnButtonTap(1),
            });

            this.AddElement(_buttonPlay = new TransparentButton(_typeColorIcon + "_play.png")
            {
                Location = new Point(_dx / 2 + _dx * 2 - 24, _size.Height - 48),
                Size = new Size(48, 48),
                TapHandler = p => OnButtonTap(2),
            });

            this.AddElement(_buttonNext = new TransparentButton(_typeColorIcon + "_next.png")
            {
                Location = new Point(_dx / 2 + _dx * 3 - 24, _size.Height - 48),
                Size = new Size(48, 48),
                TapHandler = p => OnButtonTap(3),
            });

            var _style = new TextStyle(_fontName, _fontSize.ToLogic(), _fontColor);
            var _height = FleuxApplication.DummyDrawingGraphics.Style(_style).CalculateMultilineTextHeight("0", 100);

            this.AddElement(_textTitle = new TextElementAdvanced("")
            {
                Location = new Point(10, _buttonNext.Location.Y - _height * 3),
                Size = new Size(_size.Width - 20, _height),
                Style = _style,
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Center,
            });

            this.AddElement(_textAlbum = new TextElementAdvanced("")
            {
                Location = new Point(10, _buttonNext.Location.Y - _height * 1),
                Size = new Size(_size.Width - 20, _height),
                Style = _style,
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Center,
            });

            this.AddElement(_textArtist = new TextElementAdvanced("")
            {
                Location = new Point(10, _buttonNext.Location.Y - _height * 2),
                Size = new Size(_size.Width - 20, _height),
                Style = _style,
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Center,
            });
            this.TapHandler = OnTap;
            this.HoldHandler = OnHold;
        }
Пример #3
0
        public ScreenStatus(Size _size, bool _white)
        {
            _status._countPhone = 0;
            _status._countSms = 0;
            _status._countEmail = 0;
            _status._countMms = 0;

            this.Size = _size;

            _typeColorIcon = "white";
            if (!_white) _typeColorIcon = "black";
            var _dx = _size.Width / 4;

            this.AddElement(_imagePhone = new TransparentImage(_typeColorIcon + "_phone.png")
            {
                Location = new Point(leftOffset + _dx * 0 - (_imageSize.Width / 2), _size.Height - _imageSize.Height),
                Size = _imageSize,
            });

            this.AddElement(_imageSms = new TransparentImage(_typeColorIcon + "_sms.png")
            {
                Location = new Point(leftOffset + _dx * 1 - (_imageSize.Width / 2), _size.Height - _imageSize.Height),
                Size = _imageSize,
            });

            this.AddElement(_imageEmail = new TransparentImage(_typeColorIcon + "_email.png")
            {
                Location = new Point(leftOffset + _dx * 2 - (_imageSize.Width / 2), _size.Height - _imageSize.Height),
                Size = _imageSize,
            });

            this.AddElement(_imageMms = new TransparentImage(_typeColorIcon + "_mms.png")
            {
                Location = new Point(leftOffset + _dx * 3 - (_imageSize.Width / 2), _size.Height - _imageSize.Height),
                Size = _imageSize,
            });

            //
            var _style = new TextStyle(_fontName, _fontSize.ToLogic(), _fontColor);
            var _height = FleuxApplication.DummyDrawingGraphics.Style(_style).CalculateMultilineTextHeight("0", 100);
            this.AddElement(_textPhone = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset + _dx * 0 + (_imageSize.Width / 2), _size.Height - _height),
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Left,
                Style = _style,
            });

            this.AddElement(_textSms = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset + _dx * 1 + (_imageSize.Width / 2), _size.Height - _height),
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Left,
                Style = _style,
            });

            this.AddElement(_textEmail = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset + _dx * 2 + (_imageSize.Width / 2), _size.Height - _height),
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Left,
                Style = _style,
            });

            this.AddElement(_textMms = new TextElementAdvanced("")
            {
                Location = new Point(leftOffset + _dx * 3 + (_imageSize.Width / 2), _size.Height - _height),
                AutoSizeMode = TextElementAdvanced.AutoSizeModeOptions.Left,
                Style = _style,
            });
        }