コード例 #1
0
        public static void Main(string[] args)
        {
            var guiMode     = args.Contains("GUI");
            var publishType = args.Contains("sync") ? PublishType.ExportAndSync : PublishType.Export;

            if (guiMode)
            {
                // GUI mode
                // -------------

                // Preparing the GUI
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // Opening the form
                Application.Run(new SampleGUI(publishType));
            }
            else
            {
                // Console mode
                // -------------

                // Subscribe to the Reflect logger to display the logs in the console.
                // Note : you can also use the FileLogReceiver class for easy file logging.
                Logger.AddReceiver(new Program());

                // Run the publisher sample code
                PublisherSample.Run(publishType);

                // Wait for user input to exit
                Console.ReadLine();
            }
        }
コード例 #2
0
        public static void Run(PublishType publishType)
        {
            var sample = new PublisherSample();

            sample.Publish(publishType);
        }
コード例 #3
0
 private void SampleGUI_Shown(object sender, EventArgs e)
 {
     // Run the publisher sample code
     PublisherSample.Run(m_PublishType);
 }