Example #1
0
        /*
         * If call to sendDmIcdPacketEx was successful, export text from Item View into a store file
         */
        public static bool Teardown(AutomationWindow window)
        {
            if (sentPacket && response.Length > 0)
            {
                // Get path to export to (current working directory)
                string storeFilePath = Program.GetWorkingDirectory();
                if (storeFilePath == "")
                {
                    return(false);
                }

                storeFilePath += "ExportViewTextWithComTest.txt";

                // Export Item View text to store file
                uint success = window.ExportViewText("Item View", storeFilePath);

                if (success == 0)
                {
                    Console.WriteLine("Unable to export items, 'Item View'");
                    Console.WriteLine("Last error string: " + window.GetLastErrorString());
                    return(false);
                }

                Console.WriteLine("Items exported to item store file: " + storeFilePath);
                return(true);
            }
            else
            {
                Console.WriteLine("Problem writing or retrieving packet");
                Console.WriteLine("Last error string: " + window.GetLastErrorString());
                return(false);
            }
        }
Example #2
0
        public static bool Teardown(AutomationWindow window)
        {
            window.CopyViewItems("Item View", "C:\\temp\\CopyViewItems.txt");
            window.ExportViewText("Item View", "C:\\temp\\ExportViewText.txt");

            return(true);
        }
Example #3
0
        /*
         * Export Item View text to "ExportViewTextTest.txt" in current working directory
         */
        public static bool Exec(AutomationWindow window)
        {
            string storeFile = Program.GetWorkingDirectory() + "ExportViewTextTest.txt";
            uint   success   = window.ExportViewText("Item View", storeFile);

            if (success == 0)
            {
                Console.WriteLine("Unable to export items, 'Item View'");
                return(false);
            }

            Console.WriteLine("Items exported to item store file: " + storeFile);
            return(true);
        }