Exemplo n.º 1
0
        public TargetCustomersControl(BaseDashboardContainer slideContainer) : base(slideContainer)
        {
            InitializeComponent();

            Text = ControlName;

            comboBoxEditSlideHeader.EnableSelectAll();

            comboBoxEditSlideHeader.Properties.Items.Clear();
            comboBoxEditSlideHeader.Properties.Items.AddRange(SlideContainer.DashboardInfo.TargetCustomersLists.Headers.Where(item => !item.IsPlaceholder).Select(item => item.Value).ToArray());

            checkedListBoxControlTargetDemo.Items.Clear();
            checkedListBoxControlTargetDemo.Items.AddRange(SlideContainer.DashboardInfo.TargetCustomersLists.Demos.Where(item => !item.IsPlaceholder).ToArray());

            checkedListBoxControlHouseholdIncome.Items.Clear();
            checkedListBoxControlHouseholdIncome.Items.AddRange(SlideContainer.DashboardInfo.TargetCustomersLists.HHIs.Where(item => !item.IsPlaceholder).ToArray());

            checkedListBoxControlGeographicResidence.Items.Clear();
            checkedListBoxControlGeographicResidence.Items.AddRange(SlideContainer.DashboardInfo.TargetCustomersLists.Geographies.Where(item => !item.IsPlaceholder).ToArray());

            pictureEditSplash.Image = SlideContainer.DashboardInfo.GraphicResources?.TargeCustomersSplashLogo;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControl.MaximumSize                           = RectangleHelper.ScaleSize(layoutControl.MaximumSize, scaleFactor);
            layoutControl.MinimumSize                           = RectangleHelper.ScaleSize(layoutControl.MinimumSize, scaleFactor);
            layoutControlItemSlideHeader.MaxSize                = RectangleHelper.ScaleSize(layoutControlItemSlideHeader.MaxSize, scaleFactor);
            layoutControlItemSlideHeader.MinSize                = RectangleHelper.ScaleSize(layoutControlItemSlideHeader.MinSize, scaleFactor);
            checkedListBoxControlTargetDemo.ItemHeight          = (Int32)(checkedListBoxControlTargetDemo.ItemHeight * scaleFactor.Height);
            checkedListBoxControlHouseholdIncome.ItemHeight     = (Int32)(checkedListBoxControlHouseholdIncome.ItemHeight * scaleFactor.Height);
            checkedListBoxControlGeographicResidence.ItemHeight = (Int32)(checkedListBoxControlGeographicResidence.ItemHeight * scaleFactor.Height);
        }
Exemplo n.º 2
0
        private void GridContent_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            Size newSize1 = e.NewSize;
            // ISSUE: explicit reference operation
            double height = ((Size)@newSize1).Height;

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

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

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

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

            ((Shape)rect).Fill = ((Brush)solidColorBrush);
            using (List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ((PresentationFrameworkCollection <UIElement>)((Panel)this.canvasBackground).Children).Add((UIElement)enumerator.Current);
                }
            }
        }
Exemplo n.º 3
0
        private void StackPanelMainInfo_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            double height = e.NewSize.Height;

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

            rect.Height = height;
            rect.Margin = new Thickness(0.0);
            rect.Width  = e.NewSize.Width;
            rect.Fill   = (SolidColorBrush)Application.Current.Resources["PhoneNewsBackgroundBrush"];
            using (List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(rect).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    this.canvasBackground.Children.Add(enumerator.Current);
                }
            }
        }
