Ejemplo n.º 1
0
 //----< send show metadata request to the repository >---------------
 private void showMetadata(CsMessage msg)
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         sb.AppendLine("File Name: " + msg.value("name"));
         sb.AppendLine("Description: " + msg.value("description"));
         sb.AppendLine("Date Time: " + msg.value("datetime"));
         sb.AppendLine("Dependency: " + msg.value("dependency"));
         sb.AppendLine("Location at repo: " + msg.value("location"));
         sb.AppendLine("Category: " + msg.value("category"));
         sb.AppendLine("isOpen: " + msg.value("isOpen"));
         sb.AppendLine("Version: " + msg.value("version"));
         Paragraph paragraph = new Paragraph();
         paragraph.Inlines.Add(new Run(sb.ToString()));
         CodePopUpWindow popUp = new CodePopUpWindow();
         popUp.Show();
         popUp.CodeView.Blocks.Clear();
         popUp.CodeView.Blocks.Add(paragraph);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
 //----< send show no parents request >---------------
 private void shownoparent(CsMessage msg)
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         sb.AppendLine("The files in any category that have no parents are");
         sb.AppendLine(msg.value("are"));
         Paragraph paragraph = new Paragraph();
         paragraph.Inlines.Add(new Run(sb.ToString()));
         CodePopUpWindow popUp = new CodePopUpWindow();
         popUp.Show();
         popUp.CodeView.Blocks.Clear();
         popUp.CodeView.Blocks.Add(paragraph);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 3
0
 //----< show file full content >----------------
 private void showFile(String[] content)
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         foreach (string con in content)
         {
             sb.AppendLine(con);
         }
         Paragraph paragraph = new Paragraph();
         paragraph.Inlines.Add(new Run(sb.ToString()));
         CodePopUpWindow popUp = new CodePopUpWindow();
         popUp.Show();
         popUp.CodeView.Blocks.Clear();
         popUp.CodeView.Blocks.Add(paragraph);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }