public FancyBalloon(string title, string message) { InitializeComponent(); txtBalloonTitle.Text = title; txtBalloonMessage.Text = message; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
void ToastUi_Loaded(object sender, RoutedEventArgs e) { var dc = DataContext; TaskbarIcon = TaskbarIcon.GetParentTaskbarIcon(this); TaskbarIcon.AddBalloonClosingHandler(this, OnBaloonClosing); MouseLeave += ToastUi_MouseLeave; }
public MyBalloonTip() { InitializeComponent(); grid.MouseEnter += grid_MouseEnter; grid.MouseLeave += grid_MouseLeave; grid.MouseMove += OnGridMouseMove; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public PoeBalloon() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); sBG.Top = ((Bitmap)Properties.Resources.ResourceManager.GetObject("ToastBGTop")).ToBitmapSource(); sBG.Center = ((Bitmap)Properties.Resources.ResourceManager.GetObject("ToastBGCenter")).ToBitmapSource(); }
public NotificationToast() { InitializeComponent(); // Initialize icon var icon = Taction.Properties.Resources.Icon; var src = Imaging.CreateBitmapSourceFromHIcon(icon.Handle, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); IconImage.Source = src; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public TrayNotification() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); this.WhenActivated(d => { d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext)); d(this.OneWayBind(ViewModel, vm => vm.Actions, v => v.Actions.ItemsSource)); d(this.OneWayBind(ViewModel, vm => vm.Title, v => v.Title.Text)); d(this.OneWayBind(ViewModel, vm => vm.Text, v => v.Text.Text)); d(ViewModel.WhenAnyObservable(x => x.Close) .Subscribe(x => Close())); }); }
/// <summary> /// 初始化生成 /// </summary> /// <param name="popupAnimation">动画</param> /// <param name="tittle">标题</param> private void ParamesInit(PopupAnimation popupAnimation, string tittle) { try { //生成标题 this.txtTittle.Text = tittle; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); TaskbarIcon MyNotifyIcon = new TaskbarIcon(); MyNotifyIcon.ShowCustomBalloon(this, popupAnimation, 60000); } catch (Exception ex) { MethodLb.CreateLog(this.GetType().FullName, "ParamesInit", ex.ToString(), popupAnimation, tittle); } finally { } }
public FancyBalloon(int count, params DAL.Model.Track[] musicItems) { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); Count = " (" + count + ")"; if (musicItems.Length > 2 || musicItems.Length < 1) { throw new Exception("Something went wrong"); } if (musicItems.Length == 1) { musicItem2.Visibility = System.Windows.Visibility.Hidden; } if (musicItems.Length >= 1) { musicItem1.Text = musicItems[0].TrackTitle; musicItem1.MouseDown += (s, e) => { if (PlayClicked != null) { PlayClicked(musicItems[0]); } ForceClose(); }; } if (musicItems.Length >= 2) { musicItem2.Text = musicItems[1].TrackTitle; musicItem2.MouseDown += (s, e) => { if (PlayClicked != null) { PlayClicked(musicItems[1]); } ForceClose(); }; } }
public SelectableMessage() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); listView.SelectedIndex = 0; this.KeyDown += (o, e) => { var index = e.Key - Key.D0; if (index >= 0 && DataContext is ObservableCollection <TipItem> col && index < col.Count) { listView.SelectedIndex = index; Confirm(null, null); } else { Close(); } }; }
private void SetDefaultValues() { // Get single settings instance and subscribe to it's event settings = UserSettings.Instance; settings.PropertyChanged += UserSettings_PropertyChanged; // Initialize short, long, pause and minute timers shortIntervalTimer = new Timer(); shortIntervalTimer.AutoReset = false; shortIntervalTimer.Elapsed += ShortCycleTimer_Elapsed; longIntervalTimer = new Timer(); longIntervalTimer.AutoReset = false; longIntervalTimer.Elapsed += LongCycleTimer_Elapsed; pauseTimer = new Timer(); pauseTimer.AutoReset = false; pauseTimer.Elapsed += PauseTimer_Elapsed; minuteTimer = new Timer(); minuteTimer.AutoReset = true; minuteTimer.Elapsed += MinuteTimer_Elasped; // Set up update checker updater = new UpdateCheck(new int[] { MAJVERSION, MINVERSION, REVVERSION }); // Subscribe to workstation lock event Microsoft.Win32.SystemEvents.SessionSwitch += new Microsoft.Win32.SessionSwitchEventHandler(SystemEvents_SessionSwitch); // Subscribe to sleep event - Unsubscribe in Dispose! // Microsoft.Win32.SystemEvents.PowerModeChanged += OnPowerChange; // Create stopwatch lockWatch = new Stopwatch(); // Set up the pre-break popup breakPopup = new BreakNotificationPopup(); TaskbarIcon.AddBalloonClosingHandler(breakPopup, OnBalloonClosing); }
public SelectableMessage() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); listView.SelectedIndex = 0; KeyDown += (o, e) => { var index = e.Key - Key.D0; if (index >= 0 && DataContext is ObservableCollection <TipItem> col && index < col.Count) { listView.SelectedIndex = index; Confirm(null, null); } else { Close(); var virtualkeyCode = KeyInterop.VirtualKeyFromKey(e.Key); CloseViaKey?.Invoke(virtualkeyCode); } }; }
/// <summary> /// Initializes a new instance of the <see cref="PerfGraphPopup" /> class. /// </summary> public PerfGraphPopup( ) { InitializeComponent( ); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public Balloon() { InitializeComponent(); text.Text = getRandomLine(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
internal Baloon(BaloonMode mode) { Mode = mode; InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public NotifyWindow() { this.InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBallonClosing); }
public UpdateApplicationNotify() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public NotifyBalloonView() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); this.DataContext = ViewModelLocator.GetSharedViewModel <INotifyBalloonViewModel>(); }
public PopupNotificationCtrl() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public NotificationControl() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnNotificationClosing); }
public PopupNotificationUC(PopupNotificationModel model) { Model = model; InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public Notificacao() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public NotifyBalloon() { InitializeComponent(); this.DataContext = this; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public MarketIndexesUserControl() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); //DataContext = new MarketIndexesViewModel(); }
public FancyBalloon() { InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }
public FlitzBalloon() { InitializeComponent(); DataContext = viewModel; TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }