inventor:ilogic
Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revizePředchozí verzeNásledující verze | Předchozí verze | ||
inventor:ilogic [2022/09/20 05:22] – Zdeněk Havlík | inventor:ilogic [2025/01/09 13:27] (aktuální) – Zdeněk Havlík | ||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
====== iLogic ====== | ====== iLogic ====== | ||
+ | ===== Form + save iproperties ===== | ||
+ | <file vbscript form_save_iprop.iLogicVb> | ||
+ | ' | ||
+ | Public Sub Main() | ||
+ | Dim oDrawDoc As DrawingDocument = ThisDoc.Document | ||
+ | Dim oName As String = " | ||
+ | |||
+ | '//////// | ||
+ | Dim oForm As New WinForm(iLogicVb.Automation, | ||
+ | oForm.ShowDialog() | ||
+ | |||
+ | iProperties.Value(oName, | ||
+ | |||
+ | oDrawDoc.Update | ||
+ | End Sub | ||
+ | |||
+ | Public Class WinForm | ||
+ | Inherits System.Windows.Forms.Form | ||
+ | Public Property oDrawDocint As DrawingDocument | ||
+ | Public Property oTextBox As New System.Windows.Forms.TextBox | ||
+ | |||
+ | '//////// | ||
+ | Public Sub New(ByVal Iinf As IiLogicAutomation, | ||
+ | oForm = Me | ||
+ | myIinf = Iinf | ||
+ | oDrawDocint = oDrawDoc | ||
+ | |||
+ | '//////// | ||
+ | With oForm | ||
+ | .FormBorderStyle = FormBorderStyle.FixedToolWindow | ||
+ | ' | ||
+ | .Width = 250 | ||
+ | .Height = 300 | ||
+ | .Font = oLargerFont | ||
+ | End With | ||
+ | |||
+ | '//////// | ||
+ | Dim oButton1 As New System.Windows.Forms.Button() | ||
+ | With oButton1 | ||
+ | .Text = " | ||
+ | .Top = ((oForm.Bottom - oForm.Top)/ | ||
+ | .Left = (oForm.Width/ | ||
+ | .Enabled = True | ||
+ | .AutoSize = True | ||
+ | End With | ||
+ | |||
+ | Dim oLbl As New System.Windows.Forms.Label | ||
+ | With oLbl | ||
+ | .Text = " | ||
+ | .Top = 20 | ||
+ | .Left = 20 | ||
+ | .Height = 40 | ||
+ | End With | ||
+ | |||
+ | With oTextBox | ||
+ | .Text = "Part No." | ||
+ | .Top = 20 | ||
+ | .Left = 120 | ||
+ | .Width = 100 | ||
+ | .Height = 25 | ||
+ | End With | ||
+ | |||
+ | oLbl = oForm.Controls.Add(oLbl) | ||
+ | oForm.Controls.Add(oTextBox) | ||
+ | oForm.Controls.Add(oButton1) | ||
+ | AddHandler oButton1.Click, | ||
+ | End Sub | ||
+ | | ||
+ | Public Property NewPartNumber As String | ||
+ | | ||
+ | Public Sub oButton1_Click(ByVal oSender As System.Object, | ||
+ | NewPartNumber = oTextBox.Text | ||
+ | Me.Close() | ||
+ | ' iProperties.Value(oName, | ||
+ | End Sub | ||
+ | End Class | ||
+ | </ | ||
+ | |||
===== Polotovar ===== | ===== Polotovar ===== | ||
inventor/ilogic.1663651359.txt.gz · Poslední úprava: 2022/09/20 05:22 autor: Zdeněk Havlík