Exemplo n.º 4
0
        public override void InitControls()
        {
            xtraTabControl.TabPages.AddRange(GetChildTabPages().OfType <XtraTabPage>().ToArray());

            var defaultPage = xtraTabControl.TabPages.FirstOrDefault() as IChildTabPageContainer;

            LoadTabPage(defaultPage, false);
            LoadChildTabData();

            xtraTabControl.SelectedPageChanging += OnSelectedTabPageChanging;
            xtraTabControl.SelectedPageChanged  += OnSelectedTabPageChanged;
            xtraTabControl.MouseWheel           += OnTabControlMouseWheel;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemOutputToggle.MaxSize        = RectangleHelper.ScaleSize(layoutControlItemOutputToggle.MaxSize, scaleFactor);
            layoutControlItemOutputToggle.MinSize        = RectangleHelper.ScaleSize(layoutControlItemOutputToggle.MinSize, scaleFactor);
            emptySpaceItemSlideHeader.MaxSize            = RectangleHelper.ScaleSize(emptySpaceItemSlideHeader.MaxSize, scaleFactor);
            emptySpaceItemSlideHeader.MinSize            = RectangleHelper.ScaleSize(emptySpaceItemSlideHeader.MinSize, scaleFactor);
            simpleLabelItemSlideDescriptionLeft.MaxSize  = RectangleHelper.ScaleSize(simpleLabelItemSlideDescriptionLeft.MaxSize, scaleFactor);
            simpleLabelItemSlideDescriptionLeft.MinSize  = RectangleHelper.ScaleSize(simpleLabelItemSlideDescriptionLeft.MinSize, scaleFactor);
            simpleLabelItemSlideDescriptionRight.MaxSize = RectangleHelper.ScaleSize(simpleLabelItemSlideDescriptionRight.MaxSize, scaleFactor);
            simpleLabelItemSlideDescriptionRight.MinSize = RectangleHelper.ScaleSize(simpleLabelItemSlideDescriptionRight.MinSize, scaleFactor);

            OnResize(this, EventArgs.Empty);
            Resize += OnResize;
        }
        public SingleSlidesTabControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo)
        {
            InitializeComponent();

            CustomTabInfo.LoadSlides();

            SlideSettingsManager.Instance.SettingsChanging += OnSlideFormatSettingsChanging;
            SlideSettingsManager.Instance.SettingsChanged  += OnSlideFormatSettingsChanged;

            pictureEditClipart.DoubleClick += OnOutputClick;
            pictureEditClipart.MouseWheel  += OnClipartMouseWheel;

            pictureEditUp.Image   = CustomTabInfo.ListUpImage;
            pictureEditDown.Image = CustomTabInfo.ListDownImage;
            pictureEditList.Image = CustomTabInfo.ListPopupImage;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemUp.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MaxSize, scaleFactor);
            layoutControlItemUp.MinSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MinSize, scaleFactor);
            layoutControlItemList.MaxSize = RectangleHelper.ScaleSize(layoutControlItemList.MaxSize, scaleFactor);
            layoutControlItemList.MinSize = RectangleHelper.ScaleSize(layoutControlItemList.MinSize, scaleFactor);
            layoutControlItemDown.MaxSize = RectangleHelper.ScaleSize(layoutControlItemDown.MaxSize, scaleFactor);
            layoutControlItemDown.MinSize = RectangleHelper.ScaleSize(layoutControlItemDown.MinSize, scaleFactor);
        }
        public FormProductInfo(ProductInfoType type, DigitalProduct product)
        {
            InitializeComponent();
            _type    = type;
            _product = product;

            simpleLabelItemTitle.Text = String.Format("<size=+2><i>{0}</i></size>", product.FullName);

            switch (_type)
            {
            case ProductInfoType.Targeting:
                Text = "Targeting Options";
                pictureEditLogo.Image = Resources.TargetButton;
                break;

            case ProductInfoType.RichMedia:
                Text = "Rich Media Options";
                pictureEditLogo.Image = Resources.RichMediaButton;
                break;
            }
            foreach (var group in _product.AddtionalInfo.Where(pi => pi.Type == type).Select(pi => pi.Group).Distinct())
            {
                xtraTabControlGroups.TabPages.Add(new DigitalProductInfoGroup(_product.AddtionalInfo.Where(pi => pi.Type == type && pi.Group == group))
                {
                    Text = group
                });
            }

            layoutControlItemLogo.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemLogo.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemLogo.MinSize   = RectangleHelper.ScaleSize(layoutControlItemLogo.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MinSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
        public DigitalListSettingsControl()
        {
            InitializeComponent();
            Text      = "Info";
            BarButton = new ButtonInfo
            {
                Logo    = BusinessObjects.Instance.ImageResourcesManager.DigitalRetractableBarListImage ?? Properties.Resources.DigitalSettingsList,
                Tooltip = String.Format("Open {0} Schedule Settings",
                                        MediaMetaData.Instance.DataTypeString),
                Action = () => { TabControl.SelectedTabPage = this; }
            };

            buttonXDimensions.Text = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.ListSettingsDimensionTitle ?? buttonXDimensions.Text);
            buttonXRichMedia.Text  = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.ListSettingsRichMediaTitle ?? buttonXRichMedia.Text);
            buttonXStrategy.Text   = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.ListSettingsStrategyTitle ?? buttonXStrategy.Text);
            buttonXLocation.Text   = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.ListSettingsLocationTitle ?? buttonXLocation.Text);
            buttonXTargeting.Text  = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.ListSettingsTargetingTitle ?? buttonXTargeting.Text);

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemDimensions.MaxSize = RectangleHelper.ScaleSize(layoutControlItemDimensions.MaxSize, scaleFactor);
            layoutControlItemDimensions.MinSize = RectangleHelper.ScaleSize(layoutControlItemDimensions.MinSize, scaleFactor);
            layoutControlItemRichMedia.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemRichMedia.MaxSize, scaleFactor);
            layoutControlItemRichMedia.MinSize  = RectangleHelper.ScaleSize(layoutControlItemRichMedia.MinSize, scaleFactor);
            layoutControlItemStrategy.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemStrategy.MaxSize, scaleFactor);
            layoutControlItemStrategy.MinSize   = RectangleHelper.ScaleSize(layoutControlItemStrategy.MinSize, scaleFactor);
            layoutControlItemLocation.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemLocation.MaxSize, scaleFactor);
            layoutControlItemLocation.MinSize   = RectangleHelper.ScaleSize(layoutControlItemLocation.MinSize, scaleFactor);
            layoutControlItemTargeting.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemTargeting.MaxSize, scaleFactor);
            layoutControlItemTargeting.MinSize  = RectangleHelper.ScaleSize(layoutControlItemTargeting.MinSize, scaleFactor);
        }
