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(); } }
public static void Run(PublishType publishType) { var sample = new PublisherSample(); sample.Publish(publishType); }
private void SampleGUI_Shown(object sender, EventArgs e) { // Run the publisher sample code PublisherSample.Run(m_PublishType); }