public TaskDialogForm()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            // Add any initialization after the InitializeComponent() call.
            SuspendLayouts();

            Font            = new Font("Segoe UI", 9f * TaskDialog.CustomScale, SystemFonts.MessageBoxFont.Style, GraphicsUnit.Point, SystemFonts.MessageBoxFont.GdiCharSet, SystemFonts.MessageBoxFont.GdiVerticalFont);
            LabelTitle.Font = new Font(Font.FontFamily, Font.Size * 1.5f, Font.Style, Font.Unit, Font.GdiCharSet, Font.GdiVerticalFont);

            PictureBoxIcon.Scale(new SizeF(TaskDialog.CustomScale, TaskDialog.CustomScale));

            //'TableLayoutPanel.RowStyles(2) = New RowStyle(SizeType.Absolute, 0.0!)
            //'TableLayoutPanel.RowStyles(3) = New RowStyle(SizeType.Absolute, 0.0!)

            //'TableLayoutPanelButtons.ColumnStyles(0) = New ColumnStyle(SizeType.Absolute, 0.0!)
            //'VButtons = Nothing
            //'FlowLayoutPanelButtonsLeft.Visible = False

            //'TableLayoutPanelContent.ColumnStyles(0) = New ColumnStyle(SizeType.Absolute, 0.0!)
            //'LabelIcon.Visible = False
            //'TableLayoutPanelContent.RowStyles(0) = New RowStyle(SizeType.Absolute, 0.0!)
            //'LabelTitle.Visible = False
            //'TableLayoutPanelContent.RowStyles(1) = New RowStyle(SizeType.Absolute, 0.0!) ' content
            //'LabelContent.Visible = False
            //'TableLayoutPanelContent.RowStyles(2) = New RowStyle(SizeType.Absolute, 0.0!) ' expanded content
            //'LabelExpandedContent.Visible = False
            //'TableLayoutPanelContent.RowStyles(3) = New RowStyle(SizeType.Absolute, 0.0!) ' reszta

            //'TableLayoutPanelContents.Visible = False
            //'CheckBox.Visible = False
            //'ButtonExpander.Visible = False

            //'TableLayoutPanelFooter.ColumnStyles(0) = New ColumnStyle(SizeType.Absolute, 0.0!)
            //'TableLayoutPanelExpanderFooter.ColumnStyles(0) = New ColumnStyle(SizeType.Absolute, 0.0!)

            TaskDialog.OnFormConstructed(this);

            ResumeLayouts();
        }
Example #2
0
        private void DisplayIcon()
        {
            var UrlPath = WeatherResponseFromAPI.current.condition.icon;

            PictureBoxIcon.Load(@"http:" + UrlPath.ToString());
        }