Exemplo n.º 8
0
        public override void InitControls()
        {
            comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor();

            xtraTabControl.TabPages.AddRange(GetChildTabPages().OfType <XtraTabPage>().ToArray());

            var defaultPage = xtraTabControl.TabPages.FirstOrDefault() as IChildTabPageContainer;

            LoadTabPage(defaultPage, false);
            LoadChildTabData();

            xtraTabControl.SelectedPageChanged  += OnSelectedTabPageChanged;
            xtraTabControl.SelectedPageChanging += OnSelectedTabPageChanging;
            xtraTabControl.MouseWheel           += OnTabControlMouseWheel;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemOutputToggle.MaxSize = RectangleHelper.ScaleSize(layoutControlItemOutputToggle.MaxSize, scaleFactor);
            layoutControlItemOutputToggle.MinSize = RectangleHelper.ScaleSize(layoutControlItemOutputToggle.MinSize, scaleFactor);
            layoutControlItemSlideHeader.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemSlideHeader.MaxSize, scaleFactor);
            layoutControlItemSlideHeader.MinSize  = RectangleHelper.ScaleSize(layoutControlItemSlideHeader.MinSize, scaleFactor);
            emptySpaceItemSlideHeader.MaxSize     = RectangleHelper.ScaleSize(emptySpaceItemSlideHeader.MaxSize, scaleFactor);
            emptySpaceItemSlideHeader.MinSize     = RectangleHelper.ScaleSize(emptySpaceItemSlideHeader.MinSize, scaleFactor);

            OnResize(this, EventArgs.Empty);
            Resize += OnResize;
        }
        public FormOutputSettings()
        {
            InitializeComponent();

            layoutControlGroupContractSettings.Visibility =
                BusinessObjects.Instance.OutputManager.ContractTemplateFolder.ExistsLocal()
                                        ? LayoutVisibility.Always
                                        : LayoutVisibility.Never;

            layoutControlItemUseDecimalRate.MaxSize    = RectangleHelper.ScaleSize(layoutControlItemUseDecimalRate.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemUseDecimalRate.MinSize    = RectangleHelper.ScaleSize(layoutControlItemUseDecimalRate.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemShowSpotX.MaxSize         = RectangleHelper.ScaleSize(layoutControlItemShowSpotX.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemShowSpotX.MinSize         = RectangleHelper.ScaleSize(layoutControlItemShowSpotX.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemShowSpotsPerWeek.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemShowSpotsPerWeek.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemShowSpotsPerWeek.MinSize  = RectangleHelper.ScaleSize(layoutControlItemShowSpotsPerWeek.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCloneLineToTheEnd.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCloneLineToTheEnd.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCloneLineToTheEnd.MinSize = RectangleHelper.ScaleSize(layoutControlItemCloneLineToTheEnd.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemLockToMaster.MaxSize      = RectangleHelper.ScaleSize(layoutControlItemLockToMaster.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemLockToMaster.MinSize      = RectangleHelper.ScaleSize(layoutControlItemLockToMaster.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));

            layoutControlItemOK.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MinSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 10
0
        protected BaseDigitalInfoSettingsControl()
        {
            InitializeComponent();
            Text = "Info";

            buttonXCategory.Text          = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsCategoryTitle ?? buttonXCategory.Text);
            buttonXSubCategory.Text       = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsSubCategoryTitle ?? buttonXSubCategory.Text);
            buttonXProduct.Text           = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsProductTitle ?? buttonXProduct.Text);
            buttonXInfo.Text              = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsInfoTitle ?? buttonXInfo.Text);
            buttonXLogo.Text              = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsLogosTitle ?? buttonXLogo.Text);
            buttonXMonthlyInvestment.Text = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsMontlyInvestmentTitle ?? buttonXMonthlyInvestment.Text);
            buttonXTotalInvestment.Text   = DigitalControlsConfiguration.WrapTitle(ListManager.Instance.DefaultControlsConfiguration.DigitalInfoSettingsTotalInvestmentTitle ?? buttonXTotalInvestment.Text);

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemCategory.MaxSize          = RectangleHelper.ScaleSize(layoutControlItemCategory.MaxSize, scaleFactor);
            layoutControlItemCategory.MinSize          = RectangleHelper.ScaleSize(layoutControlItemCategory.MinSize, scaleFactor);
            layoutControlItemSubCategory.MaxSize       = RectangleHelper.ScaleSize(layoutControlItemSubCategory.MaxSize, scaleFactor);
            layoutControlItemSubCategory.MinSize       = RectangleHelper.ScaleSize(layoutControlItemSubCategory.MinSize, scaleFactor);
            layoutControlItemProduct.MaxSize           = RectangleHelper.ScaleSize(layoutControlItemProduct.MaxSize, scaleFactor);
            layoutControlItemProduct.MinSize           = RectangleHelper.ScaleSize(layoutControlItemProduct.MinSize, scaleFactor);
            layoutControlItemInfo.MaxSize              = RectangleHelper.ScaleSize(layoutControlItemInfo.MaxSize, scaleFactor);
            layoutControlItemInfo.MinSize              = RectangleHelper.ScaleSize(layoutControlItemInfo.MinSize, scaleFactor);
            layoutControlItemLogo.MaxSize              = RectangleHelper.ScaleSize(layoutControlItemLogo.MaxSize, scaleFactor);
            layoutControlItemLogo.MinSize              = RectangleHelper.ScaleSize(layoutControlItemLogo.MinSize, scaleFactor);
            layoutControlItemMonthlyInvestment.MaxSize = RectangleHelper.ScaleSize(layoutControlItemMonthlyInvestment.MaxSize, scaleFactor);
            layoutControlItemMonthlyInvestment.MinSize = RectangleHelper.ScaleSize(layoutControlItemMonthlyInvestment.MinSize, scaleFactor);
            layoutControlItemTotalInvestment.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemTotalInvestment.MaxSize, scaleFactor);
            layoutControlItemTotalInvestment.MinSize   = RectangleHelper.ScaleSize(layoutControlItemTotalInvestment.MinSize, scaleFactor);
        }
        public SnapshotEditorsContainer()
        {
            InitializeComponent();

            simpleLabelItemCollectionItemsInfo.MaxSize = RectangleHelper.ScaleSize(simpleLabelItemCollectionItemsInfo.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            simpleLabelItemCollectionItemsInfo.MinSize = RectangleHelper.ScaleSize(simpleLabelItemCollectionItemsInfo.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 12
0
        public ItemControl(ApproachTabCControl container)
        {
            _container = container;
            InitializeComponent();

            memoEditSubheader.EnableSelectAll().RaiseNullValueIfEditorEmpty();

            ItemState       = ApproachState.ApproachItemState.Empty();
            ItemState.Index = DefaultItemIndex;

            pictureEditClipart.MouseWheel += OnClipartMouseWheel;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemUp.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MaxSize, scaleFactor);
            layoutControlItemUp.MinSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MinSize, scaleFactor);
            layoutControlItemList.MaxSize = RectangleHelper.ScaleSize(layoutControlItemList.MaxSize, scaleFactor);
            layoutControlItemList.MinSize = RectangleHelper.ScaleSize(layoutControlItemList.MinSize, scaleFactor);
            layoutControlItemDown.MaxSize = RectangleHelper.ScaleSize(layoutControlItemDown.MaxSize, scaleFactor);
            layoutControlItemDown.MinSize = RectangleHelper.ScaleSize(layoutControlItemDown.MinSize, scaleFactor);
            layoutControlItemWipe.MaxSize = RectangleHelper.ScaleSize(layoutControlItemWipe.MaxSize, scaleFactor);
            layoutControlItemWipe.MinSize = RectangleHelper.ScaleSize(layoutControlItemWipe.MinSize, scaleFactor);
            emptySpaceItemWipe.MaxSize    = RectangleHelper.ScaleSize(emptySpaceItemWipe.MaxSize, scaleFactor);
            emptySpaceItemWipe.MinSize    = RectangleHelper.ScaleSize(emptySpaceItemWipe.MinSize, scaleFactor);
        }
        public FormSettings(MediaScheduleSettings settings)
        {
            InitializeComponent();
            _settings = settings;

            pictureEditDemoLogo.Image =
                BusinessObjects.Instance.ImageResourcesManager.HomeSettingsDemoImage ?? pictureEditDemoLogo.Image;
            pictureEditDaypartsLogo.Image =
                BusinessObjects.Instance.ImageResourcesManager.HomeSettingsDaypartsImage ?? pictureEditDaypartsLogo.Image;
            pictureEditCalendarTypeLogo.Image =
                BusinessObjects.Instance.ImageResourcesManager.HomeSettingsCalendarTypeImage ?? pictureEditCalendarTypeLogo.Image;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            emptySpaceItemDemoSeparator.MaxSize     = RectangleHelper.ScaleSize(emptySpaceItemDemoSeparator.MaxSize, scaleFactor);
            emptySpaceItemDemoSeparator.MinSize     = RectangleHelper.ScaleSize(emptySpaceItemDemoSeparator.MinSize, scaleFactor);
            emptySpaceItemDaypartsSeparator.MaxSize = RectangleHelper.ScaleSize(emptySpaceItemDaypartsSeparator.MaxSize, scaleFactor);
            emptySpaceItemDaypartsSeparator.MinSize = RectangleHelper.ScaleSize(emptySpaceItemDaypartsSeparator.MinSize, scaleFactor);
            emptySpaceItemCalendarSeparator.MaxSize = RectangleHelper.ScaleSize(emptySpaceItemCalendarSeparator.MaxSize, scaleFactor);
            emptySpaceItemCalendarSeparator.MinSize = RectangleHelper.ScaleSize(emptySpaceItemCalendarSeparator.MinSize, scaleFactor);
            layoutControlItemOK.MaxSize             = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, scaleFactor);
            layoutControlItemOK.MinSize             = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, scaleFactor);
            layoutControlItemCancel.MaxSize         = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, scaleFactor);
            layoutControlItemCancel.MinSize         = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, scaleFactor);
        }
