ViewManager subclass: #ESView
instanceVariableNames:
'estacao '
classVariableNames: ''
poolDictionaries: '' !
!ESView class methods ! !
!ESView methods !
chegaCarro
"chegar um carro"
| car |
car := LeCarro new ler.
( car = nil ) ifFalse: [
estacao chegaCarro: car.
self changed:#listAlinhamento:.
self changed:#listLavagem:]!
infoA: aListBox
"mostrar um carro"
| car i |
i := aListBox selection.
car := estacao getCarInAlinhamento: i.
LeCarro new mostra: (car matricula) marca: (car marca)
modelo: (car modelo) lavagem: (car testaLimpeza)
direccao: (car testaDireccao).!
infoL: aListBox
"mostrar um carro"
| car i |
i := aListBox selection.
car := estacao getCarInLavagem: i.
LeCarro new mostra: (car matricula) marca: (car marca)
modelo: (car modelo) lavagem: (car testaLimpeza)
direccao: (car testaDireccao).!
listAlinhamento: pane
"Listar os Carros em Lavagem"
| l |
l := estacao listAlinhamento.
pane contents: l!
listLavagem: pane
"Listar os Carros em Lavagem"
| l |
l := estacao listLavagem.
pane contents: l!
menuES
"Menu da ES"
| menu |
menu := Menu labels: ('&Chega Carro\Regista &Lavagem\Regista &Alinhamento\
Regista &Pagamento' withCrs)
lines: #(1 3)
selectors: #(chegaCarro regLav regAl regCaixa).
menu owner: self;
title: '&Gestao'.
^menu!
open
"criar uma Estacao de Servico"
| subpane1 subpane2 |
estacao := EstacaoServico new start.
self label: 'E. S. Pouca Conversa'.
subpane1 := StaticText new.
subpane1 owner: self.
subpane1 centered.
subpane1 contents: 'Alinhamento'.
subpane1 framingRatio: (0@0 extent: (1/3)@(1/10)).
self addSubpane: subpane1.
subpane2 := ListBox new
owner: self;
when: #getContents perform: #listAlinhamento:;
when: #select perform: #infoA:;
framingRatio: (0@(1/10) extent: (1/3)@(9/10)).
self addSubpane: subpane2.
self addSubpane:
( StaticText new
owner: self;
centered;
contents: 'Lavagem';
framingRatio: ((1/3)@0 extent: (1/3)@(1/10))
).
self addSubpane:
( ListBox new
owner: self;
when: #getContents perform: #listLavagem:;
when: #select perform: #infoL:;
framingRatio: ((1/3)@(1/10) extent: (1/3)@(9/10))
).
self addSubpane:
( StaticText new
owner: self;
centered;
contents: 'Caixa';
framingRatio: ((2/3)@0 extent: (1/3)@(1/10))
).
self addSubpane:
( ListBox new
owner: (estacao caixa);
when: #getContents perform: #listCaixa:;
when: #select perform: #info:;
framingRatio: ((2/3)@(1/10) extent: (1/3)@(9/10))
).
self openWindow.
self menuWindow addMenu: (self menuES)!
regAl
"Registar lavagem"
estacao registaAlinhamento.
self changed:#listAlinhamento:;
changed:#listCaixa:;
changed:#listLavagem:!
regCaixa
"Registar lavagem"
estacao registaPagamento.
self changed: #listCaixa:!
regLav
"Registar lavagem"
estacao registaLavagem.
self changed:#listAlinhamento:;
changed:#listCaixa:;
changed:#listLavagem:! !