|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|||||||||||
как переделать эту программу в форму Windows или вставить этот код PowerShell в форму Windows?26.11.2019, 11:39. Показов 1341. Ответов 17
Метки нет (Все метки)
Как нам переделать программу, чтобы открыть XML-файл в форме Windows и прочитать значение процента после слова цены в файле MIK_RT.xml и можно было изменить это значение процента из окна в форме Windows и сохранить файл с новым значением, нажав кнопку ОК?
как переделать эту программу в форму Windows или вставить этот код PowerShell в форму Windows? файл необходимо сохранить в кодировке utf8
файл для изменения MIK_Neva.xml
0
|
|||||||||||
| 26.11.2019, 11:39 | |
|
Ответы с готовыми решениями:
17
Как вставить файл в эту форму?
Как сделать форму в Excel в которую нужно вывести данные из Sheet-а, а затем пустить эту форму на принтер? |
|
|
||||||
| 26.11.2019, 14:48 | ||||||
|
windows forms вещь классная, но на работу с ней мне приходится тратить столько времени... что я предпочитаю обойтись без графического интерфейса.
0
|
||||||
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
||||||
| 26.11.2019, 15:04 | ||||||
0
|
||||||
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 27.11.2019, 10:22 [ТС] | |
|
спасибо MGarry как сделать что-бы файл для загрузки MIK_Neva.xml уже был загружен при запуске программы и как добавить второй прайс MIK_RT.xml вторым полем загружался при загрузки и значение percent обеих файлов можно будет изменять и сохранять при нажатии на одну кнопку сохраниить
MIK_RT.xml прилагаю <?xml version="1.0" encoding="utf-8"?> <PriceConfiguration Name="MIK_RT" Version="1"><Description></Description><AuthorID>s0011373519</AuthorID><LastEditedBy>s0011373519</LastEditedBy><LastUpdate>14.11.2019 12:56:27</LastUpdate><File Type="XLS" Engine="0"><FilesMask>E:\FTP\PRICE_FORCE AUTO_MIK\RT.xls</FilesMask><IncludeFiles></IncludeFiles><ExcludeFiles></ExcludeFiles><Macro OnStart=""/><XLSoptions><Password></Password><MergeXLSsheets>1</MergeXLSsheets></XLSoptions><CSVoptions><RowsSeparator>13-10</RowsSeparator><ColumnsSeparator>59</ColumnsSeparator><AddHeaderRow>0</AddHeaderRow><UseBrackets>0</UseBrackets><Encoding>windows-1251</Encoding></CSVoptions><ReplaceTable Name="Price Codes" IsEmpty="False"><Replacement Find="{@КодПрайса}" ReplaceWith=""/><Replacement Find="{@ИмяФайлаДляПрайса}" ReplaceWith=""/></ReplaceTable></File><Sheets><SheetConfiguration index="1"><Name>Обработчик листа</Name><Description></Description><SheetSelectMode>1</SheetSelectMode><SheetName>Итого_Наценка _Остатков</SheetName><SheetIndex>1</SheetIndex><ReplaceTable Name="Price Sheet Codes" IsEmpty="False"><Replacement Find="{@КодЛиста}" ReplaceWith=""/><Replacement Find="{@ИмяФайлаДляЛиста}" ReplaceWith=""/></ReplaceTable><PriceFields><Field index="1" Enable="1"><Name>Артикул</Name><SheetColumn>2</SheetColumn><UseCellText>1</UseCellText><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/><ReplaceTableName>Артикул (EXIST_RT)</ReplaceTableName></Field><Field index="2" Enable="1"><Name>Наименование</Name><SheetColumn>3</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/><ReplaceTableName>Наименование (FA)</ReplaceTableName></Field><Field index="3" Enable="1"><Name>Производитель</Name><SheetColumn>1</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/><ReplaceTableName>Производитель (FA_RT)</ReplaceTableName></Field><Field index="4" Enable="1"><Name>Наличие</Name><SheetColumn>4</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="1" Version="1"><Function CodeName="Replace" Enabled="1" param1=">" param2=""/></FieldFunctions><FieldConditions Enable="0" Version="1"/></Field><Field index="5" Enable="1"><Name>Цена</Name><SheetColumn>5</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="1" Version="1"><Function CodeName="CompareNumbers" Enabled="1" param1="2499" param2="1000000"/></FieldFunctions><FieldConditions Enable="0" Version="1"/><FieldCostOptions Enabled="1" Version="1"><IncreaseCost Enabled="1" Percent="-5"/></FieldCostOptions></Field><Field index="6" Enable="1"><Name>ЦенаЗакупа</Name><SheetColumn>5</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="7" Enable="1"><Name>ПР</Name><SheetColumn>1</SheetColumn><ValueMode>1</ValueMode><Formula>RT</Formula><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="8"><Name>Срок_ZZAP</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="9"><Name>КодСтраны</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="10"><Name>Страна</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="11"><Name>ГТД</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="12"><Name>ИНН_Поставщика</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="13"><Name>КПП_Поставщика</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="14"><Name>НомерН</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="15"><Name>ДатаН</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="16"><Name>НомерСчета</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="17"><Name>ДатаСчета</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="18"><Name>НамерСФ</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="19"><Name>ДатаСФ</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field></PriceFields><FirstRow>4</FirstRow><LastRowColumn>1</LastRowColumn></SheetConfiguration></Sheets></PriceConfiguration>
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
|
| 27.11.2019, 13:58 | |
|
$form1_Load = {
#TODO: Initialize Form Controls here } #end form1_Load Вот тут выполняются действия при запуске программы. Остальные вопросы непонятны. Напишите по пунктам.
0
|
|
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 28.11.2019, 10:29 [ТС] | |
|
где почитать как работает remove_Click(
и где найти как этот код работает с разборов примеров
0
|
|
|
505 / 158 / 49
Регистрация: 27.02.2016
Сообщений: 820
|
|
| 29.11.2019, 06:16 | |
|
сергей124244, http://www.codeproject.com/Art... -Windows-F
0
|
|
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 13:04 [ТС] | |
|
как переделать этот код что-бы этот код работал из любой папки [xml](Get-Content $textboxFile.Text -Encoding UTF8) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $new_value) }; $_.Save('D:\Output1.xml') }
Добавлено через 1 минуту почему не работает данный код ? необходимо запускать программу из любого места на диске $file1 = New-Object 'System.Windows.Forms.TextBox' $file1.text='MIK_RT.xml' [xml](Get-Content $file1.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $new_value1) } $_.Save('$file1.text') }
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
|||
| 29.11.2019, 14:35 | |||
|
0
|
|||
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 14:43 [ТС] | |
|
этот код работает [xml](Get-Content 'c:\program\MIK_Autokontinent.xml' ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent1) }; $_.Save('c:\program\MIK_Autokontinent.xm l') }
вот этот код не работает [xml](Get-Content $file2.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent2) }; $_.Save('$file2.text') } вопрос как заменить и чем оператор save() который не работает без указания path
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
|
| 29.11.2019, 14:46 | |
|
$A = $file2.text
$_.Save($A) Попробуйте вот так
0
|
|
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 15:00 [ТС] | |
|
не работает
можно ли заменить save() на другой оператор
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
|
| 29.11.2019, 15:03 | |
|
Насколько я знаю нет.
Проверьте что у вас лежит в $file2.text Точно нужный путь и точно это тиа string?
0
|
|
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 15:06 [ТС] | |
|
$file2 = New-Object 'System.Windows.Forms.TextBox'
$file2.text='MIK_AutoPremium.xml'
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
||
| 29.11.2019, 15:08 | ||
|
0
|
||
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 15:34 [ТС] | |
|
не явно возможно ли задание пути к файлу?
0
|
|
|
22 / 18 / 4
Регистрация: 28.07.2015
Сообщений: 167
|
|
| 29.11.2019, 15:37 | |
|
Get-ChildItem <RootDirectory> $file2.text |select -ExpandProperty fullname
0
|
|
|
1 / 1 / 0
Регистрация: 11.02.2019
Сообщений: 136
|
|
| 29.11.2019, 16:08 [ТС] | |
|
как это вставить Get-ChildItem <RootDirectory> $file2.text |select -ExpandProperty fullname
в пример ниже function chpecent { $form = New-Object 'System.Windows.Forms.Form' $MaskedTextBox = New-Object System.Windows.Forms.MaskedTextBox $MaskedTextBox.PasswordChar = '*' $MaskedTextBox.Top = 200 $MaskedTextBox.Left = 200 $form.Controls.Add($MaskedTextBox) out #System.Windows.Forms.MaskedTextBox $file1 = New-Object 'System.Windows.Forms.TextBox' $file2 = New-Object 'System.Windows.Forms.TextBox' $file3 = New-Object 'System.Windows.Forms.TextBox' $file4 = New-Object 'System.Windows.Forms.TextBox' $file5 = New-Object 'System.Windows.Forms.TextBox' $file6 = New-Object 'System.Windows.Forms.TextBox' $file7 = New-Object 'System.Windows.Forms.TextBox' $file8 = New-Object 'System.Windows.Forms.TextBox' $file9 = New-Object 'System.Windows.Forms.TextBox' $file10 = New-Object 'System.Windows.Forms.TextBox' $textnamef1 = New-Object 'System.Windows.Forms.Label' $textnamef2 = New-Object 'System.Windows.Forms.Label' $textnamef3 = New-Object 'System.Windows.Forms.Label' $textnamef4 = New-Object 'System.Windows.Forms.Label' $textnamef5 = New-Object 'System.Windows.Forms.Label' $textnamef6 = New-Object 'System.Windows.Forms.Label' $textnamef7 = New-Object 'System.Windows.Forms.Label' $textnamef8 = New-Object 'System.Windows.Forms.Label' $textnamef9 = New-Object 'System.Windows.Forms.Label' $textnamef10 = New-Object 'System.Windows.Forms.Label' $textPercent = New-Object 'System.Windows.Forms.Label' $inputpecentw1 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw2 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw3 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw4 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw5 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw6 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw7 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw8 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw9 = New-Object 'System.Windows.Forms.TextBox' $inputpecentw10 = New-Object 'System.Windows.Forms.TextBox' $Read = New-Object 'System.Windows.Forms.Button' $Save = New-Object 'System.Windows.Forms.Button' $form_Load = { #выполняется при запуске $file1.text='MIK_Autokontinent.xml' $file2.text='MIK_AutoPremium.xml' $file3.text='MIK_AutoProdixSPb.xml' $file4.text='MIK_Iveco.xml' $file5.text='MIK_Moto.xml' $file6.text='MIK_Neva.xml' $file7.text='MIK_RT.xml' $file8.text='MIK_SibTrading.xml' $file9.text='MIK_Storage.xml' $file10.text='MIK_TecMar.xml' $inputpecentw1.Text = [xml](Get-Content $file1.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw2.Text = [xml](Get-Content $file2.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw3.Text = [xml](Get-Content $file3.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw4.Text = [xml](Get-Content $file4.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw5.Text = [xml](Get-Content $file5.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw6.Text = [xml](Get-Content $file6.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw7.Text = [xml](Get-Content $file7.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw8.Text = [xml](Get-Content $file8.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw9.Text = [xml](Get-Content $file9.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw10.Text = [xml](Get-Content $file10.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String } $Read_Click = { #выполняется при нажатии на кнопку прочитать $inputpecentw1.Text = [xml](Get-Content $file1.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw2.Text = [xml](Get-Content $file2.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw3.Text = [xml](Get-Content $file3.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw4.Text = [xml](Get-Content $file4.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw5.Text = [xml](Get-Content $file5.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw6.Text = [xml](Get-Content $file6.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw7.Text = [xml](Get-Content $file7.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw8.Text = [xml](Get-Content $file8.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw9.Text = [xml](Get-Content $file9.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String $inputpecentw10.Text = [xml](Get-Content $file10.text) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.GetAttribute("Percent") } } | Out-String } $Save_Click = { #выполняется при нажатии на кнопку сохранить $newpercent1 = $inputpecentw1.Text $newpercent2 = $inputpecentw2.Text $newpercent3 = $inputpecentw3.Text $newpercent4 = $inputpecentw4.Text $newpercent5 = $inputpecentw5.Text $newpercent6 = $inputpecentw6.Text $newpercent7 = $inputpecentw7.Text $newpercent8 = $inputpecentw8.Text $newpercent9 = $inputpecentw9.Text $newpercent10 = $inputpecentw10.Text $A = $file2.text [xml](Get-Content 'c:\program\MIK_Autokontinent.xml' ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent1) }; $_.Save('c:\program\MIK_Autokontinent.xm l') } [xml](Get-Content $A ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent2) }; $_.Save('$A') } [xml](Get-Content $file3.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent3) }; $_.Save('$file3.text') } [xml](Get-Content $file4.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent4) }; $_.Save('$file4.text') } [xml](Get-Content $file5.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent5) }; $_.Save('$file5.text') } [xml](Get-Content $file6.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent6) }; $_.Save('$file6.text') } [xml](Get-Content $file7.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent7) }; $_.Save('$file7.text') } [xml](Get-Content $file8.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent8) }; $_.Save('$file8.text') } [xml](Get-Content $file9.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent9) }; $_.Save('$file9.text') } [xml](Get-Content $file10.text ) | ForEach-Object { $_.SelectNodes(' //FieldCostOptions/IncreaseCost') | ForEach-Object { $_.SetAttribute("Percent", $newpercent10) }; $_.Save('$file10.text') } } $form.Controls.Add($textnamef1) $form.Controls.Add($textnamef2) $form.Controls.Add($textnamef3) $form.Controls.Add($textnamef4) $form.Controls.Add($textnamef5) $form.Controls.Add($textnamef6) $form.Controls.Add($textnamef7) $form.Controls.Add($textnamef8) $form.Controls.Add($textnamef9) $form.Controls.Add($textnamef10) $form.Controls.Add($textPercent) $form.Controls.Add($inputpecentw1) $form.Controls.Add($inputpecentw2) $form.Controls.Add($inputpecentw3) $form.Controls.Add($inputpecentw4) $form.Controls.Add($inputpecentw5) $form.Controls.Add($inputpecentw6) $form.Controls.Add($inputpecentw7) $form.Controls.Add($inputpecentw8) $form.Controls.Add($inputpecentw9) $form.Controls.Add($inputpecentw10) $form.Controls.Add($Read) $form.Controls.Add($Save) $form.ClientSize = '800, 800' $form.Text = 'проценты' $form.add_Load($form_Load) $textnamef1.AutoSize = $True $textnamef1.Location = '80, 40' $textnamef1.Text = 'MIK_Autokontinent.xml' $textnamef2.AutoSize = $True $textnamef2.Location = '80, 80' $textnamef2.Text = 'MIK_AutoPremium.xml' $textnamef3.AutoSize = $True $textnamef3.Location = '80, 120' $textnamef3.Text = 'MIK_AutoProdixSPb.xml' $textnamef4.AutoSize = $True $textnamef4.Location = '80, 160' $textnamef4.Text = 'MIK_Iveco.xml' $textnamef5.AutoSize = $True $textnamef5.Location = '80, 200' $textnamef5.Text = 'MIK_Moto.xml' $textnamef6.AutoSize = $True $textnamef6.Location = '80, 240' $textnamef6.Text = 'MIK_Neva.xml' $textnamef7.AutoSize = $True $textnamef7.Location = '80, 280' $textnamef7.Text = 'MIK_RT.xml' $textnamef8.AutoSize = $True $textnamef8.Location = '80, 320' $textnamef8.Text = 'MIK_SibTrading.xml' $textnamef9.AutoSize = $True $textnamef9.Location = '80, 360' $textnamef9.Text = 'MIK_Storage.xml' $textnamef10.AutoSize = $True $textnamef10.Location = '80, 400' $textnamef10.Text = 'MIK_TecMar.xml' $textPercent.AutoSize = $True $textPercent.Location = '30, 10' $textPercent.Text = 'процент' $inputpecentw1.Location = '60, 40' $inputpecentw1.Size = '20, 20' $inputpecentw2.Location = '60, 80' $inputpecentw2.Size = '20, 20' $inputpecentw3.Location = '60, 120' $inputpecentw3.Size = '20, 20' $inputpecentw4.Location = '60, 160' $inputpecentw4.Size = '20, 20' $inputpecentw5.Location = '60, 200' $inputpecentw5.Size = '20, 20' $inputpecentw6.Location = '60, 240' $inputpecentw6.Size = '20, 20' $inputpecentw7.Location = '60, 280' $inputpecentw7.Size = '20, 20' $inputpecentw8.Location = '60, 320' $inputpecentw8.Size = '20, 20' $inputpecentw9.Location = '60, 360' $inputpecentw9.Size = '20, 20' $inputpecentw10.Location = '60, 400' $inputpecentw10.Size = '20, 20' # показать $Read.Location = '20,740' $Read.Size = '100, 40' $Read.Text = 'Прочитать' $Read.add_Click($Read_Click) # сохранить $Save.Location = '680,740' $Save.Size = '100, 40' $Save.Text = 'Сохранить' $Save.add_Click($Save_Click) #Show the Form $form.ShowDialog() } #End Function #Call the form chpecent | Out-Null
0
|
|
| 29.11.2019, 16:08 | |
|
Помогаю со студенческими работами здесь
18
Как привязать этот код в форму Работа с ArcGIS 9.3, куда вставить приложенный код - в форму или модуль вставить изображение формы в эту же форму Как или куда вставить этот нестандартный CSS код?
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
SDL3 для Web (WebAssembly): Обработчик клика мыши в браузере ПК и касания экрана в браузере на мобильном устройстве
8Observer8 02.02.2026
Содержание блога
Для начала пошагово создадим рабочий пример для подготовки к экспериментам в браузере ПК и в браузере мобильного устройства. Потом напишем обработчик клика мыши и обработчик. . .
|
Философия технологии
iceja 01.02.2026
На мой взгляд у человека в технических проектах остается роль генерального директора. Все остальное нейронки делают уже лучше человека. Они не могут нести предпринимательские риски, не могут. . .
|
SDL3 для Web (WebAssembly): Вывод текста со шрифтом TTF с помощью SDL3_ttf
8Observer8 01.02.2026
Содержание блога
В этой пошаговой инструкции создадим с нуля веб-приложение, которое выводит текст в окне браузера. Запустим на Android на локальном сервере. Загрузим Release на бесплатный. . .
|
SDL3 для Web (WebAssembly): Сборка C/C++ проекта из консоли
8Observer8 30.01.2026
Содержание блога
Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а. . .
|
|
SDL3 для Web (WebAssembly): Установка Emscripten SDK (emsdk) и CMake для сборки C и C++ приложений в Wasm
8Observer8 30.01.2026
Содержание блога
Для того чтобы скачать Emscripten SDK (emsdk) необходимо сначало скачать и уставить Git: Install for Windows. Следуйте стандартной процедуре установки Git через установщик. . . .
|
SDL3 для Android: Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 29.01.2026
Содержание блога
Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами. Версия v3 была полностью переписана на Си, в. . .
|
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования.
Часть библиотеки BedvitCOM
Использованы. . .
|
SDL3 для Android: Загрузка PNG с альфа-каналом с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога
SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
|