Exemplo n.º 14
0
        public static void SetRoundedRegion(Form form, Size overrideSize)
        {
            int width, height;

            if (overrideSize == Size.Empty)
            {
                width  = form.ClientSize.Width;
                height = form.ClientSize.Height;
            }
            else
            {
                width  = overrideSize.Width;
                height = overrideSize.Height;
            }

            Region r = new Region(new Rectangle(3, 0, width - 6, height));

            r.Union(new Rectangle(2, 1, width - 4, height - 2));
            r.Union(new Rectangle(1, 2, width - 2, height - 4));
            r.Union(new Rectangle(0, 3, width, height - 6));

            RECT rect = new RECT();

            User32.GetWindowRect(form.Handle, ref rect);
            Point windowScreenPos = RectangleHelper.Convert(rect).Location;
            Point clientScreenPos = form.PointToScreen(new Point(0, 0));

            r.Translate(clientScreenPos.X - windowScreenPos.X, clientScreenPos.Y - windowScreenPos.Y);

            form.Region = r;
        }
Exemplo n.º 15
0
        public override void Draw(RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
        {
            drawDepth++;
            try
            {
                if (drawDepth > 1)
                {
                    return;
                }

                _HTML_PAINTER_INFO pInfo = new _HTML_PAINTER_INFO();
                GetPainterInfo(ref pInfo);

                //adjust the draw bounds to remove our padding for invalidates
                Rectangle drawBounds = RectangleHelper.Convert(rcBounds);
                drawBounds.X      += invalidationPadding;
                drawBounds.Y      += invalidationPadding;
                drawBounds.Height -= invalidationPadding * 2;
                drawBounds.Width  -= invalidationPadding * 2;

                using (Graphics g = Graphics.FromHdc(hdc))
                {
                    OnDraw(g, drawBounds, rcBounds, rcUpdate, lDrawFlags, hdc, pvDrawObject);
                }
            }
            finally
            {
                drawDepth--;
            }
        }
Exemplo n.º 16
0
        internal void Draw(Graphics e)
        {
            if (_scrollEffect == false)
            {
                _scrollY = (int)_count * Height;
            }
            int diff1, diff2;

            diff1 = 10 * Height - _scrollY;
            diff2 = Height - diff1;
            if (diff1 <= Height && diff1 >= 0)
            {
                //    Console.WriteLine(" XXscrollY = " + _scrollY + " diff1=" + diff1 + " diff2=" + diff2 + " Height=" + Height);

                e.DrawImage(_map, new Rectangle(_x, _y, _width, diff1), new Rectangle(0, _scrollY, _width, diff1), GraphicsUnit.Pixel);
                e.DrawImage(_map, new Rectangle(_x, diff1 + _y, _width, diff2), new Rectangle(0, 0, _width, diff2), GraphicsUnit.Pixel);
            }
            else
            {
                //    Console.WriteLine("YYscrollY = " + _scrollY + " diff1=" + diff1 + " diff2=" + diff2 + " Height=" + Height);

                e.DrawImage(_map, new Rectangle(_x, _y, _width, _height), new Rectangle(0, _scrollY, _width, _height), GraphicsUnit.Pixel);
            }

            Border.Border b        = new Border.Inner3D();
            Rectangle     drawRect = RectangleHelper.Shrink(new Rectangle(_x, _y, _width, _height), 3);

            b.DrawBorder(e, new GRectangle(drawRect).GetGraphicsPath());
        }
Exemplo n.º 17
0
        public SidebarGutter()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            buttonChevron = new BitmapButton(this.components);
            ColorizedResources.Instance.ColorizationChanged += new EventHandler(ColorizationChanged);
            buttonChevron.BackColor      = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
            buttonChevron.BitmapEnabled  = bitmapChevronLeft;
            buttonChevron.BitmapSelected = bitmapChevronLeftHover;
            buttonChevron.BitmapPushed   = bitmapChevronLeftHover;
            buttonChevron.Bounds         =
                RectangleHelper.Center(new Size(10, 9), new Rectangle(0, 0, ClientSize.Width, BLOCK_HEIGHT), false);
            buttonChevron.ButtonStyle    = ButtonStyle.Bitmap;
            buttonChevron.ButtonText     = Res.Get(StringId.ShowSidebar);
            buttonChevron.ToolTip        = Res.Get(StringId.ShowSidebar);
            buttonChevron.Click         += new EventHandler(buttonChevron_Click);
            buttonChevron.AccessibleName = Res.Get(StringId.ShowSidebar);
            buttonChevron.TabStop        = true;
            buttonChevron.TabIndex       = 0;
            buttonChevron.RightToLeft    = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
            buttonChevron.AllowMirroring = true;
            Controls.Add(buttonChevron);
            AccessibleRole = AccessibleRole.PushButton;
        }
