Ejemplo n.º 1
0
        public override void UpdateContent()
        {
            fLayoutPanel.Controls.Clear();
            if (fModel == null)
            {
                return;
            }

            var aquariums = fModel.QueryAquariums();

            foreach (var aqm in aquariums)
            {
                var workTime = fModel.GetWorkTime(aqm);
                if ((workTime.IsInactive() || !workTime.WasStarted()) && ALSettings.Instance.HideClosedTanks)
                {
                    continue;
                }

                var aqPanel = new TankSticker();
                aqPanel.Model        = fModel;
                aqPanel.Aquarium     = aqm;
                aqPanel.Click       += OnTankClick;
                aqPanel.DoubleClick += OnTankDoubleClick;
                aqPanel.ContextMenu  = fContextMenu;
                fLayoutPanel.Controls.Add(aqPanel);
            }
        }
Ejemplo n.º 2
0
 private void OnPanelClick(object sender, EventArgs e)
 {
     SelectedTank = null;
 }
Ejemplo n.º 3
0
 private void OnTankClick(object sender, EventArgs e)
 {
     SelectedTank = sender as TankSticker;
 }