示例#1
0
        //------< pop up window >----------------
        private void showFile(string fileContents)
        {
            try
            {
                CodePopup popup = new CodePopup();

                popup.codeView.Text = fileContents;
                popup.Show();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
示例#2
0
        //--------< local file double click>------------------------------
        private void localFiles_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            string fileName = localFiles.SelectedValue as string;

            try
            {
                string    path     = System.IO.Path.Combine(ClientEnvironment.root, fileName);
                string    contents = File.ReadAllText(path);
                CodePopup popup    = new CodePopup();
                popup.codeView.Text = contents;
                popup.Show();
            }
            catch (Exception ex)
            {
                string msg = ex.Message;
            }
            statusBarText.Text = "Get Local File Content";
        }