Esempio n. 1
0
 public CreatPart()
 {
     InitializeComponent();
     manager = new Data_Manager();
     manager.UpdateAll();
     if (manager.GetMachineName() != null)
     {
         MachineNames.DataSource = manager.GetMachineName();
     }
 }
Esempio n. 2
0
        private void CreateMachine_Click(object sender, EventArgs e)
        {
            maneger.UpdateAll();
            //MessageBox.Show("The data was upadated");
            AddMachine win = new AddMachine();

            win.ShowDialog();
            string machinename = win.Machinename;

            if (maneger.addMachine(machinename, 0) && machinename != null)
            {
                MessageBox.Show("Machine was successful created");
            }
            else
            {
                DialogResult dialog = MessageBox.Show("Machine allready exist, try again?", "Try again", MessageBoxButtons.YesNo);
                if (dialog == DialogResult.Yes)
                {
                    CreateMachine_Click(sender, e);
                }
            }
        }
Esempio n. 3
0
        public MainWindow()
        {
            maneger = new Data_Manager();
            maneger.UpdateAll();

            InitializeComponent();


            this.DisplayerRTvalues.AutoSizeColumnsMode  = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            this.DisplayDaylyLoad.AutoSizeColumnsMode   = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            this.DisplayMachineLoad.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            //this.DisplayMaintenace.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Data_Manager manager = new Data_Manager();

            manager.UpdateAll();

            foreach (var item in manager.getRtValues())
            {
                Console.WriteLine(item.Machine.ToString());
                Console.WriteLine(item.MotorCurent);
                Console.WriteLine(DateTime.Now);
            }

            /*     foreach (var item in manager.GetEvents())
             *   {
             *       Console.Write(item.Machine+ " ");
             *       Console.Write(item.Module + " ");
             *       Console.Write(item.Senor + " ");
             *       Console.Write(item.State + " ");
             *       Console.WriteLine(item.Date);
             *   }*/
            Console.ReadKey();
        }