├── .gitignore ├── docs ├── Color.png ├── ListBox.png ├── ToolBar.png ├── ComboBox.png ├── ListView.png ├── ListView2.png ├── PictureBox.png ├── StatusBar.png ├── TabControl.png ├── TreeView.png ├── eye-icon.png ├── icons8max.png ├── icons8min.png ├── RichTextBox.png ├── MonthCalendar.png ├── OSFormsDesigner │ ├── Tab1.png │ ├── Menu1.png │ ├── Menu2.png │ ├── Menu3.png │ ├── Menu4.png │ ├── Naming.png │ ├── Params.png │ ├── Tree1.png │ ├── Naming2.png │ ├── Naming3.png │ ├── Params3.png │ ├── PropGrid1.png │ ├── PropWork.png │ ├── ToolTip.png │ ├── img │ │ ├── base.gif │ │ ├── empty.gif │ │ ├── join.gif │ │ ├── line.gif │ │ ├── minus.gif │ │ ├── page.gif │ │ ├── plus.gif │ │ ├── folder.gif │ │ ├── folderopen.gif │ │ ├── joinbottom.gif │ │ ├── plusbottom.gif │ │ ├── minusbottom.gif │ │ ├── nolines_plus.gif │ │ └── nolines_minus.gif │ ├── pubmethod.gif │ ├── pubproperty.gif │ ├── PanelComponents.png │ ├── OneScriptFormsDesigner2.png │ ├── OneScriptFormsDesigner3.png │ ├── mobilstyle.js │ ├── OSFD.OneScriptFormsDesigner.html │ ├── OSFD.FormHelp.html │ ├── OSFD.OneScriptFormsDesignerProperties.html │ ├── OSFD.Appendix.html │ ├── OSFD.Param.html │ ├── OSFD.OneScriptFormsDesigner.DesignerOpen.html │ ├── OSFD.Naming.html │ ├── OSFD.OneScriptFormsDesigner.FormVisualStylesTurnOn.html │ ├── OSFD.OneScriptFormsDesignerConstructor.html │ └── OSFD.Os.html ├── OneScriptFormsDesigner.png ├── OneScriptFormsDesigner2.png ├── OneScriptFormsDesigner3.png ├── OneScriptFormsDesigner1_0_0_0.zip ├── OneScriptFormsDesigner1_0_1_0.zip ├── OneScriptFormsDesigner1_0_2_0.zip ├── OneScriptFormsDesigner1_1_0_0.zip ├── OneScriptFormsDesigner1_2_0_0.zip ├── OneScriptFormsDesigner1_2_1_0.zip ├── OneScriptFormsDesigner1_2_2_0.zip ├── OneScriptFormsDesigner1_3_0_0.zip ├── OneScriptFormsDesigner1_3_2_0.zip ├── kont.html └── howworks.html ├── OneScriptFormsDesigner ├── OneScriptFormsDesigner │ ├── Icon.ico │ ├── Appearance.cs │ ├── ProgressShape.cs │ ├── LeftRightAlignment.cs │ ├── ToolBarTextAlign.cs │ ├── ScriptStyle.cs │ ├── ToolBarAppearance.cs │ ├── BorderStyle.cs │ ├── CheckState.cs │ ├── HorizontalAlignment.cs │ ├── SortOrder.cs │ ├── CharacterCasing.cs │ ├── DataType.cs │ ├── InsertKeyMode.cs │ ├── TabAppearance.cs │ ├── ComboBoxStyle.cs │ ├── FormWindowState.cs │ ├── ItemActivation.cs │ ├── SortType.cs │ ├── TabAlignment.cs │ ├── TabSizeMode.cs │ ├── ColumnHeaderStyle.cs │ ├── DataGridViewTriState.cs │ ├── DrawMode.cs │ ├── View.cs │ ├── FlatStyle.cs │ ├── MenuMerge.cs │ ├── StatusBarPanelAutoSize.cs │ ├── TextMode.cs │ ├── ListViewAlignment.cs │ ├── ScrollBars.cs │ ├── StatusBarPanelBorderStyle.cs │ ├── MouseButtons.cs │ ├── DataGridViewColumnSortMode.cs │ ├── DataGridViewComboBoxDisplayStyle.cs │ ├── IDesignerMainForm.cs │ ├── PropertySort.cs │ ├── ColorDepth.cs │ ├── DataGridViewColumnHeadersHeightSizeMode.cs │ ├── ImageLayout.cs │ ├── AnchorStyles.cs │ ├── DockStyle.cs │ ├── SelectionMode.cs │ ├── ToolBarButtonStyle.cs │ ├── DataGridViewImageCellLayout.cs │ ├── FormatDateTimePicker.cs │ ├── MaskFormat.cs │ ├── LinkLabelLinkBehavior.cs │ ├── DataGridViewSelectionMode.cs │ ├── PictureBoxSizeMode.cs │ ├── FormStartPosition.cs │ ├── DataGridViewRowHeadersWidthSizeMode.cs │ ├── IDesignSurfaceExt2.cs │ ├── Day.cs │ ├── DialogResult.cs │ ├── FormBorderStyle.cs │ ├── MyLinkAreaConverter.cs │ ├── NotifyFilters.cs │ ├── ContentAlignment.cs │ ├── MySelectionRangeConverter.cs │ ├── DataGridViewAutoSizeColumnsMode.cs │ ├── DataGridViewAutoSizeRowsMode.cs │ ├── DataGridViewAutoSizeColumnMode.cs │ ├── DataGridViewContentAlignment.cs │ ├── MyCollectionConverter.cs │ ├── MyBooleanConverter.cs │ ├── SpecialFolder.cs │ ├── DateEntry.cs │ ├── Properties │ │ ├── Settings.settings │ │ ├── AssemblyInfo.cs │ │ ├── Settings.Designer.cs │ │ └── Resources.Designer.cs │ ├── MyImageListConverter.cs │ ├── PropertyGridExtensions.cs │ ├── MyImageIndexConverter.cs │ ├── ListItem.cs │ ├── MyAnchorEditor.cs │ ├── MyContentAlignmentEditor.cs │ ├── app.config │ ├── MyRectangleConverter.cs │ ├── Timer.cs │ ├── ColorDialog.cs │ ├── MyRuntimeServiceProvider.cs │ ├── IDesignSurfaceExt.cs │ ├── MyDateTimeConverter.cs │ ├── MainMenu.cs │ ├── MyIcon.cs │ ├── DesignerSerializationServiceImpl.cs │ ├── MyDecimalConverter.cs │ ├── FolderBrowserDialog.cs │ ├── UndoEngineExt.cs │ ├── MyFormMenuConverter.cs │ ├── MyButtonControlConverter.cs │ ├── ImageEntry.cs │ ├── MySelectedObjectConverter.cs │ ├── MyLocationConverter.cs │ ├── MySizeConverter.cs │ ├── ImageList.cs │ ├── ColumnHeader.cs │ ├── TabOrderHooker.cs │ ├── ListViewSubItem.cs │ ├── MyDateTimeEditor.cs │ ├── Program.cs │ ├── MyDockEditor.cs │ ├── IpDesigner.cs │ ├── FontDialog.cs │ ├── ExtensionMethods.cs │ ├── MyIconEditor.cs │ ├── ListItemComboBox.cs │ ├── ListItemListBox.cs │ ├── MyCursorConverter.cs │ ├── DesignerOptionServiceExt.cs │ ├── NotifyIcon.cs │ ├── MyList.cs │ ├── MyBoldedDatesList.cs │ ├── MyAnnuallyBoldedDatesList.cs │ ├── MyMonthlyBoldedDatesList.cs │ ├── DataGridBoolColumn.cs │ ├── DataGridComboBoxColumnStyle.cs │ ├── DataGridTextBoxColumn.cs │ └── MyLocationEditor.cs └── OneScriptFormsDesigner.sln └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /OneScriptFormsDesigner/.vs 2 | bin 3 | obj 4 | -------------------------------------------------------------------------------- /docs/Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/Color.png -------------------------------------------------------------------------------- /docs/ListBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/ListBox.png -------------------------------------------------------------------------------- /docs/ToolBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/ToolBar.png -------------------------------------------------------------------------------- /docs/ComboBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/ComboBox.png -------------------------------------------------------------------------------- /docs/ListView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/ListView.png -------------------------------------------------------------------------------- /docs/ListView2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/ListView2.png -------------------------------------------------------------------------------- /docs/PictureBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/PictureBox.png -------------------------------------------------------------------------------- /docs/StatusBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/StatusBar.png -------------------------------------------------------------------------------- /docs/TabControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/TabControl.png -------------------------------------------------------------------------------- /docs/TreeView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/TreeView.png -------------------------------------------------------------------------------- /docs/eye-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/eye-icon.png -------------------------------------------------------------------------------- /docs/icons8max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/icons8max.png -------------------------------------------------------------------------------- /docs/icons8min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/icons8min.png -------------------------------------------------------------------------------- /docs/RichTextBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/RichTextBox.png -------------------------------------------------------------------------------- /docs/MonthCalendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/MonthCalendar.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Tab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Tab1.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Menu1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Menu1.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Menu2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Menu2.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Menu3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Menu3.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Menu4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Menu4.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Naming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Naming.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Params.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Tree1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Tree1.png -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Naming2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Naming2.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Naming3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Naming3.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/Params3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/Params3.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/PropGrid1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/PropGrid1.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/PropWork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/PropWork.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/ToolTip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/ToolTip.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/base.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/base.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/empty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/empty.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/join.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/join.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/line.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/minus.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/page.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/plus.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/pubmethod.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/pubmethod.gif -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner2.png -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner3.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/folder.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/pubproperty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/pubproperty.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/folderopen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/folderopen.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/joinbottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/joinbottom.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/plusbottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/plusbottom.gif -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_0_0_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_0_0_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_0_1_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_0_1_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_0_2_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_0_2_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_1_0_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_1_0_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_2_0_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_2_0_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_2_1_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_2_1_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_2_2_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_2_2_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_3_0_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_3_0_0.zip -------------------------------------------------------------------------------- /docs/OneScriptFormsDesigner1_3_2_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OneScriptFormsDesigner1_3_2_0.zip -------------------------------------------------------------------------------- /docs/OSFormsDesigner/PanelComponents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/PanelComponents.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/minusbottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/minusbottom.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/nolines_plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/nolines_plus.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/img/nolines_minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/img/nolines_minus.gif -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OneScriptFormsDesigner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/OneScriptFormsDesigner2.png -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OneScriptFormsDesigner3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/docs/OSFormsDesigner/OneScriptFormsDesigner3.png -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahyahy/OneScriptFormsDesigner/HEAD/OneScriptFormsDesigner/OneScriptFormsDesigner/Icon.ico -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Appearance.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum Appearance 4 | { 5 | Кнопка = 1, 6 | Стандартное = 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ProgressShape.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ProgressShape 4 | { 5 | Плоский = 1, 6 | Круглый = 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/LeftRightAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum LeftRightAlignment 4 | { 5 | Лево = 0, 6 | Право = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ToolBarTextAlign.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ToolBarTextAlign 4 | { 5 | Понизу = 0, 6 | Право = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ScriptStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ScriptStyle 4 | { 5 | СтильСкрипта = 0, 6 | СтильПриложения = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ToolBarAppearance.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ToolBarAppearance 4 | { 5 | Плоский = 1, 6 | Стандартный = 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/BorderStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum BorderStyle 4 | { 5 | Одинарная = 1, 6 | Отсутствие = 0, 7 | Трехмерная = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/CheckState.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum CheckState 4 | { 5 | Неопределенный = 2, 6 | НеПомечен = 0, 7 | Помечен = 1 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/HorizontalAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum HorizontalAlignment 4 | { 5 | Лево = 0, 6 | Право = 1, 7 | Центр = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/SortOrder.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum SortOrder 4 | { 5 | Отсутствие = 0, 6 | ПоВозрастанию = 1, 7 | ПоУбыванию = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/CharacterCasing.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum CharacterCasing 4 | { 5 | Верхний = 1, 6 | Нижний = 2, 7 | Стандартный = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataType.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataType 4 | { 5 | Булево = 2, 6 | Дата = 3, 7 | Строка = 0, 8 | Число = 1 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/InsertKeyMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum InsertKeyMode 4 | { 5 | Вставить = 1, 6 | Перезаписать = 2, 7 | ПоУмолчанию = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/TabAppearance.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum TabAppearance 4 | { 5 | Кнопки = 1, 6 | ПлоскиеКнопки = 2, 7 | Стандартный = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ComboBoxStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ComboBoxStyle 4 | { 5 | НеРедактируемый = 2, 6 | Простой = 0, 7 | Редактируемый = 1 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FormWindowState.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum FormWindowState 4 | { 5 | Развернутое = 2, 6 | Свернутое = 1, 7 | Стандартное = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ItemActivation.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ItemActivation 4 | { 5 | ДваНажатия = 2, 6 | ОдноНажатие = 1, 7 | Стандартная = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/SortType.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum SortType 4 | { 5 | Булево = 3, 6 | ДатаВремя = 2, 7 | Текст = 0, 8 | Число = 1 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/TabAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum TabAlignment 4 | { 5 | Верх = 0, 6 | Лево = 2, 7 | Низ = 1, 8 | Право = 3 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/TabSizeMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum TabSizeMode 4 | { 5 | ЗаполнитьВправо = 1, 6 | Постоянный = 2, 7 | Стандартный = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ColumnHeaderStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ColumnHeaderStyle 4 | { 5 | Нажимаемая = 2, 6 | НеНажимаемая = 1, 7 | Отсутствие = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewTriState.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewTriState 4 | { 5 | Истина = 1, 6 | Ложь = 2, 7 | НеУстановлено = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DrawMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DrawMode 4 | { 5 | ВручнуюПеременный = 2, 6 | ВручнуюФиксированный = 1, 7 | Стандартный = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/View.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum View 4 | { 5 | БольшойЗначок = 0, 6 | МаленькийЗначок = 2, 7 | Подробно = 1, 8 | Список = 3 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FlatStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum FlatStyle 4 | { 5 | Всплывающий = 1, 6 | Плоский = 0, 7 | Система = 3, 8 | Стандартный = 2 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MenuMerge.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum MenuMerge 4 | { 5 | Добавить = 0, 6 | Заменить = 1, 7 | ОбъединитьМеню = 2, 8 | Удалить = 3 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/StatusBarPanelAutoSize.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum StatusBarPanelAutoSize 4 | { 5 | Отсутствие = 1, 6 | ПоСодержимому = 3, 7 | Растяжимое = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/TextMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum TextMode 4 | { 5 | Значение = 1, 6 | Отсутствие = 0, 7 | Пользовательский = 3, 8 | Проценты = 2 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ListViewAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ListViewAlignment 4 | { 5 | Верх = 2, 6 | Лево = 1, 7 | ПоСетке = 5, 8 | ПоУмолчанию = 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ScrollBars.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ScrollBars 4 | { 5 | Вертикальная = 2, 6 | Горизонтальная = 1, 7 | Обе = 3, 8 | Отсутствие = 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/StatusBarPanelBorderStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum StatusBarPanelBorderStyle 4 | { 5 | Отсутствие = 1, 6 | Рельефная = 2, 7 | Утопленная = 3 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MouseButtons.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | [System.Flags] 4 | public enum MouseButtons 5 | { 6 | Левая = 1048576, 7 | Правая = 2097152, 8 | Средняя = 4194304 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewColumnSortMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewColumnSortMode 4 | { 5 | Автоматически = 1, 6 | НеСортируемый = 0, 7 | Программный = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewComboBoxDisplayStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewComboBoxDisplayStyle 4 | { 5 | КнопкаСписка = 1, 6 | Отсутствие = 2, 7 | ПолеВыбора = 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/IDesignerMainForm.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace osfDesigner 4 | { 5 | public interface IDesignerMainForm 6 | { 7 | void ChangeImage(bool change); 8 | Control GetmainForm(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/PropertySort.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum PropertySort 4 | { 5 | БезСортировки = 0, 6 | ПоАлфавиту = 1, 7 | ПоКатегориям = 2, 8 | ПоКатегориямПоАлфавиту = 3 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ColorDepth.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ColorDepth 4 | { 5 | Глубина16 = 16, 6 | Глубина24 = 24, 7 | Глубина32 = 32, 8 | Глубина4 = 4, 9 | Глубина8 = 8 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewColumnHeadersHeightSizeMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewColumnHeadersHeightSizeMode 4 | { 5 | АвтоРазмер = 2, 6 | Включить = 0, 7 | Отключить = 1 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ImageLayout.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ImageLayout 4 | { 5 | Масштабировать = 4, 6 | Мозаика = 1, 7 | Отсутствие = 0, 8 | Растянуть = 3, 9 | Центр = 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/AnchorStyles.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | [System.Flags] 4 | public enum AnchorStyles 5 | { 6 | Верх = 1, 7 | Лево = 4, 8 | Низ = 2, 9 | Отсутствие = 0, 10 | Право = 8 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DockStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DockStyle 4 | { 5 | Верх = 1, 6 | Заполнение = 5, 7 | Лево = 3, 8 | Низ = 2, 9 | Отсутствие = 0, 10 | Право = 4 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/SelectionMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum SelectionMode 4 | { 5 | МножественныйПростой = 2, 6 | МножественныйРасширенный = 3, 7 | Одиночный = 1, 8 | Отсутствие = 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ToolBarButtonStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ToolBarButtonStyle 4 | { 5 | КнопкаВыпадающегоСписка = 4, 6 | Разделитель = 3, 7 | СтандартнаяТрехмерная = 1, 8 | Тумблер = 2 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewImageCellLayout.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewImageCellLayout 4 | { 5 | Масштабировать = 3, 6 | НеУстановлено = 0, 7 | Растянуть = 2, 8 | Стандартное = 1 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FormatDateTimePicker.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | [System.Flags] 4 | public enum FormatDateTimePicker 5 | { 6 | Время = 4, 7 | Длинный = 1, 8 | Короткий = 2, 9 | Пользовательский = 8 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MaskFormat.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum MaskFormat 4 | { 5 | ВключитьЛитералы = 2, 6 | ВключитьПриглашение = 1, 7 | ВключитьПриглашениеИЛитералы = 3, 8 | ИсключитьПриглашениеИЛитералы = 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/LinkLabelLinkBehavior.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum LinkLabelLinkBehavior 4 | { 5 | ВсегдаПодчеркнутый = 1, 6 | НеПодчеркнутый = 3, 7 | ПодчеркнутыйПриНаведении = 2, 8 | СистемныйПоУмолчанию = 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewSelectionMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewSelectionMode 4 | { 5 | ЗаголовокКолонки = 4, 6 | ЗаголовокСтроки = 3, 7 | Колонка = 2, 8 | Строка = 1, 9 | Ячейка = 0 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/PictureBoxSizeMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum PictureBoxSizeMode 4 | { 5 | АвтоРазмер = 2, 6 | Пропорционально = 4, 7 | РастянутьИзображение = 1, 8 | Стандартный = 0, 9 | ЦентрИзображения = 3 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FormStartPosition.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum FormStartPosition 4 | { 5 | Вручную = 0, 6 | ГраницыОкнаПоУмолчанию = 3, 7 | ПоложениеОкнаПоУмолчанию = 2, 8 | ЦентрРодителя = 4, 9 | ЦентрЭкрана = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewRowHeadersWidthSizeMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewRowHeadersWidthSizeMode 4 | { 5 | Включить = 0, 6 | ДляВсех = 2, 7 | ДляОтображаемых = 3, 8 | ДляПервого = 4, 9 | Отключить = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/IDesignSurfaceExt2.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public interface IDesignSurfaceExt2 : IDesignSurfaceExt 4 | { 5 | // Получаем IDesignerHost из .NET DesignSurface. 6 | ToolboxServiceImp GetIToolboxService(); 7 | void EnableDragandDrop(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Day.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum Day 4 | { 5 | Воскресенье = 6, 6 | Вторник = 1, 7 | Понедельник = 0, 8 | ПоУмолчанию = 7, 9 | Пятница = 4, 10 | Среда = 2, 11 | Суббота = 5, 12 | Четверг = 3 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DialogResult.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DialogResult 4 | { 5 | Да = 6, 6 | Нет = 7, 7 | ОК = 1, 8 | Отмена = 2, 9 | Отсутствие = 0, 10 | Повторить = 4, 11 | Прервать = 3, 12 | Пропустить = 5 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FormBorderStyle.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum FormBorderStyle 4 | { 5 | ГраницаОкнаИнструментов = 5, 6 | Диалоговая = 3, 7 | Изменяемая = 4, 8 | ИзменяемаяОкнаИнструментов = 6, 9 | Одинарная = 1, 10 | Отсутствие = 0, 11 | Трехмерная = 2 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyLinkAreaConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Windows.Forms; 3 | 4 | namespace osfDesigner 5 | { 6 | public class MyLinkAreaConverter : LinkArea.LinkAreaConverter 7 | { 8 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 9 | { 10 | return false; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/NotifyFilters.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | [System.Flags] 4 | public enum NotifyFilters 5 | { 6 | Атрибуты = 4, 7 | Безопасность = 256, 8 | ВремяСоздания = 64, 9 | ИмяКаталога = 2, 10 | ИмяФайла = 1, 11 | ПоследнийДоступ = 32, 12 | ПоследняяЗапись = 16, 13 | Размер = 8 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ContentAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum ContentAlignment 4 | { 5 | ВерхЛево = 1, 6 | ВерхПраво = 4, 7 | ВерхЦентр = 2, 8 | НизЛево = 256, 9 | НизПраво = 1024, 10 | НизЦентр = 512, 11 | СерединаЛево = 16, 12 | СерединаПраво = 64, 13 | СерединаЦентр = 32 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MySelectionRangeConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Windows.Forms; 3 | 4 | namespace osfDesigner 5 | { 6 | public class MySelectionRangeConverter : SelectionRangeConverter 7 | { 8 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 9 | { 10 | return false; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewAutoSizeColumnsMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewAutoSizeColumnsMode 4 | { 5 | ВсеЯчейки = 6, 6 | ВсеЯчейкиБезЗаголовков = 4, 7 | ЗаголовокКолонки = 2, 8 | Заполнение = 16, 9 | ОтобразритьЯчейки = 10, 10 | ОтобразритьЯчейкиБезЗаголовков = 8, 11 | Отсутствие = 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewAutoSizeRowsMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewAutoSizeRowsMode 4 | { 5 | ВсеЗаголовки = 5, 6 | ВсеЯчейки = 7, 7 | ВсеЯчейкиБезЗаголовков = 6, 8 | ОтобразритьЗаголовки = 9, 9 | ОтобразритьЯчейки = 11, 10 | ОтобразритьЯчейкиБезЗаголовков = 10, 11 | Отсутствие = 0 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewAutoSizeColumnMode.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewAutoSizeColumnMode 4 | { 5 | ВсеЯчейки = 6, 6 | ВсеЯчейкиБезЗаголовков = 4, 7 | ЗаголовокКолонки = 2, 8 | Заполнение = 16, 9 | НеУстановлено = 0, 10 | ОтобразритьЯчейки = 10, 11 | ОтобразритьЯчейкиБезЗаголовков = 8, 12 | Отсутствие = 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridViewContentAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum DataGridViewContentAlignment 4 | { 5 | ВерхЛево = 1, 6 | ВерхПраво = 4, 7 | ВерхЦентр = 2, 8 | НеУстановлено = 0, 9 | НизЛево = 256, 10 | НизПраво = 1024, 11 | НизЦентр = 512, 12 | СерединаЛево = 16, 13 | СерединаПраво = 64, 14 | СерединаЦентр = 32 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyCollectionConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System; 4 | 5 | namespace osfDesigner 6 | { 7 | public class MyCollectionConverter : CollectionConverter 8 | { 9 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 10 | { 11 | if (destinationType == typeof(string)) 12 | { 13 | return "(Коллекция)"; 14 | } 15 | 16 | return base.ConvertTo(context, culture, value, destinationType); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System; 4 | 5 | namespace osfDesigner 6 | { 7 | public class MyBooleanConverter : BooleanConverter 8 | { 9 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destType) 10 | { 11 | return (bool)value ? "Истина" : "Ложь"; 12 | } 13 | 14 | public new static string ConvertToString(object value) 15 | { 16 | return (bool)value ? "Истина" : "Ложь"; 17 | } 18 | 19 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 20 | { 21 | return (string)value == "Истина"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/SpecialFolder.cs: -------------------------------------------------------------------------------- 1 | namespace osfDesigner 2 | { 3 | public enum SpecialFolder 4 | { 5 | ВременныеФайлыИнтернета = 32, 6 | ДанныеПриложений = 26, 7 | ДанныеПриложенийПользователя = 28, 8 | Избранное = 6, 9 | История = 34, 10 | КаталогЗапуска = 7, 11 | КаталогОтправить = 9, 12 | КаталогПуск = 11, 13 | КаталогСистема = 37, 14 | Куки = 33, 15 | Личное = 5, 16 | МоиРисунки = 39, 17 | МойКомпьютер = 17, 18 | МояМузыка = 13, 19 | НедавниеДокументы = 8, 20 | ОбщиеДанныеПриложений = 35, 21 | ОбщиеПрограммныеФайлы = 43, 22 | ПрограммныеФайлы = 38, 23 | Программы = 2, 24 | РабочийСтол = 0, 25 | ФайлыРабочегоСтола = 16, 26 | Шаблоны = 21 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DateEntry.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System; 3 | 4 | namespace osfDesigner 5 | { 6 | [DesignTimeVisible(false)] 7 | public class DateEntry : Component 8 | { 9 | public DateEntry() 10 | { 11 | } 12 | 13 | public DateEntry(DateTime p1) 14 | { 15 | M_DateTime = p1; 16 | } 17 | 18 | [Browsable(false)] 19 | [ReadOnly(true)] 20 | public DateTime M_DateTime { get; set; } 21 | 22 | [DisplayName("Значение")] 23 | [Description("Текущее время, обычно выраженное как дата и время суток.")] 24 | [Category("Дата")] 25 | [Browsable(true)] 26 | public DateTime Value 27 | { 28 | get { return M_DateTime; } 29 | set { M_DateTime = value; } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | True 13 | 14 | 15 | True 16 | 17 | 18 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyImageListConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System; 4 | 5 | namespace osfDesigner 6 | { 7 | public class MyImageListConverter : ComponentConverter 8 | { 9 | public MyImageListConverter() : base(typeof(System.Windows.Forms.ImageList)) 10 | { 11 | } 12 | 13 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 14 | { 15 | if (destinationType == typeof(string)) 16 | { 17 | if (value != null) 18 | { 19 | return base.ConvertTo(context, culture, value, destinationType); 20 | } 21 | 22 | return "(Нет)"; 23 | } 24 | 25 | return base.ConvertTo(context, culture, value, destinationType); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/mobilstyle.js: -------------------------------------------------------------------------------- 1 | if (localStorage['keybt0hutbo'] == 'true') { 2 | document.body.setAttribute('style', 3 | 'font-size: 35px !important;' + 4 | '' 5 | ); 6 | 7 | let elems = document.querySelectorAll("div#nsbanner"); 8 | for (elem of elems) { 9 | elem.setAttribute('style', 10 | 'height: 60px;' + 11 | '' 12 | ); 13 | } 14 | } 15 | else { 16 | document.body.setAttribute('style', 17 | 'font-size: 16px !important' + 18 | '' 19 | ); 20 | } 21 | 22 | // === Начало для масштабирования ========== 23 | function clickimg(e) { 24 | var img01 = e.target; 25 | let tail = img01.id.replace("myImg", ""); 26 | var modal01 = document.getElementById('myModal' + tail); 27 | var modalImg01 = document.getElementById('img' + tail); 28 | 29 | modal01.style.display = "block"; 30 | modalImg01.src = img01.src; 31 | 32 | var span01 = document.getElementById('close' + tail); 33 | span01.onclick = function () { 34 | modal01.style.display = "none"; 35 | } 36 | } 37 | // === Конец для масштабирования ========== 38 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneScriptFormsDesigner", "OneScriptFormsDesigner\OneScriptFormsDesigner.csproj", "{2C1AE9F8-578F-4FAA-BDC7-BD1F8B7DE4A2}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2C1AE9F8-578F-4FAA-BDC7-BD1F8B7DE4A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2C1AE9F8-578F-4FAA-BDC7-BD1F8B7DE4A2}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2C1AE9F8-578F-4FAA-BDC7-BD1F8B7DE4A2}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2C1AE9F8-578F-4FAA-BDC7-BD1F8B7DE4A2}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/PropertyGridExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Windows.Forms; 3 | 4 | namespace osfDesigner 5 | { 6 | public static class PropertyGridExtensions 7 | { 8 | public static IEnumerable EnumerateAllItems(this System.Windows.Forms.PropertyGrid grid) 9 | { 10 | if (grid == null) 11 | yield break; 12 | 13 | GridItem start = grid.SelectedGridItem; 14 | while (start.Parent != null) 15 | { 16 | start = start.Parent; 17 | } 18 | 19 | foreach (GridItem item in start.EnumerateAllItems()) 20 | { 21 | yield return item; 22 | } 23 | } 24 | 25 | public static IEnumerable EnumerateAllItems(this GridItem item) 26 | { 27 | if (item == null) 28 | yield break; 29 | 30 | yield return item; 31 | foreach (GridItem child in item.GridItems) 32 | { 33 | foreach (GridItem gc in child.EnumerateAllItems()) 34 | { 35 | yield return gc; 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyImageIndexConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System.Windows.Forms; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyImageIndexConverter : ImageIndexConverter 9 | { 10 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 11 | { 12 | object res = base.ConvertTo(context, culture, value, destinationType); 13 | 14 | if (value.ToString() == "-1") 15 | { 16 | return "(Нет)"; 17 | } 18 | 19 | return base.ConvertTo(context, culture, value, destinationType); 20 | } 21 | 22 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 23 | { 24 | if (value is string) 25 | { 26 | if (value.ToString() == "(Нет)" || value.ToString() == "(none)") 27 | { 28 | value = "-1"; 29 | return base.ConvertFrom(context, culture, value); 30 | } 31 | } 32 | 33 | return base.ConvertFrom(context, culture, value); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ListItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace osfDesigner 4 | { 5 | public class ListItem 6 | { 7 | private string M_Text; 8 | public object M_Value; 9 | 10 | public ListItem(object p1) 11 | { 12 | } 13 | 14 | public string Text 15 | { 16 | get 17 | { 18 | if (M_Text != null) 19 | { 20 | return M_Text; 21 | } 22 | if (M_Value != null) 23 | { 24 | return Convert.ToString(M_Value); 25 | } 26 | return ""; 27 | } 28 | set { M_Text = value; } 29 | } 30 | 31 | public object Value 32 | { 33 | get 34 | { 35 | if (M_Value != null) 36 | { 37 | return M_Value; 38 | } 39 | if (M_Text != null) 40 | { 41 | return M_Text; 42 | } 43 | return ""; 44 | } 45 | set { M_Value = value; } 46 | } 47 | 48 | public override string ToString() 49 | { 50 | return Text; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyAnchorEditor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Reflection; 4 | using System.Windows.Forms.Design; 5 | using System.Windows.Forms; 6 | using System; 7 | 8 | namespace osfDesigner 9 | { 10 | public class MyAnchorEditor : UITypeEditor 11 | { 12 | AnchorEditor editor; 13 | 14 | public MyAnchorEditor() 15 | { 16 | editor = new AnchorEditor(); 17 | } 18 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 19 | { 20 | Type anchorUiType = typeof(AnchorEditor).GetNestedType("AnchorUI", BindingFlags.NonPublic); 21 | var anchorUiConstructor = anchorUiType.GetConstructors()[0]; 22 | var anchorUiField = typeof(AnchorEditor).GetField("anchorUI", BindingFlags.Instance | BindingFlags.NonPublic); 23 | var anchorUiObject = anchorUiConstructor.Invoke(new[] { editor }) as Control; 24 | anchorUiField.SetValue(editor, anchorUiObject); 25 | 26 | return editor.EditValue(context, provider, value); 27 | } 28 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 29 | { 30 | return editor.GetEditStyle(context); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyContentAlignmentEditor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | using System; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MyContentAlignmentEditor : UITypeEditor 10 | { 11 | ContentAlignmentEditor editor; 12 | public MyContentAlignmentEditor() 13 | { 14 | editor = new ContentAlignmentEditor(); 15 | } 16 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 17 | { 18 | Type contentUiType = typeof(ContentAlignmentEditor).GetNestedType("ContentUI", BindingFlags.NonPublic); 19 | var contentUiConstructor = contentUiType.GetConstructors()[0]; 20 | var contentUiField = typeof(ContentAlignmentEditor).GetField("contentUI", BindingFlags.Instance | BindingFlags.NonPublic); 21 | object[] args = new object[0]; 22 | var contentUiObject = contentUiConstructor.Invoke(args) as Control; 23 | contentUiField.SetValue(editor, contentUiObject); 24 | 25 | return editor.EditValue(context, provider, value); 26 | } 27 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 28 | { 29 | return editor.GetEditStyle(context); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.OneScriptFormsDesigner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OneScriptFormsDesigner Class 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) Класс

23 |
24 |
25 |
26 |

Описание

27 |

Дизайнер форм - это визуальное средство разработки форм предназначенное для построения приложений пользователя на сценарном языке OneScript.

28 |

29 | Список всех членов этого типа смотрите в разделе ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) Члены. 30 |

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | True 26 | 27 | 28 | True 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Управление общими сведениями о сборке осуществляется с помощью 6 | // набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, 7 | // связанные со сборкой. 8 | [assembly: AssemblyTitle("OneScriptFormsDesigner")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OneScriptFormsDesigner")] 13 | [assembly: AssemblyCopyright("Copyright © ahyahy 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Параметр ComVisible со значением FALSE делает типы в сборке невидимыми 18 | // для COM-компонентов. Если требуется обратиться к типу в этой сборке через 19 | // COM, задайте атрибуту ComVisible значение TRUE для этого типа. 20 | [assembly: ComVisible(false)] 21 | 22 | // Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM 23 | [assembly: Guid("2c1ae9f8-578f-4faa-bdc7-bd1f8b7de4a2")] 24 | 25 | // Сведения о версии сборки состоят из следующих четырех значений: 26 | // 27 | // Основной номер версии 28 | // Дополнительный номер версии 29 | // Номер сборки 30 | // Редакция 31 | // 32 | // Можно задать все значения или принять номера сборки и редакции по умолчанию 33 | // используя "*", как показано ниже: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.3.2.0")] 36 | [assembly: AssemblyFileVersion("1.3.2.0")] 37 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyRectangleConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Drawing; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyRectangleConverter : RectangleConverter 9 | { 10 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 11 | { 12 | return true; 13 | } 14 | 15 | public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) 16 | { 17 | PropertyDescriptorCollection originalCollection = TypeDescriptor.GetProperties(value, attributes); 18 | PropertyDescriptor[] pds = new PropertyDescriptor[originalCollection.Count]; 19 | originalCollection.CopyTo(pds, 0); 20 | PropertyDescriptorCollection newCollection = new PropertyDescriptorCollection(pds); 21 | for (int i = 0; i < originalCollection.Count; i++) 22 | { 23 | PropertyDescriptor pd = originalCollection[i]; 24 | List la = new List(); 25 | foreach (Attribute attribute in pd.Attributes) 26 | { 27 | la.Add(attribute); 28 | } 29 | MyPropertyDescriptor cp = new MyPropertyDescriptor(pd, la.ToArray()); 30 | newCollection.RemoveAt(i); 31 | newCollection.Insert(i, cp); 32 | } 33 | return newCollection.Sort(new string[] { "Икс", "Игрек", "Ширина", "Высота" }); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Timer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class Timer : System.Windows.Forms.Timer 6 | { 7 | 8 | private string _Tick_osf; 9 | 10 | public Timer() 11 | { 12 | } 13 | 14 | [DisplayName("Интервал")] 15 | [Description("Возвращает или задает время в миллисекундах между отметками таймера.")] 16 | [Category("Поведение")] 17 | [Browsable(true)] 18 | public new int Interval 19 | { 20 | get { return base.Interval; } 21 | set { base.Interval = value; } 22 | } 23 | 24 | [DisplayName("ПриСрабатыванииТаймера")] 25 | [Description("Возвращает или задает код для выполнения по истечении указанного интервала таймера и таймер включен.")] 26 | [Category("Прочее")] 27 | [Browsable(true)] 28 | public string Tick_osf 29 | { 30 | get { return _Tick_osf; } 31 | set { _Tick_osf = value; } 32 | } 33 | 34 | [Browsable(false)] 35 | public new dynamic Container { get; set; } 36 | 37 | [Browsable(false)] 38 | public new dynamic Enabled { get; set; } 39 | 40 | [Browsable(false)] 41 | public new dynamic Site { get; set; } 42 | 43 | [Browsable(false)] 44 | public new dynamic Tag { get; set; } 45 | 46 | [Browsable(false)] 47 | public string DefaultValues { get; set; } 48 | 49 | [Browsable(false)] 50 | public string RequiredValues 51 | { 52 | get 53 | { 54 | return @""; 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.FormHelp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Справка библиотеки форм 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

Справка библиотеки форм

23 |
24 |
25 |
26 |

27 | Для удобства рекомендую держать под рукой открытую справку по библиотеке форм 28 | (Справка по формам). 29 | В ней есть подробные примеры, иерархия пространства имен. Можно будет копировать целые куски кода и вставлять в свой сценарий. 30 |

31 |

32 | В разделе Дополнения есть дополнительные разъяснения и две игры написанные с применением библиотеки форм. 33 | В скачанном релизе форм будет каталог со справкой на случай отсутствия подключения к интернету. 34 | Содержимое скачанной справки соответствует версии библиотеки форм. 35 |

36 |

37 |
38 | 39 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ColorDialog.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | 5 | namespace osfDesigner 6 | { 7 | public class ColorDialog : System.Windows.Forms.ColorDialog 8 | { 9 | 10 | public ColorDialog() 11 | { 12 | } 13 | 14 | [DisplayName("Цвет")] 15 | [Description("Возвращает или задает выбранный цвет.")] 16 | [Category("Данные")] 17 | [Browsable(true)] 18 | [TypeConverter(typeof(MyColorConverter))] 19 | [Editor(typeof(MyColorEditor), typeof(UITypeEditor))] 20 | public new Color Color 21 | { 22 | get { return base.Color; } 23 | set { base.Color = value; } 24 | } 25 | 26 | [Browsable(false)] 27 | [ReadOnly(true)] 28 | public new bool AllowFullOpen { get; set; } 29 | 30 | [Browsable(false)] 31 | [ReadOnly(true)] 32 | public new bool AnyColor { get; set; } 33 | 34 | [Browsable(false)] 35 | [ReadOnly(true)] 36 | public new bool FullOpen { get; set; } 37 | 38 | [Browsable(false)] 39 | [ReadOnly(true)] 40 | public new bool ShowHelp { get; set; } 41 | 42 | [Browsable(false)] 43 | [ReadOnly(true)] 44 | public new bool SolidColorOnly { get; set; } 45 | 46 | [Browsable(false)] 47 | [ReadOnly(true)] 48 | public new object Tag { get; set; } 49 | 50 | [Browsable(false)] 51 | public string DefaultValues { get; set; } 52 | 53 | [Browsable(false)] 54 | public string RequiredValues 55 | { 56 | get 57 | { 58 | return @""; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyRuntimeServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Windows.Forms.Design; 3 | using System.Windows.Forms; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyRuntimeServiceProvider : IServiceProvider, ITypeDescriptorContext 9 | { 10 | dynamic instance; 11 | 12 | public MyRuntimeServiceProvider(object p1 = null) 13 | { 14 | instance = p1; 15 | } 16 | 17 | object IServiceProvider.GetService(Type serviceType) 18 | { 19 | if (serviceType == typeof(IWindowsFormsEditorService)) 20 | { 21 | return new WindowsFormsEditorService(); 22 | } 23 | 24 | return null; 25 | } 26 | 27 | public void OnComponentChanged() 28 | { 29 | } 30 | 31 | public IContainer Container 32 | { 33 | get { return null; } 34 | } 35 | 36 | public bool OnComponentChanging() 37 | { 38 | return true; 39 | } 40 | 41 | public object Instance 42 | { 43 | get { return instance; } 44 | } 45 | 46 | public PropertyDescriptor PropertyDescriptor 47 | { 48 | get { return null; } 49 | } 50 | 51 | internal class WindowsFormsEditorService : IWindowsFormsEditorService 52 | { 53 | public void DropDownControl(Control control) 54 | { 55 | } 56 | 57 | public void CloseDropDown() 58 | { 59 | } 60 | 61 | public System.Windows.Forms.DialogResult ShowDialog(System.Windows.Forms.Form dialog) 62 | { 63 | return dialog.ShowDialog(); 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/IDesignSurfaceExt.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design.Serialization; 2 | using System.ComponentModel.Design; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Windows.Forms; 6 | using System; 7 | 8 | namespace osfDesigner 9 | { 10 | public interface IDesignSurfaceExt 11 | { 12 | // Выполнение Cut/Copy/Paste/Delete команд. 13 | void DoAction(string command); 14 | 15 | // Активация/деактивация возможности TabOrder. 16 | void SwitchTabOrder(); 17 | 18 | // Выбор режима выравнивания элементов управления. 19 | void UseSnapLines(); 20 | void UseGrid(Size gridSize); 21 | void UseGridWithoutSnapping(Size gridSize); 22 | void UseNoGuides(); 23 | 24 | // Методы используются для создания элемента управления без помощи ToolBox. 25 | IComponent CreateRootComponent(Type controlType, Size controlSize); 26 | IComponent CreateRootComponent(DesignerLoader loader, Size controlSize); 27 | Control CreateControl(Type controlType, Size controlSize, Point controlLocation); 28 | 29 | // Получение UndoEngineExtended объекта. 30 | UndoEngineExt GetUndoEngineExt(); 31 | 32 | // Получение IDesignerHost. 33 | IDesignerHost GetIDesignerHost(); 34 | 35 | // HostControl поверхности дизайнера .NET - это просто элемент управления. 36 | // Вы можете управлять этим элементом управления так же, как и любым другим элементом управления WinForms. 37 | // Вы можете закрепить его и добавить в другой элемент управления, чтобы просто отобразить его. 38 | // Получить элемент управления HostControl. 39 | Control GetView(); 40 | 41 | //* 17.12.2021 perfolenta 42 | bool Dirty { get; } 43 | //*** 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyDateTimeConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyDateTimeConverter : DateTimeConverter 9 | { 10 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cultureInfo, object value, Type destinationType) 11 | { 12 | if (destinationType == typeof(string)) 13 | { 14 | return value.ToString(); 15 | } 16 | return base.ConvertTo(context, cultureInfo, RuntimeHelpers.GetObjectValue(value), destinationType); 17 | } 18 | 19 | public new static string ConvertToString(object value) 20 | { 21 | return value.ToString(); 22 | } 23 | 24 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 25 | { 26 | if (destinationType.Equals(typeof(string))) 27 | { 28 | return true; 29 | } 30 | return base.CanConvertTo(context, destinationType); 31 | } 32 | 33 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo cultureInfo, object value) 34 | { 35 | if (!(value is string)) 36 | { 37 | return base.ConvertFrom(context, cultureInfo, RuntimeHelpers.GetObjectValue(value)); 38 | } 39 | return value.ToString(); 40 | } 41 | 42 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 43 | { 44 | return true; 45 | } 46 | 47 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 48 | { 49 | return false; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MainMenu.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | 4 | namespace osfDesigner 5 | { 6 | public class MainMenu : System.Windows.Forms.MainMenu 7 | { 8 | System.Windows.Forms.Menu.MenuItemCollection _menuItems; 9 | private System.Windows.Forms.TreeView treeView; 10 | 11 | public MainMenu() 12 | { 13 | _menuItems = base.MenuItems; 14 | Tag = new System.Windows.Forms.TreeView(); 15 | treeView = (System.Windows.Forms.TreeView)Tag; 16 | } 17 | 18 | [Browsable(false)] 19 | public osfDesigner.frmMenuItems FrmMenuItems { get; set; } 20 | 21 | [Browsable(false)] 22 | public System.Windows.Forms.TreeView TreeView 23 | { 24 | get { return treeView; } 25 | } 26 | 27 | [DisplayName("ЭлементыМеню")] 28 | [Description("Возвращает значение, указывающее на коллекцию объектов ЭлементМеню (MenuItem), связанных с меню.")] 29 | [Category("Прочее")] 30 | [Browsable(true)] 31 | [TypeConverter(typeof(MyCollectionConverter))] 32 | [Editor(typeof(MyMenuItemsEditor), typeof(UITypeEditor))] 33 | public new System.Windows.Forms.Menu.MenuItemCollection MenuItems 34 | { 35 | get { return _menuItems; } 36 | } 37 | 38 | [Browsable(false)] 39 | [ReadOnly(true)] 40 | public new object Tag { get; set; } 41 | 42 | [Browsable(false)] 43 | [ReadOnly(true)] 44 | public new System.Windows.Forms.RightToLeft RightToLeft { get; set; } 45 | 46 | [Browsable(false)] 47 | public string DefaultValues { get; set; } 48 | 49 | [Browsable(false)] 50 | public string RequiredValues 51 | { 52 | get 53 | { 54 | return @" 55 | ЭлементыМеню == 56 | "; 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyIcon.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing; 3 | using System.IO; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | [TypeConverter(typeof(ExpandableObjectConverter))] 9 | public class MyIcon 10 | { 11 | public Icon M_Icon; 12 | 13 | public MyIcon() 14 | { 15 | } 16 | 17 | public MyIcon(MyIcon p1) 18 | { 19 | M_Icon = p1.M_Icon; 20 | } 21 | 22 | public MyIcon(Icon p1) 23 | { 24 | M_Icon = p1; 25 | } 26 | 27 | public MyIcon(string p1) 28 | { 29 | M_Icon = null; 30 | try 31 | { 32 | Bitmap Bitmap = new Bitmap(new MemoryStream(Convert.FromBase64String(p1))); 33 | IntPtr Hicon = Bitmap.GetHicon(); 34 | Icon Icon1 = Icon.FromHandle(Hicon); 35 | M_Icon = Icon1; 36 | } 37 | catch { } 38 | try 39 | { 40 | M_Icon = new Icon(new MemoryStream(Convert.FromBase64String(p1))); 41 | } 42 | catch { } 43 | if (M_Icon == null) 44 | { 45 | M_Icon = new Icon(p1); 46 | } 47 | } 48 | 49 | [DisplayName("Высота")] 50 | [Description("Возвращает высоту этого объекта Значок (Icon).")] 51 | [Browsable(true)] 52 | public int Height 53 | { 54 | get { return M_Icon.Height; } 55 | } 56 | 57 | [DisplayName("Путь")] 58 | [Description("Путь до файла изображения.")] 59 | [Browsable(true)] 60 | [DefaultValue(typeof(String), null)] 61 | [ReadOnly(true)] 62 | public string Path { get; set; } 63 | 64 | [DisplayName("Ширина")] 65 | [Description("Возвращает ширину этого объекта Значок (Icon).")] 66 | [Browsable(true)] 67 | public int Width 68 | { 69 | get { return M_Icon.Width; } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DesignerSerializationServiceImpl.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.ComponentModel.Design.Serialization; 3 | using System.Windows.Forms; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | internal class DesignerSerializationServiceImpl : IDesignerSerializationService 9 | { 10 | private IServiceProvider _serviceProvider; 11 | 12 | public DesignerSerializationServiceImpl(IServiceProvider serviceProvider) 13 | { 14 | _serviceProvider = serviceProvider; 15 | } 16 | 17 | public ICollection Deserialize(object serializationData) 18 | { 19 | SerializationStore serializationStore = serializationData as SerializationStore; 20 | if (serializationStore != null) 21 | { 22 | ComponentSerializationService componentSerializationService = _serviceProvider.GetService(typeof(ComponentSerializationService)) as ComponentSerializationService; 23 | ICollection collection = componentSerializationService.Deserialize(serializationStore); 24 | return collection; 25 | } 26 | return new object[] {}; 27 | } 28 | 29 | public object Serialize(ICollection objects) 30 | { 31 | ComponentSerializationService componentSerializationService = _serviceProvider.GetService(typeof(ComponentSerializationService)) as ComponentSerializationService; 32 | SerializationStore returnObject = null; 33 | using (SerializationStore serializationStore = componentSerializationService.CreateStore()) 34 | { 35 | foreach (object obj in objects) 36 | { 37 | if (obj is Control) 38 | { 39 | componentSerializationService.Serialize(serializationStore, obj); 40 | } 41 | } 42 | returnObject = serializationStore; 43 | } 44 | return returnObject; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyDecimalConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Globalization; 3 | using System.Runtime.CompilerServices; 4 | using System; 5 | using ScriptEngine.Machine; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MyDecimalConverter : DecimalConverter 10 | { 11 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cultureInfo, object value, Type destinationType) 12 | { 13 | if (destinationType == typeof(string)) 14 | { 15 | string str1 = ((IValue)value).AsNumber().ToString(); 16 | return str1; 17 | } 18 | return base.ConvertTo(context, cultureInfo, RuntimeHelpers.GetObjectValue(value), destinationType); 19 | } 20 | 21 | public new static string ConvertToString(object value) 22 | { 23 | string str1 = value.ToString(); 24 | return str1; 25 | } 26 | 27 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 28 | { 29 | if (destinationType.Equals(typeof(string))) 30 | { 31 | return true; 32 | } 33 | return base.CanConvertTo(context, destinationType); 34 | } 35 | 36 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo cultureInfo, object value) 37 | { 38 | if (!(value is string)) 39 | { 40 | return base.ConvertFrom(context, cultureInfo, RuntimeHelpers.GetObjectValue(value)); 41 | } 42 | IValue rez = ValueFactory.Create(Decimal.Parse((string)value)); 43 | return rez; 44 | } 45 | 46 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 47 | { 48 | return true; 49 | } 50 | 51 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 52 | { 53 | return false; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /docs/kont.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Контакты 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 |
17 | 18 | 19 |
20 | 30 |
31 |
32 |
33 |
34 |

Алёшечкин Владимир Юрьевич, по образованию - инженер, химик-технолог.

35 |

36 | Последняя профессия - системный администратор. В настоящее время пенсионер. Программирование перестало 37 | быть работой и перешло в разряд увлечений. 38 |

39 |

40 | Свои замечания прошу высылать на Email: min6220@yandex.ru 41 |
или в телеграмм: @alesha_vlad 42 |

43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FolderBrowserDialog.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class FolderBrowserDialog : System.Windows.Forms.Timer 6 | { 7 | 8 | public FolderBrowserDialog() 9 | { 10 | } 11 | 12 | [DisplayName("ВыбранныйПуть")] 13 | [Description("Возвращает или задает путь, выбранный пользователем.")] 14 | [Category("Просмотр папок")] 15 | [Browsable(true)] 16 | public string SelectedPath { get; set; } 17 | 18 | [DisplayName("КорневойКаталог")] 19 | [Description("Возвращает или задает корневой каталог, с которой начинается просмотр.")] 20 | [Category("Просмотр папок")] 21 | [Browsable(true)] 22 | public SpecialFolder RootFolder { get; set; } 23 | 24 | [DisplayName("Описание")] 25 | [Description("Возвращает или задает описательный текст, отображаемый над элементом управления древовидного представления в диалоговом окне.")] 26 | [Category("Просмотр папок")] 27 | [Browsable(true)] 28 | public string Description { get; set; } 29 | 30 | [DisplayName("ПоказатьКнопкуНовогоКаталога")] 31 | [Description("Возвращает или задает значение, указывающее, появляется ли кнопка в диалоговом окне браузера папок.")] 32 | [Category("Просмотр папок")] 33 | [Browsable(true)] 34 | [TypeConverter(typeof(MyBooleanConverter))] 35 | public bool ShowNewFolderButton { get; set; } 36 | 37 | [Browsable(false)] 38 | [ReadOnly(true)] 39 | public new object Tag { get; set; } 40 | 41 | [Browsable(false)] 42 | [ReadOnly(true)] 43 | public new bool Enabled { get; set; } 44 | 45 | [Browsable(false)] 46 | [ReadOnly(true)] 47 | public new int Interval { get; set; } 48 | 49 | [Browsable(false)] 50 | public string DefaultValues { get; set; } 51 | 52 | [Browsable(false)] 53 | public string RequiredValues 54 | { 55 | get 56 | { 57 | return @""; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/UndoEngineExt.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.Design; 3 | using System.Diagnostics; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class UndoEngineExt : UndoEngine 9 | { 10 | private string _Name_ = "UndoEngineExt"; 11 | private Stack undoStack = new Stack(); 12 | private Stack redoStack = new Stack(); 13 | 14 | public UndoEngineExt (IServiceProvider provider) : base (provider) 15 | { 16 | } 17 | 18 | public bool EnableUndo 19 | { 20 | get { return undoStack.Count > 0; } 21 | } 22 | 23 | public bool EnableRedo 24 | { 25 | get { return redoStack.Count > 0; } 26 | } 27 | 28 | public void Undo() 29 | { 30 | if (undoStack.Count > 0) 31 | { 32 | try 33 | { 34 | UndoEngine.UndoUnit unit = undoStack.Pop(); 35 | unit.Undo(); 36 | redoStack.Push (unit); 37 | } 38 | catch (Exception ex) 39 | { 40 | Debug.WriteLine(_Name_ + ex.Message); 41 | } 42 | } 43 | } 44 | 45 | public void Redo() 46 | { 47 | if (redoStack.Count > 0) 48 | { 49 | try 50 | { 51 | UndoEngine.UndoUnit unit = redoStack.Pop(); 52 | unit.Undo(); 53 | undoStack.Push (unit); 54 | } 55 | catch (Exception ex) 56 | { 57 | Debug.WriteLine(_Name_ + ex.Message); 58 | } 59 | } 60 | } 61 | 62 | protected override void AddUndoUnit (UndoEngine.UndoUnit unit) 63 | { 64 | // Тут надо бы что нибудь понадежней придумать! и учесть языковые настройки. 65 | if (!unit.Name.Contains("Form")) 66 | { 67 | undoStack.Push(unit); 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyFormMenuConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design; 2 | using System.ComponentModel; 3 | using System.Globalization; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyFormMenuConverter : ReferenceConverter 9 | { 10 | public MyFormMenuConverter(Type type) : base(type) 11 | { 12 | } 13 | 14 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 15 | { 16 | if (destinationType == null) 17 | { 18 | throw new ArgumentNullException("destinationType"); 19 | } 20 | 21 | if (destinationType == typeof(string)) 22 | { 23 | if (value != null) 24 | { 25 | if (context != null) 26 | { 27 | IReferenceService refSvc = (IReferenceService)context.GetService(typeof(IReferenceService)); 28 | if (refSvc != null) 29 | { 30 | string name = refSvc.GetName(value); 31 | if (name != null) 32 | { 33 | return name; 34 | } 35 | } 36 | } 37 | if (!System.Runtime.InteropServices.Marshal.IsComObject(value) && value is IComponent) 38 | { 39 | IComponent comp = (IComponent)value; 40 | ISite site = comp.Site; 41 | if (site != null) 42 | { 43 | string name = site.Name; 44 | if (name != null) 45 | { 46 | return name; 47 | } 48 | } 49 | } 50 | return String.Empty; 51 | } 52 | return "(отсутствует)"; 53 | } 54 | 55 | return base.ConvertTo(context, culture, value, destinationType); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyButtonControlConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design; 2 | using System.ComponentModel; 3 | using System.Globalization; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class MyButtonControlConverter : ReferenceConverter 9 | { 10 | public MyButtonControlConverter(Type type) : base(type) 11 | { 12 | } 13 | 14 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 15 | { 16 | if (destinationType == null) 17 | { 18 | throw new ArgumentNullException("destinationType"); 19 | } 20 | 21 | if (destinationType == typeof(string)) 22 | { 23 | if (value != null) 24 | { 25 | if (context != null) 26 | { 27 | IReferenceService refSvc = (IReferenceService)context.GetService(typeof(IReferenceService)); 28 | if (refSvc != null) 29 | { 30 | string name = refSvc.GetName(value); 31 | if (name != null) 32 | { 33 | return name; 34 | } 35 | } 36 | } 37 | if (!System.Runtime.InteropServices.Marshal.IsComObject(value) && value is IComponent) 38 | { 39 | IComponent comp = (IComponent)value; 40 | ISite site = comp.Site; 41 | if (site != null) 42 | { 43 | string name = site.Name; 44 | if (name != null) 45 | { 46 | return name; 47 | } 48 | } 49 | } 50 | return String.Empty; 51 | } 52 | return "(отсутствует)"; 53 | } 54 | 55 | return base.ConvertTo(context, culture, value, destinationType); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.OneScriptFormsDesignerProperties.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OneScriptFormsDesigner Properties 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) Свойства

23 |
24 |
25 |
26 |

27 | Свойства класса ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) перечислены ниже. Полный 28 | список членов класса ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) смотрите в разделе ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) Члены. 29 |

30 |

Свойства

31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
ВизуальныеСтилиФормВключены (FormVisualStylesTurnOn)Возвращает значение, указывающее, включены ли для форм визуальные стили.
ДизайнерОткрыт (DesignerOpen)Возвращает значение, указывающее, состояние дизайнера.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ImageEntry.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | [DesignTimeVisible(false)] 9 | public class ImageEntry : Component 10 | { 11 | public System.Drawing.Image M_Bitmap; 12 | 13 | public ImageEntry() 14 | { 15 | } 16 | 17 | [DefaultValue(typeof(System.Drawing.Image), null)] 18 | [DisplayName("Изображение")] 19 | [Description("Возвращает изображение.")] 20 | [Category("Внешний вид")] 21 | [Browsable(true)] 22 | [TypeConverter(typeof(MyImageConverter))] 23 | [Editor(typeof(MyImageFileNameEditor), typeof(UITypeEditor))] 24 | [ReadOnly(true)] 25 | public System.Drawing.Image Image 26 | { 27 | get { return M_Bitmap; } 28 | set { M_Bitmap = value; } 29 | } 30 | 31 | [DisplayName("Путь")] 32 | [Description("Путь до файла изображения.")] 33 | [Category("Прочее")] 34 | [Browsable(true)] 35 | [DefaultValue(typeof(String), null)] 36 | [ReadOnly(true)] 37 | public string Path { get; set; } 38 | 39 | [Browsable(false)] 40 | public string FileName { get; set; } 41 | 42 | [DisplayName("ФорматФайлаИзображения")] 43 | [Description("Возвращает объект ФорматИзображения (ImageFormat), представляющий формат этого объекта изображения.")] 44 | [Category("Прочее")] 45 | [Browsable(true)] 46 | public System.Drawing.Imaging.ImageFormat RawFormat 47 | { 48 | get { return M_Bitmap.RawFormat; } 49 | } 50 | 51 | [DisplayName("ФорматПикселей")] 52 | [Description("Возвращает формат пикселей для этого объекта Изображение (Image).")] 53 | [Category("Прочее")] 54 | [Browsable(true)] 55 | public System.Drawing.Imaging.PixelFormat PixelFormat 56 | { 57 | get { return M_Bitmap.PixelFormat; } 58 | } 59 | 60 | [DisplayName("Размер")] 61 | [Description("Возвращает ширину и высоту объекта.")] 62 | [Category("Макет")] 63 | [Browsable(true)] 64 | [TypeConverter(typeof(MySizeConverter))] 65 | [Editor(typeof(MySizeEditor), typeof(UITypeEditor))] 66 | public Size Size 67 | { 68 | get { return M_Bitmap.Size; } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /docs/howworks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Какэтоработает 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 |
17 | 18 | 19 |
20 | 30 |
31 |
32 |
33 |
34 |

Рекомендую ознакомиться со статьей на ресурсе infostart.ru - Как решать повседневные задачи с помощью OneScript здесь

35 |

Скачайте и установите 1Script - язык сценариев для специалистов по 1С (сайт) здесь

36 |
Дизайнер запускается следующим кодом: 37 |
38 |
39 | ПодключитьВнешнююКомпоненту(
40 |  "ВашКаталог\OneScriptFormsDesigner.dll");
41 | ДФ = Новый ДизайнерФормДляОдноСкрипта();
42 | ДФ.Дизайнер();
43 | 
44 |
45 |
46 |
Сохраните этот код в файл с расширением ".os".
47 |
48 | 49 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.Appendix.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Дополнения 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

Дополнения

23 |
24 |
25 |
26 |

Расширение файла не так важно

27 |

28 | OneScript выполнит сценарий если расширение файла вы зададите отличное от os, например zip. 29 | Кодовую страницу оставьте UTF-8, а расширение файла можете совсем не указывать. Сценарий всё равно сработает. 30 |

31 |

Свойства и методы дизайнера

32 |

У класса ДизайнерФормДляОдноСкрипта есть свойства и методы для организации автоматического тестирования.

33 |
34 | Свойства:
35 | ВизуальныеСтилиФормВключены (FormVisualStylesTurnOn)
36 | ДизайнерОткрыт (DesignerOpen)
37 | 
38 | Методы:
39 | ДобавитьКонтрол (AddControl)
40 | ЗакрытьДизайнер (CloseDesigner)
41 | ОткрытьФорму (LoadForm)
42 | ПолучитьЗначениеСвойства (GetPropertyValue)
43 | ПолучитьТипСвойства (GetPropertyType)
44 | СохранитьФорму (UnloadForm)
45 | СформироватьСценарий (GenerateScript)
46 | УдалитьКонтролы (RemoveControls)
47 | УстановитьСвойство (SetProperty)
48 | 
49 |

50 | В справке они не описаны. Приведу только ссылку на сценарий тестирования компонентов для версии дизайнера 1.2.0.0 в 51 | котором они задействованы (ТестДизайнера.os). 52 |

53 |

Таким образом размещать на форме компоненты, устанавливать значения свойств можно и программно.

54 |

55 |
56 | 57 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MySelectedObjectConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design; 2 | using System.ComponentModel; 3 | using System.Globalization; 4 | using System.Reflection; 5 | using System; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MySelectedObjectConverter : ReferenceConverter 10 | { 11 | dynamic Converter; 12 | 13 | public MySelectedObjectConverter(Type type) : base(type) 14 | { 15 | Type ConverterType = typeof(System.Windows.Forms.PropertyGrid).GetNestedType("SelectedObjectConverter", BindingFlags.NonPublic); 16 | var ConverterConstructor = ConverterType.GetConstructors()[0]; 17 | Converter = ConverterConstructor.Invoke(null); 18 | } 19 | 20 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 21 | { 22 | if (destinationType == null) 23 | { 24 | throw new ArgumentNullException("destinationType"); 25 | } 26 | 27 | if (destinationType == typeof(string)) 28 | { 29 | if (value != null) 30 | { 31 | if (context != null) 32 | { 33 | IReferenceService refSvc = (IReferenceService)context.GetService(typeof(IReferenceService)); 34 | if (refSvc != null) 35 | { 36 | string name = refSvc.GetName(value); 37 | if (name != null) 38 | { 39 | return name; 40 | } 41 | } 42 | } 43 | if (!System.Runtime.InteropServices.Marshal.IsComObject(value) && value is IComponent) 44 | { 45 | IComponent comp = (IComponent)value; 46 | ISite site = comp.Site; 47 | if (site != null) 48 | { 49 | string name = site.Name; 50 | if (name != null) 51 | { 52 | return name; 53 | } 54 | } 55 | } 56 | return String.Empty; 57 | } 58 | return "(отсутствует)"; 59 | } 60 | 61 | return Converter.ConvertTo(context, culture, value, destinationType); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyLocationConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing; 3 | using System.Globalization; 4 | using System.Runtime.CompilerServices; 5 | using System; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MyLocationConverter : TypeConverter 10 | { 11 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cultureInfo, object value, Type destinationType) 12 | { 13 | if (destinationType == typeof(string)) 14 | { 15 | string str1 = value.ToString(); 16 | str1 = str1.Replace("X", "Икс"); 17 | str1 = str1.Replace("Y", " Игрек"); 18 | 19 | return str1; 20 | } 21 | return base.ConvertTo(context, cultureInfo, RuntimeHelpers.GetObjectValue(value), destinationType); 22 | } 23 | 24 | public new static string ConvertToString(object value) 25 | { 26 | string str1 = value.ToString(); 27 | str1 = str1.Replace("X", "Икс"); 28 | str1 = str1.Replace("Y", " Игрек"); 29 | 30 | return str1; 31 | } 32 | 33 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 34 | { 35 | if (destinationType.Equals(typeof(string))) 36 | { 37 | return true; 38 | } 39 | return base.CanConvertTo(context, destinationType); 40 | } 41 | 42 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo cultureInfo, object value) 43 | { 44 | if (!(value is string)) 45 | { 46 | return base.ConvertFrom(context, cultureInfo, RuntimeHelpers.GetObjectValue(value)); 47 | } 48 | 49 | string[] stringSeparators = new string[] { ", " }; 50 | string[] result = Convert.ToString(value).Split(stringSeparators, StringSplitOptions.None); 51 | string _X = result[0]; 52 | _X = _X.Replace("{Икс=", ""); 53 | string _Y = result[1]; 54 | _Y = _Y.Replace("Игрек=", ""); 55 | _Y = _Y.Replace("}", ""); 56 | Point Point1 = new Point(Convert.ToInt32(_X), Convert.ToInt32(_Y)); 57 | 58 | return Point1; 59 | } 60 | 61 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 62 | { 63 | return true; 64 | } 65 | 66 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 67 | { 68 | return false; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OneScriptFormsDesigner 2 | Дизайнер форм для сценарного языка OneScript. 3 | 4 | В дополнение к [графическому интерфейсу](https://github.com/ahyahy/OneScriptForms) для сценарного языка OneScript написан представленный здесь дизайнер форм. 5 | 6 | ### Подробнее можно узнать на этом сайте 7 | 8 | > 9 | 10 | Он позволяет создавать формы, размещать на форме элементы управления, устанавливать их свойства, обработчики событий в виде не заполненных кодом процедур. Спроектированную форму можно сразу запустить на исполнение и увидеть результаты, или сохранить форму в скрипт с синтакисом OneScript, или сгенерировать и просмотреть код непосредственно в дизайнере. 11 | 12 | Как основная, ставилась цель полной русификации всех свойств компонентов и она достигнута. Исходными данными послужила справка из моего репозитория для OneScriptForms. Редакторы коллекций дизайнера не поддающиеся модификации были написаны с нуля. 13 | 14 | ![Дизайнер](https://github.com/ahyahy/OneScriptFormsDesigner/blob/main/docs/OneScriptFormsDesigner.png) 15 | 16 | Огромную помощь оказал пример работы с дизайнером [picoFormDesigner](https://www.codeproject.com/Articles/60175/The-DesignSurface-Extended-Class-is-Back-Together) (coded by Paolo Foti) под лицензией ([CPOL](https://www.codeproject.com/info/cpol10.aspx)). 17 | 18 | Предполагается, что OneScript на компьютере уже установлен. Дизайнер реализован в виде библиотеки и подключается как внешняя компонента. 19 | Скачайте из [каталога docs](https://github.com/ahyahy/OneScriptFormsDesigner/tree/main/docs) архив с именем формата OneScriptFormsDesignerх_х_х_х.zip. Скачайте последнюю версию. Поместите находящуюся в архиве библиотеку, в какой либо каталог на диске. Возможно будет необходимо правой кнопкой мыши вызвать свойства распакованного файла OneScriptFormsDesigner.dll и разблокировать его. 20 | Запустить можно так: 21 | 22 | ```bsl 23 | ПодключитьВнешнююКомпоненту("ВашКаталогНаДиске\OneScriptFormsDesigner.dll"); 24 | ДФ = Новый ДизайнерФормДляОдноСкрипта(); 25 | ДФ.Дизайнер(); 26 | ``` 27 | 28 | Формы можно сохранить в файл **osd** или в файл сценария **os** и в последующем восстановить для возобновления работы. 29 | 30 | **ВАЖНО:** Файлы для сборки библиотеки из исходников найдете в релизе, в архиве Solution.zip. Недостающие для решения (solution) библиотеки односкрипта находятся рядом, в архиве Release.zip. Репозиторий лучше не клонировать. Он не полный для получения всех необходимых для сборки файлов. Полный набор именно в архиве Solution.zip положенном в релиз, плюс архив Release.zip. Это связано с тем, что при создании релиза гитхабом искажаются некоторые данные. Вышел из положения пока таким способом. 31 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MySizeConverter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing; 3 | using System.Globalization; 4 | using System.Runtime.CompilerServices; 5 | using System; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MySizeConverter : TypeConverter 10 | { 11 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cultureInfo, object value, Type destinationType) 12 | { 13 | if (destinationType == typeof(string)) 14 | { 15 | string str1 = value.ToString(); 16 | str1 = str1.Replace("Width", "Ширина"); 17 | str1 = str1.Replace("Height", "Высота"); 18 | 19 | return str1; 20 | } 21 | return base.ConvertTo(context, cultureInfo, RuntimeHelpers.GetObjectValue(value), destinationType); 22 | } 23 | 24 | public new static string ConvertToString(object value) 25 | { 26 | string str1 = value.ToString(); 27 | str1 = str1.Replace("Width", "Ширина"); 28 | str1 = str1.Replace("Height", "Высота"); 29 | 30 | return str1; 31 | } 32 | 33 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 34 | { 35 | if (destinationType.Equals(typeof(string))) 36 | { 37 | return true; 38 | } 39 | return base.CanConvertTo(context, destinationType); 40 | } 41 | 42 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo cultureInfo, object value) 43 | { 44 | if (!(value is string)) 45 | { 46 | return base.ConvertFrom(context, cultureInfo, RuntimeHelpers.GetObjectValue(value)); 47 | } 48 | 49 | string[] stringSeparators = new string[] { ", " }; 50 | string[] result = Convert.ToString(value).Split(stringSeparators, StringSplitOptions.None); 51 | string _Width = result[0]; 52 | _Width = _Width.Replace("{Ширина=", ""); 53 | string _Height = result[1]; 54 | _Height = _Height.Replace("Высота=", ""); 55 | _Height = _Height.Replace("}", ""); 56 | Size Size1 = new Size(Convert.ToInt32(_Width), Convert.ToInt32(_Height)); 57 | 58 | return Size1; 59 | } 60 | 61 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 62 | { 63 | return true; 64 | } 65 | 66 | public override bool GetPropertiesSupported(ITypeDescriptorContext context) 67 | { 68 | return false; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ImageList.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | 5 | namespace osfDesigner 6 | { 7 | public class ImageList : System.Windows.Forms.Timer 8 | { 9 | public MyList _images = new MyList(); 10 | public System.Windows.Forms.ImageList M_ImageList; 11 | 12 | public ImageList() 13 | { 14 | M_ImageList = new System.Windows.Forms.ImageList(); 15 | } 16 | 17 | [Browsable(false)] 18 | public System.Windows.Forms.ImageList OriginalObj 19 | { 20 | get { return M_ImageList; } 21 | set { M_ImageList = value; } 22 | } 23 | 24 | [DisplayName("ГлубинаЦвета")] 25 | [Description("Возвращает или задает глубину цвета.")] 26 | [Category("Внешний вид")] 27 | [Browsable(true)] 28 | public ColorDepth ColorDepth 29 | { 30 | get { return (ColorDepth)M_ImageList.ColorDepth; } 31 | set { M_ImageList.ColorDepth = (System.Windows.Forms.ColorDepth)value; } 32 | } 33 | 34 | [DisplayName("Изображения")] 35 | [Description("Возвращает коллекцию Изображения (ImageCollection).")] 36 | [Category("Внешний вид")] 37 | [Browsable(true)] 38 | [TypeConverter(typeof(MyCollectionConverter))] 39 | [Editor(typeof(MyCollectionEditor), typeof(UITypeEditor))] 40 | public osfDesigner.MyList Images 41 | { 42 | get { return _images; } 43 | } 44 | 45 | [DisplayName("РазмерИзображения")] 46 | [Description("Возвращает или задает размер изображений в СписокИзображений (ImageList).")] 47 | [Category("Поведение")] 48 | [Browsable(true)] 49 | [TypeConverter(typeof(MySizeConverter))] 50 | [Editor(typeof(MySizeEditor), typeof(UITypeEditor))] 51 | public Size ImageSize 52 | { 53 | get { return M_ImageList.ImageSize; } 54 | set { M_ImageList.ImageSize = value; } 55 | } 56 | 57 | [Browsable(false)] 58 | [ReadOnly(true)] 59 | public new object Tag { get; set; } 60 | 61 | [Browsable(false)] 62 | [ReadOnly(true)] 63 | public new bool Enabled { get; set; } 64 | 65 | [Browsable(false)] 66 | [ReadOnly(true)] 67 | public new int Interval { get; set; } 68 | 69 | [Browsable(false)] 70 | public string DefaultValues { get; set; } 71 | 72 | [Browsable(false)] 73 | public string RequiredValues 74 | { 75 | get 76 | { 77 | return @" 78 | Изображения == 79 | "; 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ColumnHeader.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class ColumnHeader : System.Windows.Forms.ColumnHeader 6 | { 7 | 8 | public ColumnHeader() 9 | { 10 | } 11 | 12 | [DisplayName("ВыравниваниеТекста")] 13 | [Description("Возвращает или задает горизонтальное выравнивание текста, отображаемого в Колонка (ColumnHeader).")] 14 | [Category("Прочее")] 15 | [Browsable(true)] 16 | public new HorizontalAlignment TextAlign 17 | { 18 | get { return (HorizontalAlignment)base.TextAlign; } 19 | set { base.TextAlign = (System.Windows.Forms.HorizontalAlignment)value; } 20 | } 21 | 22 | [DisplayName("Текст")] 23 | [Description("Возвращает или задает текст, отображаемый в заголовке колонки.")] 24 | [Category("Прочее")] 25 | [Browsable(true)] 26 | public new string Text 27 | { 28 | get { return base.Text; } 29 | set { base.Text = value; } 30 | } 31 | 32 | [DisplayName("ТипСортировки")] 33 | [Description("Возвращает или задает тип сортировки.")] 34 | [Category("Прочее")] 35 | [Browsable(true)] 36 | public SortType SortType { get; set; } 37 | 38 | [DisplayName("Ширина")] 39 | [Description("Возвращает или задает ширину колонки.")] 40 | [Category("Прочее")] 41 | [Browsable(true)] 42 | public new int Width 43 | { 44 | get { return base.Width; } 45 | set { base.Width = value; } 46 | } 47 | 48 | [Browsable(false)] 49 | [ReadOnly(true)] 50 | public new int DisplayIndex { get; set; } 51 | 52 | [Browsable(false)] 53 | [ReadOnly(true)] 54 | public new int ImageIndex { get; set; } 55 | 56 | [Browsable(false)] 57 | [ReadOnly(true)] 58 | public new string ImageKey { get; set; } 59 | 60 | [DisplayName("(Name)")] 61 | [Description("Указывает имя, используемое в коде для идентификации объекта.")] 62 | [Category("Разработка")] 63 | [Browsable(true)] 64 | [ReadOnly(true)] 65 | public new string Name 66 | { 67 | get { return base.Name; } 68 | set { base.Name = value; } 69 | } 70 | 71 | [Browsable(false)] 72 | [ReadOnly(true)] 73 | public new object Tag { get; set; } 74 | 75 | [Browsable(false)] 76 | public string DefaultValues { get; set; } 77 | 78 | [Browsable(false)] 79 | public string RequiredValues 80 | { 81 | get 82 | { 83 | return @" 84 | Текст == 85 | "; 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/TabOrderHooker.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design; 2 | using System.Diagnostics; 3 | using System.Reflection; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | public class TabOrderHooker 9 | { 10 | public object _tabOrder = null; 11 | 12 | // Включает/отключает порядок обхода. 13 | public void HookTabOrder(IDesignerHost host) 14 | { 15 | // Порядок обхода должен быть вызван ПОСЛЕ загрузки поверхности проектирования, поэтому мы делаем небольшую проверку. 16 | if (null == host.RootComponent) 17 | { 18 | throw new Exception(@"TabOrderHooker::ctor() - Исключение: порядок вкладок должен быть вызван после загрузки поверхности дизайна!"); 19 | } 20 | 21 | try 22 | { 23 | Assembly designAssembly = Assembly.Load ("System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); 24 | Type tabOrderType = designAssembly.GetType("System.Windows.Forms.Design.TabOrder"); 25 | if (_tabOrder == null) 26 | { 27 | // Вызов конструктора. 28 | _tabOrder = Activator.CreateInstance(tabOrderType, new object[] { host }); 29 | } 30 | else 31 | { 32 | DisposeTabOrder(); 33 | } 34 | } 35 | catch(Exception exx) 36 | { 37 | Debug.WriteLine(exx.Message); 38 | if (null != exx.InnerException) 39 | { 40 | Debug.WriteLine(exx.InnerException.Message); 41 | } 42 | throw; 43 | } 44 | } 45 | 46 | // Управление порядком обхода. 47 | public void DisposeTabOrder() 48 | { 49 | if (null == _tabOrder) 50 | { 51 | return; 52 | } 53 | try 54 | { 55 | Assembly designAssembly = Assembly.Load ("System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); 56 | Type tabOrderType = designAssembly.GetType ("System.Windows.Forms.Design.TabOrder"); 57 | tabOrderType.InvokeMember ("Dispose", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, _tabOrder, new object[] { true }); 58 | _tabOrder = null; 59 | } 60 | catch(Exception exx) 61 | { 62 | Debug.WriteLine(exx.Message); 63 | if (null != exx.InnerException) 64 | { 65 | Debug.WriteLine(exx.InnerException.Message); 66 | } 67 | throw; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.Param.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Настройка 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

Настройка

23 |
24 |
25 |
26 |

Вызвав пункт подменю "Параметры" меню "Инструменты" произведите настройку дизайнера.

27 |

28 | В окне Параметры, строке Файлы укажите расположение двух файлов. Исполняемого файла виртуальной машины OneScript oscript.exe и 29 | файла библиотеки форм OneScriptForms.dll. Это сделает возможным запуск проектируемой формы через подменю Запуск меню Инструменты. 30 |

31 |
32 |
33 |
34 |
35 | Параметры - Файлы 36 | 41 |
42 |
Параметры - Файлы
43 |
44 |
45 |
46 |

В окне Параметры, строке Визуальные стили укажите включать ли визуальные стили для окна дизайнера и для разрабатываемой формы.

47 |
48 |
49 |
50 |
51 | Параметры - Визуальные стили 52 | 57 |
58 |
Параметры - Визуальные стили
59 |
60 |
61 |
62 |

.

63 |
64 | 65 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ListViewSubItem.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | 5 | namespace osfDesigner 6 | { 7 | public class ListViewSubItem : System.Windows.Forms.ListViewItem.ListViewSubItem 8 | { 9 | 10 | public ListViewSubItem() 11 | { 12 | } 13 | 14 | [DisplayName("ОсновнойЦвет")] 15 | [Description("Возвращает или задает цвет переднего плана текста подэлемента.")] 16 | [Category("Прочее")] 17 | [Browsable(true)] 18 | [TypeConverter(typeof(MyColorConverter))] 19 | [Editor(typeof(MyColorEditor), typeof(UITypeEditor))] 20 | public new Color ForeColor 21 | { 22 | get { return base.ForeColor; } 23 | set { base.ForeColor = value; } 24 | } 25 | 26 | [DisplayName("Текст")] 27 | [Description("Возвращает или задает текст подэлемента.")] 28 | [Category("Прочее")] 29 | [Browsable(true)] 30 | public new string Text 31 | { 32 | get { return base.Text; } 33 | set { base.Text = value; } 34 | } 35 | 36 | [DisplayName("ЦветФона")] 37 | [Description("Возвращает или задает цвет фона текста подэлемента.")] 38 | [Category("Прочее")] 39 | [Browsable(true)] 40 | [TypeConverter(typeof(MyColorConverter))] 41 | [Editor(typeof(MyColorEditor), typeof(UITypeEditor))] 42 | public new Color BackColor 43 | { 44 | get { return base.BackColor; } 45 | set { base.BackColor = value; } 46 | } 47 | 48 | [DisplayName("Шрифт")] 49 | [Description("Возвращает или задает шрифт текста, отображаемого подэлементом.")] 50 | [Category("Прочее")] 51 | [Browsable(true)] 52 | [TypeConverter(typeof(MyFontConverter))] 53 | public new Font Font 54 | { 55 | get { return base.Font; } 56 | set { base.Font = value; } 57 | } 58 | 59 | [Browsable(false)] 60 | public new dynamic Bounds { get; set; } 61 | 62 | [DisplayName("(Name)")] 63 | [Description("Указывает имя, используемое в коде для идентификации объекта.")] 64 | [Category("Разработка")] 65 | [Browsable(true)] 66 | [ReadOnly(true)] 67 | public new string Name 68 | { 69 | get { return base.Name; } 70 | set { base.Name = value; } 71 | } 72 | 73 | [Browsable(false)] 74 | public new dynamic Tag { get; set; } 75 | 76 | [Browsable(false)] 77 | public string DefaultValues { get; set; } 78 | 79 | [Browsable(false)] 80 | public string RequiredValues 81 | { 82 | get 83 | { 84 | return @" 85 | Текст == 86 | "; 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyDateTimeEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Drawing.Design; 4 | using System.Windows.Forms.Design; 5 | using System.Windows.Forms; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MyDateTimeEditor : UITypeEditor 10 | { 11 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 12 | { 13 | IWindowsFormsEditorService wfes = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; 14 | 15 | if (wfes != null) 16 | { 17 | frmDateTime _frmDateTime = new frmDateTime(); 18 | 19 | _frmDateTime.DateTimePicker1.Value = System.DateTime.Parse((string)value); 20 | _frmDateTime._wfes = wfes; 21 | _frmDateTime.Show(); 22 | 23 | wfes.DropDownControl(_frmDateTime); 24 | DateTime _DateTime1 = _frmDateTime.DateTimePicker1.Value; 25 | value = _DateTime1.ToString(); 26 | } 27 | return value; 28 | } 29 | 30 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 31 | { 32 | return UITypeEditorEditStyle.DropDown; 33 | } 34 | } 35 | 36 | public class frmDateTime : System.Windows.Forms.Form 37 | { 38 | public System.Windows.Forms.DateTimePicker DateTimePicker1; 39 | private Container components = null; 40 | public IWindowsFormsEditorService _wfes; 41 | 42 | public frmDateTime() 43 | { 44 | DateTimePicker1 = new System.Windows.Forms.DateTimePicker(); 45 | DateTimePicker1.Parent = this; 46 | DateTimePicker1.Dock = System.Windows.Forms.DockStyle.Fill; 47 | DateTimePicker1.CustomFormat = "dd.MM.yyyy"; 48 | DateTimePicker1.Format = DateTimePickerFormat.Custom; 49 | 50 | ControlBox = false; 51 | FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 52 | MaximizeBox = false; 53 | MinimizeBox = false; 54 | Name = "frmDateTime"; 55 | ShowInTaskbar = false; 56 | Closed += frmDateTime_Closed; 57 | Width = 200; 58 | Height = DateTimePicker1.Height; 59 | 60 | TopLevel = false; 61 | } 62 | 63 | private void frmDateTime_Closed(object sender, EventArgs e) 64 | { 65 | _wfes.CloseDropDown(); 66 | } 67 | 68 | protected override void Dispose(bool disposing) 69 | { 70 | if (disposing) 71 | { 72 | if (components != null) 73 | { 74 | components.Dispose(); 75 | } 76 | } 77 | base.Dispose(disposing); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Reflection; 3 | using System; 4 | 5 | namespace osfDesigner 6 | { 7 | public class Program 8 | { 9 | public static IDesignerMainForm pDesignerMainForm1 = null; 10 | 11 | public void Main() 12 | { 13 | // Предотвращение появления окна с текстом - Desktop applications are required to opt in to all earlier accessibility improvements to get the later improvements...... 14 | var type = Type.GetType("System.AppContext"); 15 | if (type != null) 16 | { 17 | var setSwitch = type.GetMethod("SetSwitch", BindingFlags.Public | BindingFlags.Static); 18 | setSwitch.Invoke(null, new object[] { "Switch.UseLegacyAccessibilityFeatures", false }); 19 | } 20 | 21 | // Можно получить путь до oscript.exe и таким способом, но нам ещё понадобится путь до OneScriptForms.dll, 22 | // поэтому воспользуемся osfDesigner.Properties.Settings, а это закомментируем пока. 23 | ////osfDesigner.Properties.Settings.Default["osPath"] = System.Windows.Forms.Application.ExecutablePath; 24 | 25 | // Создадим Форму. 26 | pDesignerMainForm f = new pDesignerMainForm(); 27 | pDesignerMainForm1 = f; 28 | f.Size = new Size(1200, 760); 29 | (f.pDesignerCore as IpDesigner).AddDesignSurface
(640, 480, AlignmentModeEnum.SnapLines, new Size(1, 1)); 30 | 31 | // Запускаем дизайнер. 32 | f.ShowDialog(); 33 | } 34 | 35 | public void MainPFL() 36 | { 37 | // Предотвращение появления окна с текстом - Desktop applications are required to opt in to all earlier accessibility improvements to get the later improvements...... 38 | var type = Type.GetType("System.AppContext"); 39 | if (type != null) 40 | { 41 | var setSwitch = type.GetMethod("SetSwitch", BindingFlags.Public | BindingFlags.Static); 42 | setSwitch.Invoke(null, new object[] { "Switch.UseLegacyAccessibilityFeatures", false }); 43 | } 44 | 45 | // Можно получить путь до oscript.exe и таким способом, но нам ещё понадобится путь до OneScriptForms.dll, 46 | // поэтому воспользуемся osfDesigner.Properties.Settings, а это закомментируем пока. 47 | ////osfDesigner.Properties.Settings.Default["osPath"] = System.Windows.Forms.Application.ExecutablePath; 48 | 49 | // Создадим Форму. 50 | pDesignerMainFormPFL f = new pDesignerMainFormPFL(); 51 | pDesignerMainForm1 = f; 52 | f.Size = new Size(1200, 760); 53 | (f.pDesignerCore as IpDesigner).AddDesignSurface(640, 480, AlignmentModeEnum.SnapLines, new Size(1, 1)); 54 | 55 | // Запускаем дизайнер. 56 | f.ShowDialog(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyDockEditor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Reflection; 4 | using System.Windows.Forms.Design; 5 | using System.Windows.Forms; 6 | using System; 7 | 8 | namespace osfDesigner 9 | { 10 | public class MyDockEditor : UITypeEditor 11 | { 12 | DockEditor editor; 13 | public MyDockEditor() 14 | { 15 | editor = new DockEditor(); 16 | } 17 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 18 | { 19 | Type dockUiType = typeof(DockEditor).GetNestedType("DockUI", BindingFlags.NonPublic); 20 | var dockUiConstructor = dockUiType.GetConstructors()[0]; 21 | var dockUiField = typeof(DockEditor).GetField("dockUI", BindingFlags.Instance | BindingFlags.NonPublic); 22 | var dockUiObject = dockUiConstructor.Invoke(new[] { editor }) as Control; 23 | dockUiField.SetValue(editor, dockUiObject); 24 | Control ContainerPlaceholder = dockUiObject.Controls[0]; 25 | System.Windows.Forms.CheckBox CheckBox0 = (System.Windows.Forms.CheckBox)dockUiObject.Controls[1]; 26 | System.Windows.Forms.CheckBox CheckBox1 = (System.Windows.Forms.CheckBox)ContainerPlaceholder.Controls[3]; 27 | System.Windows.Forms.CheckBox CheckBox2 = (System.Windows.Forms.CheckBox)ContainerPlaceholder.Controls[4]; 28 | System.Windows.Forms.CheckBox CheckBox3 = (System.Windows.Forms.CheckBox)ContainerPlaceholder.Controls[1]; 29 | System.Windows.Forms.CheckBox CheckBox4 = (System.Windows.Forms.CheckBox)ContainerPlaceholder.Controls[2]; 30 | System.Windows.Forms.CheckBox CheckBox5 = (System.Windows.Forms.CheckBox)ContainerPlaceholder.Controls[0]; 31 | var none = dockUiObject.Controls[1]; 32 | none.Text = "Отсутствие"; 33 | 34 | if ((int)value == 1) // верх 35 | { 36 | CheckBox1.Checked = true; 37 | } 38 | else if ((int)value == 2) // низ 39 | { 40 | CheckBox2.Checked = true; 41 | } 42 | else if ((int)value == 3) // лево 43 | { 44 | CheckBox3.Checked = true; 45 | } 46 | else if ((int)value == 4) // право 47 | { 48 | CheckBox4.Checked = true; 49 | } 50 | else if ((int)value == 5) // заполнение 51 | { 52 | CheckBox5.Checked = true; 53 | } 54 | else // отсутствие 55 | { 56 | CheckBox0.Checked = true; 57 | } 58 | 59 | return editor.EditValue(context, provider, value); 60 | } 61 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 62 | { 63 | return editor.GetEditStyle(context); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/IpDesigner.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | 4 | namespace osfDesigner 5 | { 6 | public enum AlignmentModeEnum : int { SnapLines = 0, Grid, GridWithoutSnapping, NoGuides }; 7 | 8 | // Интерфейс, используется для 9 | // * hosts: Toolbox;DesignSurfaces;PropertyGrid 10 | // * add/remove DesignSurfaces 11 | // * perform editing actions on active DesignSurface 12 | // 13 | public interface IpDesigner 14 | { 15 | // controls accessing section ----------------------------------------------------------- 16 | // +-------------+-----------------------------+-----------+ 17 | // |toolboxItem1 | ____ ____ ____ | | 18 | // |toolboxItem2 ||____|____|____|___________ +-----------+ 19 | // |toolboxItem3 || | | | | 20 | // | || | | | | 21 | // | TOOLBOX || DESIGNSURFACES | | PROPERTY | 22 | // | || | | GRID | 23 | // | ||__________________________| | | | 24 | // +-------------+-----------------------------+-----------+ 25 | System.Windows.Forms.ListBox Toolbox { get; set; } // TOOLBOX 26 | System.Windows.Forms.TabControl TabControlHostingDesignSurfaces { get; } // DESIGNSURFACES HOST 27 | PropertyGridHost PropertyGridHost { get; } // PROPERTYGRID 28 | 29 | // DesignSurfaces management section ----------------------------------------------------- 30 | DesignSurfaceExt2 ActiveDesignSurface { get; } 31 | // Создайте DesignSurface и rootComponent (элемент управления .NET) используя IDesignSurfaceExt.CreateRootComponent() 32 | // Если режим выравнивания не использует СЕТКУ, то параметр размера сетки игнорируется. 33 | // Примечание: 34 | // Общие параметры используются для определения типа элемента управления, который следует использовать в качестве корневого компонента. 35 | // TT запрашивается как производное от Control класса .NET. 36 | 37 | DesignSurfaceExt2 AddDesignSurface( 38 | int startingFormWidth, int startingFormHeight, 39 | AlignmentModeEnum alignmentMode, Size gridSize, 40 | string formName = null 41 | ) where TT : Control; 42 | void RemoveDesignSurface(DesignSurfaceExt2 activeSurface); 43 | 44 | // Раздел редактирования. 45 | void UndoOnDesignSurface(); 46 | void RedoOnDesignSurface(); 47 | void CutOnDesignSurface(); 48 | void CopyOnDesignSurface(); 49 | void PasteOnDesignSurface(); 50 | void DeleteOnDesignSurface(); 51 | void DeleteOnDesignSurfaceWithoutWarning(); 52 | void SwitchTabOrder(); 53 | 54 | //* 17.12.2021 perfolenta 55 | bool Dirty { get; } 56 | //*** 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Этот код создан программой. 4 | // Исполняемая версия:4.0.30319.42000 5 | // 6 | // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае 7 | // повторной генерации кода. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace osfDesigner.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("")] 29 | public string osPath { 30 | get { 31 | return ((string)(this["osPath"])); 32 | } 33 | set { 34 | this["osPath"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("")] 41 | public string dllPath { 42 | get { 43 | return ((string)(this["dllPath"])); 44 | } 45 | set { 46 | this["dllPath"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 53 | public bool visualSyleDesigner { 54 | get { 55 | return ((bool)(this["visualSyleDesigner"])); 56 | } 57 | set { 58 | this["visualSyleDesigner"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 65 | public bool visualSyleForms { 66 | get { 67 | return ((bool)(this["visualSyleForms"])); 68 | } 69 | set { 70 | this["visualSyleForms"] = value; 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Этот код создан программой. 4 | // Исполняемая версия:4.0.30319.42000 5 | // 6 | // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае 7 | // повторной генерации кода. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace osfDesigner.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. 17 | /// 18 | // Этот класс создан автоматически классом StronglyTypedResourceBuilder 19 | // с помощью такого средства, как ResGen или Visual Studio. 20 | // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen 21 | // с параметром /str или перестройте свой проект VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("osfDesigner.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Перезаписывает свойство CurrentUICulture текущего потока для всех 51 | /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/FontDialog.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | 5 | namespace osfDesigner 6 | { 7 | public class FontDialog : System.Windows.Forms.FontDialog 8 | { 9 | 10 | public FontDialog() 11 | { 12 | } 13 | 14 | [DisplayName("Цвет")] 15 | [Description("Возвращает или задает выбранный цвет.")] 16 | [Category("Данные")] 17 | [Browsable(true)] 18 | [TypeConverter(typeof(MyColorConverter))] 19 | [Editor(typeof(MyColorEditor), typeof(UITypeEditor))] 20 | public new Color Color 21 | { 22 | get { return base.Color; } 23 | set { base.Color = value; } 24 | } 25 | 26 | [DisplayName("Шрифт")] 27 | [Description("Возвращает или задает выбранный шрифт.")] 28 | [Category("Данные")] 29 | [Browsable(true)] 30 | [TypeConverter(typeof(MyFontConverter))] 31 | public new Font Font 32 | { 33 | get { return base.Font; } 34 | set { base.Font = value; } 35 | } 36 | 37 | [Browsable(false)] 38 | [ReadOnly(true)] 39 | public new bool AllowScriptChange { get; set; } 40 | 41 | [Browsable(false)] 42 | [ReadOnly(true)] 43 | public new bool AllowSimulations { get; set; } 44 | 45 | [Browsable(false)] 46 | [ReadOnly(true)] 47 | public new bool AllowVectorFonts { get; set; } 48 | 49 | [Browsable(false)] 50 | [ReadOnly(true)] 51 | public new bool AllowVerticalFonts { get; set; } 52 | 53 | [Browsable(false)] 54 | [ReadOnly(true)] 55 | public new bool FixedPitchOnly { get; set; } 56 | 57 | [Browsable(false)] 58 | [ReadOnly(true)] 59 | public new bool FontMustExist { get; set; } 60 | 61 | [Browsable(false)] 62 | [ReadOnly(true)] 63 | public new int MaxSize { get; set; } 64 | 65 | [Browsable(false)] 66 | [ReadOnly(true)] 67 | public new int MinSize { get; set; } 68 | 69 | [Browsable(false)] 70 | [ReadOnly(true)] 71 | public new bool ScriptsOnly { get; set; } 72 | 73 | [Browsable(false)] 74 | [ReadOnly(true)] 75 | public new bool ShowApply { get; set; } 76 | 77 | [Browsable(false)] 78 | [ReadOnly(true)] 79 | public new bool ShowColor { get; set; } 80 | 81 | [Browsable(false)] 82 | [ReadOnly(true)] 83 | public new bool ShowEffects { get; set; } 84 | 85 | [Browsable(false)] 86 | [ReadOnly(true)] 87 | public new bool ShowHelp { get; set; } 88 | 89 | [Browsable(false)] 90 | [ReadOnly(true)] 91 | public new object Tag { get; set; } 92 | 93 | [Browsable(false)] 94 | public string DefaultValues { get; set; } 95 | 96 | [Browsable(false)] 97 | public string RequiredValues 98 | { 99 | get 100 | { 101 | return @""; 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | public static class ExtensionMethods 4 | { 5 | public static void EnableContextMenu(this RichTextBox rtb) 6 | { 7 | if (rtb.ContextMenuStrip == null) 8 | { 9 | // Создайте контекстное меню без значков. 10 | ContextMenuStrip cms = new ContextMenuStrip(); 11 | cms.ShowImageMargin = false; 12 | 13 | // Добавьте опцию отмены. 14 | ToolStripMenuItem tsmiUndo = new ToolStripMenuItem("Отменить"); 15 | tsmiUndo.Click += (sender, e) => rtb.Undo(); 16 | cms.Items.Add(tsmiUndo); 17 | 18 | // Добавьте опцию Повтора. 19 | ToolStripMenuItem tsmiRedo = new ToolStripMenuItem("Вернуть"); 20 | tsmiRedo.Click += (sender, e) => rtb.Redo(); 21 | cms.Items.Add(tsmiRedo); 22 | 23 | // Добавьте разделитель. 24 | cms.Items.Add(new ToolStripSeparator()); 25 | 26 | // Добавьте опцию Вырезать (вырезает выделенный текст внутри поля richtextbox). 27 | ToolStripMenuItem tsmiCut = new ToolStripMenuItem("Вырезать"); 28 | tsmiCut.Click += (sender, e) => rtb.Cut(); 29 | cms.Items.Add(tsmiCut); 30 | 31 | // Добавьте опцию Копирования (копирует выделенный текст в поле richtextbox). 32 | ToolStripMenuItem tsmiCopy = new ToolStripMenuItem("Копировать"); 33 | tsmiCopy.Click += (sender, e) => rtb.Copy(); 34 | cms.Items.Add(tsmiCopy); 35 | 36 | // Добавьте опцию Вставки (добавляет текст из буфера обмена в поле richtextbox). 37 | ToolStripMenuItem tsmiPaste = new ToolStripMenuItem("Вставить"); 38 | tsmiPaste.Click += (sender, e) => rtb.Paste(); 39 | cms.Items.Add(tsmiPaste); 40 | 41 | // Добавьте опцию Удаления (удалите выделенный текст в поле richtextbox). 42 | ToolStripMenuItem tsmiDelete = new ToolStripMenuItem("Удалить"); 43 | tsmiDelete.Click += (sender, e) => rtb.SelectedText = ""; 44 | cms.Items.Add(tsmiDelete); 45 | 46 | // Добавьте разделитель. 47 | cms.Items.Add(new ToolStripSeparator()); 48 | 49 | // Добавьте опцию <Выбрать все> (выделяет весь текст внутри поля richtextbox). 50 | ToolStripMenuItem tsmiSelectAll = new ToolStripMenuItem("Выбрать всё"); 51 | tsmiSelectAll.Click += (sender, e) => rtb.SelectAll(); 52 | cms.Items.Add(tsmiSelectAll); 53 | 54 | // При открытии меню проверьте, выполнено ли условие, чтобы включить действие. 55 | cms.Opening += (sender, e) => 56 | { 57 | tsmiUndo.Enabled = !rtb.ReadOnly && rtb.CanUndo; 58 | tsmiRedo.Enabled = !rtb.ReadOnly && rtb.CanRedo; 59 | tsmiCut.Enabled = !rtb.ReadOnly && rtb.SelectionLength > 0; 60 | tsmiCopy.Enabled = rtb.SelectionLength > 0; 61 | tsmiPaste.Enabled = !rtb.ReadOnly && Clipboard.ContainsText(); 62 | tsmiDelete.Enabled = !rtb.ReadOnly && rtb.SelectionLength > 0; 63 | tsmiSelectAll.Enabled = rtb.TextLength > 0 && rtb.SelectionLength < rtb.TextLength; 64 | }; 65 | 66 | rtb.ContextMenuStrip = cms; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyIconEditor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | using System.IO; 5 | using System.Runtime.InteropServices; 6 | using System.Windows.Forms.Design; 7 | using System.Windows.Forms; 8 | using System; 9 | 10 | namespace osfDesigner 11 | { 12 | class MyIconEditor : IconEditor 13 | { 14 | private FileDialog _fileDialog; 15 | [DllImport("user32.dll")] static extern IntPtr GetFocus(); 16 | [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr SetFocus(IntPtr hWnd); 17 | 18 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 19 | { 20 | if (provider == null) 21 | { 22 | return value; 23 | } 24 | 25 | var edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); 26 | if (edSvc == null) 27 | { 28 | return value; 29 | } 30 | 31 | if (_fileDialog == null) 32 | { 33 | _fileDialog = new System.Windows.Forms.OpenFileDialog(); 34 | var filter = CreateFilterEntry(this); 35 | _fileDialog.Filter = filter; 36 | } 37 | 38 | IntPtr hwndFocus = GetFocus(); 39 | try 40 | { 41 | if (_fileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) 42 | { 43 | var file = new FileStream(_fileDialog.FileName, FileMode.Open, FileAccess.Read, FileShare.Read); 44 | value = LoadFromStream(file); 45 | } 46 | else 47 | { 48 | return ((dynamic)context.Instance).Icon; 49 | } 50 | } 51 | finally 52 | { 53 | if (hwndFocus != IntPtr.Zero) 54 | { 55 | SetFocus(hwndFocus); 56 | } 57 | } 58 | 59 | MyIcon MyIcon1 = new MyIcon((dynamic)value); 60 | MyIcon1.M_Icon = (dynamic)value; 61 | MyIcon1.Path = _fileDialog.FileName; 62 | return MyIcon1; 63 | } 64 | 65 | public override void PaintValue(PaintValueEventArgs e) 66 | { 67 | if (((dynamic)e.Value).M_Icon.GetType() != typeof(Icon)) 68 | { 69 | return; 70 | } 71 | 72 | Icon icon = ((MyIcon)e.Value).M_Icon; 73 | 74 | // Если значок меньше прямоугольника, просто отцентруйте его в прямоугольнике. 75 | Rectangle rectangle = e.Bounds; 76 | if (icon.Width < rectangle.Width) 77 | { 78 | rectangle.X = (rectangle.Width - icon.Width) / 2; 79 | rectangle.Width = icon.Width; 80 | } 81 | if (icon.Height < rectangle.Height) 82 | { 83 | rectangle.X = (rectangle.Height - icon.Height) / 2; 84 | rectangle.Height = icon.Height; 85 | } 86 | e.Graphics.DrawIcon(icon, rectangle); 87 | } 88 | 89 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 90 | { 91 | return UITypeEditorEditStyle.Modal; 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.OneScriptFormsDesigner.DesignerOpen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DesignerOpen Property 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

ДизайнерОткрыт (DesignerOpen) Свойство

23 |
24 |
25 |
26 |

Использование

27 |

Только чтение.

28 |

Значение

29 |

Тип: Булево.

30 |

Возвращает значение, указывающее, состояние дизайнера.

31 |

Примечание

32 |

33 |

Пример

34 |

35 |

36 | Сообщить("Дизайнер открыт = " + ДФ.ДизайнерОткрыт);
37 | 
38 |
39 | Полный пример кода 40 |

41 |

42 | Копировать     Выделить всё
43 | 
44 | ПодключитьВнешнююКомпоненту("C:\444\111\OneScriptFormsDesigner\OneScriptFormsDesigner\bin\Debug\OneScriptFormsDesigner.dll"); 45 | ДФ = Новый ДизайнерФормДляОдноСкрипта(); 46 | Сообщить("Дизайнер открыт = " + ДФ.ДизайнерОткрыт); 47 |
48 |
49 |
50 |

51 | 78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ListItemComboBox.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System; 3 | 4 | namespace osfDesigner 5 | { 6 | public class ListItemComboBox : FilterablePropertyBase 7 | { 8 | private string M_Text; 9 | private object M_Value; 10 | 11 | public ListItemComboBox() 12 | { 13 | } 14 | 15 | [DisplayName("ТипЗначения")] 16 | [Description("Указывает тип значения элемента.")] 17 | [Category("Прочее")] 18 | [Browsable(true)] 19 | public DataType ValueType { get; set; } 20 | 21 | [DisplayName("Текст")] 22 | [Description("Возвращает или задает текст, отображаемый в элементе списка.")] 23 | [Category("Прочее")] 24 | [Browsable(true)] 25 | [ReadOnly(true)] 26 | public string Text 27 | { 28 | get { return M_Text; } 29 | set { M_Text = value; } 30 | } 31 | 32 | [Browsable(false)] 33 | public object Value 34 | { 35 | get { return M_Value; } 36 | set 37 | { 38 | M_Value = value; 39 | if (value.GetType() == typeof(bool)) 40 | { 41 | if ((bool)value) 42 | { 43 | M_Text = "Истина"; 44 | } 45 | else 46 | { 47 | M_Text = "Ложь"; 48 | } 49 | } 50 | else 51 | { 52 | M_Text = Convert.ToString(M_Value); 53 | } 54 | } 55 | } 56 | 57 | [DisplayName("Значение")] 58 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 59 | [Category("Прочее")] 60 | [TypeConverter(typeof(MyBooleanConverter))] 61 | [DynamicPropertyFilter("ValueType", "Булево")] 62 | public bool ValueBool 63 | { 64 | get { return (bool)Value; } 65 | set { Value = value; } 66 | } 67 | 68 | [DisplayName("Значение")] 69 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 70 | [Category("Прочее")] 71 | [DynamicPropertyFilter("ValueType", "Дата")] 72 | public DateTime ValueDateTime 73 | { 74 | get { return (DateTime)Value; } 75 | set { Value = value; } 76 | } 77 | 78 | [DisplayName("Значение")] 79 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 80 | [Category("Прочее")] 81 | [DynamicPropertyFilter("ValueType", "Строка")] 82 | public string ValueString 83 | { 84 | get { return (string)Value; } 85 | set { Value = value; } 86 | } 87 | 88 | [DisplayName("Значение")] 89 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem). Для разделения разрядов используйте запятую.")] 90 | [Category("Прочее")] 91 | [DynamicPropertyFilter("ValueType", "Число")] 92 | [DefaultValue(0)] 93 | public decimal ValueNumber 94 | { 95 | get { return Convert.ToDecimal(Value); } 96 | set { Value = value; } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/ListItemListBox.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System; 3 | 4 | namespace osfDesigner 5 | { 6 | public class ListItemListBox : FilterablePropertyBase 7 | { 8 | private string M_Text; 9 | private object M_Value; 10 | 11 | public ListItemListBox() 12 | { 13 | } 14 | 15 | [DisplayName("ТипЗначения")] 16 | [Description("Указывает тип значения элемента.")] 17 | [Category("Прочее")] 18 | [Browsable(true)] 19 | public DataType ValueType { get; set; } 20 | 21 | [DisplayName("Текст")] 22 | [Description("Возвращает или задает текст, отображаемый в элементе списка.")] 23 | [Category("Прочее")] 24 | [Browsable(true)] 25 | [ReadOnly(true)] 26 | public string Text 27 | { 28 | get { return M_Text; } 29 | set { M_Text = value; } 30 | } 31 | 32 | [Browsable(false)] 33 | public object Value 34 | { 35 | get { return M_Value; } 36 | set 37 | { 38 | M_Value = value; 39 | if (value.GetType() == typeof(bool)) 40 | { 41 | if ((bool)value) 42 | { 43 | M_Text = "Истина"; 44 | } 45 | else 46 | { 47 | M_Text = "Ложь"; 48 | } 49 | } 50 | else 51 | { 52 | M_Text = Convert.ToString(M_Value); 53 | } 54 | } 55 | } 56 | 57 | [DisplayName("Значение")] 58 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 59 | [Category("Прочее")] 60 | [TypeConverter(typeof(MyBooleanConverter))] 61 | [DynamicPropertyFilter("ValueType", "Булево")] 62 | public bool ValueBool 63 | { 64 | get { return (bool)Value; } 65 | set { Value = value; } 66 | } 67 | 68 | [DisplayName("Значение")] 69 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 70 | [Category("Прочее")] 71 | [DynamicPropertyFilter("ValueType", "Дата")] 72 | public DateTime ValueDateTime 73 | { 74 | get { return (DateTime)Value; } 75 | set { Value = value; } 76 | } 77 | 78 | [DisplayName("Значение")] 79 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem).")] 80 | [Category("Прочее")] 81 | [DynamicPropertyFilter("ValueType", "Строка")] 82 | public string ValueString 83 | { 84 | get { return (string)Value; } 85 | set { Value = value; } 86 | } 87 | 88 | [DisplayName("Значение")] 89 | [Description("Возвращает или задает значение, связанное с ЭлементСписка (ListItem). Для разделения разрядов используйте запятую.")] 90 | [Category("Прочее")] 91 | [DynamicPropertyFilter("ValueType", "Число")] 92 | [DefaultValue(0)] 93 | public decimal ValueNumber 94 | { 95 | get { return Convert.ToDecimal(Value); } 96 | set { Value = value; } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.Naming.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Имена компонентов 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

Имена компонентов

23 |
24 |
25 |
26 |

27 | Именование компонентов производится по определенному алгоритму, и не разрешено редактировать. Имеется в виду именно свойство Name. 28 | Свойство Текст можно изменять. 29 |

30 |

Исключением является имя формы, так как мы форму можно загрузить сохраненную из предыдущего сеанса работы.

31 |

32 |
33 |
34 |
35 |
36 | Имя формы 37 | 42 |
43 |
Имя формы
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Имя кнопки 52 | 57 |
58 |
Имя кнопки
59 |
60 |
61 |
62 |

63 |

При открытии сохраненной формы есть возможность до открытия задать новое имя для формы.

64 |

65 |
66 |
67 |
68 |
69 | Имя загружаемой формы 70 | 75 |
76 |
Имя загружаемой формы
77 |
78 |
79 |
80 |

81 |

При именовании компонентов соблюдайте те же правила, что и при именовании переменных в языке OneScript.

82 |
83 | 84 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.OneScriptFormsDesigner.FormVisualStylesTurnOn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FormVisualStylesTurnOn Property 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

ВизуальныеСтилиФормВключены (FormVisualStylesTurnOn) Свойство

23 |
24 |
25 |
26 |

Использование

27 |

Только чтение.

28 |

Значение

29 |

Тип: Булево.

30 |

Возвращает значение, указывающее, включены ли для форм визуальные стили.

31 |

Примечание

32 |

33 |

Пример

34 |

35 |

36 | Сообщить("ВизуальныеСтилиФормВключены = " + ДФ.ВизуальныеСтилиФормВключены);
37 | 
38 |
39 | Полный пример кода 40 |

41 |

42 | Копировать     Выделить всё
43 | 
44 | ПодключитьВнешнююКомпоненту("C:\444\111\OneScriptFormsDesigner\OneScriptFormsDesigner\bin\Debug\OneScriptFormsDesigner.dll"); 45 | ДФ = Новый ДизайнерФормДляОдноСкрипта(); 46 | Сообщить("ВизуальныеСтилиФормВключены = " + ДФ.ВизуальныеСтилиФормВключены); 47 |
48 |
49 |
50 |

51 | 78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyCursorConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Globalization; 4 | using System.Runtime.CompilerServices; 5 | using System.Windows.Forms; 6 | using System; 7 | 8 | namespace osfDesigner 9 | { 10 | public class MyCursorConverter : CursorConverter 11 | { 12 | static TypeConverter cursorConverter = TypeDescriptor.GetConverter(typeof(Cursor)); 13 | public static Dictionary cursors = new Dictionary 14 | { 15 | {"NoMove2D", "БезДвижения2D"}, 16 | {"NoMoveVert", "БезДвиженияВертикально"}, 17 | {"NoMoveHoriz", "БезДвиженияГоризонтально"}, 18 | {"VSplit", "ВРазделитель"}, 19 | {"HSplit", "ГРазделитель"}, 20 | {"PanEast", "КурсорВ"}, 21 | {"PanWest", "КурсорЗ"}, 22 | {"WaitCursor", "КурсорОжидания"}, 23 | {"PanNorth", "КурсорС"}, 24 | {"PanNE", "КурсорСВ"}, 25 | {"PanNW", "КурсорСЗ"}, 26 | {"PanSouth", "КурсорЮ"}, 27 | {"PanSE", "КурсорЮВ"}, 28 | {"PanSW", "КурсорЮЗ"}, 29 | {"Hand", "Ладонь"}, 30 | {"IBeam", "Луч"}, 31 | {"No", "Нет"}, 32 | {"Cross", "Перекрестие"}, 33 | {"Default", "ПоУмолчанию"}, 34 | {"AppStarting", "ПриСтарте"}, 35 | {"SizeWE", "РазмерЗВ"}, 36 | {"SizeNESW", "РазмерСВЮЗ"}, 37 | {"SizeNWSE", "РазмерСЗЮВ"}, 38 | {"SizeNS", "РазмерСЮ"}, 39 | {"SizeAll", "РазмерЧетырехконечный"}, 40 | {"Help", "Справка"}, 41 | {"Arrow", "Стрелка"}, 42 | {"UpArrow", "СтрелкаВверх"} 43 | }; 44 | 45 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 46 | { 47 | return true; 48 | } 49 | 50 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 51 | { 52 | if (destinationType.Equals(typeof(string))) 53 | { 54 | return true; 55 | } 56 | return base.CanConvertTo(context, destinationType); 57 | } 58 | 59 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cultureInfo, object value, Type destinationType) 60 | { 61 | if (destinationType == typeof(string)) 62 | { 63 | string cursorName = cursorConverter.ConvertToString(value); 64 | try 65 | { 66 | return cursors[cursorName]; 67 | } 68 | catch 69 | { 70 | return cursorName; 71 | } 72 | } 73 | return base.ConvertTo(context, cultureInfo, RuntimeHelpers.GetObjectValue(value), destinationType); 74 | } 75 | 76 | public new static string ConvertToString(object value) 77 | { 78 | string cursorName = cursorConverter.ConvertToString(value); 79 | try 80 | { 81 | return cursors[cursorName]; 82 | } 83 | catch 84 | { 85 | return cursorName; 86 | } 87 | } 88 | 89 | public override bool GetStandardValuesSupported(ITypeDescriptorContext context) 90 | { 91 | return true; 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DesignerOptionServiceExt.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Design; 2 | using System.Drawing; 3 | using System.Windows.Forms.Design; 4 | 5 | namespace osfDesigner 6 | { 7 | internal class DesignerOptionServiceExt4SnapLines : DesignerOptionService 8 | { 9 | public DesignerOptionServiceExt4SnapLines() : base() { } 10 | 11 | protected override void PopulateOptionCollection(DesignerOptionCollection options) 12 | { 13 | if (null != options.Parent) 14 | { 15 | return; 16 | } 17 | 18 | DesignerOptions ops = new DesignerOptions(); 19 | ops.UseSnapLines = true; 20 | ops.UseSmartTags = true; 21 | DesignerOptionCollection wfd = CreateOptionCollection(options, "WindowsFormsDesigner", null); 22 | CreateOptionCollection(wfd, "General", ops); 23 | } 24 | } 25 | 26 | internal class DesignerOptionServiceExt4Grid : DesignerOptionService 27 | { 28 | private Size _gridSize; 29 | 30 | public DesignerOptionServiceExt4Grid(Size gridSize) : base() { _gridSize = gridSize; } 31 | 32 | protected override void PopulateOptionCollection(DesignerOptionCollection options) 33 | { 34 | if (null != options.Parent) 35 | { 36 | return; 37 | } 38 | 39 | DesignerOptions ops = new DesignerOptions(); 40 | ops.GridSize = _gridSize; 41 | ops.SnapToGrid = true; 42 | ops.ShowGrid = true; 43 | ops.UseSnapLines = false; 44 | ops.UseSmartTags = true; 45 | DesignerOptionCollection wfd = CreateOptionCollection(options, "WindowsFormsDesigner", null); 46 | CreateOptionCollection(wfd, "General", ops); 47 | } 48 | } 49 | 50 | internal class DesignerOptionServiceExt4GridWithoutSnapping : DesignerOptionService 51 | { 52 | private Size _gridSize; 53 | 54 | public DesignerOptionServiceExt4GridWithoutSnapping(Size gridSize) : base() { _gridSize = gridSize; } 55 | 56 | protected override void PopulateOptionCollection(DesignerOptionCollection options) 57 | { 58 | if (null != options.Parent) 59 | { 60 | return; 61 | } 62 | 63 | DesignerOptions ops = new DesignerOptions(); 64 | ops.GridSize = _gridSize; 65 | ops.SnapToGrid = false; 66 | ops.ShowGrid = true; 67 | ops.UseSnapLines = false; 68 | ops.UseSmartTags = true; 69 | DesignerOptionCollection wfd = CreateOptionCollection(options, "WindowsFormsDesigner", null); 70 | CreateOptionCollection(wfd, "General", ops); 71 | } 72 | } 73 | 74 | internal class DesignerOptionServiceExt4NoGuides : DesignerOptionService 75 | { 76 | public DesignerOptionServiceExt4NoGuides() : base() { } 77 | 78 | protected override void PopulateOptionCollection(DesignerOptionCollection options) 79 | { 80 | if (null != options.Parent) 81 | { 82 | return; 83 | } 84 | 85 | DesignerOptions ops = new DesignerOptions(); 86 | ops.GridSize = new Size(8, 8); 87 | ops.SnapToGrid = false; 88 | ops.ShowGrid = false; 89 | ops.UseSnapLines = false; 90 | ops.UseSmartTags = true; 91 | DesignerOptionCollection wfd = CreateOptionCollection(options, "WindowsFormsDesigner", null); 92 | CreateOptionCollection(wfd, "General", ops); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.OneScriptFormsDesignerConstructor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OneScriptFormsDesigner Constructor 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

ДизайнерФормДляОдноСкрипта (OneScriptFormsDesigner) Конструктор

23 |
24 |
25 |
26 |

Синтаксис

27 |

Дизайнер(<Параметр>)

28 |

Параметры

29 |
30 |
Параметр (необязательный)
31 |
Тип: Строка.
32 |
Состояние окна консоли.
33 |
34 |

Описание

35 |

Параметр может принимать одно из двух строковых значений: ВосстановитьКонсоль и СкрытьКонсоль.

36 |

Примечание

37 |

38 |

Пример

39 |

40 |

41 | ДФ.Дизайнер("ВосстановитьКонсоль"); // окно консоли развёрнуто
42 | ДФ.Дизайнер("СкрытьКонсоль"); // окно консоли скрыто
43 | ДФ.Дизайнер(); // окно консоли минимизировано
44 | 
45 |
46 | Полный пример кода 47 |

48 |

49 | Копировать     Выделить всё
50 | 
51 | ПодключитьВнешнююКомпоненту("ВашКаталогНаДиске\OneScriptFormsDesigner.dll"); 52 | ДФ = Новый ДизайнерФормДляОдноСкрипта(); 53 | ДФ.Дизайнер(); 54 |
55 |
56 |
57 |

58 | 85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/NotifyIcon.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | 4 | namespace osfDesigner 5 | { 6 | public class NotifyIcon : System.Windows.Forms.Timer 7 | { 8 | 9 | private MyIcon _icon; 10 | 11 | public NotifyIcon() 12 | { 13 | } 14 | 15 | [DisplayName("ДвойноеНажатие")] 16 | [Description("Возвращает или задает код для выполнения, когда пользователь дважды щелкает значок в области уведомлений на панели задач.")] 17 | [Category("Прочее")] 18 | [Browsable(true)] 19 | public string DoubleClick_osf { get; set; } 20 | 21 | [DisplayName("Значок")] 22 | [Description("Возвращает или задает текущий значок.")] 23 | [Category("Внешний вид")] 24 | [Browsable(true)] 25 | [TypeConverter(typeof(MyIconConverter))] 26 | [Editor(typeof(MyIconEditor), typeof(UITypeEditor))] 27 | [DefaultValue(null)] 28 | public MyIcon Icon 29 | { 30 | get { return _icon; } 31 | set { _icon = value; } 32 | } 33 | 34 | [DisplayName("Нажатие")] 35 | [Description("Возвращает или задает код для выполнения, когда пользователь щелкает значок в области уведомлений.")] 36 | [Category("Прочее")] 37 | [Browsable(true)] 38 | public string Click_osf { get; set; } 39 | 40 | [DisplayName("Отображать")] 41 | [Description("Возвращает или задает значение, определяющее видимость значка в области уведомлений на панели задач.")] 42 | [Category("Поведение")] 43 | [Browsable(true)] 44 | [TypeConverter(typeof(MyBooleanConverter))] 45 | public bool Visible { get; set; } 46 | 47 | [DisplayName("ПриНажатииКнопкиМыши")] 48 | [Description("Возвращает или задает код для выполнения, когда пользователь нажимает кнопку мыши, а указатель мыши находится на значке в области уведомлений панели задач.")] 49 | [Category("Прочее")] 50 | [Browsable(true)] 51 | public string MouseDown_osf { get; set; } 52 | 53 | [DisplayName("ПриОтпусканииМыши")] 54 | [Description("Возвращает или задает код для выполнения, когда пользователь отпускает кнопку мыши, а указатель мыши находится на значке в области уведомлений панели задач.")] 55 | [Category("Прочее")] 56 | [Browsable(true)] 57 | public string MouseUp_osf { get; set; } 58 | 59 | [DisplayName("ПриПеремещенииМыши")] 60 | [Description("Возвращает или задает код для выполнения, когда пользователь перемещает мыши, в то время как указатель находится над значком в области уведомлений панели задач.")] 61 | [Category("Прочее")] 62 | [Browsable(true)] 63 | public string MouseMove_osf { get; set; } 64 | 65 | [DisplayName("Текст")] 66 | [Description("Возвращает или задает текст подсказки, отображаемый при наведении указателя мыши на значок в области уведомлений.")] 67 | [Category("Внешний вид")] 68 | [Browsable(true)] 69 | public string Text { get; set; } 70 | 71 | [Browsable(false)] 72 | [ReadOnly(true)] 73 | public new object Tag { get; set; } 74 | 75 | [Browsable(false)] 76 | [ReadOnly(true)] 77 | public new bool Enabled { get; set; } 78 | 79 | [Browsable(false)] 80 | [ReadOnly(true)] 81 | public new int Interval { get; set; } 82 | 83 | [Browsable(false)] 84 | public string DefaultValues { get; set; } 85 | 86 | [Browsable(false)] 87 | public string RequiredValues 88 | { 89 | get 90 | { 91 | return @""; 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using System; 4 | 5 | namespace osfDesigner 6 | { 7 | public class MyList : IList, IList 8 | { 9 | List _list = new List(); 10 | 11 | public ImageEntry this[int index] 12 | { 13 | get { return ((IList)_list)[index]; } 14 | set { ((IList)_list)[index] = value; } 15 | } 16 | 17 | object IList.this[int index] 18 | { 19 | get { return ((IList)_list)[index]; } 20 | set { ((IList)_list)[index] = value; } 21 | } 22 | 23 | public int Count 24 | { 25 | get { return ((IList)_list).Count; } 26 | } 27 | 28 | public bool IsFixedSize 29 | { 30 | get { return ((IList)_list).IsFixedSize; } 31 | } 32 | 33 | public bool IsReadOnly 34 | { 35 | get { return ((IList)_list).IsReadOnly; } 36 | } 37 | 38 | public bool IsSynchronized 39 | { 40 | get { return ((IList)_list).IsSynchronized; } 41 | } 42 | 43 | public object SyncRoot 44 | { 45 | get { return ((IList)_list).SyncRoot; } 46 | } 47 | 48 | public int Add(object value) 49 | { 50 | return ((IList)_list).Add(value); 51 | } 52 | 53 | public void Add(ImageEntry item) 54 | { 55 | ((IList)_list).Add(item); 56 | } 57 | 58 | public void Clear() 59 | { 60 | ((IList)_list).Clear(); 61 | } 62 | 63 | public bool Contains(object value) 64 | { 65 | return ((IList)_list).Contains(value); 66 | } 67 | 68 | public bool Contains(ImageEntry item) 69 | { 70 | return ((IList)_list).Contains(item); 71 | } 72 | 73 | public void CopyTo(Array array, int index) 74 | { 75 | ((IList)_list).CopyTo(array, index); 76 | } 77 | 78 | public void CopyTo(ImageEntry[] array, int arrayIndex) 79 | { 80 | ((IList)_list).CopyTo(array, arrayIndex); 81 | } 82 | 83 | public IEnumerator GetEnumerator() 84 | { 85 | return ((IList)_list).GetEnumerator(); 86 | } 87 | 88 | public int IndexOf(object value) 89 | { 90 | return ((IList)_list).IndexOf(value); 91 | } 92 | 93 | public int IndexOf(ImageEntry item) 94 | { 95 | return ((IList)_list).IndexOf(item); 96 | } 97 | 98 | public void Insert(int index, object value) 99 | { 100 | ((IList)_list).Insert(index, value); 101 | } 102 | 103 | public void Insert(int index, ImageEntry item) 104 | { 105 | ((IList)_list).Insert(index, item); 106 | } 107 | 108 | public void Remove(object value) 109 | { 110 | ((IList)_list).Remove(value); 111 | } 112 | 113 | public bool Remove(ImageEntry item) 114 | { 115 | return ((IList)_list).Remove(item); 116 | } 117 | 118 | public void RemoveAt(int index) 119 | { 120 | ((IList)_list).RemoveAt(index); 121 | } 122 | 123 | IEnumerator IEnumerable.GetEnumerator() 124 | { 125 | return ((IList)_list).GetEnumerator(); 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyBoldedDatesList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using System.ComponentModel; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | [TypeConverter(typeof(ExpandableObjectConverter))] 9 | public class MyBoldedDatesList : IList, IList 10 | { 11 | List _list = new List(); 12 | 13 | public DateEntry this[int index] 14 | { 15 | get { return ((IList)_list)[index]; } 16 | set { ((IList)_list)[index] = value; } 17 | } 18 | 19 | object IList.this[int index] 20 | { 21 | get { return ((IList)_list)[index]; } 22 | set { ((IList)_list)[index] = value; } 23 | } 24 | 25 | public int Count 26 | { 27 | get { return ((IList)_list).Count; } 28 | } 29 | 30 | public bool IsFixedSize 31 | { 32 | get { return ((IList)_list).IsFixedSize; } 33 | } 34 | 35 | public bool IsReadOnly 36 | { 37 | get { return ((IList)_list).IsReadOnly; } 38 | } 39 | 40 | public bool IsSynchronized 41 | { 42 | get { return ((IList)_list).IsSynchronized; } 43 | } 44 | 45 | public object SyncRoot 46 | { 47 | get { return ((IList)_list).SyncRoot; } 48 | } 49 | 50 | public int Add(object value) 51 | { 52 | return ((IList)_list).Add(value); 53 | } 54 | 55 | public void Add(DateEntry item) 56 | { 57 | ((IList)_list).Add(item); 58 | } 59 | 60 | public void Clear() 61 | { 62 | ((IList)_list).Clear(); 63 | } 64 | 65 | public bool Contains(object value) 66 | { 67 | return ((IList)_list).Contains(value); 68 | } 69 | 70 | public bool Contains(DateEntry item) 71 | { 72 | return ((IList)_list).Contains(item); 73 | } 74 | 75 | public void CopyTo(Array array, int index) 76 | { 77 | ((IList)_list).CopyTo(array, index); 78 | } 79 | 80 | public void CopyTo(DateEntry[] array, int arrayIndex) 81 | { 82 | ((IList)_list).CopyTo(array, arrayIndex); 83 | } 84 | 85 | public IEnumerator GetEnumerator() 86 | { 87 | return ((IList)_list).GetEnumerator(); 88 | } 89 | 90 | public int IndexOf(object value) 91 | { 92 | return ((IList)_list).IndexOf(value); 93 | } 94 | 95 | public int IndexOf(DateEntry item) 96 | { 97 | return ((IList)_list).IndexOf(item); 98 | } 99 | 100 | public void Insert(int index, object value) 101 | { 102 | ((IList)_list).Insert(index, value); 103 | } 104 | 105 | public void Insert(int index, DateEntry item) 106 | { 107 | ((IList)_list).Insert(index, item); 108 | } 109 | 110 | public void Remove(object value) 111 | { 112 | ((IList)_list).Remove(value); 113 | } 114 | 115 | public bool Remove(DateEntry item) 116 | { 117 | return ((IList)_list).Remove(item); 118 | } 119 | 120 | public void RemoveAt(int index) 121 | { 122 | ((IList)_list).RemoveAt(index); 123 | } 124 | 125 | IEnumerator IEnumerable.GetEnumerator() 126 | { 127 | return ((IList)_list).GetEnumerator(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyAnnuallyBoldedDatesList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using System.ComponentModel; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | [TypeConverter(typeof(ExpandableObjectConverter))] 9 | public class MyAnnuallyBoldedDatesList : IList, IList 10 | { 11 | List _list = new List(); 12 | 13 | public DateEntry this[int index] 14 | { 15 | get { return ((IList)_list)[index]; } 16 | set { ((IList)_list)[index] = value; } 17 | } 18 | 19 | object IList.this[int index] 20 | { 21 | get { return ((IList)_list)[index]; } 22 | set { ((IList)_list)[index] = value; } 23 | } 24 | 25 | public int Count 26 | { 27 | get { return ((IList)_list).Count; } 28 | } 29 | 30 | public bool IsFixedSize 31 | { 32 | get { return ((IList)_list).IsFixedSize; } 33 | } 34 | 35 | public bool IsReadOnly 36 | { 37 | get { return ((IList)_list).IsReadOnly; } 38 | } 39 | 40 | public bool IsSynchronized 41 | { 42 | get { return ((IList)_list).IsSynchronized; } 43 | } 44 | 45 | public object SyncRoot 46 | { 47 | get { return ((IList)_list).SyncRoot; } 48 | } 49 | 50 | public int Add(object value) 51 | { 52 | return ((IList)_list).Add(value); 53 | } 54 | 55 | public void Add(DateEntry item) 56 | { 57 | ((IList)_list).Add(item); 58 | } 59 | 60 | public void Clear() 61 | { 62 | ((IList)_list).Clear(); 63 | } 64 | 65 | public bool Contains(object value) 66 | { 67 | return ((IList)_list).Contains(value); 68 | } 69 | 70 | public bool Contains(DateEntry item) 71 | { 72 | return ((IList)_list).Contains(item); 73 | } 74 | 75 | public void CopyTo(Array array, int index) 76 | { 77 | ((IList)_list).CopyTo(array, index); 78 | } 79 | 80 | public void CopyTo(DateEntry[] array, int arrayIndex) 81 | { 82 | ((IList)_list).CopyTo(array, arrayIndex); 83 | } 84 | 85 | public IEnumerator GetEnumerator() 86 | { 87 | return ((IList)_list).GetEnumerator(); 88 | } 89 | 90 | public int IndexOf(object value) 91 | { 92 | return ((IList)_list).IndexOf(value); 93 | } 94 | 95 | public int IndexOf(DateEntry item) 96 | { 97 | return ((IList)_list).IndexOf(item); 98 | } 99 | 100 | public void Insert(int index, object value) 101 | { 102 | ((IList)_list).Insert(index, value); 103 | } 104 | 105 | public void Insert(int index, DateEntry item) 106 | { 107 | ((IList)_list).Insert(index, item); 108 | } 109 | 110 | public void Remove(object value) 111 | { 112 | ((IList)_list).Remove(value); 113 | } 114 | 115 | public bool Remove(DateEntry item) 116 | { 117 | return ((IList)_list).Remove(item); 118 | } 119 | 120 | public void RemoveAt(int index) 121 | { 122 | ((IList)_list).RemoveAt(index); 123 | } 124 | 125 | IEnumerator IEnumerable.GetEnumerator() 126 | { 127 | return ((IList)_list).GetEnumerator(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyMonthlyBoldedDatesList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using System.ComponentModel; 4 | using System; 5 | 6 | namespace osfDesigner 7 | { 8 | [TypeConverter(typeof(ExpandableObjectConverter))] 9 | public class MyMonthlyBoldedDatesList : IList, IList 10 | { 11 | List _list = new List(); 12 | 13 | public DateEntry this[int index] 14 | { 15 | get { return ((IList)_list)[index]; } 16 | set { ((IList)_list)[index] = value; } 17 | } 18 | 19 | object IList.this[int index] 20 | { 21 | get { return ((IList)_list)[index]; } 22 | set { ((IList)_list)[index] = value; } 23 | } 24 | 25 | public int Count 26 | { 27 | get { return ((IList)_list).Count; } 28 | } 29 | 30 | public bool IsFixedSize 31 | { 32 | get { return ((IList)_list).IsFixedSize; } 33 | } 34 | 35 | public bool IsReadOnly 36 | { 37 | get { return ((IList)_list).IsReadOnly; } 38 | } 39 | 40 | public bool IsSynchronized 41 | { 42 | get { return ((IList)_list).IsSynchronized; } 43 | } 44 | 45 | public object SyncRoot 46 | { 47 | get { return ((IList)_list).SyncRoot; } 48 | } 49 | 50 | public int Add(object value) 51 | { 52 | return ((IList)_list).Add(value); 53 | } 54 | 55 | public void Add(DateEntry item) 56 | { 57 | ((IList)_list).Add(item); 58 | } 59 | 60 | public void Clear() 61 | { 62 | ((IList)_list).Clear(); 63 | } 64 | 65 | public bool Contains(object value) 66 | { 67 | return ((IList)_list).Contains(value); 68 | } 69 | 70 | public bool Contains(DateEntry item) 71 | { 72 | return ((IList)_list).Contains(item); 73 | } 74 | 75 | public void CopyTo(Array array, int index) 76 | { 77 | ((IList)_list).CopyTo(array, index); 78 | } 79 | 80 | public void CopyTo(DateEntry[] array, int arrayIndex) 81 | { 82 | ((IList)_list).CopyTo(array, arrayIndex); 83 | } 84 | 85 | public IEnumerator GetEnumerator() 86 | { 87 | return ((IList)_list).GetEnumerator(); 88 | } 89 | 90 | public int IndexOf(object value) 91 | { 92 | return ((IList)_list).IndexOf(value); 93 | } 94 | 95 | public int IndexOf(DateEntry item) 96 | { 97 | return ((IList)_list).IndexOf(item); 98 | } 99 | 100 | public void Insert(int index, object value) 101 | { 102 | ((IList)_list).Insert(index, value); 103 | } 104 | 105 | public void Insert(int index, DateEntry item) 106 | { 107 | ((IList)_list).Insert(index, item); 108 | } 109 | 110 | public void Remove(object value) 111 | { 112 | ((IList)_list).Remove(value); 113 | } 114 | 115 | public bool Remove(DateEntry item) 116 | { 117 | return ((IList)_list).Remove(item); 118 | } 119 | 120 | public void RemoveAt(int index) 121 | { 122 | ((IList)_list).RemoveAt(index); 123 | } 124 | 125 | IEnumerator IEnumerable.GetEnumerator() 126 | { 127 | return ((IList)_list).GetEnumerator(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridBoolColumn.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class DataGridBoolColumn : System.Windows.Forms.DataGridBoolColumn 6 | { 7 | 8 | public DataGridBoolColumn() 9 | { 10 | } 11 | 12 | [DisplayName("Выравнивание")] 13 | [Description("Возвращает или задает выравнивание текста в колонке.")] 14 | [Category("Показать")] 15 | [Browsable(true)] 16 | public new HorizontalAlignment Alignment 17 | { 18 | get { return (HorizontalAlignment)base.Alignment; } 19 | set { base.Alignment = (System.Windows.Forms.HorizontalAlignment)value; } 20 | } 21 | 22 | [DisplayName("ИмяОтображаемого")] 23 | [Description("Возвращает или задает имя элемента данных, на который отображается стиль колонки.")] 24 | [Category("Прочее")] 25 | [Browsable(true)] 26 | public new string MappingName 27 | { 28 | get { return base.MappingName; } 29 | set { base.MappingName = value; } 30 | } 31 | 32 | [DisplayName("ТекстЗаголовка")] 33 | [Description("Возвращает или задает текст заголовка колонки.")] 34 | [Category("Показать")] 35 | [Browsable(true)] 36 | public new string HeaderText 37 | { 38 | get { return base.HeaderText; } 39 | set { base.HeaderText = value; } 40 | } 41 | 42 | [DisplayName("ТолькоЧтение")] 43 | [Description("Возвращает или задает значение, указывающее, находится ли СтильКолонкиБулево (DataGridBoolColumn) в состоянии 'только для чтения'.")] 44 | [Category("Прочее")] 45 | [Browsable(true)] 46 | [TypeConverter(typeof(MyBooleanConverter))] 47 | public new bool ReadOnly 48 | { 49 | get { return base.ReadOnly; } 50 | set { base.ReadOnly = value; } 51 | } 52 | 53 | [DisplayName("Ширина")] 54 | [Description("Возвращает или задает ширину колонки.")] 55 | [Category("Макет")] 56 | [Browsable(true)] 57 | public new int Width 58 | { 59 | get { return base.Width; } 60 | set { base.Width = value; } 61 | } 62 | 63 | [Browsable(false)] 64 | [ReadOnly(true)] 65 | public new bool AllowNull { get; set; } 66 | 67 | [Browsable(false)] 68 | [ReadOnly(true)] 69 | public new string NullText { get; set; } 70 | 71 | [Browsable(false)] 72 | [ReadOnly(true)] 73 | public new object FalseValue { get; set; } 74 | 75 | [Browsable(false)] 76 | [ReadOnly(true)] 77 | public new object NullValue { get; set; } 78 | 79 | [Browsable(false)] 80 | [ReadOnly(true)] 81 | public new object TrueValue { get; set; } 82 | 83 | [DisplayName("ИмяСтиля")] 84 | [Category("Прочее")] 85 | [Browsable(true)] 86 | [ReadOnly(true)] 87 | public string NameStyle { get; set; } 88 | 89 | [DisplayName("Текст")] 90 | [Category("Прочее")] 91 | [Browsable(true)] 92 | public string Text { get; set; } 93 | 94 | private System.Collections.Hashtable toolTip = new System.Collections.Hashtable(); 95 | [Browsable(false)] 96 | public System.Collections.Hashtable ToolTip 97 | { 98 | get { return toolTip; } 99 | set { toolTip = value; } 100 | } 101 | 102 | [Browsable(false)] 103 | public string DefaultValues { get; set; } 104 | 105 | [Browsable(false)] 106 | public string RequiredValues 107 | { 108 | get 109 | { 110 | return @" 111 | Текст == 112 | "; 113 | } 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /docs/OSFormsDesigner/OSFD.Os.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Сохранение в os 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 |

Сохранение формы в файл os

23 |
24 |
25 |
26 |

27 | Начиная с версии 1.2.0.0 есть возможность загружать в дизайнер формы из сохраненного файла сценария os. 28 | Не любого сценария, а именно сохраненного из дизайнера. При этом будет сохранена наработанная логика. 29 |

30 |

31 | При сохранении в формате os будет промежуточно создан текст файла osd, закодирован в строку Base64, 32 | которая будет присвоена переменной osdText и помещена как комментарий в 33 | процедуру Процедура ПодготовкаКомпонентов() или Процедура ПриСозданииФормы(_Форма) Экспорт. 34 |

35 |
36 | Перем Ф;
37 | Перем Форма_0;
38 | 
39 | Процедура ПодготовкаКомпонентов()
40 |     // ВАЖНО: Необходимая процедура для поддержки конструктора — не изменяйте содержимое этой процедуры с помощью редактора кода.
41 |     // osdText = "WzzQmtC+0L3RgdGC0YDRg9C60YLQvtGA0YtdDQrQpNC+0YDQvNCwXzAgPSDQpC7QpNC+0YDQvNCwKCk7DQpb0JrQvtC90YHRgtGA0YPQutGC0L7RgNGLPl0NCls80KHQstC+0LnRgdGC0LLQsF0NCls80KTQvtGA0LzQsF8wXQ0K0KTQvtGA0LzQsF8wLtCg0LDQt9C80LXRgCA9INCkLtCg0LDQt9C80LXRgCg2NDAsIDQ4MCk7DQrQpNC+0YDQvNCwXzAu0J/Rg9GC0YwgPSAiQzpcNDQ0XNCg0LDQt9GA0LDQsdC+0YLQutCwXDIyMi5vcyI7DQrQpNC+0YDQvNCwXzAu0KHRgtC40LvRjNCh0LrRgNC40L/RgtCwID0gItCh0YLQuNC70YzQodC60YDQuNC/0YLQsCI7DQrQpNC+0YDQvNCwXzAu0KLQtdC60YHRgiA9ICLQpNC+0YDQvNCwXzAiOw0K0KTQvtGA0LzQsF8wLtCY0LzRj9Ce0LHRitC10LrRgtCw0KTQvtGA0LzRi9CU0LvRj9Ce0LTQvdC+0KHQutGA0LjQv9GC0LAgPSAi0KQiOw0KW9Ck0L7RgNC80LBfMD5dDQpb0KHQstC+0LnRgdGC0LLQsD5dDQo=";
42 |     ПодключитьВнешнююКомпоненту("C:\444\111\OneScriptForms\OneScriptForms\bin\Debug\OneScriptForms.dll");
43 |     Ф = Новый ФормыДляОдноСкрипта();
44 | 
45 |     Форма_0 = Ф.Форма();
46 |     Форма_0.Отображать = Истина;
47 |     Форма_0.Показать();
48 |     Форма_0.Активизировать();
49 | 
50 |     Форма_0.Размер = Ф.Размер(640, 480);
51 |     Форма_0.Текст = "Форма_0";
52 | 
53 | КонецПроцедуры
54 | 
55 | ПодготовкаКомпонентов();
56 | 
57 | // ...
58 | 
59 | Ф.ЗапуститьОбработкуСобытий();
60 | 
61 |

62 | Процедура инициализации Процедура ПодготовкаКомпонентов() или Процедура ПриСозданииФормы(_Форма) Экспорт (зависит от свойства формы СтильСкрипта) 63 | является автоматически сформированной. Не изменяйте её содержимое. Весь ваш код вы можете вносить в любых других частях сценария, дизайнер их не затронет. 64 |

65 |

66 | Если форма будет работать как единственная или главная в вашем приложении, лучше подойдет значение СтильСкрипта. 67 | Если приложение будет состоять из множества форм, тогда у подчиненных форм, открываемых из главной формы или у диалоговых форм лучше 68 | подойдет значение СтильПриложения. 69 |

70 |

Поменять значение свойства формы СтильСкрипта можно в любое время, но рекомендую определиться с этим в самом начале проектирования формы.

71 |

72 |
73 | 74 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridComboBoxColumnStyle.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class DataGridComboBoxColumnStyle : System.Windows.Forms.DataGridTextBoxColumn 6 | { 7 | private osfDesigner.HorizontalAlignment _Alignment; 8 | private osfDesigner.ComboBox _ComboBox = new osfDesigner.ComboBox(); 9 | 10 | public DataGridComboBoxColumnStyle() 11 | { 12 | _Alignment = (osfDesigner.HorizontalAlignment)(base.Alignment); 13 | } 14 | 15 | [DisplayName("Выравнивание")] 16 | [Description("Возвращает или задает выравнивание текста в колонке.")] 17 | [Category("Показать")] 18 | [Browsable(true)] 19 | public new HorizontalAlignment Alignment 20 | { 21 | get { return _Alignment; } 22 | set 23 | { 24 | base.Alignment = (System.Windows.Forms.HorizontalAlignment)value; 25 | _Alignment = value; 26 | } 27 | } 28 | 29 | [DisplayName("ИмяСтиля")] 30 | [Category("Прочее")] 31 | [Browsable(true)] 32 | [ReadOnly(true)] 33 | public string NameStyle { get; set; } 34 | 35 | [DisplayName("Текст")] 36 | [Category("Прочее")] 37 | [Browsable(true)] 38 | public string Text { get; set; } 39 | 40 | [DisplayName("ИмяОтображаемого")] 41 | [Description("Возвращает или задает имя элемента данных, на который отображается стиль столбца.")] 42 | [Category("Прочее")] 43 | [Browsable(true)] 44 | public new string MappingName 45 | { 46 | get { return base.MappingName; } 47 | set { base.MappingName = value; } 48 | } 49 | 50 | [DisplayName("ПолеВыбора")] 51 | [Description("Возвращает объект класса ПолеВыбора (ComboBox), используемый в стиле колонки сетки данных.")] 52 | [Category("Прочее")] 53 | [Browsable(true)] 54 | [ReadOnly(true)] 55 | [TypeConverter(typeof(MyConverter))] 56 | public osfDesigner.ComboBox ComboBox 57 | { 58 | get { return _ComboBox; } 59 | } 60 | 61 | [DisplayName("ТекстЗаголовка")] 62 | [Description("Возвращает или задает текст заголовка колонки.")] 63 | [Category("Показать")] 64 | [Browsable(true)] 65 | public new string HeaderText 66 | { 67 | get { return base.HeaderText; } 68 | set { base.HeaderText = value; } 69 | } 70 | 71 | [DisplayName("ТолькоЧтение")] 72 | [Description("Возвращает или задает значение, указывающее, находится ли СтильКолонкиПолеВвода (DataGridTextBoxColumn) в состоянии 'только для чтения'.")] 73 | [Category("Прочее")] 74 | [Browsable(true)] 75 | [TypeConverter(typeof(MyBooleanConverter))] 76 | public new bool ReadOnly 77 | { 78 | get { return base.ReadOnly; } 79 | set { base.ReadOnly = value; } 80 | } 81 | 82 | [DisplayName("Ширина")] 83 | [Description("Возвращает или задает ширину колонки.")] 84 | [Category("Макет")] 85 | [Browsable(true)] 86 | public new int Width 87 | { 88 | get { return base.Width; } 89 | set { base.Width = value; } 90 | } 91 | 92 | [Browsable(false)] 93 | [ReadOnly(true)] 94 | public new string NullText { get; set; } 95 | 96 | [Browsable(false)] 97 | [ReadOnly(true)] 98 | public new string Format { get; set; } 99 | 100 | [Browsable(false)] 101 | public string RequiredValues 102 | { 103 | get 104 | { 105 | return @" 106 | Текст == 107 | "; 108 | } 109 | } 110 | 111 | [Browsable(false)] 112 | public string DefaultValues { get; set; } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/DataGridTextBoxColumn.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osfDesigner 4 | { 5 | public class DataGridTextBoxColumn : System.Windows.Forms.DataGridTextBoxColumn 6 | { 7 | 8 | private string _DoubleClick_osf; 9 | 10 | public DataGridTextBoxColumn() 11 | { 12 | } 13 | 14 | [DisplayName("Выравнивание")] 15 | [Description("Возвращает или задает выравнивание текста в колонке.")] 16 | [Category("Показать")] 17 | [Browsable(true)] 18 | public new HorizontalAlignment Alignment 19 | { 20 | get { return (HorizontalAlignment)base.Alignment; } 21 | set { base.Alignment = (System.Windows.Forms.HorizontalAlignment)value; } 22 | } 23 | 24 | [DisplayName("ИмяОтображаемого")] 25 | [Description("Возвращает или задает имя элемента данных, на который отображается стиль колонки.")] 26 | [Category("Прочее")] 27 | [Browsable(true)] 28 | public new string MappingName 29 | { 30 | get { return base.MappingName; } 31 | set { base.MappingName = value; } 32 | } 33 | 34 | [DisplayName("ТекстЗаголовка")] 35 | [Description("Возвращает или задает текст заголовка колонки.")] 36 | [Category("Показать")] 37 | [Browsable(true)] 38 | public new string HeaderText 39 | { 40 | get { return base.HeaderText; } 41 | set { base.HeaderText = value; } 42 | } 43 | 44 | [DisplayName("ТолькоЧтение")] 45 | [Description("Возвращает или задает значение, указывающее, находится ли СтильКолонкиПолеВвода (DataGridTextBoxColumn) в состоянии 'только для чтения'.")] 46 | [Category("Прочее")] 47 | [Browsable(true)] 48 | [TypeConverter(typeof(MyBooleanConverter))] 49 | public new bool ReadOnly 50 | { 51 | get { return base.ReadOnly; } 52 | set { base.ReadOnly = value; } 53 | } 54 | 55 | [DisplayName("Ширина")] 56 | [Description("Возвращает или задает ширину колонки.")] 57 | [Category("Макет")] 58 | [Browsable(true)] 59 | public new int Width 60 | { 61 | get { return base.Width; } 62 | set { base.Width = value; } 63 | } 64 | 65 | [Browsable(false)] 66 | [ReadOnly(true)] 67 | public new string NullText { get; set; } 68 | 69 | [Browsable(false)] 70 | [ReadOnly(true)] 71 | public new string Format { get; set; } 72 | 73 | [DisplayName("ДвойноеНажатие")] 74 | [Description("Возвращает или задает код для выполнения, когда ячейка колонки дважды щелкнута.")] 75 | [Category("Прочее")] 76 | [Browsable(true)] 77 | public string DoubleClick_osf 78 | { 79 | get { return _DoubleClick_osf; } 80 | set { _DoubleClick_osf = value; } 81 | } 82 | 83 | [DisplayName("ИмяСтиля")] 84 | [Category("Прочее")] 85 | [Browsable(true)] 86 | [ReadOnly(true)] 87 | public string NameStyle { get; set; } 88 | 89 | [DisplayName("Текст")] 90 | [Category("Прочее")] 91 | [Browsable(true)] 92 | public string Text { get; set; } 93 | 94 | private System.Collections.Hashtable toolTip = new System.Collections.Hashtable(); 95 | [Browsable(false)] 96 | public System.Collections.Hashtable ToolTip 97 | { 98 | get { return toolTip; } 99 | set { toolTip = value; } 100 | } 101 | 102 | [Browsable(false)] 103 | public string DefaultValues { get; set; } 104 | 105 | [Browsable(false)] 106 | public string RequiredValues 107 | { 108 | get 109 | { 110 | return @" 111 | Текст == 112 | "; 113 | } 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /OneScriptFormsDesigner/OneScriptFormsDesigner/MyLocationEditor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Drawing.Design; 3 | using System.Drawing; 4 | using System.Windows.Forms.Design; 5 | using System; 6 | 7 | namespace osfDesigner 8 | { 9 | public class MyLocationEditor : UITypeEditor 10 | { 11 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) 12 | { 13 | IWindowsFormsEditorService wfes = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; 14 | 15 | if (wfes != null) 16 | { 17 | frmXY _frmXY = new frmXY(); 18 | 19 | _frmXY.numericUpDown1.Value = ((Point)value).X; 20 | _frmXY.numericUpDown2.Value = ((Point)value).Y; 21 | _frmXY._wfes = wfes; 22 | 23 | wfes.DropDownControl(_frmXY); 24 | int _X = Convert.ToInt32(_frmXY.numericUpDown1.Value); 25 | int _Y = Convert.ToInt32(_frmXY.numericUpDown2.Value); 26 | value = new Point(_X, _Y); 27 | } 28 | return value; 29 | } 30 | 31 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) 32 | { 33 | return UITypeEditorEditStyle.Modal; 34 | } 35 | } 36 | 37 | public class frmXY : System.Windows.Forms.Form 38 | { 39 | private System.Windows.Forms.Label label1; 40 | public System.Windows.Forms.NumericUpDown numericUpDown1; 41 | private System.Windows.Forms.Label label2; 42 | public System.Windows.Forms.NumericUpDown numericUpDown2; 43 | private Container components = null; 44 | 45 | public IWindowsFormsEditorService _wfes; 46 | 47 | public frmXY() 48 | { 49 | ClientSize = new Size(192, 70); 50 | ControlBox = false; 51 | FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 52 | MaximizeBox = false; 53 | MinimizeBox = false; 54 | Name = "frmXY"; 55 | ShowInTaskbar = false; 56 | Closed += frmXY_Closed; 57 | 58 | label1 = new System.Windows.Forms.Label(); 59 | label1.Parent = this; 60 | label1.Location = new Point(10, 10); 61 | label1.Text = "Икс"; 62 | label1.Width = 55; 63 | 64 | numericUpDown1 = new System.Windows.Forms.NumericUpDown(); 65 | numericUpDown1.Parent = this; 66 | numericUpDown1.Location = new Point(label1.Left + label1.Width + 5, label1.Top); 67 | numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 68 | numericUpDown1.ThousandsSeparator = true; 69 | numericUpDown1.Minimum = 0; 70 | numericUpDown1.Maximum = 7680; 71 | 72 | label2 = new System.Windows.Forms.Label(); 73 | label2.Parent = this; 74 | label2.Location = new Point(label1.Left, label1.Bottom + 5); 75 | label2.Text = "Игрек"; 76 | label2.Width = 55; 77 | 78 | numericUpDown2 = new System.Windows.Forms.NumericUpDown(); 79 | numericUpDown2.Parent = this; 80 | numericUpDown2.Location = new Point(label2.Left + label2.Width + 5, label2.Top); 81 | numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 82 | numericUpDown2.ThousandsSeparator = true; 83 | numericUpDown2.Minimum = 0; 84 | numericUpDown2.Maximum = 4800; 85 | 86 | TopLevel = false; 87 | } 88 | 89 | private void frmXY_Closed(object sender, EventArgs e) 90 | { 91 | _wfes.CloseDropDown(); 92 | } 93 | 94 | protected override void Dispose(bool disposing) 95 | { 96 | if (disposing) 97 | { 98 | if (components != null) 99 | { 100 | components.Dispose(); 101 | } 102 | } 103 | base.Dispose(disposing); 104 | } 105 | } 106 | } 107 | --------------------------------------------------------------------------------