Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Application' does not contain a definition for 'Current' #129

Open
TwangyMoney opened this issue Dec 11, 2022 · 0 comments
Open

'Application' does not contain a definition for 'Current' #129

TwangyMoney opened this issue Dec 11, 2022 · 0 comments

Comments

@TwangyMoney
Copy link

Library version

ToastNotifications 2.5.1 | ToastNotifications.Messages 2.5.1

Expected behavior

No errors and smooth work.

Actual behavior

Errors and no smooth work, some variables are missing.

Steps to reproduce behavior

Install ToastNotifications 2.5.1 and ToastNotifications.Messages 2.5.1 then (maybe wrongly) remove them and try to reinstall them

Code to reproduce behavior

using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Csharp_HUD;
using DiscordRpcDemo;
using System.Windows.Controls;
using System.Configuration;
using ToastNotifications;
using ToastNotifications.Lifetime;
using ToastNotifications.Position;

namespace TwangSploit
{
    public partial class TwangSploit : Form
    {
        private DiscordRpc.EventHandlers handlers;
        private DiscordRpc.RichPresence presence;
        private const string V = "TwangSploit - Open Script";
        private const string N = "TwangSploit - Save Script";
        private const string I = "";
        private const string I2 = "";
        private const string I3 = "";

        Notifier notifier = new Notifier(cfg =>
        {
            cfg.PositionProvider = new WindowPositionProvider(
                parentWindow: Application.Current.MainWindow,
                corner: Corner.TopRight,
                offsetX: 10,
                offsetY: 10);

            cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
                notificationLifetime: TimeSpan.FromSeconds(3),
                maximumNotificationCount: MaximumNotificationCount.FromCount(5));

            cfg.Dispatcher = Application.Current.Dispatcher;
        });
        public TwangSploit()

        {
            InitializeComponent();
        }

Questions

How could this be fixed? The only problem that's showing is the statement "Current" in the code. Screenshot is provided. I needed to get this to a stable state so I can build my application again. Needed swift answers.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant