public MainPage()
        {
            InitializeComponent();
            notificationSystem = new NotificationSystem();
            AbsoluteRoot.Children.Add(notificationSystem, new Xamarin.Forms.Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);

            QRCodeGenerator  qrGenerator = new QRCodeGenerator();
            QRCodeData       qrCodeData  = qrGenerator.CreateQrCode(Application.Current.Properties["walletid"].ToString(), QRCodeGenerator.ECCLevel.Q);
            BitmapByteQRCode qrCode      = new BitmapByteQRCode(qrCodeData);

            byte[] qrCodeBytes = qrCode.GetGraphic(20, "#000000", "#ffffff");

            ImageSource QrCodeImageSource = ImageSource.FromStream(() => new MemoryStream(qrCodeBytes));

            QrCodeImage.Source = QrCodeImageSource;

            WalletIdLabel.Text = Application.Current.Properties["walletid"].ToString();
        }
Example #2
0
        public Alerts(string access_token, string clientId)
        {
            InitializeComponent();
            this.API = new TwitchAPI(access_token, clientId);
            this.NotificationSystem = new NotificationSystem();
            this.LiveStreams = new List<Stream>();
            this.CurrentUser = this.API.GetUser();
            this.notifyIcon.Text = "Twitch Alert - " + this.CurrentUser.display_name;
            this.notifyIcon.DoubleClick += this.notifyIcon_DoubleClick;
            this.contextMenuStrip_Live.ItemClicked += this.toolStripMenuItem_Live_Click;
            this.contextMenuStrip_Live.Opened += this.contextMenuStrip_Live_Opened;
            this.contextMenuStrip_Live.Closed += this.contextMenuStrip_Live_Closed;
            this.RefreshLive = true;

            this.Tip = new ToolTip();
            this.Tip.UseAnimation = true;

            this.NotificationSystem.Start();

            this.IsRunning = true;
            var t = new Thread(new ThreadStart(() => this.Monitor()));
            t.IsBackground = true;
            t.Start();
        }
Example #3
0
 public GameManager()
 {
     GameState = new ClientState();
     CurrentScreen = GameScreen.Intro;
     Notifications = new NotificationSystem();
 }
	void Start () {
		instance = this;
	}