Пример #1
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.StretchHorizontally               = true;
     this.StretchVertically                 = false;
     this.Orientation                       = Orientation.Horizontal;
     this.leftArrow                         = (LightVisualElement) new TimeHeaderLeftArrow();
     this.leftArrow.DrawText                = false;
     this.leftArrow.Class                   = "TimeTableHeaderElementLeftArrow";
     this.leftArrow.TextAlignment           = ContentAlignment.MiddleLeft;
     this.leftArrow.StretchHorizontally     = false;
     this.headerElement                     = (LightVisualElement) new TimeHeaderArrow();
     this.headerElement.Text                = DateTime.Now.ToString("t");
     this.headerElement.StretchHorizontally = true;
     this.headerElement.StretchVertically   = true;
     this.headerElement.TextAlignment       = ContentAlignment.MiddleCenter;
     this.headerElement.Class               = "TimeTableHeaderElementheaderElement";
     this.rightArrow                        = (LightVisualElement) new TimeHeaderRightArrow();
     this.rightArrow.TextAlignment          = ContentAlignment.MiddleRight;
     this.rightArrow.StretchHorizontally    = false;
     this.rightArrow.DrawText               = false;
     this.rightArrow.Class                  = "TimeTableHeaderElementRightArrow";
     this.Children.Add((RadElement)this.leftArrow);
     this.Children.Add((RadElement)this.headerElement);
     this.Children.Add((RadElement)this.rightArrow);
     this.BorderTopWidth  = 1f;
     this.BorderLeftWidth = 1f;
     this.MinSize         = new Size(0, 19);
     this.SetArrowButtonsVisibility();
 }
Пример #2
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.ShouldPaint               = true;
     this.MinSize                   = this.MaxSize = new Size(134, 135);
     this.ImageLayout               = ImageLayout.None;
     this.ImageAlignment            = ContentAlignment.TopLeft;
     this.hoursArrow                = new ArrowElement();
     this.hoursArrow.Class          = "HoursArrow";
     this.hoursArrow.ImageAlignment = ContentAlignment.MiddleRight;
     this.hoursArrow.MinSize        = this.hoursArrow.MaxSize = new Size(134, 135);
     this.Children.Add((RadElement)this.hoursArrow);
     this.minutesArrow                = new ArrowElement();
     this.minutesArrow.Class          = "MinutesArrow";
     this.minutesArrow.ImageAlignment = ContentAlignment.MiddleRight;
     this.minutesArrow.MinSize        = this.minutesArrow.MaxSize = new Size(134, 135);
     this.Children.Add((RadElement)this.minutesArrow);
     this.secondsArrow                = new ArrowElement();
     this.secondsArrow.Class          = "SecondsArrow";
     this.secondsArrow.ImageAlignment = ContentAlignment.MiddleRight;
     this.secondsArrow.MinSize        = this.secondsArrow.MaxSize = new Size(134, 135);
     this.Children.Add((RadElement)this.secondsArrow);
     this.centralDoth         = new LightVisualElement();
     this.centralDoth.Class   = "CentralDot";
     this.centralDoth.MinSize = this.centralDoth.MaxSize = new Size(134, 135);
     this.Children.Add((RadElement)this.centralDoth);
     this.timer          = new Timer();
     this.timer.Tick    += new EventHandler(this.timer_Tick);
     this.timer.Interval = 1000;
     this.timer.Start();
 }
 private int GetDropHintWidth(RadListElement listElement)
 {
     int num = listElement.ControlBoundingRectangle.Width - LightVisualElement.GetBorderThickness((LightVisualElement) listElement, true).Horizontal;
       if (listElement.VScrollBar.Visibility == ElementVisibility.Visible)
     num -= listElement.VScrollBar.Size.Width;
       return num;
 }
Пример #4
0
        private void PreparePages()
        {
            examplePage = new LightVisualElement();
            examplePage.DrawText = false;
            examplePage.DrawFill = true;
            examplePage.BackColor = Color.White;
            examplePage.GradientStyle = GradientStyles.Solid;
            examplePage.Visibility = ElementVisibility.Collapsed;
            this.radPanorama1.PanoramaElement.Children.Add(examplePage);
            examplePage.Margin = new Padding(0, 140, 0, 0);

            this.exampleControls = new Dictionary<string, UserControl>();
            this.exampleControls.Add("Add Patient", new Tlieta.Pdms.Views.Shared.EditPatient(0));
            this.exampleControls.Add("Patient LookUp", new Tlieta.Pdms.Views.Shared.SearchPatient());
            this.exampleControls.Add("Settings", new Tlieta.Pdms.Views.Shared.Settings(serialKey));
            this.exampleControls.Add("Statistics", new Tlieta.Pdms.Views.Shared.Statistics());
            this.exampleControls.Add("LogBook", new Tlieta.Pdms.Views.Shared.LogBook());
            this.exampleControls.Add("Appointments", new Tlieta.Pdms.Views.Shared.AppointmentView());
            this.exampleControls.Add("Income/Expense Daybook", new Tlieta.Pdms.Views.Shared.FinanceDaybook());
            this.exampleControls.Add("Certificates", new Tlieta.Pdms.Views.Shared.Certificates());
            this.exampleControls.Add("Contacts", new Tlieta.Pdms.Views.Shared.ContactView());
            this.exampleControls.Add("Letters", new Tlieta.Pdms.Views.Shared.Letters());
            this.exampleControls.Add("Charts", new Tlieta.Pdms.Views.Shared.Charts());
            this.PreloadControls();
        }
