Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import clr
- import sys
- sys.path.append("c:/Program Files (x86)/IronPython 2.7/Lib")
- import System
- clr.AddReference("System.Windows.Forms")
- clr.AddReference("System.Drawing")
- from System.Windows.Forms import Application, Form, StatusBar
- from System.Windows.Forms import ToolBar, ToolBarButton, FolderBrowserDialog
- from System.Windows.Forms import DialogResult
- if IN[2] == 1:
- Text=str(IN[1])
- if IN[2] > 1:
- Text="\r\n".join(str(i) for i in IN[1])
- class MainForm(System.Windows.Forms.Form): #Windows form
- def __init__(self):
- self.InitializeComponent()
- def InitializeComponent(self):
- self._textBox1 = System.Windows.Forms.RichTextBox()
- self._label1 = System.Windows.Forms.Label()
- self._button1 = System.Windows.Forms.Button()
- self.SuspendLayout()
- #
- # textBox1
- #
- self._textBox1.Location = System.Drawing.Point(50, 60)
- self._textBox1.AppendText(Text)
- self._textBox1.Name = "textBox1"
- self._textBox1.Size = System.Drawing.Size(300, 300)
- self._textBox1.TabIndex = 0
- #
- # label1
- #
- self._label1.Location = System.Drawing.Point(100, 15)
- self._label1.Name = "label1"
- self._label1.Size = System.Drawing.Size(200, 23)
- self._label1.TabIndex = 1
- self._label1.Text = "Скопируйте результат отчета"
- self._label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
- #
- # button1
- #
- self._button1.DialogResult = System.Windows.Forms.DialogResult.OK
- self._button1.Location = System.Drawing.Point(180, 370)
- self._button1.Name = "button1"
- self._button1.Size = System.Drawing.Size(40, 25)
- self._button1.TabIndex = 2
- self._button1.Text = "OK"
- self._button1.UseVisualStyleBackColor = True
- #
- # MainForm
- #
- self.ClientSize = System.Drawing.Size(400, 400)
- self.Controls.Add(self._button1)
- self.Controls.Add(self._label1)
- self.Controls.Add(self._textBox1)
- self.Name = ""
- self.Text = "Результат индексации"
- self.ResumeLayout(False)
- self.PerformLayout()
- dialog = MainForm()
- dialog.ShowDialog()
- OUT = Text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement