예제 #1
0
파일: MainView.cs 프로젝트: kouweizhong/vrs
 private void CloseStatisticsView(int feedId, StatisticsView statisticsView)
 {
     statisticsView.CloseClicked -= StatisticsView_CloseClicked;
     statisticsView.Close();
     statisticsView.Dispose();
     _StatisticsViews.Remove(feedId);
 }
예제 #2
0
 private void StatisticsView_CloseClicked(object sender, EventArgs e)
 {
     if (_StatisticsView != null)
     {
         _StatisticsView.CloseClicked -= StatisticsView_CloseClicked;
         _StatisticsView.Close();
         _StatisticsView.Dispose();
         _StatisticsView = null;
     }
 }
예제 #3
0
 private void menuStatisticsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_StatisticsView != null)
     {
         _StatisticsView.WindowState = FormWindowState.Normal;
         _StatisticsView.Activate();
     }
     else
     {
         _StatisticsView = new StatisticsView();
         _StatisticsView.CloseClicked += StatisticsView_CloseClicked;
         _StatisticsView.Show();
     }
 }
예제 #4
0
파일: MainView.cs 프로젝트: kouweizhong/vrs
        private void ShowStatisticsView(IFeed feed)
        {
            if (feed != null && feed.Listener.Statistics != null)
            {
                StatisticsView view;
                if (_StatisticsViews.TryGetValue(feed.UniqueId, out view))
                {
                    view.WindowState = FormWindowState.Normal;
                    view.Activate();
                }
                else
                {
                    view               = new StatisticsView();
                    view.Statistics    = feed.Listener.Statistics;
                    view.FeedName      = feed.Name;
                    view.CloseClicked += StatisticsView_CloseClicked;
                    view.Show();

                    _StatisticsViews.Add(feed.UniqueId, view);
                }
            }
        }
예제 #5
0
 private void StatisticsView_CloseClicked(object sender, EventArgs e)
 {
     if(_StatisticsView != null) {
         _StatisticsView.CloseClicked -= StatisticsView_CloseClicked;
         _StatisticsView.Close();
         _StatisticsView.Dispose();
         _StatisticsView = null;
     }
 }
예제 #6
0
 private void menuStatisticsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if(_StatisticsView != null) {
         _StatisticsView.WindowState = FormWindowState.Normal;
         _StatisticsView.Activate();
     } else {
         _StatisticsView = new StatisticsView();
         _StatisticsView.CloseClicked += StatisticsView_CloseClicked;
         _StatisticsView.Show();
     }
 }