Пример #5
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            _stack = new StackLayoutElement {
                Orientation = Orientation.Horizontal, AutoSize = false, Margin = new Padding(2)
            };
            _headerElement = new LightVisualElement {
                AutoSize = false, Margin = default(Padding)
            };
            _hasErrorsElement = new LightVisualElement {
                AutoSize = false, Margin = default(Padding)
            };

            _progressElement = new RadProgressBarElement {
                AutoSize      = false,
                Margin        = new Padding(0, 3, 0, 0),
                SmoothingMode = SmoothingMode.AntiAlias
            };

            _stack.Children.Add(_headerElement);
            _stack.Children.Add(_progressElement);
            _stack.Children.Add(_hasErrorsElement);

            this.Children.Add(_stack);
        }
Пример #6
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            LightVisualElement lightVisualElement1 = new LightVisualElement();

            lightVisualElement1.MinSize = new Size(120, 0);
            lightVisualElement1.ShouldHandleMouseInput   = false;
            lightVisualElement1.TextAlignment            = ContentAlignment.MiddleLeft;
            lightVisualElement1.NotifyParentOnMouseInput = true;
            lightVisualElement1.AutoSize = true;
            this.lightVisualElement_2    = lightVisualElement1;
            LightVisualElement lightVisualElement2 = new LightVisualElement();

            lightVisualElement2.Image    = (Image)Class123.arrowUP;
            lightVisualElement2.AutoSize = false;
            this.lightVisualElement_1    = lightVisualElement2;
            LightVisualElement lightVisualElement3 = new LightVisualElement();

            lightVisualElement3.Image      = (Image)Class123.arrowDown;
            lightVisualElement3.AutoSize   = false;
            this.lightVisualElement_0      = lightVisualElement3;
            this.lightVisualElement_0.Size = new Size(30, 20);
            this.lightVisualElement_1.Size = new Size(30, 20);
            this.Children.Add((RadElement)this.lightVisualElement_2);
            this.Children.Add((RadElement)this.lightVisualElement_0);
            this.Children.Add((RadElement)this.lightVisualElement_1);
        }
Пример #7
0
 protected override void CreateChildElements()
 {
     this.caption                               = new LightVisualElement();
     this.caption.Class                         = "Caption";
     this.caption.StretchVertically             = false;
     this.caption.TextAlignment                 = ContentAlignment.TopLeft;
     this.subCaption                            = new LightVisualElement();
     this.subCaption.Class                      = "SubCaption";
     this.subCaption.StretchVertically          = false;
     this.subCaption.TextAlignment              = ContentAlignment.TopLeft;
     this.description                           = new LightVisualElement();
     this.description.Class                     = "Description";
     this.description.StretchVertically         = false;
     this.description.TextAlignment             = ContentAlignment.TopLeft;
     this.elementsLayout                        = new StackLayoutElement();
     this.elementsLayout.Orientation            = Orientation.Horizontal;
     this.elementsLayout.StretchHorizontally    = true;
     this.elementsLayout.StretchVertically      = true;
     this.elementsLayout.ShouldHandleMouseInput = false;
     this.elementsLayout.ClipDrawing            = true;
     this.elementsLayout.FitInAvailableSize     = true;
     this.items               = new RadItemOwnerCollection();
     this.items.Owner         = (RadElement)this.elementsLayout;
     this.items.ItemTypes     = this.GetItemsTypes();
     this.items.DefaultType   = typeof(RatingStarVisualElement);
     this.Orientation         = Orientation.Vertical;
     this.StretchHorizontally = true;
     this.StretchVertically   = true;
     this.Children.Add((RadElement)this.caption);
     this.Children.Add((RadElement)this.subCaption);
     this.Children.Add((RadElement)this.elementsLayout);
     this.Children.Add((RadElement)this.description);
 }
Пример #8
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.stack = this.CreateStackLayoutElement();
     this.messagesViewElement     = this.CreateMessagesListView();
     this.overlayPopupElement     = this.CreateOverlayPopupElement();
     this.suggestedActionsElement = this.CreateSuggestedActionsElement();
     this.inputTextBox            = this.CreateInputTextBox();
     this.toolbarElement          = this.CreateToolbarElement();
     this.typingIndicator         = this.CreateTypingIndicatorElement();
     this.showToolbarButton       = this.CreateShowToolbarButton();
     this.sendButton = this.CreateSendButton();
     this.inputTextBox.ButtonsStack.Children.Add((RadElement)this.showToolbarButton);
     this.inputTextBox.ButtonsStack.Children.Add((RadElement)this.sendButton);
     this.stack.Children.Add((RadElement)this.messagesViewElement);
     this.stack.Children.Add((RadElement)this.overlayPopupElement);
     this.stack.Children.Add((RadElement)this.suggestedActionsElement);
     this.stack.Children.Add((RadElement)this.typingIndicator);
     this.stack.Children.Add((RadElement)this.inputTextBox);
     this.stack.Children.Add((RadElement)this.toolbarElement);
     this.Children.Add((RadElement)this.stack);
     this.overlayElement            = new LightVisualElement();
     this.overlayElement.Visibility = ElementVisibility.Collapsed;
     this.Children.Add((RadElement)this.overlayElement);
 }
