Пример #1
0
        private void AddinList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (AddinList.SelectedItem != null)
            {
                SquadronAddin Addin = (AddinList.SelectedItem as SquadronItem).Addin;

                if (Addin != null)
                {
                    SquadronContext.ActiveAddin = Addin;

                    AddinTitleLabel.Caption = Addin.Name;
                    AddinTitleLabel.Tag     = Addin;

                    AddinControlContainer.Controls.Clear();

                    SquadronHelper.Instance.InitializeControls(Addin.UserControlInstance);

                    AddinControlContainer.Controls.Add(Addin.UserControlInstance);

                    Addin.UserControlInstance.Dock = DockStyle.Fill;

                    SetHelpLink(Addin);

                    Addin.OnChange();
                }
            }
        }
Пример #2
0
        private void SetHelpLink(SquadronAddin Addin)
        {
            if (Constants.IsReducedVersion)
            {
                return;
            }

            helpbox.Tag = Addin;

            bool valid = helpbox.Visible = !string.IsNullOrEmpty(Addin.HelpUrl);

            if (helpbox.Visible)
            {
                AddinTitleLabel.Cursor = Cursors.Hand;
            }
            else

            if (valid)
            {
                new Thread(new ThreadStart(() =>
                {
                    for (int i = 1; i <= 6; i++)
                    {
                        helpbox.Visible = !helpbox.Visible;
                        Thread.Sleep(100);
                    }

                    helpbox.Visible = !string.IsNullOrEmpty((helpbox.Tag as SquadronAddin).HelpUrl);
                }
                                           )).Start();
            }
        }
Пример #3
0
        private void helpbox_Click(object sender, EventArgs e)
        {
            SquadronAddin Addin = (sender as Windows8LookNFeel.Windows8Button).Tag as SquadronAddin;

            if (Addin != null)
            {
                if (!string.IsNullOrEmpty(Addin.HelpUrl))
                {
                    Process.Start(Addin.HelpUrl);
                }
                else
                {
                    Process.Start("http://www.jeanpaulva.com");
                }
            }
        }