static void Main() { config = new Settings1(); sap = new SAP(); sql = new SQL(); logger = new Logger(Application.StartupPath); lastOperator = ""; try { steelyard = new Steelyard(config.KantarID, sql); } catch (Exception ex) { MessageBox.Show("Ayar dosyasýnda kantar ID'si hatalý, kontrol edin: " + ex.ToString()); return; } sync = new Sync(); syncStart = new ThreadStart(sync.doSync); syncThread = new Thread(syncStart); syncThread.Start(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frmMain = new FormMain(); frmMain.setIntegrationStatus(Common.STATUS.GRAY); Application.Run(frmMain); }
public void appendLog(string Text) { // TimeStamp al DateTime now = DateTime.Now; string date = ""; string time = ""; SAP.parseDateTime(now, out date, out time); // Dosyaya yazdýr sw.WriteLine("[" + date + time + "] " + Text); sw.Flush(); }
/*public delegate void syncEventDelegate(object sender, SyncEventArgs e); * public event syncEventDelegate syncEvent; */ public Sync() { sap = new SAP(); sql = new SQL(); }