Пример #9
0
        private void radTreeView1_NodeFormatting(object sender, TreeNodeFormattingEventArgs args)
        {
            DataRowView rowView       = (DataRowView)args.Node.DataBoundItem;
            string      propertyName  = (string)rowView["PropertyName"];
            object      propertyValue = rowView["PropertyValue"];

            if (propertyValue != DBNull.Value)
            {
                if (args.NodeElement.Children.Count == 4)
                {
                    LightVisualElement descriptionElement = new LightVisualElement();
                    descriptionElement.StretchHorizontally = false;
                    descriptionElement.Font          = ((LightVisualElement)args.NodeElement.Children[3]).Font;
                    descriptionElement.TextAlignment = ContentAlignment.MiddleLeft;
                    args.NodeElement.Children.Insert(3, descriptionElement);
                }

                ((LightVisualElement)args.NodeElement.Children[3]).Text = propertyName + ":  ";
                args.NodeElement.ContentElement.ForeColor = Color.Blue;
                args.NodeElement.ContentElement.Text      = propertyValue.ToString();
            }
            else
            {
                if (args.NodeElement.Children.Count == 5)
                {
                    args.NodeElement.Children.RemoveAt(3);
                }
                args.NodeElement.ContentElement.Text      = "<html><b>" + propertyName;
                args.NodeElement.ContentElement.ForeColor = Color.Black;
            }
        }
Пример #10
0
 private void EnsureDrawFill(LightVisualElement element, int backColorNo)
 {
     if (this.node.Style.GradientStyle != GradientStyles.Solid && this.node.Style.NumberOfColors >= backColorNo)
     {
         element.DrawFill = true;
     }
 }
Пример #11
0
        protected override void ArrangeContentCells(int xCellSize, int yCellSize, int xOffset, int yOffset)
        {
            PointF position = PointF.Empty;


            for (int i = 0; i < this.Rows; i++)
            {
                position.Y += i > 0 ? yCellSize : yOffset;
                position.Y += this.verticalCellSpacing;
                position.X  = 0;

                for (int j = 0; j < this.Columns; j++)
                {
                    LightVisualElement cell = null;

                    cell = this.GetElement(i, j);

                    if (cell == null)
                    {
                        continue;
                    }

                    position.X += j > 0 ? xCellSize : xOffset;
                    position.X += this.horizontalCellSpacing;

                    cell.Arrange(new RectangleF(position, new SizeF(xCellSize, yCellSize)));
                }
            }
        }
Пример #12
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.nextButton       = new WizardCommandAreaButtonElement();
            this.nextButton.Class = "NextButton";
            this.nextButton.UseDefaultDisabledPaint = false;
            this.nextButton.Text = LocalizationProvider <RadWizardLocalizationProvider> .CurrentProvider.GetLocalizedString("NextButtonText");

            this.nextButton.Alignment = ContentAlignment.MiddleRight;
            this.nextButton.MinSize   = new Size(100, 24);
            this.nextButton.Click    += new EventHandler(this.NextButton_Click);
            this.cancelButton         = new WizardCommandAreaButtonElement();
            this.cancelButton.Class   = "CancelButtont";
            this.cancelButton.UseDefaultDisabledPaint = false;
            this.cancelButton.Text = LocalizationProvider <RadWizardLocalizationProvider> .CurrentProvider.GetLocalizedString("CancelButtonText");

            this.cancelButton.Alignment = ContentAlignment.MiddleRight;
            this.cancelButton.MinSize   = new Size(100, 24);
            this.finishButton           = new WizardCommandAreaButtonElement();
            this.finishButton.Class     = "FinishButton";
            this.finishButton.UseDefaultDisabledPaint = false;
            this.finishButton.Text = LocalizationProvider <RadWizardLocalizationProvider> .CurrentProvider.GetLocalizedString("FinishButtonText");

            this.finishButton.Alignment = ContentAlignment.MiddleRight;
            this.finishButton.MinSize   = new Size(100, 24);
            this.helpButton             = (LightVisualElement) new BaseWizardElement();
            this.helpButton.Class       = "HelpButton";
            this.helpButton.Text        = LocalizationProvider <RadWizardLocalizationProvider> .CurrentProvider.GetLocalizedString("HelpButtonText");

            this.helpButton.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.helpButton.Alignment         = ContentAlignment.MiddleLeft;
            this.helpButton.MinSize           = new Size(60, 24);
        }
