} //nn singleton //================================================================================ static public MainForm start() { //data: validateDirs(); loadConfig(); //view: CajApp.mainForm = new MainForm(config); CajApp.optionsForm = new frmOptions(config); //logic: string poeFolder = config.read(CajConfig.poeFolderPath); locations = new CajLocations(dataDir + locationsFolderName, mainForm.setLocationData, trace); locations.setPart(config.readInt(CajConfig.gamePart, 1)); client = new CajClient(poeFolder, onLocationChange, trace); //first launch: if (poeFolder == "") { showOptions(); optionsForm.onFirstLaunch(); } //launch main timer: timer = new System.Timers.Timer(updateTime); timer.Elapsed += new ElapsedEventHandler(OnTimerEvent); timer.Enabled = true; tests(); return(mainForm); }