예제 #1
0
        private void btnNav_Click(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (btn.Tag.ToString() == "CommunityPage")
            {
                if (CP == null)
                {
                    CP = new CommunityPage();
                    mainFrame.Content = CP;
                }
                else
                {
                    mainFrame.Content = CP;
                }
            }
            else
            {
                if (TP == null)
                {
                    TP = new TransPage();
                    mainFrame.Content = TP;
                }
                else
                {
                    mainFrame.Content = TP;
                }
            }

            //      CommunityPage = new Uri("Pages/" + btn.Tag.ToString() + ".xaml", UriKind.Relative);
            //       mainFrame.Navigate(CommunityPage);
        }
예제 #2
0
        public FileWaiting(TransPage page)
        {
            FileStreamPage = page;
            StreamRequest  = new ConcurrentDictionary <Guid, WaitingObject>();

            CheckTimer = new Timer
            {
                Interval  = 2000,
                AutoReset = false
            };
            CheckTimer.Elapsed += Timer_Trigger;
            CheckTimer.Start();
        }
예제 #3
0
        public FileService(TransPage page)
        {
            FileStreamPage = page;

            FileCache = new ConcurrentDictionary <Guid, StreamBase>();

            CacheTimer = new Timer
            {
                Interval  = CacheVaildTime,
                AutoReset = false
            };
            CacheTimer.Elapsed += CacheFresh_Trigger;
            CacheTimer.Start();

            UpdateTimer = new Timer
            {
                Interval  = UpdateUITime,
                AutoReset = false
            };
            UpdateTimer.Elapsed += UpdateUI_Trigger;
            UpdateTimer.Start();
        }
예제 #4
0
 public MainWindow()
 {
     InitializeComponent();
     TP = new TransPage();
     mainFrame.Content = TP;
 }