Пример #13
0
            private void RadChat_ItemFormattingChildren(object sender, ChatItemElementEventArgs e)
            {
                ChatMessageAvatarElement avatar = e.ItemElement.AvatarPictureElement;
                ChatMessageNameElement   name   = e.ItemElement.NameLabelElement;
                ChatMessageStatusElement status = e.ItemElement.StatusLabelElement;
                LightVisualElement       bubble = e.ItemElement.MainMessageElement;

                if (!e.ItemElement.IsOwnMessage && e.ItemElement is TextMessageItemElement)
                {
                    avatar.DrawImage   = false;
                    name.Font          = f;
                    bubble.DrawFill    = true;
                    bubble.BackColor   = Color.LightGreen;
                    bubble.ShadowDepth = 3;
                    bubble.ShadowColor = Color.Green;
                }
                else
                {
                    avatar.ResetValue(LightVisualElement.ImageProperty, Telerik.WinControls.ValueResetFlags.Local);
                    name.ResetValue(LightVisualElement.FontProperty, Telerik.WinControls.ValueResetFlags.All);
                    status.ResetValue(LightVisualElement.VisibilityProperty, Telerik.WinControls.ValueResetFlags.Local);
                    bubble.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);
                    bubble.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
                    bubble.ResetValue(LightVisualElement.ShadowDepthProperty, Telerik.WinControls.ValueResetFlags.Local);
                    bubble.ResetValue(LightVisualElement.ShadowColorProperty, Telerik.WinControls.ValueResetFlags.Local);
                }
            }
        protected override void ArrangeContentCells(
            int xCellSize,
            int yCellSize,
            int xOffset,
            int yOffset)
        {
            PointF empty = PointF.Empty;

            for (int row = 0; row < this.Rows; ++row)
            {
                empty.Y += row > 0 ? (float)yCellSize : (float)yOffset;
                empty.Y += (float)this.verticalCellSpacing;
                empty.X  = 0.0f;
                for (int column = 0; column < this.Columns; ++column)
                {
                    LightVisualElement element = this.GetElement(row, column);
                    if (element != null)
                    {
                        empty.X += column > 0 ? (float)xCellSize : (float)xOffset;
                        empty.X += (float)this.horizontalCellSpacing;
                        element.Arrange(new RectangleF(empty, new SizeF((float)xCellSize, (float)yCellSize)));
                    }
                }
            }
        }
Пример #15
0
        protected override void Synchronise()
        {
            base.Synchronise();
            ChatFlightCardDataItem dataItem = this.DataItem as ChatFlightCardDataItem;

            this.nameElement.Text     = dataItem.PassangerName;
            this.planeImage           = dataItem.Image;
            this.totalSumElement.Text = dataItem.Total;
            for (int index = 0; index < this.stackElement.Children.Count; ++index)
            {
                if (index < this.stackElement.Children.Count && this.stackElement.Children[index] is FlightStackLayoutPanel)
                {
                    this.stackElement.Children.RemoveAt(index);
                }
            }
            int index1 = 3;

            foreach (FlightInfo flight in dataItem.Flights)
            {
                FlightStackLayoutPanel flightStackElement = this.CreateFlightStackElement();
                FlightCardAirportInfo  departureElement   = this.CreateFlightDepartureElement(flight.DepartureCity, flight.DepartureAirport, flight.DepartureDateTime.ToShortDateString(), flight.DepartureDateTime.ToShortTimeString());
                LightVisualElement     flightImageElement = this.CreateFlightImageElement();
                flightImageElement.Image = this.planeImage;
                FlightCardAirportInfo flightArrivalElement = this.CreateFlightArrivalElement(flight.ArrivalCity, flight.ArrivalAirport, flight.ArrivalDateTime.ToShortDateString(), flight.ArrivalDateTime.ToShortTimeString());
                flightStackElement.Children.Add((RadElement)departureElement);
                flightStackElement.Children.Add((RadElement)flightImageElement);
                flightStackElement.Children.Add((RadElement)flightArrivalElement);
                this.stackElement.Children.Insert(index1, (RadElement)flightStackElement);
                ++index1;
            }
        }
Пример #16
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            StackLayoutElement stackLayoutElement = new StackLayoutElement();

            stackLayoutElement.StretchVertically   = true;
            stackLayoutElement.FitInAvailableSize  = true;
            stackLayoutElement.Orientation         = Orientation.Horizontal;
            stackLayoutElement.Padding             = new Padding(2);
            stackLayoutElement.ElementSpacing      = 5;
            stackLayoutElement.StretchHorizontally = false;
            this.Children.Add((RadElement)stackLayoutElement);
            this.colorBox = new LightVisualElement();
            this.colorBox.GradientStyle            = GradientStyles.Solid;
            this.colorBox.DrawFill                 = true;
            this.colorBox.NotifyParentOnMouseInput = true;
            this.colorBox.MinSize                  = new Size(30, 0);
            this.colorBox.MaxSize                  = new Size(30, 0);
            this.colorBox.DrawBorder               = true;
            this.colorBox.BorderColor              = Color.Black;
            this.colorBox.BorderGradientStyle      = GradientStyles.Solid;
            this.colorBox.NotifyParentOnMouseInput = true;
            this.colorBox.StretchHorizontally      = false;
            stackLayoutElement.Children.Add((RadElement)this.colorBox);
            this.textBox = new LightVisualElement();
            this.textBox.NotifyParentOnMouseInput = true;
            this.textBox.TextAlignment            = ContentAlignment.MiddleLeft;
            this.textBox.StretchHorizontally      = false;
            stackLayoutElement.Children.Add((RadElement)this.textBox);
        }
