Exemplo n.º 1
0
 void pLinie_DisplayWariant(object sender, EventArgs e)
 {
     try
     {
         Query.Linie      linia    = ((PresenterLinie)sender).Linia;
         PresenterWariant pWariant = new PresenterWariant(linia);
         pWariant.FormText            = "Linia " + linia.Nazwa.Trim();
         pWariant.MaterialSkinManager = MaterialSkinManager;
         pWariant.MaterialForm.Parent = View.FormControl;
         View.AddMaterialPanelTab(pWariant.MaterialForm, false);
         pWariant.ViewClosed        += OnTabClosed;
         pWariant.DisplayPrzystanek += pWariant_DisplayPrzystanek;
     }
     catch (Exception)
     { }
 }
Exemplo n.º 2
0
        public PresenterWariant(Query.Linie linia)
        {
            this.Linia = linia;

            MaterialForm = new CFormListView();
            View         = (IFormListView)MaterialForm;
            FormControl  = View.FormControl;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed      += view_Closed;
            View.SetHeaders(new List <string>()
            {
                "Nazwa", "Start", "Koniec"
            });
            View.RefreshClicked += View_RefreshClicked;
            View.ObjectClicked  += View_ObjectClicked;

            workerRefreshGrid = new OverlayBackgroundWorker();
            workerRefreshGrid.DisplayControl      = View.FormControl;
            workerRefreshGrid.DoWork             += GetLines;
            workerRefreshGrid.RunWorkerCompleted += DisplayLines;
            workerRefreshGrid.RunWorkerAsync();
        }