Пример #1
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;
                    }
                }
            }
        }
Пример #2
0
 private void Button_Click_9(object sender, RoutedEventArgs e)
 {
     Document.MSWord_Controller mswControl = new Document.MSWord_Controller();
 }