anchor.diff:   inherited Create(index);
   
    Self.GlobalSettings.typ := _BLK_AC;
  - Self.ACStav := _def_ac_stav;
  + Self.m_state := _def_ac_state;
   end;//ctor
   
   destructor TBlkAC.Destroy();
  
positive.code: 
  ////////////////////////////////////////////////////////////////////////////////
  
  procedure TBlkAC.LoadData(ini_tech:TMemIniFile;const section:string;ini_rel,ini_stat:TMemIniFile);
  var str:TStrings;
  begin
   inherited LoadData(ini_tech, section, ini_rel, ini_stat);
  
   // TODO load data here
  
   if (ini_rel <> nil) then
    begin
  
negative.code: //toto se zavola pri kliku na jakoukoliv itemu menu tohoto bloku
  procedure TBlkAC.PanelMenuClick(SenderPnl:TIdContext; SenderOR:TObject; item:string; itemindex:Integer);
  begin
   if (not Self.enabled) then Exit();
  
   if      (item = 'START')  then Self.MenuSTARTClick(SenderPnl, SenderOR)
   else if (item = 'STOP')   then Self.MenuSTOPClick(SenderPnl, SenderOR)
   else if (item = 'PAUZA')  then Self.MenuPAUZAClick(SenderPnl, SenderOR)
   else if (item = 'POKRA') then Self.MenuPOKRACClick(SenderPnl, SenderOR);
  end;
  
  ////////////////////////////////////////////////////////////////////////////////
  
  function TBlkAC.PanelStateString():string;
  var fg, bg: TColor;
      flash: boolean;
  begin
   Result := inherited;
  
   bg := clBlack;
   fg := $A0A0A0;
  
   case (Self.m_state.state) of
    TACState.running: fg := clYellow;
    TACState.paused: fg := clYellow;
   end;
  
   if (Self.stopped) then
    begin
     if (Self.clientConnected) then
       fg := $A0A0A0
     else
       fg := clFuchsia;
    end;
  
   flash := Self.running;
  
   Result := Result + PrevodySoustav.ColorToStr(fg) + ';'
                    + PrevodySoustav.ColorToStr(bg) + ';'
                    + IntToStr(PrevodySoustav.BoolToInt(flash)) + ';';
  end;
  
  ////////////////////////////////////////////////////////////////////////////////
  
  function TBlkAC.GetStopped():boolean;
  begin
   Result := (Self.m_state.state = TACState.stopped);
  end;
  
  function TBlkAC.GetRunning():boolean;
  begin
   Result := (Self.m_state.state = TACState.running);
  end;
  
  function TBlkAC.GetPaused():boolean;
  begin
   Result := (Self.m_state.state = TACState.paused);
  end;
  
  function TBlkAC.GetClientConnected():boolean;
  begin
   Result := (Self.m_state.client <> nil);
  end;
  
  ////////////////////////////////////////////////////////////////////////////////
  
  procedure TBlkAC.Start();
  begin
   if ((Self.m_state.state <> TACState.stopped) and (Self.m_state.state <> TACState.paused)) then
     TBlkACException.Create('Nelze spustit bc AC!');
   if (Self.m_state.client = nil) then
     TBlkACException.Create('AC nelze spustit bez pipojenho klienta!');
  
   if (Self.paused) then
     ORTCPServer.SendLn(Self.client, '-;AC;CONTROL;RESUME')
   else
     ORTCPServer.SendLn(Self.client, '-;AC;CONTROL;START');
  
   Self.m_state.state := TACState.running;
   Self.Change();
  end;
  
  procedure TBlkAC.Stop();
  begin
   if (Self.m_state.state <> TACState.running) then
     TBlkACException.Create('Nelze zastavit nesputn AC!');
  
   Self.m_state.state := TACState.stopped;
   ORTCPServer.SendLn(Self.client, '-;AC;CONTROL;STOP');
   Self.Change();
  end;
  
  procedure TBlkAC.Pause();
  begin
   if (Self.m_state.state <> TACState.running) then
     TBlkACException.Create('Nelze pozastavit nesputn AC!');
  
   Self.m_state.state := TACState.paused;
   ORTCPServer.SendLn(Self.client, '-;AC;CONTROL;PAUSE');
   Self.Change();
  end;
  
  ////////////////////////////////////////////////////////////////////////////////
  
  procedure TBlkAC.OnClientDisconnect(client: TIdContext);
  begin
   // TODO
   Self.Change();
  end;
  
  ////////////////////////////////////////////////////////////////////////////////
  