daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Feb 20th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import clr
  2. import sys
  3. sys.path.append("c:/Program Files (x86)/IronPython 2.7/Lib")
  4. import System
  5. clr.AddReference("System.Windows.Forms")
  6. clr.AddReference("System.Drawing")
  7. from System.Windows.Forms import Application, Form, StatusBar
  8. from System.Windows.Forms import ToolBar, ToolBarButton, FolderBrowserDialog
  9. from System.Windows.Forms import DialogResult
  10.  
  11. if IN[2] == 1:
  12.     Text=str(IN[1])
  13. if IN[2] > 1:
  14.     Text="\r\n".join(str(i) for i in IN[1])
  15.  
  16. class MainForm(System.Windows.Forms.Form): #Windows form
  17.     def __init__(self):
  18.         self.InitializeComponent()
  19.            
  20.     def InitializeComponent(self):
  21.         self._textBox1 = System.Windows.Forms.RichTextBox()
  22.         self._label1 = System.Windows.Forms.Label()
  23.         self._button1 = System.Windows.Forms.Button()
  24.         self.SuspendLayout()
  25.         #
  26.         # textBox1
  27.         #
  28.         self._textBox1.Location = System.Drawing.Point(50, 60)
  29.         self._textBox1.AppendText(Text)
  30.         self._textBox1.Name = "textBox1"
  31.         self._textBox1.Size = System.Drawing.Size(300, 300)
  32.         self._textBox1.TabIndex = 0
  33.        
  34.         #
  35.         # label1
  36.         #
  37.         self._label1.Location = System.Drawing.Point(100, 15)
  38.         self._label1.Name = "label1"
  39.         self._label1.Size = System.Drawing.Size(200, 23)
  40.         self._label1.TabIndex = 1
  41.         self._label1.Text = "Скопируйте результат отчета"
  42.         self._label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
  43.         #
  44.         # button1
  45.         #
  46.         self._button1.DialogResult = System.Windows.Forms.DialogResult.OK
  47.         self._button1.Location = System.Drawing.Point(180, 370)
  48.         self._button1.Name = "button1"
  49.         self._button1.Size = System.Drawing.Size(40, 25)
  50.         self._button1.TabIndex = 2
  51.         self._button1.Text = "OK"
  52.         self._button1.UseVisualStyleBackColor = True
  53.         #
  54.         # MainForm
  55.         #
  56.         self.ClientSize = System.Drawing.Size(400, 400)
  57.         self.Controls.Add(self._button1)
  58.         self.Controls.Add(self._label1)
  59.         self.Controls.Add(self._textBox1)
  60.         self.Name = ""
  61.         self.Text = "Результат индексации"
  62.         self.ResumeLayout(False)
  63.         self.PerformLayout()
  64.  
  65. dialog = MainForm()
  66. dialog.ShowDialog()
  67.  
  68. OUT = Text
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top