Example #1
0
 private void InvisibleButton_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     if (SettingsManager.CurrentUser.IsVisible)
     {
         HeaderPanel.ToggleVisibility();
     }
 }
Example #2
0
        private void OnParallaxScrollScrolled(object sender, ScrolledEventArgs e)
        {
            double translation = 0;

            if (_lastScroll < e.ScrollY)
            {
                translation = 0 - ((e.ScrollY / 2));

                if (translation > 0)
                {
                    translation = 0;
                }
            }
            else
            {
                translation = 0 + ((e.ScrollY / 2));

                if (translation > 0)
                {
                    translation = 0;
                }
            }

            HeaderPanel.TranslateTo(HeaderPanel.TranslationX, translation);
            _lastScroll = e.ScrollY;
        }
        void IDeviceSpecificDesigner.InitHeader(int mergingContext)
        {
            HeaderPanel panel          = new HeaderPanel();
            HeaderLabel lblDescription = new HeaderLabel();

            lblDescription.TabIndex = 0;
            lblDescription.Height   = 24;
            lblDescription.Width    = 204;
            panel.Height            = 28;
            panel.Width             = 204;
            panel.Controls.Add(lblDescription);

            switch (mergingContext)
            {
            case MobileControlDesigner.MergingContextTemplates:
            {
                lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingTemplatingChoiceDescription);
                break;
            }

            default:
            {
                lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingGenericChoiceDescription);
                break;
            }
            }

            _header = panel;
        }
Example #4
0
        public override void PaintHeaderPanel(PaintEventArgs args, HeaderPanel headerPanel)
        {
            SizeF textSize = args.Graphics.MeasureString(headerPanel.HeaderText, HeaderPanelFont);

            args.Graphics.DrawString(headerPanel.HeaderText, HeaderPanelFont, new SolidBrush(ThemeColor), new PointF(2, HeaderHeight - textSize.Height - 4));
            args.Graphics.DrawLine(new Pen(new SolidBrush(ThemeLightColor), 1), new Point(0, HeaderHeight - 2), new Point(headerPanel.Width, HeaderHeight - 2));
        }
Example #5
0
 private void SequenceCtrl_Load(object sender, EventArgs e)
 {
     if (!header)
     {
         HeaderPanel.Hide();
     }
 }
 public void SetUp()
 {
     loginPage      = new LoginPage();
     _addNewLead    = new AddNewLead();
     _dashboardPage = new DashboardPage();
     companyPage    = new CompanyPage();
     headerPanel    = new HeaderPanel();
 }
Example #7
0
    public void ShowHeader()
    {
        if (this.header == null)
        {
            this.header = Instantiate(this.headerPrefab, this.headerParent, false);
        }

        this.header.gameObject.SetActive(true);
    }
        private void ApplyColors(Control parent)
        {
            foreach (Control control in parent.Controls)
            {
                if (control is FlatTabControl)
                {
                    FlatTabControl tabView = control as FlatTabControl;
                    tabView.UpdateColors();
                    // TabControls embedded in plugins probably do not use the main background color.
                    // If that is required we have to reach through to those specific places and fix that individually.
                    //tabView.BackgroundColor = Conversions.GetApplicationColor(ApplicationColor.AppColorMainBackground, false);
                }
                else
                if (control is HeaderPanel)
                {
                    HeaderPanel panel = control as HeaderPanel;
                    panel.HeaderColor        = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeader, false);
                    panel.ForeColor          = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeader, true);
                    panel.HeaderColorFocused = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeaderFocused, false);
                    panel.ForeColorFocused   = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeaderFocused, true);
                }
                else
                if (control is ToolStrip)
                {
                    ToolStrip toolStrip = control as ToolStrip;
                    toolStrip.BackColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelToolbar, false);
                    toolStrip.ForeColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelToolbar, true);
                }
                else
                if (control is TabPage)
                {
                    TabPage page = control as TabPage;
                    if (page.Parent is FlatTabControl)
                    {
                        FlatTabControl view = page.Parent as FlatTabControl;
                        if (view.TabStyle == FlatTabControl.TabStyleType.BottomNormal)
                        {
                            page.BackColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelContentArea, false);
                        }
                    }
                }

                if (control.ContextMenuStrip != null)
                {
                    if (Conversions.UseWin8Drawing())
                    {
                        control.ContextMenuStrip.Renderer = new Win8MenuStripRenderer();
                    }
                    else
                    {
                        control.ContextMenuStrip.Renderer = new TransparentMenuStripRenderer();
                    }
                }
                ApplyColors(control);
            }
        }
Example #9
0
        void IDeviceSpecificDesigner.InitHeader(int mergingContext)
        {
            HeaderPanel panel          = new HeaderPanel();
            HeaderLabel lblDescription = new HeaderLabel();

            lblDescription.TabIndex = 0;
            lblDescription.Text     = SR.GetString(SR.MobileControl_SettingGenericChoiceDescription);

            panel.Height = lblDescription.Height;
            panel.Width  = lblDescription.Width;
            panel.Controls.Add(lblDescription);
            _header = panel;
        }
