private void scale() { this.SuspendLayout(); TitleHeight = TitleHeight.ByDpiHeight(); ImageMinimize = ImageMinimize.HalfResizeDpi(); ImageMaximize = ImageMaximize.HalfResizeDpi(); ImageNormalize = ImageNormalize.HalfResizeDpi(); ImageClose = ImageClose.HalfResizeDpi(); foreach (var tab in _tabs) { tab.Height = tab.Height.ByDpiHeight(); tab.SlopeSize = tab.SlopeSize.ByDpi(); tab.AddButtonSlopeSize = tab.SlopeSize.ByDpi(); tab.CloseIcon = tab.CloseIcon.HalfResizeDpi(); tab.CloseIconHovered = tab.CloseIconHovered.HalfResizeDpi(); } _buttonApply.ScaleDpi(); _progressBar.ScaleDpi(); foreach (var button in _buttons) { button.ScaleDpi(); } foreach (var button in _headerButtons) { button.ScaleDpi(); } foreach (var menu in _menus) { menu.ScaleDpi(); } _sortIconsOrder = new[] { Resources.sort_none_hovered.HalfResizeDpi(), Resources.sort_asc_hovered.HalfResizeDpi(), Resources.sort_desc_hovered.HalfResizeDpi() }; _aggregateIconsOrder = new[] { ResourcesFilter.sum_hovered.HalfResizeDpi(), ResourcesFilter.count_hovered.HalfResizeDpi(), ResourcesFilter.count_distinct_hovered.HalfResizeDpi(), ResourcesFilter.min_hovered.HalfResizeDpi(), ResourcesFilter.avg_hovered.HalfResizeDpi(), ResourcesFilter.max_hovered.HalfResizeDpi() }; this.ResumeLayout(false); this.PerformLayout(); }
private void scale() { TitleHeight = TitleHeight.ByDpiHeight(); ImageMinimize = ImageMinimize.HalfResizeDpi(); ImageMaximize = ImageMaximize.HalfResizeDpi(); ImageNormalize = ImageNormalize.HalfResizeDpi(); ImageClose = ImageClose.HalfResizeDpi(); _progressBar.Height = _progressBar.Height.ByDpiHeight(); this.ScaleDpi(); _tableLayoutButtons.ScaleDpi(); foreach (var button in _tableLayoutButtons.Controls.Cast <Button>()) { button.Image = ((Bitmap)button.Image).HalfResizeDpi(); } }
private void scale() { TitleHeight = TitleHeight.ByDpiHeight(); ImageMinimize = ImageMinimize.HalfResizeDpi(); ImageMaximize = ImageMaximize.HalfResizeDpi(); ImageNormalize = ImageNormalize.HalfResizeDpi(); ImageClose = ImageClose.HalfResizeDpi(); _buttonDonateYandexMoney.ScaleDpi(); _buttonDonatePayPal.ScaleDpi(); _panelAva.BackgroundImage = ((Bitmap)_panelAva.BackgroundImage).HalfResizeDpi(); _panelAva.ScaleDpi(); _labelDonate.ScaleDpi(); _buttonMenuPasteDeck.ScaleDpi(); _buttonMenuPasteDeckAppend.ScaleDpi(); _buttonMenuPasteCollection.ScaleDpi(); _buttonMenuPasteCollectionAppend.ScaleDpi(); _buttonMenuCopyCollection.ScaleDpi(); _buttonMenuCopyDeck.ScaleDpi(); _labelPasteInfo.ScaleDpi(); _buttonMenuOpenDeck.ScaleDpi(); _buttonMenuSaveDeck.ScaleDpi(); _buttonMenuOpenCollection.ScaleDpi(); _buttonMenuSaveCollection.ScaleDpi(); _buttonVisitForge.ScaleDpi(); _buttonVisitMagarena.ScaleDpi(); _buttonVisitXMage.ScaleDpi(); _buttonVisitMtgo.ScaleDpi(); _buttonVisitDotP2014.ScaleDpi(); _buttonVisitCockatrice.ScaleDpi(); _labelMtgo.ScaleDpi(); _labelMagarena.ScaleDpi(); _labelDotP2.ScaleDpi(); _tabs.Height = _tabs.Height.ByDpiHeight(); _tabs.SlopeSize = _tabs.SlopeSize.ByDpi(); _tabs.AddButtonSlopeSize = _tabs.AddButtonSlopeSize.ByDpi(); _tabs.AddButtonWidth = _tabs.AddButtonWidth.ByDpiWidth(); _tabs.CloseIcon = _tabs.CloseIcon.HalfResizeDpi(); _tabs.CloseIconHovered = _tabs.CloseIconHovered.HalfResizeDpi(); _tabs.AddIcon = _tabs.AddIcon.HalfResizeDpi(); foreach (var langButton in getLanguageMenuItems()) { langButton.ScaleDpi(); } foreach (var titleButton in _flowTitleLeft.Controls.OfType <ButtonBase>()) { titleButton.ScaleDpi(); } foreach (var titleButton in _flowTitleRight.Controls.OfType <ButtonBase>()) { titleButton.ScaleDpi(); } }