public P3DClient(SimConnectDummyWindow dummyWindow) { this.dummyWindow = dummyWindow; setupSimConnect(); optionsWindow = new P3DAutoSave.OptionsWindow(this); optionsWindow.Visible = false; saveTimer = new System.Timers.Timer(); saveTimer.Elapsed += new ElapsedEventHandler(saveGame); loadSettings(); p3d.MenuAddItem("P3DAutoSave", EVENTS.EVENT_MENU, 0); p3d.MenuAddSubItem(EVENTS.EVENT_MENU, "Enable/Disable", EVENTS.EVENT_MENU_ENABLE_DISABLE, 0); p3d.MenuAddSubItem(EVENTS.EVENT_MENU, "Options", EVENTS.EVENT_MENU_OPTIONS, 0); p3d.MenuAddSubItem(EVENTS.EVENT_MENU, "Save", EVENTS.EVENT_MENU_SAVE, 0); p3d.MenuAddSubItem(EVENTS.EVENT_MENU, "Open Console", EVENTS.EVENT_MENU_CONSOLE, 0); }
public static void Main(string[] args) { // Setup debug console if in debug mode AllocConsole(); // Setup and start the application Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SimConnectDummyWindow form1 = new SimConnectDummyWindow(); form1.Visible = false; P3DClient fsx = new P3DClient(form1); form1.registerSimConnect(fsx); Application.Run(); MessageBox.Show("P3DAutoSave Succesfully Started"); }