Esempio n. 1
0
 private void Init(Form parent)
 {
     InitializeComponent();
     this.Owner     = parent;
     this.Location  = new Point(this.Owner.Location.X + 20, this.Owner.Location.Y + 20);
     SupplierKeeper = new CompaniesKeeper();
 }
Esempio n. 2
0
        private async void FormLoaded(object sender, EventArgs e)
        {
            Looper = new frmLooper(this);
            Looper.Show(this);
            producers = new CompaniesKeeper();
            suppliers = new CompaniesKeeper();
            SetComboboxes();
            InitiailizeButtonContextMenu();
            if (mode > 1)
            {
                EnableButtons();
                List <Task> tasks = new List <Task>()
                {
                    Task.Run(() => GetBoms()),
                    Task.Run(() => GetImage()),
                    Task.Run(() => GetUsedParts()),
                    Task.Run(() => GetPrices())
                };
                await Task.WhenAll(tasks);
            }

            files.Initialize();
            Looper.Hide();
        }