parent
da8b3cc81f
commit
66b7aa42c5
|
|
@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
|
|||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PascalABC.NET Compiler")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005-2019 by Ivan Bondarev, Stanislav Mikhalkovich")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005-2019 by Ivan Bondarev, Stanislav Mihalkovich")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion(RevisionClass.FullVersion)]
|
||||
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "5";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "2217";
|
||||
public const string Revision = "2218";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=5
|
||||
%REVISION%=2217
|
||||
%COREVERSION%=0
|
||||
%REVISION%=2218
|
||||
%MINOR%=5
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -10,6 +10,11 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
|
||||
<title></title>
|
||||
<link rel="StyleSheet" href="../../default.css">
|
||||
<style type="text/css">
|
||||
.auto-style1 {
|
||||
color: #000080;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -93,6 +98,48 @@ value: Complex);<br> <b>begin</b><br> &
|
|||
integer): string; <strong>extensionmethod</strong>;<br><strong>begin</strong><br> result := str +
|
||||
n.ToString;<br><strong>end</strong>;</code></p>
|
||||
</blockquote>
|
||||
<p>Ìîæíî ïåðåãðóæàòü ðàñøèðåííûå îïåðàöèè ïðèñâàèâàíèÿ +=, -= è ò.ä.: </p>
|
||||
<blockquote>
|
||||
<pre><code><strong>type</strong>
|
||||
t0 = <strong>class
|
||||
</strong> x: integer;
|
||||
<strong>static</strong> <strong>function</strong> <strong>operator</strong>+=(a: t0; i: integer): t0;
|
||||
<strong>begin</strong>
|
||||
a.x += i;
|
||||
<strong>end</strong>;
|
||||
<strong>end</strong>;
|
||||
<strong>begin</strong>
|
||||
<strong>var</strong> t := new t0;
|
||||
t += 2;
|
||||
</code><span class="auto-style1"><font size="2"><strong>end</strong>.</font></span></pre>
|
||||
</blockquote>
|
||||
<p>Âàæíî îòìåòèòü, ÷òî åñëè ñëåâà îò ðàñøèðåííîãî ïðèñâàèâàíèÿ íàõîäèòñÿ
|
||||
ñâîéñòâî, òî ïåðåãðóæåííàÿ ôîðìà ðàñøèðåííîãî ïðèñâàèâàíèÿ èãíîðèðóåòñÿ è ñàìî
|
||||
ðàñøèðåííîå ïðèñâàèâàíèå ðàçâîðà÷èâàåòñÿ â ïðèñâàèâàíèå è ñîîòâåòñòâóþùóþ
|
||||
îïåðàöèþ: </p>
|
||||
<blockquote>
|
||||
<pre><code><strong>type</strong>
|
||||
t0 = <strong>class
|
||||
</strong> x: integer;
|
||||
<strong>static</strong> <strong>function</strong> <strong>operator</strong>+=(a: t0; i: integer): t0;
|
||||
<strong>begin</strong>
|
||||
a.x += i;
|
||||
<strong>end</strong>;
|
||||
<strong>end</strong>;
|
||||
t1 = class
|
||||
<strong>property</strong> p1: t0 <strong>read</strong> ...<strong> write</strong> ...;
|
||||
<strong>end</strong>;
|
||||
<strong>begin</strong>
|
||||
<strong>var</strong> t := new t1;
|
||||
t.p1 += 2;
|
||||
</code><span class="auto-style1"><font size="2"><strong>end</strong>.</font></span></pre>
|
||||
</blockquote>
|
||||
<p>Â äàííîì êîäå ïîñëåäíèé îïåðàòîð ðàñøèðåííîãî ïðèñâàèâàíèÿ ïðèíóäèòåëüíî
|
||||
ðàçâåðíåòñÿ â </p>
|
||||
<blockquote>
|
||||
<pre><code>t.p1 := t.p1 + 2; </code></pre>
|
||||
</blockquote>
|
||||
<p>è ïîñêîëüêó äëÿ t0 íå ïåðåãðóæåíà îïåðàöèÿ +, òî êîìïèëÿòîð âûäàñò îøèáêó.</p>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -24,23 +24,30 @@
|
|||
Size: integer <b>read</b>;<br>
|
||||
<b>end</b>;<br>
|
||||
Brush = <b>class</b>(IShape,IBrush)<br>
|
||||
// метод Draw реализуется
|
||||
единожды<br>
|
||||
<b>end</b>;</code></p>
|
||||
|
||||
<b>procedure</b> Draw;<br> <strong>begin</strong><br>
|
||||
<strong>end</strong>;<br> <b>end</b>;</code></p>
|
||||
</blockquote>
|
||||
<p>Чтобы решить проблему с одинаковыми именами в интерфейсах, в
|
||||
.NET классы могут реализовывать методы интерфейсов так
|
||||
называемым явным образом, так что вызов метода интерфейса для переменной класса
|
||||
возможен только после явного приведения к типу интерфейса. В <b>
|
||||
PascalABC.NET</b> такие классы определять нельзя,
|
||||
однако, пользоваться такими классами, реализованными в .NET,
|
||||
можно. Например, тип <code>integer</code> явно
|
||||
реализует интерфейс <code>IComparable</code><span id="nsrTitle">:</span></p>
|
||||
<p>×òîáû ðåøèòü ïðîáëåìó ñ îäèíàêîâûìè èìåíàìè â èíòåðôåéñàõ, â .NET êëàññû
|
||||
ìîãóò ðåàëèçîâûâàòü ìåòîäû èíòåðôåéñîâ òàê íàçûâàåìûì <strong>ÿâíûì</strong>
|
||||
îáðàçîì, òàê ÷òî âûçîâ ìåòîäà èíòåðôåéñà äëÿ ïåðåìåííîé êëàññà âîçìîæåí òîëüêî
|
||||
ïîñëå ÿâíîãî ïðèâåäåíèÿ ê òèïó èíòåðôåéñà. <span id="nsrTitle">Íàïðèìåð:</span></p>
|
||||
<blockquote>
|
||||
<p><code><b>var</b> i: integer := 1;<br>
|
||||
<b>var</b> res : integer := IComparable(i).CompareTo(2);<br>
|
||||
// i.CompareTo(2)
|
||||
- ошибка компиляции </code></p>
|
||||
<p><code><strong>type</strong><br> IWindow = <strong>interface</strong><br>
|
||||
procedure Menu;<br> <strong>end</strong>;<br> IRestaurant =
|
||||
<strong>interface</strong><br> procedure Menu;<br>
|
||||
<strong>end</strong>;<br> RestaurantSystem = <strong>class</strong>(IWindow,IRestaurant)<br>
|
||||
<strong>public</strong><br> <strong>procedure</strong>
|
||||
IWindow.Menu; // ÿâíàÿ ðåàëèçàöèÿ ìåòîäà èíòåðôåéñà<br>
|
||||
<strong>begin</strong><br>
|
||||
Println('IWindow.Menu');<br> <strong>end</strong>;<br>
|
||||
<strong>procedure</strong> IRestaurant.Menu;<br> <strong>
|
||||
begin</strong><br>
|
||||
Println('IRestaurant.Menu');<br> <strong>end</strong>;<br>
|
||||
<strong>end</strong>;<br><br><strong>begin</strong><br> <strong>var</strong>
|
||||
r := new RestaurantSystem;<br> IWindow(r).Menu; <br>
|
||||
IRestaurant(r).Menu; <br> r.Menu; // îøèáêà êîìïèëÿöèè!<br><strong>end</strong>. </code>
|
||||
</p>
|
||||
</blockquote>
|
||||
<p> </p>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.5.0.2217
|
||||
3.5.0.2218
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2217'
|
||||
!define VERSION '3.5.0.2218'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit ABCButtons;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit ABCHouse;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Модуль реализует векторные графические объекты с возможностью масштабирования, наложения друг на друга,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Модуль ABCSprites реализует спрайты - анимационные объекты с автоматически меняющимися кадрами.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
unit Arrays;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit ClientServer;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
/// Модуль содержит шаблоны классов
|
||||
/// Stack — стек
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Core;
|
||||
{$reference 'System.Core.dll'}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit DMCollect;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit DMTaskMaker;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit DMZadan;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit DrawManField;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Исполнитель Чертежник предназначен для построения рисунков и чертежей на плоскости с координатами.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
// Для совместимости с Pascal ABC
|
||||
unit Events;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit FilesOperations;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit FormsABC;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Модуль предоставляет константы, типы, процедуры, функции и классы для рисования в графическом окне
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit GraphABCHelper;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (©) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (©) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///Модуль графики
|
||||
unit GraphWPF;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///--
|
||||
unit GraphWPFBase;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit IniFile;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit MPI;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Oberon00System;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///--
|
||||
unit PABCExtensions;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
/// Стандартный модуль
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit PointRect;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
unit PointerTools;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Исполнитель Робот действует на прямоугольном клеточном поле. Между некоторыми клетками, а также по периметру поля находятся стены.
|
||||
|
|
@ -397,6 +397,10 @@ begin
|
|||
RegisterTask('p14',p14);
|
||||
RegisterTask('p15',p15);
|
||||
|
||||
RegisterTask('ps1',ps1);
|
||||
RegisterTask('ps2',ps2);
|
||||
RegisterTask('ps3',ps3);
|
||||
|
||||
RegisterTask('pp1',pp1);
|
||||
RegisterTask('pp2',pp2);
|
||||
RegisterTask('pp3',pp3);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit RobotField;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit RobotTaskMaker;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit RobotZadan;
|
||||
|
||||
|
|
@ -144,6 +144,10 @@ procedure p13;
|
|||
procedure p14;
|
||||
procedure p15;
|
||||
|
||||
procedure ps1;
|
||||
procedure ps2;
|
||||
procedure ps3;
|
||||
|
||||
procedure pp1;
|
||||
procedure pp2;
|
||||
procedure pp3;
|
||||
|
|
@ -2396,6 +2400,34 @@ begin
|
|||
end
|
||||
end;
|
||||
|
||||
procedure ps1;
|
||||
begin
|
||||
TaskText('Задание ps1. Закрась помеченные клетки. Составь процедуру PR2 и вызови её');
|
||||
Field(5,5);
|
||||
TagRect(2,3,3,3);
|
||||
RobotBeginEnd(2,3,2,3);
|
||||
end;
|
||||
|
||||
procedure ps2;
|
||||
begin
|
||||
TaskText('Задание ps2. Закрасить помеченные клетки. Скопируй процедуру PR3 из предыдущего задания и вызови её трижды');
|
||||
Field(7,7);
|
||||
TagRect(2,2,3,2);
|
||||
TagRect(5,4,6,4);
|
||||
TagRect(3,6,4,6);
|
||||
RobotBeginEnd(2,2,3,6);
|
||||
end;
|
||||
|
||||
procedure ps3;
|
||||
begin
|
||||
TaskText('Задание ps3. Закрасить помеченные клетки. Составь процедуру PD3 и вызови её трижды');
|
||||
Field(8,8);
|
||||
TagRect(2,2,2,4);
|
||||
TagRect(4,3,4,5);
|
||||
TagRect(7,5,7,7);
|
||||
RobotBeginEnd(2,2,7,5);
|
||||
end;
|
||||
|
||||
procedure pp1;
|
||||
var i: integer;
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Sockets;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Utils;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit vcl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (©) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (©) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///Модуль векторных графических объектов на основе WPF
|
||||
unit WPFObjects;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///--
|
||||
unit __RedirectIOMode;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
///--
|
||||
unit __RunMode;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (©) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (©) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
/// Модуль трёхмерной графики
|
||||
unit Graph3D;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Исполнитель Робот действует на прямоугольном клеточном поле. Между некоторыми клетками, а также по периметру поля находятся стены.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
///Исполнитель Чертежник предназначен для построения рисунков и чертежей на плоскости с координатами.
|
||||
|
|
|
|||
|
|
@ -3381,7 +3381,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
{
|
||||
List<SymbolInfo> sil = compiled_find(name);
|
||||
List<SymbolInfo> sil2 = find_in_additional_names(name);
|
||||
if (sil == null && sil2 == null && string.Compare(name,"Create",true) != 0)
|
||||
if (/*sil == null &&*/ sil2 == null && string.Compare(name,"Create",true) != 0)
|
||||
{
|
||||
compiled_type_node bas_type = base_type as compiled_type_node;
|
||||
while (sil == null && bas_type != null && bas_type.scope != null)
|
||||
|
|
|
|||
|
|
@ -24,33 +24,26 @@ namespace VisualPascalABC
|
|||
void GetCurNextLines(out string Current, out string Next, out string Prev) // Next - следующая непустая строка
|
||||
{
|
||||
var ta = CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
|
||||
var doc = ta.Document;
|
||||
var tl_beg = new TextLocation(ta.Caret.Column, ta.Caret.Line);
|
||||
var cls = doc.GetLineSegment(ta.Caret.Line);
|
||||
LineSegment nls = null;
|
||||
if (ta.Caret.Line + 1 < doc.TotalNumberOfLines)
|
||||
nls = doc.GetLineSegment(ta.Caret.Line + 1);
|
||||
Current = GetLine(ta.Caret.Line);
|
||||
|
||||
var i = ta.Caret.Line + 1;
|
||||
do
|
||||
{
|
||||
Next = GetLine(i);
|
||||
i++;
|
||||
} while (Next != null && Next.Trim() == "");
|
||||
|
||||
Prev = null;
|
||||
//if (ta.Caret.Line > 0)
|
||||
//Prev = GetLine(ta.Caret.Line - 1);
|
||||
if (ta.Caret.Line > 0)
|
||||
if (ta.Caret.Line == 0)
|
||||
return;
|
||||
var j = ta.Caret.Line;
|
||||
do
|
||||
{
|
||||
var j = ta.Caret.Line;
|
||||
do
|
||||
{
|
||||
j--;
|
||||
Prev = GetLine(j);
|
||||
} while (j > 0 && Prev.Trim() == "");
|
||||
if (Prev.Trim() == "")
|
||||
Prev = null;
|
||||
}
|
||||
j--;
|
||||
Prev = GetLine(j);
|
||||
} while (j > 0 && Prev.Trim() == "");
|
||||
if (Prev.Trim() == "")
|
||||
Prev = null;
|
||||
}
|
||||
|
||||
int Indent(string s)
|
||||
|
|
@ -192,9 +185,10 @@ namespace VisualPascalABC
|
|||
var seg = doc.GetLineSegment(ta.Caret.Line);
|
||||
var curline = doc.GetText(seg).TrimEnd();
|
||||
if (ta.Caret.Column >= curline.Length)
|
||||
if (curline.Contains(":="))
|
||||
//if (curline.Contains(":=") && !curline.TrimStart().ToLower().StartsWith("for")) // Это наиболее спорно. Надо проверять, что до присваивания - одно имя
|
||||
if (Regex.IsMatch(curline, @"^\s*\w+\s*:=", RegexOptions.IgnoreCase))
|
||||
{
|
||||
var curlinenew = Regex.Replace(curline, @"(\s*)(\S+)(\s*):=(\s*)([^;]+)(;?)", @"$1$2 := $5;");
|
||||
var curlinenew = Regex.Replace(curline, @"(\s*)(\S+)(\s*):=(\s*)([^ ;]+)(\s*)(;?)", @"$1$2 := $5;",RegexOptions.IgnoreCase);
|
||||
while (curlinenew.EndsWith(";;"))
|
||||
curlinenew = curlinenew.Remove(curlinenew.Length - 1);
|
||||
doc.Replace(seg.Offset, curline.Length, curlinenew);
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ namespace VisualPascalABC
|
|||
|
||||
public static void GenerateTemplate(string pattern, TextArea textArea) => GenerateTemplate(pattern, textArea, templateManager);
|
||||
|
||||
public static void GenerateTemplate(string pattern, TextArea textArea, CodeTemplateManager templateManager, bool withPatternLength = true)
|
||||
public static void GenerateTemplate(string pattern, TextArea textArea, CodeTemplateManager templateManager, bool withPatternLength = true, Func<string,string> PostAction = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -384,7 +384,12 @@ namespace VisualPascalABC
|
|||
doc.Replace(offset, ind, "");
|
||||
doc.CommitUpdate();
|
||||
textArea.Caret.Column = col - ind;
|
||||
textArea.InsertString(sb.ToString());
|
||||
var sbs = sb.ToString();
|
||||
if (PostAction != null)
|
||||
{
|
||||
sbs = PostAction(sbs);
|
||||
}
|
||||
textArea.InsertString(sbs);
|
||||
textArea.Caret.Line = line + cline;
|
||||
textArea.Caret.Column = col - ind + ccol;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,27 +28,58 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.listBox1 = new System.Windows.Forms.ListView();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox1.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.ItemHeight = 16;
|
||||
this.listBox1.FullRowSelect = true;
|
||||
this.listBox1.HideSelection = false;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.listBox1.MultiSelect = false;
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(366, 339);
|
||||
this.listBox1.Size = new System.Drawing.Size(464, 562);
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick);
|
||||
this.listBox1.TileSize = new System.Drawing.Size(380, 14);
|
||||
this.listBox1.UseCompatibleStateImageBehavior = false;
|
||||
this.listBox1.View = System.Windows.Forms.View.Tile;
|
||||
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
this.listBox1.SizeChanged += new System.EventHandler(this.listBox1_SizeChanged);
|
||||
this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick_1);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.label1.Location = new System.Drawing.Point(0, 566);
|
||||
this.label1.MaximumSize = new System.Drawing.Size(0, 100);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(464, 86);
|
||||
this.label1.TabIndex = 1;
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.splitter1.Location = new System.Drawing.Point(0, 562);
|
||||
this.splitter1.Name = "splitter1";
|
||||
this.splitter1.Size = new System.Drawing.Size(464, 4);
|
||||
this.splitter1.TabIndex = 2;
|
||||
this.splitter1.TabStop = false;
|
||||
//
|
||||
// CodeTemplatesForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(366, 339);
|
||||
this.ClientSize = new System.Drawing.Size(464, 652);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Controls.Add(this.splitter1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.DockAreas = ((WeifenLuo.WinFormsUI.Docking.DockAreas)((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft | WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight)));
|
||||
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.Name = "CodeTemplatesForm";
|
||||
this.TabText = "Образцы кода";
|
||||
this.Text = "Образцы кода";
|
||||
|
|
@ -59,6 +90,8 @@
|
|||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private System.Windows.Forms.ListView listBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Splitter splitter1;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,8 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using VisualPascalABC;
|
||||
using System.Text.RegularExpressions;
|
||||
using ICSharpCode.TextEditor.Document;
|
||||
|
||||
namespace CodeTemplatesPlugin
|
||||
{
|
||||
|
|
@ -17,14 +19,40 @@ namespace CodeTemplatesPlugin
|
|||
public CodeTemplateManager schoolManager;
|
||||
public VisualPascalABC.Form1 MainForm;
|
||||
|
||||
private Dictionary<string, string> help = new Dictionary<string, string>();
|
||||
|
||||
public CodeTemplatesForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
var scale = ScreenScale.Calc();
|
||||
listBox1.TileSize = new Size(listBox1.TileSize.Width, System.Convert.ToInt32(16 * scale));
|
||||
try
|
||||
{
|
||||
schoolManager = new CodeTemplateManager("school.pct");
|
||||
listBox1.Items.Clear();
|
||||
listBox1.Items.AddRange(schoolManager.ht.Keys.ToArray());
|
||||
//listBox1.Items.AddRange(schoolManager.ht.Keys.ToArray());
|
||||
foreach (var x in schoolManager.ht.Keys)
|
||||
{
|
||||
var a = x.Split('/');
|
||||
listBox1.Items.Add(a[0]);
|
||||
a[1] = a[1].Trim();
|
||||
help[a[0]] = a[2];
|
||||
var ind = -1;
|
||||
for (var i=0; i < listBox1.Groups.Count; i++)
|
||||
{
|
||||
if (listBox1.Groups[i].Name == a[1])
|
||||
{
|
||||
ind = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ind == -1)
|
||||
{
|
||||
listBox1.Groups.Add(a[1], a[1]);
|
||||
ind = listBox1.Groups.Count - 1;
|
||||
}
|
||||
listBox1.Items[listBox1.Items.Count - 1].Group = listBox1.Groups[ind];
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -37,14 +65,93 @@ namespace CodeTemplatesPlugin
|
|||
e.Cancel = true;
|
||||
}
|
||||
|
||||
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
string GetLine(int lineNum)
|
||||
{
|
||||
var s = listBox1.SelectedItem.ToString();
|
||||
var ta = MainForm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
|
||||
var doc = ta.Document;
|
||||
if (lineNum < doc.TotalNumberOfLines && lineNum >= 0)
|
||||
{
|
||||
var cseg = doc.GetLineSegment(lineNum);
|
||||
return TextUtilities.GetLineAsString(doc, lineNum);
|
||||
}
|
||||
|
||||
else return null;
|
||||
}
|
||||
|
||||
string GetPrevLine(int lineNum) // предыдущая непустая строка
|
||||
{
|
||||
var ta = MainForm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
|
||||
|
||||
string Prev = null;
|
||||
if (ta.Caret.Line == 0)
|
||||
return null;
|
||||
var j = ta.Caret.Line;
|
||||
do
|
||||
{
|
||||
j--;
|
||||
Prev = GetLine(j);
|
||||
} while (j > 0 && Prev.Trim() == "");
|
||||
if (Prev.Trim() == "")
|
||||
return null;
|
||||
else return Prev;
|
||||
}
|
||||
|
||||
string GetNextLine(int lineNum) // следущая непустая строка
|
||||
{
|
||||
var ta = MainForm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
|
||||
string Next;
|
||||
var i = ta.Caret.Line + 1;
|
||||
do
|
||||
{
|
||||
Next = GetLine(i);
|
||||
i++;
|
||||
} while (Next != null && string.IsNullOrWhiteSpace(Next));
|
||||
return Next;
|
||||
}
|
||||
|
||||
private void listBox1_MouseDoubleClick_1(object sender, MouseEventArgs e)
|
||||
{
|
||||
var s = listBox1.SelectedItems[0].Text;
|
||||
ICSharpCode.TextEditor.TextArea ta = MainForm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
|
||||
ta.Focus();
|
||||
if (schoolManager.ht.ContainsKey(s))
|
||||
var full = schoolManager.ht.Keys.FirstOrDefault(st => st.StartsWith(s));
|
||||
//if (schoolManager.ht.Keys.Select(st=>st.Substring(0,s.IndexOf('/'))).Contains(s))
|
||||
if (full != null)
|
||||
{
|
||||
CodeCompletionActionsManager.GenerateTemplate(s, ta, schoolManager, false);
|
||||
// Если шаблон начинается с begin и предыдущая конструкция с начала строки - управляющий оператор, то сдвинуть курсор, выровняв по предыдущей конструкции
|
||||
if (s.StartsWith("begin … end"))
|
||||
{
|
||||
var Prev = GetPrevLine(ta.Caret.Line);
|
||||
Match m = null;
|
||||
if (Prev != null)
|
||||
{
|
||||
m = Regex.Match(Prev, @"^\s*(loop|for|while|if|else)", RegexOptions.IgnoreCase);
|
||||
if (m.Groups[1].Value.Length > 0)
|
||||
{
|
||||
var Curr = GetLine(ta.Caret.Line);
|
||||
if (Curr.Length < m.Groups[1].Index)
|
||||
{
|
||||
ta.Caret.Column = Curr.Length;
|
||||
ta.InsertString(new string(' ', m.Groups[1].Index - Curr.Length));
|
||||
}
|
||||
|
||||
ta.Caret.Column = m.Groups[1].Index;
|
||||
}
|
||||
}
|
||||
var Next = GetNextLine(ta.Caret.Line);
|
||||
if (m != null && m.Groups[1].Value.ToLower().Equals("if") && Next != null && Next.TrimStart().ToLower().StartsWith("else"))
|
||||
{
|
||||
CodeCompletionActionsManager.GenerateTemplate(s, ta, schoolManager, false, str => str.Remove(str.Length-1)); // Удалить ; в begin end перед else
|
||||
}
|
||||
else
|
||||
{
|
||||
CodeCompletionActionsManager.GenerateTemplate(s, ta, schoolManager, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CodeCompletionActionsManager.GenerateTemplate(s, ta, schoolManager, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -52,5 +159,22 @@ namespace CodeTemplatesPlugin
|
|||
}
|
||||
ta.Focus();
|
||||
}
|
||||
|
||||
private void listBox1_SizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
listBox1.TileSize = new Size(listBox1.Size.Width-4, listBox1.TileSize.Height);
|
||||
}
|
||||
|
||||
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listBox1.SelectedItems.Count == 0)
|
||||
return;
|
||||
var s = listBox1.SelectedItems[0].Text;
|
||||
if (help.ContainsKey(s))
|
||||
{
|
||||
label1.Text = help[s];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using VisualPascalABCPlugins;
|
|||
using VisualPascalABC;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
|
||||
namespace CodeTemplatesPlugin
|
||||
{
|
||||
public class CodeTemplates_VisualPascalABCPlugin : IVisualPascalABCPlugin
|
||||
|
|
|
|||
|
|
@ -132,5 +132,11 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\CodeTemplates.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\CodeTemplates1.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\format.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
11
VisualPlugins/CodeTemplatesPlugin/Images.Designer.cs
generated
11
VisualPlugins/CodeTemplatesPlugin/Images.Designer.cs
generated
|
|
@ -34,8 +34,10 @@
|
|||
//
|
||||
// PluginImage
|
||||
//
|
||||
this.PluginImage.Image = global::CodeTemplatesPlugin.Properties.Resources.CodeTemplates;
|
||||
this.PluginImage.Location = new System.Drawing.Point(39, 37);
|
||||
this.PluginImage.Image = global::CodeTemplatesPlugin.Properties.Resources.CodeTemplate3;
|
||||
this.PluginImage.InitialImage = global::CodeTemplatesPlugin.Properties.Resources.CodeTemplates2;
|
||||
this.PluginImage.Location = new System.Drawing.Point(78, 71);
|
||||
this.PluginImage.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.PluginImage.Name = "PluginImage";
|
||||
this.PluginImage.Size = new System.Drawing.Size(16, 16);
|
||||
this.PluginImage.TabIndex = 1;
|
||||
|
|
@ -44,10 +46,11 @@
|
|||
//
|
||||
// Images
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(385, 241);
|
||||
this.ClientSize = new System.Drawing.Size(770, 463);
|
||||
this.Controls.Add(this.PluginImage);
|
||||
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.Name = "Images";
|
||||
this.Text = "Images";
|
||||
((System.ComponentModel.ISupportInitialize)(this.PluginImage)).EndInit();
|
||||
|
|
|
|||
|
|
@ -60,6 +60,16 @@ namespace CodeTemplatesPlugin.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap CodeTemplate3 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CodeTemplate3", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
@ -69,5 +79,15 @@ namespace CodeTemplatesPlugin.Properties {
|
|||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap CodeTemplates2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CodeTemplates2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,13 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="CodeTemplate3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\format.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CodeTemplates" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CodeTemplates.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CodeTemplates2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CodeTemplates1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1,69 +1,74 @@
|
|||
[Left]
|
||||
[Left/Команды Робота/Команда перемещения влево]
|
||||
Left;
|
||||
|
||||
[Right]
|
||||
[Right/Команды Робота/Команда перемещения вправо]
|
||||
Right;
|
||||
|
||||
[Up]
|
||||
[Up/Команды Робота/Команда перемещения вверх]
|
||||
Up;
|
||||
|
||||
[Down]
|
||||
[Down/Команды Робота/Команда перемещения вниз]
|
||||
Down;
|
||||
|
||||
[Paint]
|
||||
[Paint/Команды Робота/Команда закрашивания текущей клетки]
|
||||
Paint;
|
||||
|
||||
[Новая программа]
|
||||
[Новая программа/Основное/Шаблон новой программы]
|
||||
begin
|
||||
|
|
||||
end.
|
||||
|
||||
[begin … end]
|
||||
[var •: тип/Основное/Описание переменной с типом]
|
||||
var |: тип;
|
||||
|
||||
[Print/Операторы/Оператор вывода]
|
||||
Print(|);
|
||||
|
||||
[Println/Операторы/Оператор вывода с переходом на новую строку]
|
||||
Println(|);
|
||||
|
||||
[ReadInteger/Операторы/Описание целой переменной со вводом]
|
||||
var | := ReadInteger;
|
||||
|
||||
[ReadReal/Операторы/Описание вещественной переменной со вводом]
|
||||
var | := ReadReal;
|
||||
|
||||
[begin … end/Операторы/Составной оператор. Используется для превращения группы операторов в один. begin и end называют операторными скобками]
|
||||
begin
|
||||
|
|
||||
end;
|
||||
|
||||
[loop … do]
|
||||
[loop • do/Управляющие операторы/Оператор цикла с известным числом повторений]
|
||||
loop 10 do
|
||||
begin
|
||||
|
|
||||
end;
|
||||
|
||||
[for var i:=• to • do]
|
||||
[for var i:=• to • do …/Управляющие операторы/Оператор цикла со счётчиком]
|
||||
for var i:=1 to 10 do
|
||||
begin
|
||||
|
|
||||
end;
|
||||
|
||||
[if • then …]
|
||||
if условие then
|
||||
begin
|
||||
|
|
||||
end;
|
||||
|
||||
[if • then … else …]
|
||||
[if • then …/Управляющие операторы/Условный оператор - неполная форма]
|
||||
if условие then
|
||||
|
|
||||
|
||||
[if • then … else …/Управляющие операторы/Условный оператор - полная форма]
|
||||
if условие then
|
||||
begin
|
||||
|
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
[while • do …]
|
||||
[while • do …/Управляющие операторы/Оператор цикла с предварительным условием]
|
||||
while условие do
|
||||
begin
|
||||
|
|
||||
end;
|
||||
|
||||
[repeat … until •]
|
||||
[repeat … until •/Управляющие операторы/Оператор цикла с последующим условием]
|
||||
repeat
|
||||
|
|
||||
until условие;
|
||||
|
||||
[case • of … end]
|
||||
[case • of … end/Управляющие операторы/Оператор выбора варианта]
|
||||
case | of
|
||||
: ;
|
||||
: ;
|
||||
• : …;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Reference in a new issue