Esempio n. 1
0
        private void StopRead()
        {
            FIFOReset(true);

            ReadTimer.Stop();
            ReadTimerLocked = false;

            StopThreads();
        }
Esempio n. 2
0
        private void RunSynch()
        {
            //Start timer
            timer.Start();

            tree.Synchronize(path, pattern, bRecursive, subroot);

            //Stop timer
            timer.Stop();
        }
Esempio n. 3
0
        public void FillTree()
        {
            //FillTreeView
            tree.FillOneLevelTree(treeView1);


            ImageList imgList = new ImageList();

            imgList.ColorDepth = ColorDepth.Depth32Bit;
            imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\folder3.ico"));
            imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\file1.ico"));
            imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\folder2_green.ico"));
            treeView1.ImageList          = imgList;
            treeView1.SelectedImageIndex = 2;

            treeView1.Nodes[0].Expand();
            treeView1.SelectedNode = treeView1.Nodes[0];
            treeView1.Refresh();

            //FillListView
            listView1.SmallImageList = imgList;
            listView1.LargeImageList = imgList;

            timer.Stop();
            lblTotal.Text = "Folders: " + tree.FoldersCount + " Files: " + tree.FilesCount + " List: " + lstDirectory.Items.Count + " Elapsed: " + timer.Duration + " (s)";
        }
Esempio n. 4
0
        public void LoadFile(string fileName)
        {
            try
            {
                /* try to open the file */
                FileSampleSource source = new FileSampleSource(fileName);
                source.ForwardEnabled  = true;
                source.SamplesPerBlock = (int)(ReadFrameRate * source.OutputSamplingRate);

                /* succeeded, use this filesource */
                lock (AccessLock)
                {
                    eTransferMode lastMode = TransferMode;

                    TransferMode = eTransferMode.Stopped;
                    Source.Close();
                    FileName     = fileName;
                    Source       = source;
                    TransferMode = lastMode;

                    /* update trackbar */
                    trackBar.Maximum = (int)(Source.GetTotalTime() / 0.01f);

                    /* reconfigure timer */
                    Timer.Stop();
                    Timer.Interval = (uint)((double)(Source.OutputBlockSize * 1000.0f) / Source.InputSamplingRate);
                    Timer.Start();
                }
                UpdateDisplay();
            }
            catch (InvalidDataException ex)
            {
                MessageBox.Show("File format not supported. (" + ex.Message + ")");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Could not open the file. (" + ex.Message + ")");
            }
        }
Esempio n. 5
0
 internal void Shutdown()
 {
     BufferStatsTimer.Stop();
     Dispose();
 }
Esempio n. 6
0
 private void Stop()
 {
     mTimer1.Stop();
     mTimer2.Stop();
 }