Пример #17
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            buttonElement       = new RadButtonElement();
            buttonElement.Class = "RibbonBarButtonElement";
            buttonElement.ButtonFillElement.Class = "ButtonInRibbonFill";
            buttonElement.BorderElement.Class     = "ButtonInRibbonBorder";
            buttonElement.Margin = new System.Windows.Forms.Padding(0, 10, 10, 0);
            buttonElement.Click += new EventHandler(buttonElement_Click);
            this.Children.Add(buttonElement);

            lve                     = new LightVisualElement();
            lve.BackColor           = Color.Red;
            lve.DrawFill            = true;
            lve.StretchHorizontally = false;
            lve.StretchVertically   = false;
            lve.GradientStyle       = Telerik.WinControls.GradientStyles.Solid;
            lve.Shape               = new RoundRectShape(sizeConst / 2);
            lve.SmoothingMode       = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            lve.ForeColor           = Color.White;
            lve.MinSize             = new Size(sizeConst, sizeConst);
            lve.Visibility          = ElementVisibility.Collapsed;
            this.Children.Add(lve);
        }
Пример #18
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            StackLayoutElement stack = new StackLayoutElement();

            stack.StretchVertically   = true;
            stack.FitInAvailableSize  = true;
            stack.Orientation         = System.Windows.Forms.Orientation.Horizontal;
            stack.Padding             = new System.Windows.Forms.Padding(2);
            stack.ElementSpacing      = 5;
            stack.StretchHorizontally = false;
            this.Children.Add(stack);

            colorBox = new LightVisualElement();
            colorBox.GradientStyle            = Telerik.WinControls.GradientStyles.Solid;
            colorBox.DrawFill                 = true;
            colorBox.NotifyParentOnMouseInput = true;
            colorBox.MinSize                  = new Size(colorBoxSizeWidth, 0);
            colorBox.MaxSize                  = new Size(colorBoxSizeWidth, 0);
            colorBox.DrawBorder               = true;
            colorBox.BorderColor              = Color.Black;
            colorBox.BorderGradientStyle      = GradientStyles.Solid;
            colorBox.NotifyParentOnMouseInput = true;
            colorBox.StretchHorizontally      = false;
            stack.Children.Add(colorBox);

            textBox = new LightVisualElement();
            textBox.NotifyParentOnMouseInput = true;
            textBox.TextAlignment            = ContentAlignment.MiddleLeft;
            textBox.StretchHorizontally      = false;
            stack.Children.Add(textBox);
        }
Пример #19
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            StackLayoutElement stackLayoutElement1 = new StackLayoutElement();

            stackLayoutElement1.Orientation         = Orientation.Vertical;
            stackLayoutElement1.StretchHorizontally = true;
            stackLayoutElement1.StretchVertically   = true;
            this.titleElement = this.CreateTitleElement();
            this.actionsBar   = this.CreateActionsBarElement();
            this.ok           = this.CreateOkButton();
            this.cancel       = this.CreateCancelButton();
            StackLayoutElement stackLayoutElement2 = new StackLayoutElement();

            stackLayoutElement2.Orientation = Orientation.Horizontal;
            stackLayoutElement2.Children.Add((RadElement)this.ok);
            stackLayoutElement2.Children.Add((RadElement)this.cancel);
            this.actionsBar.Children.Add((RadElement)stackLayoutElement2);
            this.currentValueElement = this.CreateCurrentValueElement();
            stackLayoutElement1.Children.Add((RadElement)this.titleElement);
            stackLayoutElement1.Children.Add(this.CreateMainElement());
            stackLayoutElement1.Children.Add((RadElement)this.currentValueElement);
            stackLayoutElement1.Children.Add((RadElement)this.actionsBar);
            this.Children.Add((RadElement)stackLayoutElement1);
        }
