Exemple #1
0
        private void AlertBar_Show(object sender, RoutedEventArgs e)
        {
            var spStandard = (StackPanel)AlertBar.FindName("spStandard");
            var spOutline  = (StackPanel)AlertBar.FindName("spOutline");

            Grid grdParent;

            switch (AlertBar.Theme)
            {
            case DivinityModManager.Controls.AlertBar.ThemeType.Standard:
                grdParent = spStandard.FindVisualChildren <Grid>().FirstOrDefault();
                break;

            case DivinityModManager.Controls.AlertBar.ThemeType.Outline:
            default:
                grdParent = spOutline.FindVisualChildren <Grid>().FirstOrDefault();
                break;
            }

            TextBlock lblMessage = grdParent.FindVisualChildren <TextBlock>().FirstOrDefault();

            if (lblMessage != null)
            {
                Trace.WriteLine(lblMessage.Text);
            }
        }
Exemple #2
0
        public void SlideUpAlert()
        {
            if (alertBarVisible)
            {
                return;
            }

            DoubleAnimation animation = new DoubleAnimation();

            animation.From     = 0d;
            animation.To       = 30d;
            animation.Duration = TimeSpan.FromSeconds(.5d);

            alertBarVisible = true;

            AlertBar.BeginAnimation(HeightProperty, animation);
        }
Exemple #3
0
        public void SlideDownAlert()
        {
            if (!alertBarVisible)
            {
                return;
            }

            DoubleAnimation animation = new DoubleAnimation();

            animation.From     = 30d;
            animation.To       = 0d;
            animation.Duration = TimeSpan.FromSeconds(.5d);

            alertBarVisible       = false;
            alertBarPriorityAlert = false;

            AlertBar.BeginAnimation(HeightProperty, animation);
        }
 private void ResetButton_Click(object sender, RoutedEventArgs e)
 {
     VersionData.ParseInt(268435456);
     VersionNumberTextBox.Text = "268435456";
     AlertBar.SetWarningAlert($"Reset version number.");
 }
 private void CopyButton_Click(object sender, RoutedEventArgs e)
 {
     Clipboard.SetText(VersionData.VersionInt.ToString());
     AlertBar.SetSuccessAlert($"Copied {VersionData.VersionInt} to the clipboard.");
 }
Exemple #6
0
 public AlertBarAutomationPeer(AlertBar owner) : base(owner)
 {
     alertBar = owner;
 }