Exemplo n.º 18
0
        public SectionTotalsSettingsControl()
        {
            InitializeComponent();

            Text      = "Info";
            BarButton = new ButtonInfo
            {
                Logo    = BusinessObjects.Instance.ImageResourcesManager.ProgramScheduleRetractableBarTotalsImage ?? Properties.Resources.SectionSettingsInfo,
                Tooltip = "Open Schedule Info",
                Action  = () => { TabControl.SelectedTabPage = this; }
            };

            quarterSelectorControl.QuarterSelected += OnQuarterChanged;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemAvgRate.MaxSize      = RectangleHelper.ScaleSize(layoutControlItemAvgRate.MaxSize, scaleFactor);
            layoutControlItemAvgRate.MinSize      = RectangleHelper.ScaleSize(layoutControlItemAvgRate.MinSize, scaleFactor);
            layoutControlItemDiscount.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemDiscount.MaxSize, scaleFactor);
            layoutControlItemDiscount.MinSize     = RectangleHelper.ScaleSize(layoutControlItemDiscount.MinSize, scaleFactor);
            layoutControlItemNetRate.MaxSize      = RectangleHelper.ScaleSize(layoutControlItemNetRate.MaxSize, scaleFactor);
            layoutControlItemNetRate.MinSize      = RectangleHelper.ScaleSize(layoutControlItemNetRate.MinSize, scaleFactor);
            layoutControlItemTotalCPP.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemTotalCPP.MaxSize, scaleFactor);
            layoutControlItemTotalCPP.MinSize     = RectangleHelper.ScaleSize(layoutControlItemTotalCPP.MinSize, scaleFactor);
            layoutControlItemTotalCost.MaxSize    = RectangleHelper.ScaleSize(layoutControlItemTotalCost.MaxSize, scaleFactor);
            layoutControlItemTotalCost.MinSize    = RectangleHelper.ScaleSize(layoutControlItemTotalCost.MinSize, scaleFactor);
            layoutControlItemTotalPeriods.MaxSize = RectangleHelper.ScaleSize(layoutControlItemTotalPeriods.MaxSize, scaleFactor);
            layoutControlItemTotalPeriods.MinSize = RectangleHelper.ScaleSize(layoutControlItemTotalPeriods.MinSize, scaleFactor);
            layoutControlItemTotalSpots.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemTotalSpots.MaxSize, scaleFactor);
            layoutControlItemTotalSpots.MinSize   = RectangleHelper.ScaleSize(layoutControlItemTotalSpots.MinSize, scaleFactor);
            layoutControlItemTotalGRP.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemTotalGRP.MaxSize, scaleFactor);
            layoutControlItemTotalGRP.MinSize     = RectangleHelper.ScaleSize(layoutControlItemTotalGRP.MinSize, scaleFactor);
        }