Пример #20
0
 public virtual void Update()
 {
   this.sizeMode = (PageViewItemSizeMode) this.itemLayout.GetValue(RadPageViewElement.ItemSizeModeProperty);
   this.contentOrientation = (PageViewContentOrientation) this.itemLayout.GetValue(RadPageViewElement.ItemContentOrientationProperty);
   this.itemSpacing = (int) this.itemLayout.GetValue(RadPageViewElement.ItemSpacingProperty);
   this.vertical = this.GetIsVertical();
   this.availableLength = this.vertical ? this.availableSize.Height : this.availableSize.Width;
   this.paddingLength = this.vertical ? (float) this.itemLayout.Padding.Vertical : (float) this.itemLayout.Padding.Horizontal;
   Padding borderThickness = LightVisualElement.GetBorderThickness(this.itemLayout, true);
   this.borderLength = this.vertical ? (float) borderThickness.Vertical : (float) borderThickness.Horizontal;
   int num = 0;
   foreach (RadElement child in this.itemLayout.Children)
   {
     RadPageViewItem radPageViewItem = child as RadPageViewItem;
     if (radPageViewItem != null && radPageViewItem.Visibility != ElementVisibility.Collapsed)
     {
       radPageViewItem.Measure(this.GetMeasureSizeConstraint((RadItem) radPageViewItem));
       PageViewItemSizeInfo itemSizeInfo = this.CreateItemSizeInfo(radPageViewItem);
       itemSizeInfo.desiredSize = new SizeF(radPageViewItem.DesiredSize.Width, radPageViewItem.DesiredSize.Height);
       this.maxWidth = Math.Max(itemSizeInfo.desiredSize.Width, this.maxWidth);
       this.maxHeight = Math.Max(itemSizeInfo.desiredSize.Height, this.maxHeight);
       this.items.Add(itemSizeInfo);
       itemSizeInfo.itemIndex = num++;
     }
   }
   this.itemCount = this.items.Count;
 }
Пример #21
0
        protected virtual LightVisualElement CreateSeparatorElement()
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.BackColor = Color.Gray;
            lightVisualElement.ShouldHandleMouseInput = false;
            return(lightVisualElement);
        }
Пример #22
0
 public PageViewLayoutInfo(LightVisualElement layout, SizeF available)
 {
     this.items         = new List <PageViewItemSizeInfo>();
     this.itemLayout    = layout;
     this.availableSize = available;
     this.previousSize  = layout.PreviousConstraint;
     this.Update();
 }
Пример #23
0
 private void EnsureDrawFill(LightVisualElement element, int backColorNo)
 {
     if (this.node.Style.GradientStyle == GradientStyles.Solid || this.node.Style.NumberOfColors < backColorNo)
     {
         return;
     }
     element.DrawFill = true;
 }
Пример #24
0
        protected override LightVisualElement CreateMainMessageElement()
        {
            LightVisualElement mainMessageElement = base.CreateMainMessageElement();

            mainMessageElement.SmoothingMode = SmoothingMode.HighQuality;
            mainMessageElement.Shape         = (ElementShape) new RoundRectShape(20);
            return(mainMessageElement);
        }
Пример #25
0
        private LightVisualElement CreateTimeElement()
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.TextAlignment          = ContentAlignment.MiddleLeft;
            lightVisualElement.ShouldHandleMouseInput = false;
            return(lightVisualElement);
        }
Пример #26
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.Class                                        = nameof(DescriptionTextListVisualItem);
            this.DrawText                                     = true;
            this.Text                                         = string.Empty;
            this.ClipDrawing                                  = true;
            this.horizontalStackLayout                        = new StackLayoutElement();
            this.horizontalStackLayout.Orientation            = Orientation.Horizontal;
            this.horizontalStackLayout.StretchHorizontally    = true;
            this.horizontalStackLayout.StretchVertically      = true;
            this.horizontalStackLayout.ShouldHandleMouseInput = false;
            this.Children.Add((RadElement)this.horizontalStackLayout);
            this.imageContent                     = new LightVisualElement();
            this.imageContent.DrawText            = false;
            this.imageContent.StretchVertically   = true;
            this.imageContent.StretchHorizontally = false;
            this.imageContent.ImageLayout         = ImageLayout.None;
            this.imageContent.ImageAlignment      = ContentAlignment.MiddleCenter;
            int num1 = (int)this.imageContent.BindProperty(LightVisualElement.ImageAlignmentProperty, (RadObject)this, LightVisualElement.ImageAlignmentProperty, PropertyBindingOptions.OneWay);

            this.imageContent.Class = "ImageContent";
            this.imageContent.ShouldHandleMouseInput = false;
            this.horizontalStackLayout.Children.Add((RadElement)this.imageContent);
            this.verticalStackLayout                        = new StackLayoutElement();
            this.verticalStackLayout.Orientation            = Orientation.Vertical;
            this.verticalStackLayout.StretchHorizontally    = true;
            this.verticalStackLayout.StretchVertically      = false;
            this.verticalStackLayout.ShouldHandleMouseInput = false;
            this.horizontalStackLayout.Children.Add((RadElement)this.verticalStackLayout);
            this.mainContent = new LightVisualElement();
            this.mainContent.StretchVertically        = false;
            this.mainContent.TextAlignment            = ContentAlignment.MiddleLeft;
            this.mainContent.NotifyParentOnMouseInput = true;
            this.mainContent.TextWrap = true;
            this.mainContent.Class    = "MainContent";
            this.mainContent.ShouldHandleMouseInput = false;
            this.verticalStackLayout.Children.Add((RadElement)this.mainContent);
            this.separator = new LinePrimitive();
            this.separator.NotifyParentOnMouseInput = true;
            this.separator.StretchHorizontally      = true;
            this.separator.StretchVertically        = false;
            this.separator.ShouldHandleMouseInput   = false;
            this.verticalStackLayout.Children.Add((RadElement)this.separator);
            this.descriptionContent = new DescriptionContentListVisualItem();
            this.descriptionContent.TextAlignment            = ContentAlignment.MiddleLeft;
            this.descriptionContent.ForeColor                = Color.FromArgb((int)byte.MaxValue, 128, 128, 128);
            this.descriptionContent.NotifyParentOnMouseInput = true;
            this.descriptionContent.ShouldHandleMouseInput   = false;
            this.descriptionContent.TextWrap = true;
            this.descriptionContent.Class    = "DescriptionContent";
            int num2 = (int)this.descriptionContent.BindProperty(DescriptionContentListVisualItem.ActiveProperty, (RadObject)this, RadListVisualItem.ActiveProperty, PropertyBindingOptions.OneWay);
            int num3 = (int)this.descriptionContent.BindProperty(DescriptionContentListVisualItem.SelectedProperty, (RadObject)this, RadListVisualItem.SelectedProperty, PropertyBindingOptions.OneWay);
            int num4 = (int)this.descriptionContent.BindProperty(RadElement.ContainsMouseProperty, (RadObject)this, RadElement.ContainsMouseProperty, PropertyBindingOptions.OneWay);

            this.verticalStackLayout.Children.Add((RadElement)this.descriptionContent);
            RadListVisualItem.SynchronizationProperties.Add(DescriptionTextListVisualItem.DescriptionFontProperty);
        }