Example #10
0
        private void AddListenerConfiguratorControl(Control c)
        {
            c.TextChanged += new EventHandler(Configurator_TextChanged);

            var h = new HeaderPanel();

            h.Width = headerPanel1.Width;
            h.AddControl(c);
            h.Text = ((IListenerConfigurator)c).Caption;

            h.ResizeHeight();
            stacked.Controls.Add(h);

            if (_session.IsRunning)
            {
                //((Control) lc).Enabled = false;
            }
        }
        private void ApplyColors(Control parent)
        {
            foreach (Control control in parent.Controls)
            {
                if (control is FlatTabControl)
                {
                    FlatTabControl tabView = control as FlatTabControl;
                    tabView.UpdateColors();
                    tabView.BackgroundColor = Conversions.GetApplicationColor(ApplicationColor.AppColorMainBackground, false);
                }
                else
                if (control is HeaderPanel)
                {
                    HeaderPanel panel = control as HeaderPanel;
                    panel.HeaderColor        = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeader, false);
                    panel.ForeColor          = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeader, true);
                    panel.HeaderColorFocused = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeaderFocused, false);
                    panel.ForeColorFocused   = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelHeaderFocused, true);
                }
                else
                if (control is ToolStrip)
                {
                    ToolStrip toolStrip = control as ToolStrip;
                    toolStrip.BackColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelToolbar, false);
                    toolStrip.ForeColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelToolbar, true);
                }
                else
                if (control is TabPage)
                {
                    TabPage page = control as TabPage;
                    if (page.Parent is FlatTabControl)
                    {
                        FlatTabControl view = page.Parent as FlatTabControl;
                        if (view.TabStyle == FlatTabControl.TabStyleType.BottomNormal)
                        {
                            page.BackColor = Conversions.GetApplicationColor(ApplicationColor.AppColorPanelContentArea, false);
                        }
                    }
                }

                ApplyColors(control);
            }
        }
Example #12
0
        public void HeaderVisibleAnimation(bool show)
        {
            if (_isAnimated)
            {
                return;
            }

            var             timeAnimation = TimeSpan.FromMilliseconds(200.0);
            DoubleAnimation HeaderAnimation;

            _isAnimated = true;

            HeaderAnimation = show == true ? new DoubleAnimation(0.0, 1.0, timeAnimation) : new DoubleAnimation(1.0, 0.0, timeAnimation);


            HeaderAnimation.Completed += (s, a) => {
                _isAnimated = false;
            };
            HeaderPanel.BeginAnimation(DockPanel.OpacityProperty, HeaderAnimation);
        }
Example #13
0
        private void OnParallaxScrollScrolled(object sender, ScrolledEventArgs e)
        {
            double translation = 0;

            if (lastScroll < e.ScrollY)
            {
                translation = 0 - ((e.ScrollY / 2));

                if (translation > 0) translation = 0;
                fabBtn.IsVisible = false;
            }
            else
            {
                translation = 0 + ((e.ScrollY / 2));

                if (translation > 0) translation = 0;
                fabBtn.IsVisible = true;
            }
          
            HeaderPanel.TranslateTo(HeaderPanel.TranslationX, translation);           
            lastScroll = e.ScrollY;
        }
Example #14
0
        private void MainForm_Resize(object sender, EventArgs e)
        {
            HeaderPanel.Refresh();
            MessageColumnHeader.Width = (MessagesListView.Width - DateTimeColumnHeader.Width - FromColumnHeader.Width - 30);

            if (SettingsManager.Configuration.MinimizeToTray)
            {
                if (WindowState == FormWindowState.Normal)
                {
                    ShowInTaskbar = true;
                }
                else if (WindowState == FormWindowState.Minimized)
                {
                    ShowInTaskbar = false;
                }
            }

            if (WindowState == FormWindowState.Normal)
            {
                SettingsManager.Configuration.MainForm.Size = Size;
            }
        }