Exemplo n.º 19
0
        public FormStartExtended()
        {
            InitializeComponent();

            pictureEditNew.Buttonize();
            pictureEditOpen.Buttonize();
            pictureEditQuickEditSchedule.Buttonize();
            pictureEditExit.Buttonize();

            pictureEditLogo.Image = BusinessObjects.Instance.ImageResourcesManager.StartFormLogo ?? pictureEditLogo.Image;
            pictureEditNew.Image  = BusinessObjects.Instance.ImageResourcesManager.StartFormNewImage;
            pictureEditOpen.Image = BusinessObjects.Instance.ImageResourcesManager.StartFormOpenImage;
            pictureEditQuickEditSchedule.Image = BusinessObjects.Instance.ImageResourcesManager.StartFormQuickEditScheduleImage;
            pictureEditExit.Image = BusinessObjects.Instance.ImageResourcesManager.StartFormCancelImage;

            pictureEditOpen.Enabled = !FileStorageManager.Instance.UseLocalMode ||
                                      Directory.Exists(BusinessObjects.Instance.ScheduleManager.ContextPath);

            layoutControlItemNew.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemNew.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemNew.MinSize  = RectangleHelper.ScaleSize(layoutControlItemNew.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOpen.MaxSize = RectangleHelper.ScaleSize(layoutControlItemOpen.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOpen.MinSize = RectangleHelper.ScaleSize(layoutControlItemOpen.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemQuickEditSchedule.MaxSize = RectangleHelper.ScaleSize(layoutControlItemQuickEditSchedule.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemQuickEditSchedule.MinSize = RectangleHelper.ScaleSize(layoutControlItemQuickEditSchedule.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemExit.MaxSize = RectangleHelper.ScaleSize(layoutControlItemExit.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemExit.MinSize = RectangleHelper.ScaleSize(layoutControlItemExit.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 20
0
        public HtmlEditorSidebarTitle()
        {
            // enable double buffered painting.
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            Height = 30;

            buttonChevron                = new BitmapButton(this.components);
            buttonChevron.ButtonStyle    = ButtonStyle.Bitmap;
            buttonChevron.ButtonText     = Res.Get(StringId.HideSidebar);
            buttonChevron.ToolTip        = Res.Get(StringId.HideSidebar);
            buttonChevron.Click         += new EventHandler(ClickHandler);
            buttonChevron.AccessibleName = Res.Get(StringId.HideSidebar);
            buttonChevron.TabStop        = true;
            buttonChevron.TabIndex       = 0;
            buttonChevron.RightToLeft    = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
            buttonChevron.AllowMirroring = true;
            Controls.Add(buttonChevron);

            Click += new EventHandler(ClickHandler);

            //create the UI theme
            _uiTheme = new SidebarTitleUITheme(this);

            buttonChevron.Bounds =
                RectangleHelper.Center(_uiTheme.bmpChevronRight.Size, new Rectangle(0, 0, 20, ClientSize.Height), false);
        }
Exemplo n.º 21
0
        private void StackPanelMainInfo_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            double height = e.NewSize.Height;

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

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

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

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

            rect.Fill = (Brush)solidColorBrush;
            foreach (UIElement coverByRectangle in RectangleHelper.CoverByRectangles(rect))
            {
                this.canvasBackground.Children.Add(coverByRectangle);
            }
        }
Exemplo n.º 22
0
        public FormFlexFlightDatesWarning()
        {
            InitializeComponent();

            layoutControlItemOK.MaxSize = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 23
0
        public ItemControl(NeedsSolutionsTabFControl container)
        {
            _container = container;
            InitializeComponent();

            memoEditSubheader.EnableSelectAll().RaiseNullValueIfEditorEmpty();

            ItemState       = NeedsSolutionsState.SolutionsItemState.Empty();
            ItemState.Index = DefaultItemIndex;

            pictureEditClipart.MouseWheel += OnClipartMouseWheel;

            pictureEditUp.Image   = _container.CustomTabInfo.ListUpImage;
            pictureEditDown.Image = _container.CustomTabInfo.ListDownImage;
            pictureEditList.Image = _container.CustomTabInfo.ListPopupImage;
            pictureEditWipe.Image = _container.CustomTabInfo.ListWipeImage;

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemUp.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MaxSize, scaleFactor);
            layoutControlItemUp.MinSize   = RectangleHelper.ScaleSize(layoutControlItemUp.MinSize, scaleFactor);
            layoutControlItemList.MaxSize = RectangleHelper.ScaleSize(layoutControlItemList.MaxSize, scaleFactor);
            layoutControlItemList.MinSize = RectangleHelper.ScaleSize(layoutControlItemList.MinSize, scaleFactor);
            layoutControlItemDown.MaxSize = RectangleHelper.ScaleSize(layoutControlItemDown.MaxSize, scaleFactor);
            layoutControlItemDown.MinSize = RectangleHelper.ScaleSize(layoutControlItemDown.MinSize, scaleFactor);
            layoutControlItemWipe.MaxSize = RectangleHelper.ScaleSize(layoutControlItemWipe.MaxSize, scaleFactor);
            layoutControlItemWipe.MinSize = RectangleHelper.ScaleSize(layoutControlItemWipe.MinSize, scaleFactor);
            emptySpaceItemWipe.MaxSize    = RectangleHelper.ScaleSize(emptySpaceItemWipe.MaxSize, scaleFactor);
            emptySpaceItemWipe.MinSize    = RectangleHelper.ScaleSize(emptySpaceItemWipe.MinSize, scaleFactor);
        }
Exemplo n.º 24
0
        public SummaryColumnSettingsControl()
        {
            InitializeComponent();
            Text      = "Info";
            BarButton = new ButtonInfo
            {
                Logo    = BusinessObjects.Instance.ImageResourcesManager.SnapshotsRetractableBarSummaryImage ?? Properties.Resources.SectionSettingsInfo,
                Tooltip = "Open Schedule Info",
                Action  = () => { TabControl.SelectedTabPage = this; }
            };

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemLineId.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemLineId.MaxSize, scaleFactor);
            layoutControlItemLineId.MinSize     = RectangleHelper.ScaleSize(layoutControlItemLineId.MinSize, scaleFactor);
            layoutControlItemLogo.MaxSize       = RectangleHelper.ScaleSize(layoutControlItemLogo.MaxSize, scaleFactor);
            layoutControlItemLogo.MinSize       = RectangleHelper.ScaleSize(layoutControlItemLogo.MinSize, scaleFactor);
            layoutControlItemCampaign.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemCampaign.MaxSize, scaleFactor);
            layoutControlItemCampaign.MinSize   = RectangleHelper.ScaleSize(layoutControlItemCampaign.MinSize, scaleFactor);
            layoutControlItemComments.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemComments.MaxSize, scaleFactor);
            layoutControlItemComments.MinSize   = RectangleHelper.ScaleSize(layoutControlItemComments.MinSize, scaleFactor);
            layoutControlItemSpots.MaxSize      = RectangleHelper.ScaleSize(layoutControlItemSpots.MaxSize, scaleFactor);
            layoutControlItemSpots.MinSize      = RectangleHelper.ScaleSize(layoutControlItemSpots.MinSize, scaleFactor);
            layoutControlItemCost.MaxSize       = RectangleHelper.ScaleSize(layoutControlItemCost.MaxSize, scaleFactor);
            layoutControlItemCost.MinSize       = RectangleHelper.ScaleSize(layoutControlItemCost.MinSize, scaleFactor);
            layoutControlItemTotalWeeks.MaxSize = RectangleHelper.ScaleSize(layoutControlItemTotalWeeks.MaxSize, scaleFactor);
            layoutControlItemTotalWeeks.MinSize = RectangleHelper.ScaleSize(layoutControlItemTotalWeeks.MinSize, scaleFactor);
            layoutControlItemTotalCost.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemTotalCost.MaxSize, scaleFactor);
            layoutControlItemTotalCost.MinSize  = RectangleHelper.ScaleSize(layoutControlItemTotalCost.MinSize, scaleFactor);
            layoutControlItemTallySpots.MaxSize = RectangleHelper.ScaleSize(layoutControlItemTallySpots.MaxSize, scaleFactor);
            layoutControlItemTallySpots.MinSize = RectangleHelper.ScaleSize(layoutControlItemTallySpots.MinSize, scaleFactor);
            layoutControlItemTallyCost.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemTallyCost.MaxSize, scaleFactor);
            layoutControlItemTallyCost.MinSize  = RectangleHelper.ScaleSize(layoutControlItemTallyCost.MinSize, scaleFactor);
        }
Exemplo n.º 25
0
 protected override void GenerateChildren()
 {
     base.GenerateChildren();
     this.CreateMenu();
     this._mvm.PropertyChanged += new PropertyChangedEventHandler(this._mvm_PropertyChanged);
     if (this._calloutPath == null)
     {
         return;
     }
     this.UpdateFill();
     ((UIElement)this._selectionPath).Visibility = this._mvm.SelectionMarkVisibility;
     this.Children.Add((FrameworkElement)this._selectionPath);
     this.Children.Add((FrameworkElement)this._calloutPath);
     List <Rectangle> .Enumerator enumerator = RectangleHelper.CoverByRectangles(this._bubbleRect).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             this.Children.Add((FrameworkElement)enumerator.Current);
         }
     }
     finally
     {
         enumerator.Dispose();
     }
 }
        public FormOutputSettings()
        {
            InitializeComponent();
            spinEditOutputLimitPeriods.EnableSelectAll();

            layoutControlGroupContractSettings.Visibility =
                BusinessObjects.Instance.OutputManager.ContractTemplateFolder.ExistsLocal()
                                        ? LayoutVisibility.Always
                                        : LayoutVisibility.Never;

            layoutControlItemEmptySports.MaxSize         = RectangleHelper.ScaleSize(layoutControlItemEmptySports.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemEmptySports.MinSize         = RectangleHelper.ScaleSize(layoutControlItemEmptySports.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemUseGenericDates.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemUseGenericDates.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemUseGenericDates.MinSize     = RectangleHelper.ScaleSize(layoutControlItemUseGenericDates.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputLimitPeriods.MaxSize  = RectangleHelper.ScaleSize(layoutControlItemOutputLimitPeriods.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputLimitPeriods.MinSize  = RectangleHelper.ScaleSize(layoutControlItemOutputLimitPeriods.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputLimitQuarters.MaxSize = RectangleHelper.ScaleSize(layoutControlItemOutputLimitQuarters.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputLimitQuarters.MinSize = RectangleHelper.ScaleSize(layoutControlItemOutputLimitQuarters.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemUseDecimalRate.MaxSize      = RectangleHelper.ScaleSize(layoutControlItemUseDecimalRate.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemUseDecimalRate.MinSize      = RectangleHelper.ScaleSize(layoutControlItemUseDecimalRate.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputNoBrackets.MaxSize    = RectangleHelper.ScaleSize(layoutControlItemOutputNoBrackets.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOutputNoBrackets.MinSize    = RectangleHelper.ScaleSize(layoutControlItemOutputNoBrackets.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCloneLineToTheEnd.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemCloneLineToTheEnd.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCloneLineToTheEnd.MinSize   = RectangleHelper.ScaleSize(layoutControlItemCloneLineToTheEnd.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemLockToMaster.MaxSize        = RectangleHelper.ScaleSize(layoutControlItemLockToMaster.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemLockToMaster.MinSize        = RectangleHelper.ScaleSize(layoutControlItemLockToMaster.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));

            layoutControlItemOK.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MinSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 27
0
        public FormCloneNote(CalendarNote sourceNote, DateTime flightDateStart, DateTime flightDateEnd)
        {
            InitializeComponent();
            _sourceNote      = sourceNote;
            _flightDateStart = flightDateStart;
            _flightDateEnd   = flightDateEnd;
            simpleLabelItemFlightDates.Text      = String.Format(simpleLabelItemFlightDates.Text, String.Format("{0} - {1}", new object[] { _flightDateStart.ToString("M/d/yy"), _flightDateEnd.ToString("M/d/yy") }));
            simpleLabelItemClonedNote.Text       = _sourceNote.Note.SimpleText;
            monthCalendarClone.ActiveMonth.Month = _sourceNote.StartDay.Month;
            monthCalendarClone.ActiveMonth.Year  = _sourceNote.StartDay.Year;
            monthCalendarClone.Header.TextColor  = Color.Black;

            UpdateTotals();

            var scaleFactor = Utilities.GetScaleFactor(CreateGraphics().DpiX);

            layoutControlItemLogo.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemLogo.MaxSize, scaleFactor);
            layoutControlItemLogo.MinSize     = RectangleHelper.ScaleSize(layoutControlItemLogo.MinSize, scaleFactor);
            layoutControlItemHelp.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemHelp.MaxSize, scaleFactor);
            layoutControlItemHelp.MinSize     = RectangleHelper.ScaleSize(layoutControlItemHelp.MinSize, scaleFactor);
            layoutControlItemClearAll.MaxSize = RectangleHelper.ScaleSize(layoutControlItemClearAll.MaxSize, scaleFactor);
            layoutControlItemClearAll.MinSize = RectangleHelper.ScaleSize(layoutControlItemClearAll.MinSize, scaleFactor);
            layoutControlItemOK.MaxSize       = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, scaleFactor);
            layoutControlItemOK.MinSize       = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, scaleFactor);
            layoutControlItemCancel.MaxSize   = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, scaleFactor);
            layoutControlItemCancel.MinSize   = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, scaleFactor);
        }
Exemplo n.º 28
0
        protected override void GenerateChildren()
        {
            base.GenerateChildren();
            this.CreateMenu();
            Rectangle rect        = new Rectangle();
            double    fixedHeight = this.FixedHeight;
            Thickness margin1     = this.Margin;
            // ISSUE: explicit reference operation
            double top  = margin1.Top;
            double num1 = fixedHeight + top;

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

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

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

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

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

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

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

            ((FrameworkElement)rectangle).Margin = thickness2;
            this.Children.Add((FrameworkElement)rectangle);
        }
        public FormPowerPointSeveralInstancesWarning()
        {
            InitializeComponent();

            layoutControlItemOK.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MinSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
        public FormMediaSettings()
        {
            InitializeComponent();

            layoutControlItemOK.MaxSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemOK.MinSize     = RectangleHelper.ScaleSize(layoutControlItemOK.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MaxSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MaxSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
            layoutControlItemCancel.MinSize = RectangleHelper.ScaleSize(layoutControlItemCancel.MinSize, Utilities.GetScaleFactor(CreateGraphics().DpiX));
        }
Exemplo n.º 31
0
        public HoverController()
        {
            enabled = true;
            hoverItem = null;
            showingTooltip = false;
            rectHelper = new RectangleHelper(Color.FromArgb(120, 192, 192, 192), Color.White);
            hoverPainter = new HoverPainter();

            timerDelegate = new System.Threading.TimerCallback(timerCallback);
            timer = new System.Threading.Timer(timerDelegate, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
        }