Beispiel #1
0
        private void TestButton(object sender, MouseButtonEventArgs e)
        {
            string teststring = "Test" + i;

            UI.SendNotification(teststring, NotificationImage.Credits, NotificationType.Standard, TCTData.Colors.BrightGreen, false, true, false);
            i++;
        }
        public static void TryReset()
        {
            if (dailyReset)
            {
                ResetDailyData();
                UI.UpdateLog("Daily data has been reset.");
                UI.SendNotification("Daily data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false);

                dailyReset = false;
            }
            if (weeklyReset)
            {
                ResetWeeklyData();
                UI.UpdateLog("Weekly data has been reset.");
                UI.SendNotification("Weekly data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false);

                weeklyReset = false;
            }
        }
Beispiel #3
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     UI.SendNotification(TCTData.Data.CharList[0].GoldfingerTokens.ToString(), NotificationImage.Goldfinger, NotificationType.Standard, TCTData.Colors.SolidAccentColor, true, false, false);
 }
Beispiel #4
0
        public TeraMainWindow()
        {
            InitializeComponent();

            //event handlers used to send notifications and update log from TCTData
            TCTData.Events.EventsManager.LogEntryEvent     += (t) => UI.UpdateLog(t.LogData);
            TCTData.Events.EventsManager.NotificationEvent += (n) => UI.SendNotification(n.Content, n.Image, n.Type, n.Color, n.Repeat, n.Sound, n.Right);

            UIManager.UndoList = new List <Delegate>();

            Top    = TCTData.Settings.Top;
            Left   = TCTData.Settings.Left;
            Height = TCTData.Settings.Height;
            Width  = TCTData.Settings.Width;

            var buttonStyle = new Style {
                TargetType = typeof(System.Windows.Shapes.Rectangle)
            };

            buttonStyle.Setters.Add(new Setter(HeightProperty, 20.0));
            buttonStyle.Setters.Add(new Setter(WidthProperty, 20.0));
            buttonStyle.Setters.Add(new Setter(CursorProperty, Cursors.Hand));
            buttonStyle.Setters.Add(new Setter(VerticalAlignmentProperty, VerticalAlignment.Center));
            buttonStyle.Setters.Add(new Setter(HorizontalAlignmentProperty, HorizontalAlignment.Center));
            buttonStyle.Setters.Add(new Setter(OpacityProperty, .3));
            buttonStyle.Setters.Add(new EventSetter(MouseEnterEvent, new MouseEventHandler(BarButtonHoverIn)));
            buttonStyle.Setters.Add(new EventSetter(MouseLeaveEvent, new MouseEventHandler(BarButtonHoverOut)));
            buttonStyle.Setters.Add(new Setter(MarginProperty, new Thickness(3, 0, 0, 0)));
            switch (TCTData.Settings.Theme)
            {
            case Theme.Light:
                MainGrid.Background = new SolidColorBrush(TCTData.Colors.LightTheme_Background);
                ToolBar.Background  = new SolidColorBrush(TCTData.Colors.LightTheme_Bar);
                ToolBar.Effect      = TCTData.Shadows.LightThemeShadow;
                title.Foreground    = new SolidColorBrush(TCTData.Colors.LightTheme_Foreground1);
                buttonStyle.Setters.Add(new Setter(System.Windows.Shapes.Rectangle.FillProperty, new SolidColorBrush(TCTData.Colors.DarkTheme_Card)));
                break;

            case Theme.Dark:
                MainGrid.Background = new SolidColorBrush(TCTData.Colors.DarkTheme_Background);
                ToolBar.Background  = new SolidColorBrush(TCTData.Colors.DarkTheme_Bar);
                ToolBar.Effect      = TCTData.Shadows.DarkThemeShadow;
                title.Foreground    = new SolidColorBrush(TCTData.Colors.DarkTheme_Foreground1);
                buttonStyle.Setters.Add(new Setter(System.Windows.Shapes.Rectangle.FillProperty, new SolidColorBrush(TCTData.Colors.LightTheme_Card)));

                break;

            default:
                break;
            }
            this.Resources["toolBarButton"] = buttonStyle;
            //MinWidth = main.chView.Width + main.accountsColumn.MinWidth;

            //NI = new System.Windows.Forms.NotifyIcon();
            //NI.DoubleClick += new EventHandler(notifyIcon_DoubleClick);
            //NI.Icon = Tera.Properties.Resources.tctlogo;
            //NI.Text = "Tera Character Tracker " + TCTData.TCTProps.CurrentVersion;
            //UI.NotifyIcon = NI;

            TCTData.Data.CharacterAddedEvent += CreateStrip;

            UI.MainWin = this;
        }