Exemple #1
0
        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);
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        /*public delegate void syncEventDelegate(object sender, SyncEventArgs e);
         * public event syncEventDelegate syncEvent; */

        public Sync()
        {
            sap = new SAP();
            sql = new SQL();
        }