示例#1
0
        /// <summary>
        /// Handle user click view stat (statistics of tag) on context menu in notify icon
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ViewStat_MenuItem(object sender, EventArgs e)
        {
            PieChartWindow pieChartWindow = null;

            pieChartWindow = new PieChartWindow(databaseManager.GetListTag());
            notifyIcon.ContextMenu.MenuItems[3].Enabled = false;

            pieChartWindow.ShowInTaskbar = true;
            pieChartWindow.Owner         = Application.Current.MainWindow;

            pieChartWindow.Closed += (s, args) => {
                notifyIcon.ContextMenu.MenuItems[3].Enabled = true;
                Application.Current.MainWindow.Focus();
            };
            pieChartWindow.Show();
            pieChartWindow.Activate();
            pieChartWindow.Topmost = true;
            pieChartWindow.Topmost = false;
            pieChartWindow.Focus();
        }
示例#2
0
        private void GroupBtn_Click(object sender, RoutedEventArgs e)
        {
            var pieSeriesWnd = new PieChartWindow(ViewModel.TransactionRecordsList);

            pieSeriesWnd.Show();
        }