示例#1
0
 public P4RecordSet Run(String command, String[] args)
 {
     try
     {
         P4RecordSet results = p4.Run(command, args);
         return(results);
     }
     catch (System.Exception e)
     {
         MessageBox.Show(e.Message, "Perforce Error!");
         return(null);
     }
 }
示例#2
0
文件: Program.cs 项目: orecht/P4.net
 /// <summary>
 /// </summary>
 public static int Main(string[] args)
 {
     using (var c = new P4Connection())
     {
         try
         {
             c.Connect();
             P4RecordSet ret = c.Run("reconcile", "//database/trunk/logging/...");
             ret.DumpToConsole();
         }
         catch (Exception ex)
         {
             Console.ForegroundColor = ConsoleColor.Red;
             Console.Write(ex.GetType().FullName);
             Console.Write(": ");
             Console.WriteLine(ex.Message);
             Console.WriteLine(ex.StackTrace);
             Console.ResetColor();
         }
         finally
         {
             Console.ReadKey();
         }
     }
     return 0;
 }
示例#3
0
 //---------------------------------
 private P4RecordSet RunCmd(String command, String[] args)
 {
     try
     {
         if (IsValidConnection())
         {
             return(p4.Run(command, args));
         }
     }
     catch (P4API.Exceptions.RunException e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message);
     }
     return(null);
 }