示例#1
0
 private void Next()
 {
     llnode      = llnode.Next;
     fmp         = llnode.Value;
     B.IsEnabled = true;
     N.IsEnabled = (llnode.Next != null);
     UpdateMembers(true);
     MainFrame.Navigate(fmp);
 }
示例#2
0
 private void Back()
 {
     llnode      = llnode.Previous;
     fmp         = llnode.Value;
     N.IsEnabled = true;
     B.IsEnabled = (llnode.Previous != null);
     UpdateMembers(true);
     Debug.WriteLine("Inside Back ---------> IsFilterActive  " + isFilterActive);
     MainFrame.Navigate(fmp);
 }
示例#3
0
 private void Refresh()
 {
     if (pD != null)
     {
         llnode.Value = new File_Manager_Page(pD);
     }
     else
     {
         llnode.Value = new File_Manager_Page();
     }
     fmp         = llnode.Value;
     B.IsEnabled = (llnode.Previous != null);
     N.IsEnabled = (llnode.Next != null);
     UpdateMembers(true);
     MainFrame.Navigate(fmp);
 }
示例#4
0
        public File_Manager()
        {
            InitializeComponent();

            cbItem["None"]  = 1;
            cbItem[".pdf"]  = 2;
            cbItem[".txt"]  = 3;
            cbItem[".doc"]  = 4;
            cbItem[".docx"] = 5;
            cbItem[".mp3"]  = 6;
            cbItem[".mp4"]  = 7;
            cbItem[".wav"]  = 8;
            cbItem[".wmv"]  = 9;
            cbItem[".mpeg"] = 10;
            cbItem[".avi"]  = 11;

            fmp = new File_Manager_Page();
            ll.AddFirst(fmp);
            llnode      = ll.First;
            TB1.Text    = "";
            B.IsEnabled = N.IsEnabled = TB1.IsEnabled = false;
            UpdateMembers(true);
            MainFrame.Navigate(fmp);
        }
示例#5
0
        private void Open(int selectedItemNo)
        {
            if (selectedItemNo == 0)
            {
                Speak_Listen.Speak("You haven't selected any item.");
            }
            else if (isFolder == 1)
            {
                DirectoryInfo dI = fmp.GetSelectedFolder(selectedItemNo);
                /*******************  Memory Management Start  ***************/

                temp = llnode.Next;

                while (temp != null)
                {
                    nxt = temp.Next;
                    temp.Value.Dispose();
                    ll.Remove(temp);
                    temp = nxt;
                }
                /*******************  Memory Management Finish  ****************/

                ll.AddAfter(llnode, new File_Manager_Page(dI));
                llnode      = llnode.Next;
                fmp         = llnode.Value;
                B.IsEnabled = true;
                N.IsEnabled = false;
                UpdateMembers(true);
                MainFrame.Navigate(fmp);
            }
            else
            {
                FileInfo fI = fmp.GetSelectedFile(selectedItemNo);
                Debug.WriteLine("QQQQQQQQQQQQQ    " + fI.Name);
                if (fI.Name == "firefox.exe" || fI.Name == "chrome.exe" || fI.Name == "iexplore")
                {
                    // TODO 1: Call the Web Browser Controller
                }
                else
                {
                    switch (fI.Extension)
                    {
                    case ".pdf":
                        // TODO 1: Call the PDF Reader
                        break;

                    case ".txt":
                        // TODO 1: Call the Respective Document Controller
                        break;

                    case ".doc":
                    case ".docx":
                        Document.MSWord_Controller mSWord = new Document.MSWord_Controller(fI.FullName);
                        break;

                    case ".mp3":
                    case ".mp4":
                    case ".wav":
                    case ".mpeg":
                    case ".wmv":
                    case ".avi":
                        // TODO 1: Call the Media Player
                        break;

                    default:
                        Speak_Listen.Speak("Sorry, the file format is not supported.");
                        break;
                    }
                }
            }
        }