コード例 #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();
     }
 }