Пример #27
0
 public RenderElementEventArgs(
     LightVisualElement cell,
     RadCalendarDay day,
     CalendarView currentView)
 {
     this.day     = day;
     this.element = cell;
     this.view    = currentView;
 }
Пример #28
0
        private LightVisualElement CreateAirportElement()
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.TextAlignment          = ContentAlignment.MiddleLeft;
            lightVisualElement.Font                   = new Font(this.Font.FontFamily, 22f);
            lightVisualElement.ShouldHandleMouseInput = false;
            return(lightVisualElement);
        }
Пример #29
0
        protected virtual LightVisualElement CreateImageElement()
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.ImageLayout            = ImageLayout.Zoom;
            lightVisualElement.AutoSizeMode           = RadAutoSizeMode.FitToAvailableSize;
            lightVisualElement.ShouldHandleMouseInput = false;
            return(lightVisualElement);
        }
Пример #30
0
        protected virtual LightVisualElement CreateDataElement(string text)
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.TextAlignment          = ContentAlignment.MiddleCenter;
            lightVisualElement.ShouldHandleMouseInput = false;
            lightVisualElement.Text = text;
            return(lightVisualElement);
        }
Пример #31
0
        protected virtual LightVisualElement CreateFlightImageElement()
        {
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.ImageLayout            = ImageLayout.Zoom;
            lightVisualElement.MaxSize                = new Size(90, 0);
            lightVisualElement.ShouldHandleMouseInput = false;
            return(lightVisualElement);
        }
Пример #32
0
        private void PrepareFooter()
        {
            StackLayoutElement footerLayout = new StackLayoutElement();
            footerLayout.Orientation = Orientation.Horizontal;
            footerLayout.Margin = new System.Windows.Forms.Padding(700, 600, 0, 0);
            footerLayout.StretchHorizontally = false;

            this.doctorLabel = new LightVisualElement();
            this.doctorLabel.Text = ConfigurationSettings.AppSettings["Doctor"].ToString();
            this.doctorLabel.Font = new Font("Segoe UI Light", 45, GraphicsUnit.Point);
            this.doctorLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.doctorLabel.ForeColor = Color.White;
            this.doctorLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.doctorLabel.StretchHorizontally = false;
            footerLayout.Children.Add(this.doctorLabel);

            StackLayoutElement serialLayout = new StackLayoutElement();
            serialLayout.Orientation = Orientation.Vertical;
            serialLayout.Margin = new System.Windows.Forms.Padding(750, 680, 0, 0);
            serialLayout.StretchHorizontally = false;
            
            this.suffixLabel = new LightVisualElement();
            this.suffixLabel.Text = ConfigurationSettings.AppSettings["Suffix"].ToString();
            this.suffixLabel.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            this.suffixLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.suffixLabel.ForeColor = Color.White;
            this.suffixLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.suffixLabel.StretchHorizontally = false;
            serialLayout.Children.Add(this.suffixLabel);

            this.suffix2Label = new LightVisualElement();
            this.suffix2Label.Text = ConfigurationSettings.AppSettings["Suffix2"].ToString();
            this.suffix2Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            this.suffix2Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.suffix2Label.ForeColor = Color.White;
            this.suffix2Label.TextAlignment = ContentAlignment.MiddleLeft;
            this.suffix2Label.StretchHorizontally = false;
            serialLayout.Children.Add(this.suffix2Label);

            //this.suffix3Label = new LightVisualElement();
            //this.suffix3Label.Text = ConfigurationSettings.AppSettings["Suffix3"].ToString();
            //this.suffix3Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            //this.suffix3Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            //this.suffix3Label.ForeColor = Color.White;
            //this.suffix3Label.TextAlignment = ContentAlignment.MiddleLeft;
            //this.suffix3Label.StretchHorizontally = false;
            //serialLayout.Children.Add(this.suffix3Label);

            //this.suffix4Label = new LightVisualElement();
            //this.suffix4Label.Text = ConfigurationSettings.AppSettings["Suffix4"].ToString();
            //this.suffix4Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            //this.suffix4Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            //this.suffix4Label.ForeColor = Color.White;
            //this.suffix4Label.TextAlignment = ContentAlignment.MiddleLeft;
            //this.suffix4Label.StretchHorizontally = false;
            //serialLayout.Children.Add(this.suffix4Label);

            this.radPanorama1.PanoramaElement.Children.Add(footerLayout);
            this.radPanorama1.PanoramaElement.Children.Add(serialLayout);
        }
