Skip to content

Commit

Permalink
Релиз2_6_0_0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyahy committed Jan 4, 2024
1 parent 360799b commit f9c2c07
Show file tree
Hide file tree
Showing 10 changed files with 436 additions and 10 deletions.
40 changes: 39 additions & 1 deletion OneScriptForms/OneScriptForms/FontStyle.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлСтильШрифта", "ClFontStyle")]
public class ClFontStyle : AutoContext<ClFontStyle>
public class ClFontStyle : AutoContext<ClFontStyle>, ICollectionContext, IEnumerable<IValue>
{
private int m_regular = (int)System.Drawing.FontStyle.Regular; // 0 Обычный шрифт.
private int m_bold = (int)System.Drawing.FontStyle.Bold; // 1 Полужирный шрифт.
private int m_italic = (int)System.Drawing.FontStyle.Italic; // 2 Шрифт курсив.
private int m_underline = (int)System.Drawing.FontStyle.Underline; // 4 Подчеркнутый шрифт.
private int m_strikeout = (int)System.Drawing.FontStyle.Strikeout; // 8 Зачеркнутый шрифт.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClFontStyle()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(Bold));
_list.Add(ValueFactory.Create(Italic));
_list.Add(ValueFactory.Create(Regular));
_list.Add(ValueFactory.Create(Strikeout));
_list.Add(ValueFactory.Create(Underline));
}

