new: Создал папку под скрипты и добавил скрипт logo-creator

This commit is contained in:
Ilya Galkin
2020-08-20 23:55:13 +04:00
parent c016f1cd08
commit e64f9c55c1
4 changed files with 1295 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{......................................................................................................................}
Var gv_ListBoxIndexToLayerArray : TList;
{......................................................................................................................}
{......................................................................................................................}
Function GetLayerFromComboBox(ComboBox : TComboBox; Board : IPCB_Board) : TLayer;
Begin
Result := eTopLayer;
If ComboBox.ItemIndex < 0 Then
Exit;
If ComboBox.ItemIndex >= ComboBox.Items.Count Then
Exit;
Result := gv_ListBoxIndexToLayerArray.Items(ComboBox.ItemIndex);
End;
{......................................................................................................................}
{......................................................................................................................}
Procedure SetupComboBoxFromLayer(ComboBox : TComboBox; Board : IPCB_Board);
Var
Layer : TLayer;
LayerObject : IPCB_LayerObject;
LayerIterator : IPCB_LayerObjectIterator;
Begin
gv_ListBoxIndexToLayerArray := TList.Create;
ComboBox.Items.Clear;
LayerIterator := ILayer.LayerIterator_PossibleLayers;
While LayerIterator.Next Do
Begin
gv_ListBoxIndexToLayerArray.Add(LayerIterator.Layer);
ComboBox.Items.Add(ILayer.AsString(LayerIterator.Layer));
If LayerIterator.Layer = Board.CurrentLayer Then
ComboBox.ItemIndex := ComboBox.Items.Count - 1;
End;
End;
{......................................................................................................................}