Пример #33
0
        private void PrepareHeader()
        {
            StackLayoutElement headerLayout = new StackLayoutElement();
            headerLayout.Orientation = Orientation.Horizontal;
            headerLayout.Margin = new System.Windows.Forms.Padding(0, 35, 0, 0);
            headerLayout.NotifyParentOnMouseInput = true;
            headerLayout.ShouldHandleMouseInput = false;
            headerLayout.StretchHorizontally = false;

            this.backButton = new RadImageItem();
            this.backButton.Margin = new Padding(40, 0, 28, 0);
            this.backButton.Click += new EventHandler(backButton_Click);
            this.backButton.Visibility = ElementVisibility.Hidden;
            this.backButton.Image = Tlieta.Pdms.Properties.Resources.back;
            this.backButton.BackColor = Color.Transparent;
            this.backButton.BorderThickness = new Padding(0, 0, 0, 0);
            headerLayout.Children.Add(this.backButton);

            this.headerLabel = new LightVisualElement();
            this.headerLabel.Text = ConfigurationSettings.AppSettings["ApplicationLabel"].ToString();
            this.headerLabel.Font = new Font("Segoe UI Light", 35, GraphicsUnit.Point);
            this.headerLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.headerLabel.ForeColor = Color.White;
            this.headerLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.headerLabel.MaxSize = new Size(1030, 110);
            this.headerLabel.NotifyParentOnMouseInput = true;
            this.headerLabel.ShouldHandleMouseInput = false;
            this.headerLabel.StretchHorizontally = false;
            headerLayout.Children.Add(this.headerLabel);

            //StackLayoutElement headerLogo = new StackLayoutElement();
            //headerLogo.Margin = new System.Windows.Forms.Padding(1220, 60, 0, 0);
            //headerLogo.StretchHorizontally = false;

            //this.logoTlietaHeader = new RadImageItem();
            //this.logoTlietaHeader.Image = Tlieta.Pdms.Properties.Resources.TLIETA90;
            //this.logoTlietaHeader.BackColor = Color.Transparent;
            //this.logoTlietaHeader.Margin = new Padding(0, 0, 20, 0);
            //this.logoTlietaHeader.BorderThickness = new Padding(0, 0, 0, 0);
            //headerLogo.Children.Add(this.logoTlietaHeader);

            this.radPanorama1.PanoramaElement.Children.Add(headerLayout);
            //this.radPanorama1.PanoramaElement.Children.Add(headerLogo);
        }
Пример #34
0
        private void PreparePages()
        {
            examplePage = new LightVisualElement();
            examplePage.DrawText = false;
            examplePage.DrawFill = true;
            examplePage.BackColor = Color.White;
            examplePage.GradientStyle = GradientStyles.Solid;
            examplePage.Visibility = ElementVisibility.Collapsed;
            this.radPanorama1.PanoramaElement.Children.Add(examplePage);
            examplePage.Margin = new Padding(0, 140, 0, 0);

            this.exampleControls = new Dictionary<string, UserControl>();
            this.exampleControls.Add("Patient Info", new Tlieta.Pdms.Views.Shared.EditPatient(_patientId));
            this.exampleControls.Add("Videos", new Tlieta.Pdms.Views.Shared.Videos(_patientId.ToString()));
            this.exampleControls.Add("Photos", new Tlieta.Pdms.Views.Shared.Photos(_patientId.ToString()));
            this.exampleControls.Add("PrintPhoto", new Tlieta.Pdms.Views.Shared.PrintPhoto(_patientId.ToString()));
            this.exampleControls.Add("Notes", new Tlieta.Pdms.Views.Shared.EditPatient(0));
            this.exampleControls.Add("Surgery", new Tlieta.Pdms.Views.Shared.SurgeryView(_patientId));
            this.exampleControls.Add("Measurement & Vitals", new Tlieta.Pdms.Views.Shared.Measurements(_patientId));
            this.exampleControls.Add("New Visit", new Tlieta.Pdms.Views.Shared.NewVisitView(_patientId));
            this.exampleControls.Add("Visit History", new Tlieta.Pdms.Views.Shared.VisitHistoryView(_patientId));
            this.exampleControls.Add("Billing", new Tlieta.Pdms.Views.Shared.BillingView(_patientId));
            this.PreloadControls();
        }