[ContextProperty("Жирный", "Bold")]
public int Bold
{
Expand Down
42 changes: 41 additions & 1 deletion OneScriptForms/OneScriptForms/FormBorderStyle.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлСтильГраницыФормы", "ClFormBorderStyle")]
public class ClFormBorderStyle : AutoContext<ClFormBorderStyle>
public class ClFormBorderStyle : AutoContext<ClFormBorderStyle>, ICollectionContext, IEnumerable<IValue>
{
private int m_none = (int)System.Windows.Forms.FormBorderStyle.None; // 0 Граница отсутствует.
private int m_fixedSingle = (int)System.Windows.Forms.FormBorderStyle.FixedSingle; // 1 Фиксированная однострочная граница.
Expand All @@ -13,6 +16,43 @@ public class ClFormBorderStyle : AutoContext<ClFormBorderStyle>
private int m_fixedToolWindow = (int)System.Windows.Forms.FormBorderStyle.FixedToolWindow; // 5 Граница окна инструментов, размеры которого не изменяются. Окно инструментов не отображается на панели задач или в окне, которое появляется, когда пользователь нажимает сочетание клавиш ALT + TAB.
private int m_sizableToolWindow = (int)System.Windows.Forms.FormBorderStyle.SizableToolWindow; // 6 Изменяемая граница окна инструментов. Окно инструментов не отображается на панели задач или в окне, которое появляется, когда пользователь нажимает сочетание клавиш ALT + TAB.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClFormBorderStyle()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(Fixed3D));
_list.Add(ValueFactory.Create(FixedDialog));
_list.Add(ValueFactory.Create(FixedSingle));
_list.Add(ValueFactory.Create(FixedToolWindow));
_list.Add(ValueFactory.Create(None));
_list.Add(ValueFactory.Create(Sizable));
_list.Add(ValueFactory.Create(SizableToolWindow));
}

[ContextProperty("ГраницаОкнаИнструментов", "FixedToolWindow")]
public int FixedToolWindow
{
Expand Down
40 changes: 39 additions & 1 deletion OneScriptForms/OneScriptForms/FormStartPosition.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлНачальноеПоложениеФормы", "ClFormStartPosition")]
public class ClFormStartPosition : AutoContext<ClFormStartPosition>
public class ClFormStartPosition : AutoContext<ClFormStartPosition>, ICollectionContext, IEnumerable<IValue>
{
private int m_manual = (int)System.Windows.Forms.FormStartPosition.Manual; // 0 Положение формы определяется свойством <B>Положение&nbsp;(Location)</B>.
private int m_centerScreen = (int)System.Windows.Forms.FormStartPosition.CenterScreen; // 1 Форма выравнивается по центру текущего экрана.
private int m_windowsDefaultLocation = (int)System.Windows.Forms.FormStartPosition.WindowsDefaultLocation; // 2 Форма с заданными размерами размещается в расположении, определенном по умолчанию в Windows.
private int m_windowsDefaultBounds = (int)System.Windows.Forms.FormStartPosition.WindowsDefaultBounds; // 3 Положение формы и ее границы определены в Windows по умолчанию.
private int m_centerParent = (int)System.Windows.Forms.FormStartPosition.CenterParent; // 4 Форма выравнивается по центру в границах родительской формы.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClFormStartPosition()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(CenterParent));
_list.Add(ValueFactory.Create(CenterScreen));
_list.Add(ValueFactory.Create(Manual));
_list.Add(ValueFactory.Create(WindowsDefaultBounds));
_list.Add(ValueFactory.Create(WindowsDefaultLocation));
}

[ContextProperty("Вручную", "Manual")]
public int Manual
{
Expand Down
38 changes: 37 additions & 1 deletion OneScriptForms/OneScriptForms/FormWindowState.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,50 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлСостояниеОкнаФормы", "ClFormWindowState")]
public class ClFormWindowState : AutoContext<ClFormWindowState>
public class ClFormWindowState : AutoContext<ClFormWindowState>, ICollectionContext, IEnumerable<IValue>
{
private int m_normal = (int)System.Windows.Forms.FormWindowState.Normal; // 0 Окно с размерами по умолчанию.
private int m_minimized = (int)System.Windows.Forms.FormWindowState.Minimized; // 1 Свернутое окно.
private int m_maximized = (int)System.Windows.Forms.FormWindowState.Maximized; // 2 Развернутое окно.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClFormWindowState()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(Maximized));
_list.Add(ValueFactory.Create(Minimized));
_list.Add(ValueFactory.Create(Normal));
}

[ContextProperty("Развернутое", "Maximized")]
public int Maximized
{
Expand Down
39 changes: 38 additions & 1 deletion OneScriptForms/OneScriptForms/FormatDateTimePicker.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,52 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлФорматПоляКалендаря", "ClFormatDateTimePicker")]
public class ClFormatDateTimePicker : AutoContext<ClFormatDateTimePicker>
public class ClFormatDateTimePicker : AutoContext<ClFormatDateTimePicker>, ICollectionContext, IEnumerable<IValue>
{
private int m_long = (int)System.Windows.Forms.DateTimePickerFormat.Long; // 1 Элемент управления <B>ПолеКалендаря&nbsp;(DateTimePicker)</B> отображает значение даты/времени в длинном формате даты, настроенном в операционной системе пользователя.
private int m_short = (int)System.Windows.Forms.DateTimePickerFormat.Short; // 2 Элемент управления <B>ПолеКалендаря&nbsp;(DateTimePicker)</B> отображает значение даты/времени в коротком формате даты, настроенном в операционной системе пользователя.
private int m_time = (int)System.Windows.Forms.DateTimePickerFormat.Time; // 4 Элемент управления <B>ПолеКалендаря&nbsp;(DateTimePicker)</B> отображает значение даты/времени в формате времени, настроенном в операционной системе пользователя.
private int m_custom = (int)System.Windows.Forms.DateTimePickerFormat.Custom; // 8 Элемент управления <B>ПолеКалендаря&nbsp;(DateTimePicker)</B> отображает значение даты/времени в пользовательском формате.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClFormatDateTimePicker()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(Custom));
_list.Add(ValueFactory.Create(Long));
_list.Add(ValueFactory.Create(Short));
_list.Add(ValueFactory.Create(Time));
}

[ContextProperty("Время", "Time")]
public int Time
{
Expand Down
39 changes: 38 additions & 1 deletion OneScriptForms/OneScriptForms/GridItemType.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,52 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлТипЭлементаСетки", "ClGridItemType")]
public class ClGridItemType : AutoContext<ClGridItemType>
public class ClGridItemType : AutoContext<ClGridItemType>, ICollectionContext, IEnumerable<IValue>
{
private int m_property = (int)System.Windows.Forms.GridItemType.Property; // 0 Компонент сетки, соответствующий свойству.
private int m_category = (int)System.Windows.Forms.GridItemType.Category; // 1 Компонент сетки, являющийся именем категории. Категория представляет собой описательную классификацию групп строк <A href="OneScriptForms.GridItem.html">ЭлементСетки&nbsp;(GridItem)</A>. К типовым категориям относятся <B>Поведение</B>, <B>Макет</B>, <B>Данные</B> и <B>Внешний вид</B>.
private int m_arrayValue = (int)System.Windows.Forms.GridItemType.ArrayValue; // 2 Компонент сетки, соответствующий элементу массива.
private int m_root = (int)System.Windows.Forms.GridItemType.Root; // 3 Корневой элемент в иерархии сетки.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClGridItemType()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(ArrayValue));
_list.Add(ValueFactory.Create(Category));
_list.Add(ValueFactory.Create(Property));
_list.Add(ValueFactory.Create(Root));
}

[ContextProperty("Категория", "Category")]
public int Category
{
Expand Down
39 changes: 38 additions & 1 deletion OneScriptForms/OneScriptForms/GridLineStyle.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,52 @@
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Collections;
using System.Collections.Generic;

namespace osf
{
[ContextClass ("КлСтильСетки", "ClGridLineStyle")]
public class ClGridLineStyle : AutoContext<ClGridLineStyle>
public class ClGridLineStyle : AutoContext<ClGridLineStyle>, ICollectionContext, IEnumerable<IValue>
{
private int m_none = 0; // 0 Сетка не отображается.
private int m_horizontal = 1; // 1 Отображаются горизонтальные линии.
private int m_vertical = 2; // 2 Отображаются вертикальные линии.
private int m_horizontalAndVertical = 3; // 3 Отображаются горизонтальные и вертикальные линии.

private List<IValue> _list;

public int Count()
{
return _list.Count;
}

public CollectionEnumerator GetManagedIterator()
{
return new CollectionEnumerator(this);
}

IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<IValue>)_list).GetEnumerator();
}

IEnumerator<IValue> IEnumerable<IValue>.GetEnumerator()
{
foreach (var item in _list)
{
yield return (item as IValue);
}
}

internal ClGridLineStyle()
{
_list = new List<IValue>();
_list.Add(ValueFactory.Create(Horizontal));
_list.Add(ValueFactory.Create(HorizontalAndVertical));
_list.Add(ValueFactory.Create(None));
_list.Add(ValueFactory.Create(Vertical));
}

[ContextProperty("Вертикальная", "Vertical")]
public int Vertical
{
Expand Down
Loading

0 comments on commit f9c2c07

Please sign in to comment.