Example #15
0
 public override void RefreshHeader()
 {
     HeaderPanel.Update();
 }
        private void InitializeComponent()
        {
            this._pnlHeader        = new HeaderPanel();
            this._lblHeader        = new HeaderLabel();
            this._glAttributes     = new GroupLabel();
            this._glType           = new GroupLabel();
            this._txtType          = new System.Windows.Forms.TextBox();
            this._pnlMain          = new System.Windows.Forms.Panel();
            this._filterList       = new EditableTreeList();
            this._rbCompare        = new System.Windows.Forms.RadioButton();
            this._lblCompare       = new System.Windows.Forms.Label();
            this._dialogButtons    = new DefaultDialogButtons();
            this._lblType          = new System.Windows.Forms.Label();
            this._txtMethod        = new System.Windows.Forms.TextBox();
            this._txtArgument      = new System.Windows.Forms.TextBox();
            this._pnlRight         = new System.Windows.Forms.Panel();
            this._lblMethod        = new System.Windows.Forms.Label();
            this._rbDelegate       = new System.Windows.Forms.RadioButton();
            this._pnlCompare       = new System.Windows.Forms.Panel();
            this._cbCompare        = new System.Windows.Forms.ComboBox();
            this._lblArgument      = new System.Windows.Forms.Label();
            this._pnlDelegate      = new System.Windows.Forms.Panel();
            this._txtType.Location = new System.Drawing.Point(0, 20);
            this._txtType.Size     = new System.Drawing.Size(211, 20);

            this._lblHeader.Location = new System.Drawing.Point(0, 0);
            this._lblHeader.Size     = new System.Drawing.Size(434, 16);
            this._lblHeader.Anchor   = (System.Windows.Forms.AnchorStyles.Top
                                        | System.Windows.Forms.AnchorStyles.Left);
            this._pnlHeader.Controls.AddRange(new System.Windows.Forms.Control[] {
                this._lblHeader
            });
            this._pnlHeader.Location = new System.Drawing.Point(6, 5);
            this._pnlHeader.Size     = new System.Drawing.Size(434, 16);
            this._pnlHeader.Anchor   = (System.Windows.Forms.AnchorStyles.Top
                                        | System.Windows.Forms.AnchorStyles.Left);
            this._pnlMain.Controls.AddRange(new System.Windows.Forms.Control[] { this._dialogButtons,
                                                                                 this._pnlRight,
                                                                                 this._filterList });
            this._pnlMain.Location = new System.Drawing.Point(6, 27);
            this._pnlMain.Size     = new System.Drawing.Size(434, 253);
            this._pnlMain.Anchor   = (System.Windows.Forms.AnchorStyles.Bottom
                                      | System.Windows.Forms.AnchorStyles.Left);
            this._filterList.Size        = new System.Drawing.Size(198, 224);
            this._filterList.Location    = new System.Drawing.Point(0, 0);
            this._rbCompare.Location     = new System.Drawing.Point(8, 21);
            this._rbCompare.Size         = new System.Drawing.Size(211, 17);
            this._lblCompare.Location    = new System.Drawing.Point(0, 4);
            this._lblCompare.Size        = new System.Drawing.Size(211, 16);
            this._dialogButtons.Location = new System.Drawing.Point(197, 230);
            this._dialogButtons.Size     = new System.Drawing.Size(237, 23);
            this._lblType.Location       = new System.Drawing.Point(0, 4);
            this._lblType.Size           = new System.Drawing.Size(211, 16);
            this._txtMethod.Location     = new System.Drawing.Point(0, 64);
            this._txtMethod.Size         = new System.Drawing.Size(211, 20);
            this._txtArgument.Location   = new System.Drawing.Point(0, 64);
            this._txtArgument.Size       = new System.Drawing.Size(211, 20);
            this._pnlRight.Controls.AddRange(new System.Windows.Forms.Control[] { this._pnlCompare,
                                                                                  this._pnlDelegate,
                                                                                  this._glAttributes,
                                                                                  this._glType,
                                                                                  this._rbDelegate,
                                                                                  this._rbCompare });
            this._pnlRight.Location     = new System.Drawing.Point(215, 0);
            this._pnlRight.Size         = new System.Drawing.Size(219, 226);
            this._lblMethod.Location    = new System.Drawing.Point(0, 48);
            this._lblMethod.Size        = new System.Drawing.Size(211, 16);
            this._glAttributes.Location = new System.Drawing.Point(0, 73);
            this._glAttributes.Size     = new System.Drawing.Size(216, 16);
            this._rbDelegate.Location   = new System.Drawing.Point(8, 46);
            this._rbDelegate.Size       = new System.Drawing.Size(211, 17);
            this._glType.Size           = new System.Drawing.Size(216, 16);
            this._pnlCompare.Controls.AddRange(new System.Windows.Forms.Control[] { this._txtArgument,
                                                                                    this._lblArgument,
                                                                                    this._cbCompare,
                                                                                    this._lblCompare });
            this._pnlCompare.Location     = new System.Drawing.Point(8, 90);
            this._pnlCompare.Size         = new System.Drawing.Size(211, 136);
            this._cbCompare.DropDownWidth = 211;
            this._cbCompare.Location      = new System.Drawing.Point(0, 20);
            this._cbCompare.Size          = new System.Drawing.Size(211, 21);
            this._cbCompare.Sorted        = true;
            this._lblArgument.Location    = new System.Drawing.Point(0, 48);
            this._lblArgument.Size        = new System.Drawing.Size(211, 16);
            this._pnlDelegate.Controls.AddRange(new System.Windows.Forms.Control[] { this._txtType,
                                                                                     this._txtMethod,
                                                                                     this._lblMethod,
                                                                                     this._lblType });
            this._pnlDelegate.Location = new System.Drawing.Point(8, 90);
            this._pnlDelegate.Size     = new System.Drawing.Size(211, 136);
            this.FormBorderStyle       = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.ClientSize            = new System.Drawing.Size(448, 289);
            this.AcceptButton          = _dialogButtons.CmdOK;
            this.CancelButton          = _dialogButtons.CmdCancel;
            this.Controls.AddRange(new System.Windows.Forms.Control[] { this._pnlHeader, this._pnlMain });
        }
Example #17
0
 public abstract void PaintHeaderPanel(PaintEventArgs args, HeaderPanel headerPanel);
Example #18
0
 private void Awake()
 {
     Get = this;
 }