; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Моя программа"
#define MyAppVersion "1.6.2.0"
#define MyAppPublisher "ООО Бирюльки"
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "NameOfMainExeFile.exe"
#define SetupName "setup_my_programm"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{390B67EF-46E4-45B6-B6F9-C9C6362FE337}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName="{pf}\MyProgramm"
DefaultGroupName={#MyAppName}
OutputBaseFilename={#SetupName}{#MyAppVersion}
Compression=lzma
SolidCompression=yes
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Files]
Source: "{#SourcePath}NDP461-KB3102436-x86-x64-AllOS-ENU.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Check: not DotNetFrameworkIsInstalled
Source: "{#SourcePath}DopCalc\bin\Release\MyProgramm.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\MyProgramm.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\MyProgramm.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\GalaSoft.MvvmLight.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\System.Web.Razor.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}DopCalc\bin\Release\Templates\*"; DestDir: "{app}\Templates"; Flags: ignoreversion createallsubdirs recursesubdirs
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{tmp}\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"; Parameters: "/passive /showfinalerror /norestart /x86 /x64"; Check: not DotNetFrameworkIsInstalled; StatusMsg: Microsoft Framework 4.6.1 устанавливается. Пожалуйста подождите...
[Code]
function DotNetFrameworkIsInstalled(): Boolean;
var
bSuccess: Boolean;
regVersion: Cardinal;
begin
Result := False;
bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', regVersion);
if (True = bSuccess) and (regVersion >= 394254) then begin
Result := True;
end;
end;
userControlInstance.DataContext = viewModelInstance;
...
<ListView ItemsSource="{Binding ItemsFromViewModel}">
...
using System;
using System.Linq;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
string[] dayOfWeek = new string[] { "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье" };
Console.WriteLine("Введите температуру воздуха за неделю: ");
var temp = new List<int>();
var r = new Random();
foreach(var day in dayOfWeek){
// Console.Write("{0,-12}: ", day);
// temp.Add(Convert.ToInt32(Console.ReadLine()));
temp.Add(r.Next(-10,10));
}
Console.WriteLine(string.Join(", ", temp));
Console.WriteLine();
//Для обычных людей
Console.WriteLine("Средняя температура за неделю: {0} градусов", temp.Average());
Console.WriteLine("Максимальная температура: {0} градус(-ов)", temp.Max());
Console.WriteLine("Минимальная температура: {0} градус(-ов)", temp.Min());
Console.WriteLine();
//Для студентов
{
double sum = 0;
for(int i = 0; i < temp.Count; i++){
sum += temp[i];
}
Console.WriteLine("Средняя температура за неделю: {0} градусов", sum / temp.Count);
}
{
int pos = 0, max = temp[0];
for(int i = 1; i < temp.Count; i++){
if(max < temp[i]){
pos = i;
max = temp[i];
}
}
Console.WriteLine("Максимальная температура: {0} градус(-ов) позиция {1}", max, pos+1);
}
{
int pos = 0, min = temp[0];
for(int i = 1; i < temp.Count; i++){
if(min > temp[i]){
pos = i;
min = temp[i];
}
}
Console.WriteLine("Минимальная температура: {0} градус(-ов) позиция {1}", min, pos+1);
}
}
}