diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/README b/README new file mode 100644 index 0000000..c6df806 --- /dev/null +++ b/README @@ -0,0 +1,53 @@ +-===============- +-= MARK EDITOR =- +-===============- + + Mark Editor - this is a text editor with comprised of it instrument marksheideren calculations. + + Mark Editor is released under the terms of the GNU General Public License. + + http://mykaralw.narod.ru/download/exe/i/markedit.html + +-= REQUIREMENTS =- + * Windows XP + * BCX (Basic to C translator) + * PellesC + * Lcc-Win32 + * FreeUPX + +-= INSTALL =- + edit setpath.cmd (view Install.txt) + `configure' + `make' or `make -d' + `make upx' + `make install' or `make install "INSTALLPATH"' + `make clean' or `make clean all' + +-= BACKENDS =- + +-= ARTWORK=- + +-= CONTACT =- + More info on: http://mykaralw.narod.ru/ + Bugs, emails: mykaralw@yandex.ru + +-= RESOURCES =- + + * Basic to C Translator (BCX) + http://www.bcxgurus.com/ + + * Pelles C for Windows + http://www.smorgasbordet.com/pellesc/download.htm + + * Lcc-Win32 compiler + http://www.q-software-solutions.de + + * Free UPX + http://www.pazera-software.com/products/free-upx/ + +-= THANKS =- + Kevin Diggins [http://www.bcxgurus.com/] (BCX author) + Pelle Orinius [http://www.smorgasbordet.com/pellesc/download.htm] (PellesC author) + Jacob Navia and Q Software Solutions GmbH [http://www.q-software-solutions.de] (Lcc-Win32 author) + Markus Oberhumer , Laszlo Molnar & John Reiser [http://www.pazera-software.com/products/free-upx/] (FreeUPX authors) + \ No newline at end of file diff --git a/markedit.exe b/markedit.exe new file mode 100644 index 0000000..d562b6d Binary files /dev/null and b/markedit.exe differ diff --git a/markedit.txt b/markedit.txt new file mode 100644 index 0000000..1d6d0aa --- /dev/null +++ b/markedit.txt @@ -0,0 +1,81 @@ +MarkEdit for Windows +is copyright © 2010-2011 +by AKON & TerraNoNames. +http://mykaralw.narod.ru/ +Version 1.0.0.3, Feb 12 2011. + +[12.02.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлен скрипт конфигурирования (configure) для сборки. +* добавлена документация разработки (SRC\*\*.txt). + + +[04.02.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлен инструмен линейной интерполяции. +* обновлена документация. + + +[29.01.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлены инструмены расчета стягивающих хорд. + + +[22.01.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлены инструмены расчета вертикального профиля. + + +[19.01.2011] Akon + "MarkEdit v.1.0.0.2" +! исправлена ошибка(ляп) в расчете смещения пункта от оси трассы на прямой. + + +[15.01.2011] Akon + "MarkEdit v.1.0.0.2" +! изменен расчет пикетажа на переходной кривой, приведен в соответствие с разбивочной осью: + PKpz = PKnsk+lpk(pz) = PKnsk+l(pz)+l(pz)^5/(60*C^2) = PKnsk+l(pz)*[1+l(pz)^4/(60*C^2)] +* добавлен инструмен настройки точности округления результата. + + +[30.12.2010] Akon + "MarkEdit v.1.0.0.1" +! изменена инициализация меню, что сделало C-код совместимым с Pelles C for Windows: + Wc.lpszMenuName = MAKEINTRESOURCE(IDMAINMENU) +* наведена логика (не до конца) в операциях открытия-сохранения текстовых файлов +* исходный код разбит на модули, что улучшило его читаемость: + MarkEdit.h + MarkEdit.Bas + medlgabout.basi + medlgos.basi + medlgrcc.basi + medlgrl.basi + medlgrsc.basi + medlgtcc.basi + medlgtl.basi + medlgtsc.basi + megsedit.basi + meids.basi + memark.basi + memath.basi +! маркшейдерские вычисления переделаны в вызываемые функции (контроль ляпов): + Function MarkLen(tY As Double, tX As Double) As Double + Function MarkPK(tY As Double,tX As Double, tSin As Double,tCos As Double) As Double + Function MarkDelta(tY As Double,tX As Double, tSin As Double,tCos As Double) As Double + Function MarkSCFi(tL As Double,tC As Double) As Double + Function MarkSCX(tL As Double,tC As Double) As Double + Function MarkSCY(tL As Double,tC As Double) As Double + Function MarkSCa1(tL As Double,tC As Double) As Double + Function MarkSCa(tL As Double,tC As Double) As Double + Function MarkSCZ(tL As Double,tC As Double) As Double + Function MarkSCddX(tL As Double,tC As Double) As Double + Function MarkSChigh(Xsk As Double, Ysk As Double, FIsk As Double, y0pz As Double) As Double + Function MarkSCLpk(tL As Double, tC As Double) As Double +! доопределены границы переходной кривой: + 0 <= x0pz <= Xsk+(Ysk-y0pz)*tan(FIsk) +! добавлена документация к программе + + +[20.12.2010] Akon + "MarkEdit v.1.0.0.0" +* стартовая версия программы diff --git a/src/Authors.txt b/src/Authors.txt new file mode 100644 index 0000000..d1ac79f --- /dev/null +++ b/src/Authors.txt @@ -0,0 +1 @@ +Akon [http://mykaralw.narod.ru] diff --git a/src/Copying.txt b/src/Copying.txt new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/src/Copying.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/src/Install.txt b/src/Install.txt new file mode 100644 index 0000000..ccea679 --- /dev/null +++ b/src/Install.txt @@ -0,0 +1,83 @@ +Basic Installation +================== + + These are generic installation instructions. + + Edit setpath.cmd: + + SET BCXPATH=... - path Basic To C Translator (BCX) + SET POCCPATH=... - path Pelles C compiler + SET LCCPATH=... - path Lcc-Win32 compiler + SET UPXPATH=... - path UPX compressor + + Edit setproject.cmd: + + set PRJNAME=... - project name (name main.bas in project) + set CC={POCC|LCC} - name C compiler {PellesC|Lcc-Win32} + set RC={TRUE|FALSE} - {enable|disable} resource compiler + set RESPATH=... - subpath resource + set RESNAME=... - name resource (name main.rc) + set UPX={TRUE|FALSE} - {enable|disable} UPX compress + set INSTALLPATH=... - path for installation + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `make' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `configure' to configure the package for your system. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Type `make install' to install the programs and any data files and + documentation. + + 4. You can remove the program binaries and object files from the + source code directory by typing `make clean' or `make clean all'. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure --CC POCC + ./configure --CC LCC + +Installation Names +================== + + By default, `make install' will install the package's files in +"INSTALLPATH". You can specify an installation `make install "INSTALLPATH"'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `setproject.cmd' that gives +default values for variables like `CC' and `INSTALLPATH'. + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' + Print a summary of the options to `configure', and exit. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/src/MarkEdit.Bas b/src/MarkEdit.Bas new file mode 100644 index 0000000..e7737f6 --- /dev/null +++ b/src/MarkEdit.Bas @@ -0,0 +1,309 @@ +$INCLUDE "meids.basi" + +GLOBAL Brl As Double +GLOBAL LenFrac As Integer +GLOBAL LenFracA As Integer + +'program variables + +GLOBAL AppName$ +GLOBAL AppMeCaption$ +GLOBAL Caption$ + +GLOBAL szFile$ +GLOBAL szFileTitle$ + +GLOBAL Form1 AS HWND +GLOBAL Edit1 AS HWND +GLOBAL Wc AS WNDCLASS +GLOBAL OpenFileName AS OPENFILENAME + +DIM wRect AS RECT 'rect structure for window pos +DIM ww AS DWORD 'window width +DIM wh AS DWORD 'window height +DIM bNeedSave AS BOOL +DIM bSave AS BOOL +DIM iReturn AS DWORD + + +FUNCTION WINMAIN + Brl = 0.76 + LenFrac = 4 + LenFracA = 2 + LOCAL Msg AS MSG + AppName$ = "Mark_Editor" + AppMeCaption$ = "Mark Editor by AKON (rus)" + Caption$ = AppMeCaption$ + bSave = TRUE + bNeedSave = FALSE + + If FINDFIRSTINSTANCE(AppName$) Then Exit Function + + Wc.style = CS_HREDRAW OR CS_VREDRAW + Wc.lpfnWndProc = WndProc + Wc.cbClsExtra = 0 + Wc.cbWndExtra = 0 + Wc.hInstance = hInst + Wc.hIcon = LoadIcon ( hInst, MAKEINTRESOURCE(IDI_MEICON)) + Wc.hCursor = LoadCursor ( NULL,IDC_ARROW ) + Wc.hbrBackground = GetStockObject ( WHITE_BRUSH ) + Wc.lpszMenuName = MAKEINTRESOURCE(IDMAINMENU) + Wc.lpszClassName = AppName$ + RegisterClass(&Wc) + + +' create the main window + Form1 = CreateWindow(AppName$, Caption$, WS_CAPTION OR WS_MAXIMIZEBOX OR WS_MINIMIZEBOX OR _ + WS_SYSMENU OR WS_VISIBLE,0,0, 600, 500, NULL, NULL, hInst, NULL) + +' create the edit window + Edit1 = CreateWindow("edit",NULL, WS_CHILD OR WS_VISIBLE OR WS_BORDER OR _ + ES_LEFT OR WS_HSCROLL OR WS_VSCROLL OR ES_MULTILINE OR _ + ES_AUTOVSCROLL OR ES_AUTOHSCROLL,0, 0, 550, 450, _ + Form1, EDIT_1, hInst,NULL ) + + PosMainWindow (Form1) 'set main window pos + ShowWindow (Form1,CmdShow) 'show that baby! + UpdateWindow (Form1) 'update it + + While GetMessage (&Msg,NULL,0,0) 'message loop + TranslateMessage (&Msg) + DispatchMessage (&Msg) + Wend + + Function = Msg.wParam 'return this +End Function + +SUB PosMainWindow (hWnd AS HWND) + GetWindowRect (hWnd, &wRect) + ww = GetSystemMetrics (SM_CXSCREEN) + wh = GetSystemMetrics (SM_CYSCREEN)-GetSystemMetrics(SM_CYCAPTION)-5 + SetWindowPos (hWnd, NULL,0,0,ww,wh,SWP_SHOWWINDOW) +End Sub + + +$INCLUDE "megsedit.basi" +$INCLUDE "medlgos.basi" + +$INCLUDE "medlgopt.basi" +$INCLUDE "medlgabout.basi" + +$INCLUDE "memath.basi" +$INCLUDE "memark.basi" + +$INCLUDE "medlgtl.basi" +$INCLUDE "medlgtcc.basi" +$INCLUDE "medlgtsc.basi" + +$INCLUDE "medlgrl.basi" +$INCLUDE "medlgrcc.basi" +$INCLUDE "medlgrsc.basi" + +$INCLUDE "medlgevl.basi" +$INCLUDE "medlgevc.basi" + +$INCLUDE "medlgchc.basi" +$INCLUDE "medlgchs.basi" + +$INCLUDE "medlgint.basi" + +CALLBACK FUNCTION WndProc + DIM T$ + DIM hDC AS HDC + DIM ps AS PAINTSTRUCT + Dim i + + SELECT CASE CBMSG + + CASE WM_COMMAND + IF LOWORD (wParam) = EDIT_1 THEN + IF HIWORD (wParam) = EN_CHANGE THEN + bNeedSave = TRUE + IF HIWORD (wParam) = EN_ERRSPACE OR HIWORD (wParam) = EN_MAXTEXT THEN + MsgBox "Edit control out of space.","Error!", 16 + EXIT FUNCTION + END IF + END IF + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_NEW THEN + bNeedSave = Not (FileNewMeEdit (Form1, Edit1)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_OPEN THEN + bNeedSave = Not (FileOpenMeEdit (Form1, Edit1)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_SAVE THEN + bNeedSave = Not (FileSaveMeEdit (Form1, Edit1)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_SAVEAS THEN + bNeedSave = Not (FileSaveAsMeEdit (Form1, Edit1)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_PRINT THEN + notice("Sorry - Not implemented yet!") + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_EXIT THEN ' Was the EXIT menu clicked? + bNeedSave = Not (FileExitMeEdit (Form1, Edit1)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_DELETE THEN + SendMessage(Edit1, WM_CLEAR, 0, 0) + Caption$ = Caption$ & " - " & szFile$ + SetWindowText (Form1, Caption$) + bNeedSave = TRUE + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_UNDO THEN + IF SendMessage(Edit1, EM_CANUNDO,0,0) THEN + SendMessage(Edit1, WM_UNDO, 0, 0) + ELSE + MsgBox "Nothing to undo!","Undo Notification", 0 + END IF + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_CUT THEN + SendMessage (Edit1, WM_CUT, 0, 0) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_COPY THEN + SendMessage (Edit1, WM_COPY, 0, 0) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_PASTE THEN + SendMessage (Edit1, WM_PASTE, 0, 0) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_SELECTALL THEN + SendMessage (Edit1, EM_SETSEL, 0, MAKELONG(-1,0)) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_OPTION THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_OPTD),Form1,DlgOPT) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_ABOUT THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_ABOUT),Form1,AboutDlg) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_TLD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_TLD),Form1,DlgTLD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_TCD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_TCD),Form1,DlgTCD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_TSD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_TSD),Form1,DlgTSD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_RLD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_RLD),Form1,DlgRLD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_RCD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_RCD),Form1,DlgRCD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_RSD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_RSD),Form1,DlgRSD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_EVLD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_EVLD),Form1,DlgEvLD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_EVCD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_EVCD),Form1,DlgEvCD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_CHCD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_CHCD),Form1,DlgCHCD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_CHSD THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_CHSD),Form1,DlgCHSD) + EXIT FUNCTION + END IF + + IF LOWORD(wParam) = IDM_INTER THEN + MessageBeep(MB_OK) + DialogBox(GetModuleHandle(0),MAKEINTRESOURCE(IDD_INTER),Form1,DlgINTER) + EXIT FUNCTION + END IF + EXIT FUNCTION + + CASE WM_SETFOCUS + SetFocus(Edit1) + EXIT FUNCTION + + CASE WM_PAINT + hDC = BeginPaint(hWnd,&ps) + T$ = "Editbox is using" & Str$(GetWindowTextLength(Edit1)) & " bytes" + TextOut(hDC,75,128,T$,len(T$)) + EndPaint(hWnd,&ps) + EXIT FUNCTION + + CASE WM_SIZE 'set editor size + MoveWindow(Edit1,0, 0, LOWORD(lParam), HIWORD(lParam), TRUE) + EXIT FUNCTION + + CASE WM_KEYDOWN + IF wParam = VK_DELETE THEN + SendMessage(Edit1, WM_CLEAR, 0, 0) + Caption$ = Caption$ & " - " & szFile$ + SetWindowText (Form1, Caption$) + bNeedSave = TRUE + END IF + EXIT FUNCTION + + CASE WM_DESTROY + PostQuitMessage(0) + EXIT FUNCTION + + CASE WM_LBUTTONDOWN + notice ("Made it!") + EXIT FUNCTION + + END SELECT +END FUNCTION diff --git a/src/MarkEdit.h b/src/MarkEdit.h new file mode 100644 index 0000000..b1fdbfa --- /dev/null +++ b/src/MarkEdit.h @@ -0,0 +1,189 @@ +// ICON +#define IDI_MEICON 12345 +#define IDI_BCXICON 54321 + +// File Menu +#define IDM_NEW 100 +#define IDM_OPEN 110 +#define IDM_SAVE 120 +#define IDM_SAVEAS 130 +#define IDM_PRINT 140 +#define IDM_PAGESETUP 150 +#define IDM_EXIT 160 + +// Edit Menu +#define IDM_UNDO 200 +#define IDM_SELECTALL 205 +#define IDM_CUT 210 +#define IDM_COPY 220 +#define IDM_PASTE 230 + +// Help Menu +#define IDM_SETTING 250 +#define IDM_OPTION 260 + +// Help Menu +#define IDM_HELPTOPICS 300 +#define IDM_ABOUT 310 + +// Help Dialog +#define IDD_ABOUT 500 +#define IDC_ABOUT_Name 501 +#define IDC_ABOUT_Coment 502 +#define IDC_ABOUT_Version 503 +#define IDC_ABOUT_Copy 504 +#define IDC_ABOUT_License 505 +#define IDC_ABOUT_Line 506 + +// Setting Dialog +#define IDD_OPTD 570 +#define IDC_Label_Trunc 571 +#define IDC_Label_LenFrac 572 +#define IDC_Edit_LenFrac 573 +#define IDC_Label_LenFracA 574 +#define IDC_Edit_LenFracA 575 + +// Window Controls +#define IDACCEL 400 +#define IDM_DELETE 410 +#define IDM_CLOSE 420 +#define IDMAINMENU 430 +#define IDAPPLICON 440 +#define IDAPPLCURSOR 450 +#define IDS_FILEMENU 2000 +#define IDS_HELPMENU 2010 +#define IDS_SYSMENU 2030 +#define IDM_STATUSBAR 3000 +#define ID_TOOLBAR 805 +#define IDC_EDIT 900 + +// Tools Menu +#define IDM_TLD 1001 +#define IDM_TCD 1002 +#define IDM_TSD 1003 +#define IDM_RLD 1004 +#define IDM_RCD 1005 +#define IDM_RSD 1006 +#define IDM_EVLD 1007 +#define IDM_EVCD 1008 +#define IDM_CHCD 1009 +#define IDM_CHSD 1010 +#define IDM_INTER 1011 + +// Tools Dialog +#define IDD_TLD 1051 +#define IDD_TCD 1052 +#define IDD_TSD 1053 +#define IDD_RLD 1054 +#define IDD_RCD 1055 +#define IDD_RSD 1056 +#define IDD_EVLD 1057 +#define IDD_EVCD 1058 +#define IDD_CHCD 1059 +#define IDD_CHSD 1060 +#define IDD_INTER 1061 + +// Tools Control +#define IDC_Group_Base 1101 +#define IDC_Group_Crooked 1102 +#define IDC_Group_Pz 1103 +#define IDC_Group_Rp 1104 +#define IDC_Group_Calc 1105 +#define IDC_Label_PK0 1111 +#define IDC_Edit_PK0 1112 +#define IDC_Label_d0 1113 +#define IDC_Edit_d0 1114 +#define IDC_Label_Y0 1115 +#define IDC_Edit_Y0 1116 +#define IDC_Label_X0 1117 +#define IDC_Edit_X0 1118 +#define IDC_Label_H0 1119 +#define IDC_Edit_H0 1120 +#define IDC_Label_M0 1121 +#define IDC_Edit_M0 1122 +#define IDC_Label_PKn 1123 +#define IDC_Edit_PKn 1124 +#define IDC_Label_dn 1125 +#define IDC_Edit_dn 1126 +#define IDC_Label_Yn 1127 +#define IDC_Edit_Yn 1128 +#define IDC_Label_Xn 1129 +#define IDC_Edit_Xn 1130 +#define IDC_Label_Hn 1131 +#define IDC_Edit_Hn 1132 +#define IDC_Label_Mn 1133 +#define IDC_Edit_Mn 1134 +#define IDC_Label_NamePz 1135 +#define IDC_Edit_NamePz 1136 +#define IDC_Label_Ypz 1137 +#define IDC_Edit_Ypz 1138 +#define IDC_Label_Xpz 1139 +#define IDC_Edit_Xpz 1140 +#define IDC_Label_Hpz 1141 +#define IDC_Edit_Hpz 1142 +#define IDC_Label_Pz 1143 +#define IDC_Label_PKpz 1144 +#define IDC_Edit_PKpz 1145 +#define IDC_Label_Dpz 1146 +#define IDC_Edit_Dpz 1147 +#define IDC_Label_H0pz 1148 +#define IDC_Edit_H0pz 1149 +#define IDC_Label_dHpz 1150 +#define IDC_Edit_dHpz 1151 +#define IDC_Label_Center 1152 +#define IDC_Label_Yck 1153 +#define IDC_Edit_Yck 1154 +#define IDC_Label_Xck 1155 +#define IDC_Edit_Xck 1156 +#define IDC_Label_Rkk 1157 +#define IDC_Edit_Rkk 1158 +#define IDC_Label_Zkk 1159 +#define IDC_Edit_Zkk 1160 +#define IDC_Label_Qkk 1161 +#define IDC_Edit_Qkk 1162 +#define IDC_Label_Lsk 1163 +#define IDC_Edit_Lsk 1164 +#define IDC_Label_NameRp 1165 +#define IDC_Edit_NameRp 1166 +#define IDC_Label_PKrp 1167 +#define IDC_Edit_PKrp 1168 +#define IDC_Label_Mrp 1169 +#define IDC_Edit_Mrp 1170 +#define IDC_Label_Rp 1171 +#define IDC_Label_Brl 1172 +#define IDC_Edit_Brl 1173 +#define IDC_Label_Yrp 1174 +#define IDC_Edit_Yrp 1175 +#define IDC_Label_Crooked 1176 +#define IDC_Label_PKnsk 1177 +#define IDC_Edit_PKnsk 1178 +#define IDC_Label_Csk 1179 +#define IDC_Edit_Csk 1180 +#define IDC_Label_i0 1181 +#define IDC_Edit_i0 1182 +#define IDC_Label_in 1183 +#define IDC_Edit_in 1184 +#define IDC_Label_Lch 1185 +#define IDC_Edit_Lch 1186 +#define IDC_Label_dLch 1187 +#define IDC_Edit_dLch 1188 +#define IDC_Label_N 1189 +#define IDC_Edit_N 1190 +#define IDC_Label_B 1191 +#define IDC_Edit_B 1192 +#define IDC_Label_L0 1193 +#define IDC_Edit_L0 1194 +#define IDC_Label_Ln 1195 +#define IDC_Edit_Ln 1196 +#define IDC_Label_XXi 1197 +#define IDC_Edit_XXi 1198 +#define IDC_Label_XX0 1199 +#define IDC_Edit_XX0 1200 +#define IDC_Label_XXn 1201 +#define IDC_Edit_XXn 1202 +#define IDC_Label_YYi 1203 +#define IDC_Edit_YYi 1204 +#define IDC_Label_YY0 1205 +#define IDC_Edit_YY0 1206 +#define IDC_Label_YYn 1207 +#define IDC_Edit_YYn 1208 diff --git a/src/News.txt b/src/News.txt new file mode 100644 index 0000000..1d6d0aa --- /dev/null +++ b/src/News.txt @@ -0,0 +1,81 @@ +MarkEdit for Windows +is copyright © 2010-2011 +by AKON & TerraNoNames. +http://mykaralw.narod.ru/ +Version 1.0.0.3, Feb 12 2011. + +[12.02.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлен скрипт конфигурирования (configure) для сборки. +* добавлена документация разработки (SRC\*\*.txt). + + +[04.02.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлен инструмен линейной интерполяции. +* обновлена документация. + + +[29.01.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлены инструмены расчета стягивающих хорд. + + +[22.01.2011] Akon + "MarkEdit v.1.0.0.3" +* добавлены инструмены расчета вертикального профиля. + + +[19.01.2011] Akon + "MarkEdit v.1.0.0.2" +! исправлена ошибка(ляп) в расчете смещения пункта от оси трассы на прямой. + + +[15.01.2011] Akon + "MarkEdit v.1.0.0.2" +! изменен расчет пикетажа на переходной кривой, приведен в соответствие с разбивочной осью: + PKpz = PKnsk+lpk(pz) = PKnsk+l(pz)+l(pz)^5/(60*C^2) = PKnsk+l(pz)*[1+l(pz)^4/(60*C^2)] +* добавлен инструмен настройки точности округления результата. + + +[30.12.2010] Akon + "MarkEdit v.1.0.0.1" +! изменена инициализация меню, что сделало C-код совместимым с Pelles C for Windows: + Wc.lpszMenuName = MAKEINTRESOURCE(IDMAINMENU) +* наведена логика (не до конца) в операциях открытия-сохранения текстовых файлов +* исходный код разбит на модули, что улучшило его читаемость: + MarkEdit.h + MarkEdit.Bas + medlgabout.basi + medlgos.basi + medlgrcc.basi + medlgrl.basi + medlgrsc.basi + medlgtcc.basi + medlgtl.basi + medlgtsc.basi + megsedit.basi + meids.basi + memark.basi + memath.basi +! маркшейдерские вычисления переделаны в вызываемые функции (контроль ляпов): + Function MarkLen(tY As Double, tX As Double) As Double + Function MarkPK(tY As Double,tX As Double, tSin As Double,tCos As Double) As Double + Function MarkDelta(tY As Double,tX As Double, tSin As Double,tCos As Double) As Double + Function MarkSCFi(tL As Double,tC As Double) As Double + Function MarkSCX(tL As Double,tC As Double) As Double + Function MarkSCY(tL As Double,tC As Double) As Double + Function MarkSCa1(tL As Double,tC As Double) As Double + Function MarkSCa(tL As Double,tC As Double) As Double + Function MarkSCZ(tL As Double,tC As Double) As Double + Function MarkSCddX(tL As Double,tC As Double) As Double + Function MarkSChigh(Xsk As Double, Ysk As Double, FIsk As Double, y0pz As Double) As Double + Function MarkSCLpk(tL As Double, tC As Double) As Double +! доопределены границы переходной кривой: + 0 <= x0pz <= Xsk+(Ysk-y0pz)*tan(FIsk) +! добавлена документация к программе + + +[20.12.2010] Akon + "MarkEdit v.1.0.0.0" +* стартовая версия программы diff --git a/src/Readme.txt b/src/Readme.txt new file mode 100644 index 0000000..c6df806 --- /dev/null +++ b/src/Readme.txt @@ -0,0 +1,53 @@ +-===============- +-= MARK EDITOR =- +-===============- + + Mark Editor - this is a text editor with comprised of it instrument marksheideren calculations. + + Mark Editor is released under the terms of the GNU General Public License. + + http://mykaralw.narod.ru/download/exe/i/markedit.html + +-= REQUIREMENTS =- + * Windows XP + * BCX (Basic to C translator) + * PellesC + * Lcc-Win32 + * FreeUPX + +-= INSTALL =- + edit setpath.cmd (view Install.txt) + `configure' + `make' or `make -d' + `make upx' + `make install' or `make install "INSTALLPATH"' + `make clean' or `make clean all' + +-= BACKENDS =- + +-= ARTWORK=- + +-= CONTACT =- + More info on: http://mykaralw.narod.ru/ + Bugs, emails: mykaralw@yandex.ru + +-= RESOURCES =- + + * Basic to C Translator (BCX) + http://www.bcxgurus.com/ + + * Pelles C for Windows + http://www.smorgasbordet.com/pellesc/download.htm + + * Lcc-Win32 compiler + http://www.q-software-solutions.de + + * Free UPX + http://www.pazera-software.com/products/free-upx/ + +-= THANKS =- + Kevin Diggins [http://www.bcxgurus.com/] (BCX author) + Pelle Orinius [http://www.smorgasbordet.com/pellesc/download.htm] (PellesC author) + Jacob Navia and Q Software Solutions GmbH [http://www.q-software-solutions.de] (Lcc-Win32 author) + Markus Oberhumer , Laszlo Molnar & John Reiser [http://www.pazera-software.com/products/free-upx/] (FreeUPX authors) + \ No newline at end of file diff --git a/src/configure.cmd b/src/configure.cmd new file mode 100644 index 0000000..043bc5f --- /dev/null +++ b/src/configure.cmd @@ -0,0 +1,363 @@ +@echo off +echo Configure... +if (%1)==(--help) ( + echo HELP. + echo This configure make for compiling this project. + echo . + echo COMAND LINE: + echo . + echo configure + echo /default configure, options setproject/ + echo . + echo configure --help + echo /this help/ + echo . + echo configure --CC POCC + echo /compiling of PellesC/ + echo . + echo configure --CC LCC + echo /compiling of LCC-WIN32/ + echo . + echo configure --CC Not + echo /not compiling, only tranclator to C/ + echo . + goto END +) + +:SETHELP +echo @echo off> make.cmd +echo if (%%1)==(--help) (>> make.cmd +echo echo HELP.>> make.cmd +echo echo Make this project.>> make.cmd +echo echo .>> make.cmd +echo echo COMAND LINE:>> make.cmd +echo echo .>> make.cmd +echo echo make --help>> make.cmd +echo echo /this help/>> make.cmd +echo echo .>> make.cmd +echo echo make>> make.cmd +echo echo /compiling this project/>> make.cmd +echo echo .>> make.cmd +echo echo make -d>> make.cmd +echo echo /detalise make/>> make.cmd +echo echo .>> make.cmd +echo echo make upx>> make.cmd +echo echo /UPX compress prjname.exe/>> make.cmd +echo echo .>> make.cmd +echo echo make install>> make.cmd +echo echo /copy prjname.exe in INSTALLDIR />> make.cmd +echo echo .>> make.cmd +echo echo make install "VARINSTALLDIR">> make.cmd +echo echo /copy prjname.exe in VARINSTALLDIR />> make.cmd +echo echo .>> make.cmd +echo echo make uninstall>> make.cmd +echo echo /delete prjname.exe in INSTALLDIR />> make.cmd +echo echo .>> make.cmd +echo echo make uninstall "VARINSTALLDIR">> make.cmd +echo echo /delete prjname.exe in VARINSTALLDIR />> make.cmd +echo echo .>> make.cmd +echo echo make clean>> make.cmd +echo echo /clean *.obj,*.res/>> make.cmd +echo echo .>> make.cmd +echo echo make clean all>> make.cmd +echo echo /clean all: *.c,*.obj,*.res,*.exe/>> make.cmd +echo echo .>> make.cmd +echo goto END>> make.cmd +echo )>> make.cmd + +:SETPATH +if not (%1)==() ( + if not /%1/==/--CC/ goto UNKNOW +) +echo set BAKPATH=%%PATH%%>>make.cmd +call setpath.cmd +if errorlevel 1 goto CNFGERROR +call setproject.cmd +if errorlevel 1 goto CNFGERROR +echo . +echo Project %PRJNAME%: +echo . +set WORKPATH=%CD% +echo WORKPATH = %WORKPATH% +if not exist %WORKPATH%\%PRJNAME%.bas goto CNFGERROR +echo set PRJNAME=%PRJNAME%>> make.cmd +echo set WORKPATH=%WORKPATH%>> make.cmd +echo set INSTALLPATH=%INSTALLPATH%>> make.cmd +if not (%RC%)==(TRUE) ( + set RC=FALSE +) +set RESPFN=%RESNAME% +if not (%RESPATH%)==() ( + set RESPFN=%RESPATH%\%RESNAME% +) +echo if not exist %%WORKPATH%%\BUILD (>> make.cmd +echo mkdir %%WORKPATH%%\BUILD>> make.cmd +echo )>> make.cmd + +echo if (%%1)==(upx) goto UPX>> make.cmd +echo if (%%1)==(clean) goto CLEAN>> make.cmd +echo if (%%1)==(install) goto INSTALL>> make.cmd +echo if (%%1)==(uninstall) goto UNINSTALL>> make.cmd +echo if (%%1)==(-d) goto BCX>> make.cmd +echo if not (%%1)==() goto UNKNOW>> make.cmd +echo . + +:TESTBC +echo Test Basic to C/C++ Translator... +if not exist %BCXPATH%\BIN\BC.EXE goto CNFGERROR +echo :BCX>> make.cmd +echo set BCXPATH=%BCXPATH%>> make.cmd +echo cd %%WORKPATH%%>> make.cmd +echo echo Bacic to C translation...>> make.cmd +echo if (%%1)==(-d) (@echo on)>> make.cmd +echo %%BCXPATH%%\BIN\BC.EXE %%PRJNAME%%.bas -f:%%WORKPATH%%\BUILD\%%PRJNAME%%.c>> make.cmd +echo if errorlevel 1 goto MAKEERRROR>> make.cmd +echo if (%%1)==(-d) (@echo off)>> make.cmd +echo echo %%PRJNAME%%.c>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +echo copy %PRJNAME%.h %%WORKPATH%%\BUILD\>> make.cmd + +if (%1)==(--CC) ( + set CC=%2 +) +echo CC = %CC% +echo . +if (%CC%)==(POCC) goto TESTPOCC +if (%CC%)==(LCC) goto TESTLCC +goto ENDCFG + +:TESTPOCC +echo :POCC>> make.cmd +echo Test Path PellesC Compiler... +if not exist %POCCPATH%\BIN\povars32.bat goto CNFGERROR +echo set POCCPATH=%POCCPATH%>> make.cmd +echo call %%POCCPATH%%\BIN\povars32.bat>> make.cmd +echo if errorlevel 1 goto MAKERRROR>> make.cmd +echo echo Path PellesC = %%PellesCDir%%>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +if (%RC%)==(TRUE) ( + echo Test PellesC Resource Compiler... + echo set RESPATH=%RESPATH%>> make.cmd + echo set RESNAME=%RESNAME%>> make.cmd + if not exist %POCCPATH%\BIN\porc.exe goto CNFGERROR + if not exist %RESPFN%.rc goto CNFGERROR + echo cd %%RESPATH%%>>make.cmd + echo echo PellesC resource compile...>> make.cmd + echo if /%%1/==/-d/ @echo on>> make.cmd + echo %%POCCPATH%%\BIN\porc.exe /Fo%%WORKPATH%%\BUILD\%%PRJNAME%%.res %%RESNAME%%.rc>> make.cmd + echo if errorlevel 1 goto MAKEERROR>> make.cmd + echo if /%%1/==/-d/ @echo off>> make.cmd + echo echo %RESPFN%%.res>> make.cmd + echo cd %%WORKPATH%%>> make.cmd + echo echo OK>> make.cmd + echo echo .>> make.cmd + echo OK + echo . +) +echo Test Pelles C compiler... +if not exist %POCCPATH%\BIN\POCC.EXE goto CNFGERROR +echo echo PellesC compile...>> make.cmd +echo if (%%1)==(-d) (@echo on)>> make.cmd +echo %%POCCPATH%%\bin\pocc.exe /D_WIN32_IE=0x0501 /W1 /Os /Gd /Go /Zd /Ze /Zx /Tx86-coff %%WORKPATH%%\BUILD\%%PRJNAME%%.c /Fo%%WORKPATH%%\BUILD\%%PRJNAME%%.obj>> make.cmd +echo if errorlevel 1 goto MAKEERROR>> make.cmd +echo if (%%1)==(-d) (@echo off)>> make.cmd +echo echo %%PRJNAME%%.obj>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +echo Test Pelles C linker... +if not exist %POCCPATH%\BIN\POLINK.EXE goto CNFGERROR +echo echo PellesC linker...>> make.cmd +echo if (%%1)==(-d) (@echo on)>> make.cmd +if (%RC%)==(TRUE) ( + echo %%POCCPATH%%\bin\polink.exe /release /delay:nobind /machine:ix86 /subsystem:windows kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib /out:%%WORKPATH%%\BUILD\%%PRJNAME%%.exe %%WORKPATH%%\BUILD\%%PRJNAME%%.obj %%WORKPATH%%\BUILD\%%PRJNAME%%.res>> make.cmd +) +if (%RC%)==(FALSE) ( + echo %%POCCPATH%%\bin\polink.exe /release /delay:nobind /machine:ix86 /subsystem:windows kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib /out:%%WORKPATH%%\BUILD\%%PRJNAME%%.exe %%WORKPATH%%\BUILD\%%PRJNAME%%.obj>> make.cmd +) +echo if errorlevel 1 goto MAKEERROR>> make.cmd +echo if (%%1)==(-d) (@echo off)>> make.cmd +echo echo %%PRJNAME%%.exe>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +goto ENDCFG + +:TESTLCC +echo :LCC>> make.cmd +echo Test Lcc-Win32 Compiler... +if not exist %LCCPATH%\BIN\lcc.exe goto CNFGERROR +echo set LCCPATH=%LCCPATH%>> make.cmd +echo echo Path Lcc-Win32 = %%LCCPATH%%>> make.cmd +echo OK +echo . +if (%RC%)==(TRUE) ( + echo Test Lcc-Win32 Resource Compiler... + echo set RESPATH=%RESPATH%>> make.cmd + echo set RESNAME=%RESNAME%>> make.cmd + if not exist %LCCPATH%\BIN\lrc.exe goto CNFGERROR + if not exist %RESPFN%.rc goto CNFGERROR + echo cd %%RESPATH%%>>make.cmd + echo echo Lcc-Win32 resource compile...>> make.cmd + echo if /%%1/==/-d/ @echo on>> make.cmd + echo %%LCCPATH%%\BIN\lrc.exe /fo%%WORKPATH%%\BUILD\%%PRJNAME%%.res %%PRJNAME%%.rc>> make.cmd + echo if errorlevel 1 goto MAKEERROR>> make.cmd + echo if /%%1/==/-d/ @echo off>> make.cmd + echo echo %RESPFN%%.res>> make.cmd + echo cd %%WORKPATH%%>> make.cmd + echo echo OK>> make.cmd + echo echo .>> make.cmd + echo OK + echo . +) +echo Test Lcc-Win32 compiler... +if not exist %LCCPATH%\BIN\LCC.EXE goto CNFGERROR +echo echo Lcc-Win32 compile...>> make.cmd +echo if (%%1)==(-d) (@echo on)>> make.cmd +echo %%LCCPATH%%\bin\lcc.exe -Zp1 -v -o %%WORKPATH%%\BUILD\%%PRJNAME%%.obj %%WORKPATH%%\BUILD\%%PRJNAME%%.c>> make.cmd +echo if errorlevel 1 goto MAKEERROR>> make.cmd +echo if (%%1)==(-d) (@echo off)>> make.cmd +echo echo %%PRJNAME%%.obj>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +echo Test Lcc-Win32 linker... +if not exist %POCCPATH%\BIN\POLINK.EXE goto CNFGERROR +echo echo Lcc-Win32 linker...>> make.cmd +echo if (%%1)==(-d) (@echo on)>> make.cmd +if (%RC%)==(TRUE) ( + echo %%LCCPATH%%\bin\lcclnk.exe -subsystem windows -v -s -o %%WORKPATH%%\BUILD\%%PRJNAME%%.exe %%WORKPATH%%\BUILD\%%PRJNAME%%.obj %%WORKPATH%%\BUILD\%%PRJNAME%%.res>> make.cmd +) +if (%RC%)==(FALSE) ( + echo %%LCCPATH%%\bin\lcclnk.exe -subsystem windows -v -s -o %%WORKPATH%%\BUILD\%%PRJNAME%%.exe %%WORKPATH%%\BUILD\%%PRJNAME%%.obj>> make.cmd +) +echo if errorlevel 1 goto MAKEERROR>> make.cmd +echo if (%%1)==(-d) (@echo off)>> make.cmd +echo echo %%PRJNAME%%.exe>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo OK +echo . +goto ENDCFG + +:ENDCFG +echo goto END>> make.cmd + +:UPXCFG +echo :UPX>> make.cmd +echo echo UPX compress>> make.cmd +if not exist %UPXPATH%\upx.exe ( + SET UPX=FALSE + echo UPX compressor not fund +) +if not (%UPX%)==(TRUE) ( + set UPX=FALSE +) +if (%UPX%)==(TRUE) ( + echo UPX compressor... + echo SET UPXPATH=%UPXPATH%>> make.cmd + echo cd %%WORKPATH%%>> make.cmd + echo %%UPXPATH%%\upx.exe BUILD\%%PRJNAME%%.exe>> make.cmd + echo if errorlevel 1 goto MAKEERROR>> make.cmd + echo echo OK>> make.cmd + echo echo .>> make.cmd + echo OK + echo . +) +if (%UPX%)==(FALSE) ( + echo echo Not this element!>> make.cmd +) +echo goto END>> make.cmd + +:CLEANCFG +echo :CLEAN>> make.cmd +echo echo Clean project>> make.cmd +echo cd %%WORKPATH%%>> make.cmd +echo del /Q BUILD\*.res>> make.cmd +echo del /Q BUILD\*.obj>> make.cmd +echo if (%%2)==(all) (>> make.cmd +echo del /Q BUILD\*.*>> make.cmd +echo )>> make.cmd +echo echo OK>> make.cmd +echo echo .>> make.cmd +echo goto END>> make.cmd + +:INSTALLCFG +echo :INSTALL>> make.cmd +echo if not (%%2)==() (>> make.cmd +echo set INSTALLPATH=%%2>> make.cmd +echo )>> make.cmd +echo if not exist %%WORKPATH%%\BUILD\%%PRJNAME%%.exe goto MAKEERROR>> make.cmd +echo if not exist %%INSTALLPATH%% (>> make.cmd +echo mkdir %%INSTALLPATH%%>> make.cmd +echo )>> make.cmd +echo if not exist %%INSTALLPATH%%\DOC (>> make.cmd +echo mkdir %%INSTALLPATH%%\DOC>> make.cmd +echo )>> make.cmd +echo copy %%WORKPATH%%\BUILD\%%PRJNAME%%.exe %%INSTALLPATH%%>> make.cmd +echo copy %%WORKPATH%%\News.txt %%INSTALLPATH%%\DOC\markedit-news.txt>> make.cmd +echo copy %%WORKPATH%%\Authors.txt %%INSTALLPATH%%\DOC\markedit-authors.txt>> make.cmd +echo copy %%WORKPATH%%\DOC\markprogs.pdf %%INSTALLPATH%%\DOC>> make.cmd +echo copy %%WORKPATH%%\DOC\markedit.pdf %%INSTALLPATH%%\DOC>> make.cmd +echo echo Installation %%PRJNAME%% in %%INSTALLPATH%%>> make.cmd +echo goto END>> make.cmd + +:UNINSTALLCFG +echo :UNINSTALL>> make.cmd +echo if not (%%2)==() (>> make.cmd +echo set INSTALLPATH=%%2>> make.cmd +echo )>> make.cmd +echo del /Q %%INSTALLPATH%%\%%PRJNAME%%.exe>> make.cmd +echo del /Q %%INSTALLPATH%%\DOC\markedit*.*>> make.cmd +echo echo Uninstall %%PRJNAME%% of %%INSTALLPATH%%>> make.cmd +echo goto END>> make.cmd + +:UNKNOWCFG +echo :UNKNOW>> make.cmd +echo echo Option "%%1" unknow.>> make.cmd +echo echo Type 'make --help' for show options.>> make.cmd +echo echo .>> make.cmd +echo goto END>> make.cmd + +echo :MAKEERROR>> make.cmd +echo echo !!! Make error.>> make.cmd +echo :END>> make.cmd +echo set PATH=%%BAKPATH%%>>make.cmd +echo pause>> make.cmd +echo . + +echo For build and clean: +echo make +echo make upx +echo make install +echo make uninstall +echo make clean +echo make clean all +echo . +echo For help: +echo make --help +echo . +goto END + +:UNKNOW +echo Option "%1" unknow. +echo Type 'configure --help' for show options. +echo . + +:CNFGERROR +del /Q make.cmd > nul +echo !!! Configure error. +goto END + +:END +echo . +pause diff --git a/src/doc/markedit.pdf b/src/doc/markedit.pdf new file mode 100644 index 0000000..79c43a7 Binary files /dev/null and b/src/doc/markedit.pdf differ diff --git a/src/doc/markprogs.pdf b/src/doc/markprogs.pdf new file mode 100644 index 0000000..176ac1d Binary files /dev/null and b/src/doc/markprogs.pdf differ diff --git a/src/make.cmd b/src/make.cmd new file mode 100644 index 0000000..a4932fb --- /dev/null +++ b/src/make.cmd @@ -0,0 +1,156 @@ +@echo off +if (%1)==(--help) ( + echo HELP. + echo Make this project. + echo . + echo COMAND LINE: + echo . + echo make --help + echo /this help/ + echo . + echo make + echo /compiling this project/ + echo . + echo make -d + echo /detalise make/ + echo . + echo make upx + echo /UPX compress prjname.exe/ + echo . + echo make install + echo /copy prjname.exe in INSTALLDIR / + echo . + echo make install "VARINSTALLDIR" + echo /copy prjname.exe in VARINSTALLDIR / + echo . + echo make uninstall + echo /delete prjname.exe in INSTALLDIR / + echo . + echo make uninstall "VARINSTALLDIR" + echo /delete prjname.exe in VARINSTALLDIR / + echo . + echo make clean + echo /clean *.obj,*.res/ + echo . + echo make clean all + echo /clean all: *.c,*.obj,*.res,*.exe/ + echo . + goto END +) +set BAKPATH=%PATH% +set PRJNAME=markedit +set WORKPATH=D:\Ide\BCX\work\MarkEdit.v.1.0.0.3\src +set INSTALLPATH=C:\MARKSOFT\MarkEdit +if not exist %WORKPATH%\BUILD ( + mkdir %WORKPATH%\BUILD +) +if (%1)==(upx) goto UPX +if (%1)==(clean) goto CLEAN +if (%1)==(install) goto INSTALL +if (%1)==(uninstall) goto UNINSTALL +if (%1)==(-d) goto BCX +if not (%1)==() goto UNKNOW +:BCX +set BCXPATH=D:\IDE\BCX +cd %WORKPATH% +echo Bacic to C translation... +if (%1)==(-d) (@echo on) +%BCXPATH%\BIN\BC.EXE %PRJNAME%.bas -f:%WORKPATH%\BUILD\%PRJNAME%.c +if errorlevel 1 goto MAKEERRROR +if (%1)==(-d) (@echo off) +echo %PRJNAME%.c +echo OK +echo . +copy markedit.h %WORKPATH%\BUILD\ +:POCC +set POCCPATH=D:\IDE\PellesC +call %POCCPATH%\BIN\povars32.bat +if errorlevel 1 goto MAKERRROR +echo Path PellesC = %PellesCDir% +echo OK +echo . +set RESPATH=RES +set RESNAME=markedit +cd %RESPATH% +echo PellesC resource compile... +if /%1/==/-d/ @echo on +%POCCPATH%\BIN\porc.exe /Fo%WORKPATH%\BUILD\%PRJNAME%.res %RESNAME%.rc +if errorlevel 1 goto MAKEERROR +if /%1/==/-d/ @echo off +echo RES\markedit.res +cd %WORKPATH% +echo OK +echo . +echo PellesC compile... +if (%1)==(-d) (@echo on) +%POCCPATH%\bin\pocc.exe /D_WIN32_IE=0x0501 /W1 /Os /Gd /Go /Zd /Ze /Zx /Tx86-coff %WORKPATH%\BUILD\%PRJNAME%.c /Fo%WORKPATH%\BUILD\%PRJNAME%.obj +if errorlevel 1 goto MAKEERROR +if (%1)==(-d) (@echo off) +echo %PRJNAME%.obj +echo OK +echo . +echo PellesC linker... +if (%1)==(-d) (@echo on) +%POCCPATH%\bin\polink.exe /release /delay:nobind /machine:ix86 /subsystem:windows kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib /out:%WORKPATH%\BUILD\%PRJNAME%.exe %WORKPATH%\BUILD\%PRJNAME%.obj %WORKPATH%\BUILD\%PRJNAME%.res +if errorlevel 1 goto MAKEERROR +if (%1)==(-d) (@echo off) +echo %PRJNAME%.exe +echo OK +echo . +goto END +:UPX +echo UPX compress +SET UPXPATH=D:\IDE\FREEUPX +cd %WORKPATH% +%UPXPATH%\upx.exe BUILD\%PRJNAME%.exe +if errorlevel 1 goto MAKEERROR +echo OK +echo . +goto END +:CLEAN +echo Clean project +cd %WORKPATH% +del /Q BUILD\*.res +del /Q BUILD\*.obj +if (%2)==(all) ( + del /Q BUILD\*.* +) +echo OK +echo . +goto END +:INSTALL +if not (%2)==() ( + set INSTALLPATH=%2 +) +if not exist %WORKPATH%\BUILD\%PRJNAME%.exe goto MAKEERROR +if not exist %INSTALLPATH% ( + mkdir %INSTALLPATH% +) +if not exist %INSTALLPATH%\DOC ( + mkdir %INSTALLPATH%\DOC +) +copy %WORKPATH%\BUILD\%PRJNAME%.exe %INSTALLPATH% +copy %WORKPATH%\News.txt %INSTALLPATH%\DOC\markedit-news.txt +copy %WORKPATH%\Authors.txt %INSTALLPATH%\DOC\markedit-authors.txt +copy %WORKPATH%\DOC\markprogs.pdf %INSTALLPATH%\DOC +copy %WORKPATH%\DOC\markedit.pdf %INSTALLPATH%\DOC +echo Installation %PRJNAME% in %INSTALLPATH% +goto END +:UNINSTALL +if not (%2)==() ( + set INSTALLPATH=%2 +) +del /Q %INSTALLPATH%\%PRJNAME%.exe +del /Q %INSTALLPATH%\DOC\markedit*.* +echo Uninstall %PRJNAME% of %INSTALLPATH% +goto END +:UNKNOW +echo Option "%1" unknow. +echo Type 'make --help' for show options. +echo . +goto END +:MAKEERROR +echo !!! Make error. +:END +set PATH=%BAKPATH% +pause diff --git a/src/medlgabout.basi b/src/medlgabout.basi new file mode 100644 index 0000000..6ec541f --- /dev/null +++ b/src/medlgabout.basi @@ -0,0 +1,15 @@ +Function AboutDlg (hDlg AS HWND, Msg, wParam, lParam) + + Select Case Msg + Case WM_INITDIALOG + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgchc.basi b/src/medlgchc.basi new file mode 100644 index 0000000..0ee3653 --- /dev/null +++ b/src/medlgchc.basi @@ -0,0 +1,99 @@ +Function DlgCHCD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL Rkk As Double +GLOBAL Lch As Double +GLOBAL L As Double +GLOBAL dLch As Double +GLOBAL N As Double +GLOBAL B As Double +GLOBAL Li As Double +GLOBAL Bi As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lch) + strTxt$ = MathCstr$(Lch,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dLch) + strTxt$ = MathCstr$(dLch,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation Hords size of Circular crooked" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Rkk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lch) + strTxt$ = GetText$(hwSelect) + Lch = Val(strTxt$) + strBuffer$ = strBuffer$ & (" L=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dLch) + strTxt$ = GetText$(hwSelect) + dLch = Val(strTxt$) + strBuffer$ = strBuffer$ & (" dL=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + If ((Rkk>0) And (Lch>0) And (dLch>0)) Then + N = 0 + L = Lch-(Lch*Lch*Lch)/(24*Rkk*Rkk) + B = (Lch*Lch)/(8*Rkk) + strBuffer$ = "" + Do + Li = N*dLch + strTxt$ = MathCstr$(Li,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Li=" & strTxt$) + Bi = B - (Li-Lch/2)*(Li-Lch/2)/(2*Rkk) + strTxt$ = MathCstr$(Bi,LenFrac) + strBuffer$ = strBuffer$ & (" Bi=" & strTxt$) + N = N+1 + Li = N*dLch + Loop Until (Li>=Lch) + strTxt$ = MathCstr$(Lch,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Li=" & strTxt$) + strTxt$ = MathCstr$(0,LenFrac) + strBuffer$ = strBuffer$ & (" Bi=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + N = N+1 + strTxt$ = MathCstr$(N,0) + hwSelect = GetDlgItem(hDlg,IDC_Edit_N) + SetText (hwSelect,strTxt$) + strTxt$ = MathCstr$(B,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_B) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(N,0) + strBuffer$ = strBuffer$ & (CRLF$ & "N=" & strTxt$) + strTxt$ = MathCstr$(L,LenFrac) + strBuffer$ = strBuffer$ & (" |L|=" & strTxt$) + strTxt$ = MathCstr$(B,LenFrac) + strBuffer$ = strBuffer$ & (" B0=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + End If + + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgchs.basi b/src/medlgchs.basi new file mode 100644 index 0000000..7858ddf --- /dev/null +++ b/src/medlgchs.basi @@ -0,0 +1,132 @@ +Function DlgCHSD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL Rkk As Double +GLOBAL Lsk As Double +GLOBAL Csk As Double +GLOBAL L0 As Double +GLOBAL Ln As Double +GLOBAL Lch As Double +GLOBAL L As Double +GLOBAL dLch As Double +GLOBAL N As Double +GLOBAL B As Double +GLOBAL Li As Double +GLOBAL dLi As Double +GLOBAL Bi As Double +GLOBAL X0 As Double +GLOBAL Y0 As Double +GLOBAL Xn As Double +GLOBAL Yn As Double +GLOBAL dX As Double +GLOBAL dY As Double +GLOBAL sinB As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lsk) + strTxt$ = MathCstr$(Lsk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dLch) + strTxt$ = MathCstr$(dLch,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation Hords size of Connecting crooked" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Rkk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lsk) + strTxt$ = GetText$(hwSelect) + Lsk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" L=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_L0) + strTxt$ = GetText$(hwSelect) + L0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "L0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ln) + strTxt$ = GetText$(hwSelect) + Ln = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Ln=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dLch) + strTxt$ = GetText$(hwSelect) + dLch = Val(strTxt$) + strBuffer$ = strBuffer$ & (" dL=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + If ((Rkk>0) And (Lsk>0) And (L00)) Then + Csk = Rkk*Lsk + Lch = Ln-L0 + X0 = MarkSCX(L0,Csk) + Y0 = MarkSCY(L0,Csk) + Xn = MarkSCX(Ln,Csk) + Yn = MarkSCY(Ln,Csk) + dX = Xn-X0 + dY = Yn-Y0 + L = MarkLen(dY,dX) + sinB=dY/Lch + B = 0 + N = 0 + strBuffer$ = "" + Do + dLi = N*dLch + Li = L0+dLi + strTxt$ = MathCstr$(Li,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Li=" & strTxt$) + Bi = (Y0+dLi*sinB) - MarkSCY(Li,Csk) + If (Bi>B) Then + B = Bi + End If + strTxt$ = MathCstr$(Bi,LenFrac) + strBuffer$ = strBuffer$ & (" Bi=" & strTxt$) + N = N+1 + dLi = N*dLch + Loop Until (dLi>=Lch) + strTxt$ = MathCstr$(Ln,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Li=" & strTxt$) + strTxt$ = MathCstr$(0,LenFrac) + strBuffer$ = strBuffer$ & (" Bi=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + N = N+1 + strTxt$ = MathCstr$(N,0) + hwSelect = GetDlgItem(hDlg,IDC_Edit_N) + SetText (hwSelect,strTxt$) + strTxt$ = MathCstr$(B,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_B) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(N,0) + strBuffer$ = strBuffer$ & (CRLF$ & "N=" & strTxt$) + strTxt$ = MathCstr$(L,LenFrac) + strBuffer$ = strBuffer$ & (" |L|=" & strTxt$) + strTxt$ = MathCstr$(B,LenFrac) + strBuffer$ = strBuffer$ & (" B0=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + End If + + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgevc.basi b/src/medlgevc.basi new file mode 100644 index 0000000..b5c42a9 --- /dev/null +++ b/src/medlgevc.basi @@ -0,0 +1,173 @@ +Function DlgEvCD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKpz As Double +GLOBAL dPK0 As Double +GLOBAL dPKn As Double +GLOBAL H0 As Double +GLOBAL Hn As Double +GLOBAL Hpz As Double +GLOBAL H0tpz As Double +GLOBAL Hntpz As Double +GLOBAL H0pz As Double +GLOBAL Hnpz As Double +GLOBAL Hkpz As Double +GLOBAL dH0pz As Double +GLOBAL dHnpz As Double +GLOBAL dHpz As Double +GLOBAL iL0 As Double +GLOBAL iLn As Double +GLOBAL diL As Double +GLOBAL sdiL As Double +GLOBAL Rev As Double +GLOBAL Tev As Double +GLOBAL Bev As Double +GLOBAL Kev As Double +GLOBAL Alpha As Double +GLOBAL NamePZ$ +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0) + strTxt$ = MathCstr$(H0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_i0) + strTxt$ = MathCstr$(iL0*1000,LenFracA) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hn) + strTxt$ = MathCstr$(Hn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_in) + strTxt$ = MathCstr$(iLn*1000,LenFracA) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rev,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = NamePZ$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + strTxt$ = MathCstr$(PKpz,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hpz) + strTxt$ = MathCstr$(Hpz,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation on circular elevation" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0) + strTxt$ = GetText$(hwSelect) + H0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" H0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_i0) + strTxt$ = GetText$(hwSelect) + iL0 = Val(strTxt$)/1000 + strBuffer$ = strBuffer$ & (" i0=" & strTxt$ & " o/oo") + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hn) + strTxt$ = GetText$(hwSelect) + Hn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Hn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_in) + strTxt$ = GetText$(hwSelect) + iLn = Val(strTxt$)/1000 + strBuffer$ = strBuffer$ & (" in=" & strTxt$ & " o/oo") + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rev = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "R_v=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = GetText$(hwSelect) + NamePZ$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "PZ: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + strTxt$ = GetText$(hwSelect) + PKpz = Val(strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hpz) + strTxt$ = GetText$(hwSelect) + Hpz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Hpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + diL = iLn-iL0 + sdiL = MathSign(diL) + Tev = Abs(Rev/2*diL) + Bev = Rev/8*diL*diL + Alpha = ATN(diL) + Kev = Abs(Rev*Alpha) + dPK0 = PKpz-PK0 + dPKn = PKpz-PKn + H0tpz = H0+iL0*dPK0 + Hntpz = Hn+iLn*dPKn + dH0pz = sdiL*dPK0*dPK0/(2*Rev) + dHnpz = sdiL*dPKn*dPKn/(2*Rev) + H0pz = H0tpz+dH0pz + Hnpz = Hntpz+dHnpz + Hkpz = (H0pz+Hnpz)/2 + dHpz = Hpz-Hkpz + + strTxt$ = MathCstr$(Hkpz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0pz) + SetText (hwSelect,strTxt$) + + strTxt$ = MathCstr$(dHpz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dHpz) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(Tev,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "T=" & strTxt$) + strTxt$ = MathCstr$(Bev,LenFrac) + strBuffer$ = strBuffer$ & (" B=" & strTxt$) + strTxt$ = MathRadToGMS(Alpha) + strBuffer$ = strBuffer$ & (CRLF$ & "A=" & strTxt$) + strTxt$ = MathCstr$(Kev,LenFrac) + strBuffer$ = strBuffer$ & (" K=" & strTxt$) + strTxt$ = MathCstr$(dPK0,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "dPK0=" & strTxt$) + strTxt$ = MathCstr$(H0pz,LenFrac) + strBuffer$ = strBuffer$ & (" H0=" & strTxt$) + strTxt$ = MathCstr$(dPKn,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "dPKn=" & strTxt$) + strTxt$ = MathCstr$(Hnpz,LenFrac) + strBuffer$ = strBuffer$ & (" Hn=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + strTxt$ = MathCstr$(Hkpz,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Hkpz=" & strTxt$) + strTxt$ = MathCstr$(dHpz,LenFrac) + strBuffer$ = strBuffer$ & (" dHpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgevl.basi b/src/medlgevl.basi new file mode 100644 index 0000000..ddc9bf3 --- /dev/null +++ b/src/medlgevl.basi @@ -0,0 +1,121 @@ +Function DlgEvLD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKpz As Double +GLOBAL dPK As Double +GLOBAL dPKpz As Double +GLOBAL sPK As Double +GLOBAL H0 As Double +GLOBAL Hn As Double +GLOBAL Hpz As Double +GLOBAL dH As Double +GLOBAL H0pz As Double +GLOBAL dHpz As Double +GLOBAL NamePZ$ +GLOBAL iL As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0) + strTxt$ = MathCstr$(H0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hn) + strTxt$ = MathCstr$(Hn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = NamePZ$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + strTxt$ = MathCstr$(PKpz,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hpz) + strTxt$ = MathCstr$(Hpz,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation on linear elevation" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0) + strTxt$ = GetText$(hwSelect) + H0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" H0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hn) + strTxt$ = GetText$(hwSelect) + Hn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Hn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = GetText$(hwSelect) + NamePZ$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "PZ: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + strTxt$ = GetText$(hwSelect) + PKpz = Val(strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Hpz) + strTxt$ = GetText$(hwSelect) + Hpz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Hpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + dH = Hn-H0 + dPK = PKn-PK0 + sPK = MathSign(dPK) + iL = dH/dPK + dPKpz = PKpz-PK0 + H0pz = H0+iL*dPKpz + dHpz = Hpz-H0pz + + strTxt$ = MathCstr$(H0pz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_H0pz) + SetText (hwSelect,strTxt$) + + strTxt$ = MathCstr$(dHpz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dHpz) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(dPK,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "dPK=" & strTxt$) + strTxt$ = MathCstr$(dH,LenFrac) + strBuffer$ = strBuffer$ & (" dH=" & strTxt$) + strTxt$ = MathCstr$(iL*1000,LenFracA) + strBuffer$ = strBuffer$ & (" i=" & strTxt$ & " o/oo") + strBuffer$ = strBuffer$ & CRLF$ + strTxt$ = MathCstr$(H0pz,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "H0pz=" & strTxt$) + strTxt$ = MathCstr$(dHpz,LenFrac) + strBuffer$ = strBuffer$ & (" dHpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgint.basi b/src/medlgint.basi new file mode 100644 index 0000000..6082f9a --- /dev/null +++ b/src/medlgint.basi @@ -0,0 +1,90 @@ +Function DlgINTER (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL YYi As Double +GLOBAL YY0 As Double +GLOBAL YYn As Double +GLOBAL XXi As Double +GLOBAL XX0 As Double +GLOBAL XXn As Double +GLOBAL dX As Double +GLOBAL dY As Double +GLOBAL mXY As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_YY0) + strTxt$ = MathCstr$(YY0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_YYn) + strTxt$ = MathCstr$(YYn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_XX0) + strTxt$ = MathCstr$(XX0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_XXn) + strTxt$ = MathCstr$(XXn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_YYi) + strTxt$ = MathCstr$(YYi,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Interpolation" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_YY0) + strTxt$ = GetText$(hwSelect) + YY0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Y0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_YYn) + strTxt$ = GetText$(hwSelect) + YYn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Yn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_XX0) + strTxt$ = GetText$(hwSelect) + XX0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "X0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_XXn) + strTxt$ = GetText$(hwSelect) + XXn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xn=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + hwSelect = GetDlgItem(hDlg,IDC_Edit_YYi) + strTxt$ = GetText$(hwSelect) + YYi = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Yi=" & strTxt$) + + dX = XXn-XX0 + dY = YYn-YY0 + If Not(dY=0) Then + mXY = dX/dY + XXi = XX0+(YYi-YY0)*mXY + Else + XXi = 0 + End If + + strTxt$ = MathCstr$(XXi,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_XXi) + SetText (hwSelect,strTxt$) + + strTxt$ = MathCstr$(XXi,LenFrac) + strBuffer$ = strBuffer$ & (" Xi=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgopt.basi b/src/medlgopt.basi new file mode 100644 index 0000000..3ba1061 --- /dev/null +++ b/src/medlgopt.basi @@ -0,0 +1,66 @@ +Function DlgOPT (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +'LenFrac = 4 +'LenFracA = 2 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFrac) + strTxt$ = STR$(LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFracA) + strTxt$ = STR$(LenFracA) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFrac) + strTxt$ = GetText$(hwSelect) + LenFrac = Val(strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFracA) + strTxt$ = GetText$(hwSelect) + LenFracA = Val(strTxt$) + + strBuffer$ = "" + If LenFrac<2 Then + LenFrac=2 + strTxt$ = STR$(LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "! Len Frac Linear =" & strTxt$ & CRLF$) + End If + If LenFrac>7 Then + LenFrac=7 + strTxt$ = STR$(LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "! Len Frac Linear =" & strTxt$ & CRLF$) + End If + If LenFracA<0 Then + LenFracA=0 + strTxt$ = STR$(LenFracA) + strBuffer$ = strBuffer$ & (CRLF$ & "! Len Frac Angles =" & strTxt$ & CRLF$) + End If + If LenFracA>4 Then + LenFracA=4 + strTxt$ = STR$(LenFracA) + strBuffer$ = strBuffer$ & (CRLF$ & "! Len Frac Angles =" & strTxt$ & CRLF$) + End If + + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFrac) + strTxt$ = STR$(LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_LenFracA) + strTxt$ = STR$(LenFracA) + SetText (hwSelect,strTxt$) + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgos.basi b/src/medlgos.basi new file mode 100644 index 0000000..b494806 --- /dev/null +++ b/src/medlgos.basi @@ -0,0 +1,207 @@ +Function InitOpenFileName(hForm AS HWND) 'init the openfilename struct + OpenFileName.lStructSize = sizeof(OPENFILENAME) + OpenFileName.hwndOwner = hForm + OpenFileName.hInstance = GetModuleHandle(0) +' -------------------------------------------------------------------- + ! OpenFileName.lpstrFilter = + ! "Text Files (*.TXT)\0*.txt\0All Files(*.*)\0*.*\0\0"; +' -------------------------------------------------------------------- + OpenFileName.lpstrCustomFilter = NULL + OpenFileName.nMaxCustFilter = 0 + OpenFileName.nFilterIndex = 0 + OpenFileName.lpstrFile = "" + OpenFileName.nMaxFile = MAX_PATH + OpenFileName.lpstrFileTitle = "" + OpenFileName.nMaxFileTitle = MAX_PATH + OpenFileName.lpstrInitialDir = Curdir$ + OpenFileName.lpstrTitle = NULL + OpenFileName.nFileOffset = 0 + OpenFileName.nFileExtension = 0 + OpenFileName.lpstrDefExt = "*.txt" + OpenFileName.lCustData = 0 + OpenFileName.lpfnHook = NULL + OpenFileName.lpTemplateName = NULL + Function = 0 +End Function + + +FUNCTION PopFileOpenDlg (hForm AS HWND, tFile$, tFileTitle$) + tFile$ = "" + tFileTitle$ = "" + OpenFileName.lpstrTitle = "Open File" 'text for caption of file dialog box + OpenFileName.hwndOwner = hForm 'handle of main window + OpenFileName.lpstrFile = tFile$ 'file to open + OpenFileName.lpstrFileTitle = tFileTitle$ 'file name + OpenFileName.Flags = OFN_HIDEREADONLY | OFN_CREATEPROMPT 'flags for dialog + Function = GetOpenFileName (&OpenFileName) +End Function + + +Function OpenNewFile(hWnd AS HWND) 'open file code + Local t AS DWORD + Dim FileBuf$ + Dim File$ * 65535 'dim buffer for file + File$ ="" 'init buffer + t = EXIST ( szFile$ ) 'make sure file exists + IF t <> 0 THEN 'if it exists + Open szFile$ For Input As Fp1 'open 'er up! + SetText (hWnd, "") + While Not Eof(Fp1) + Line Input Fp1, FileBuf$ + File$ = FileBuf$ & chr$(13) & chr$(10) 'add line endings + AppendText(hWnd, File$) + Wend + Close Fp1 'close the file + Free File$ 'free memory + Function = TRUE + ELSE + MessageBox (hWnd, "File open failed.", NULL, MB_OK ) + Function = FALSE + END IF +End Function + + +Function PopFileSaveDlg (hWnd AS HWND, tFile$, tFileTitle$) + OpenFileName.lpstrTitle = "Save File" + OpenFileName.hwndOwner = hWnd + OpenFileName.lpstrFile = tFile$ + OpenFileName.lpstrFileTitle = tFileTitle$ + OpenFileName.Flags = OFN_OVERWRITEPROMPT + Function = GetSaveFileName (&OpenFileName) +End Function + + +Function SaveOpenFile(hWnd AS HWND) + Local t AS DWORD + Local iLength AS DWORD + iLength = GetWindowTextLength (hWnd) + Dim File$ * iLength + 1 + File$ = "" + t = GetWindowText (hWnd, File$, iLength+1) + IF Not(szFile$="") THEN + Open szFile$ For Binary New As Fp1 + PUT$ Fp1,File$, LEN(File$) + Close Fp1 + Free File$ + Function = TRUE + ELSE + MessageBox( hWnd, "File Save failed.", NULL, MB_OK ) + Function = FALSE + END IF +End Function + + +Function AskAboutSave (hWnd AS HWND) + Local afile$ + afile$ = "File has changed. Save?" + iReturn = MsgBox (afile$, "Confirm", 35) + Function = iReturn +End Function + + +Function FileNewMeEdit (hForm As HWND, hEdit As HWND) + IF FileTestSaveMeEdit (hForm, hEdit) Then + SetText (hEdit,"") + szFile$ = "" + szFileTitle$ = "" + Caption$ = AppMeCaption$ + SetWindowText (hForm, Caption$) + Function = TRUE + Else + Function = FALSE + End If +End Function + +Function FileOpenMeEdit (hForm As HWND, hEdit As HWND) + LOCAL bakFile$ + IF FileTestSaveMeEdit (hForm, hEdit) Then +' Caption$ = AppMeCaption$ +' SetWindowText (hForm, Caption$) + InitOpenFileName(hForm) + bakFile$ = szFile$ + PopFileOpenDlg (hForm, szFile$, szFileTitle$) + If OpenNewFile(hEdit) Then + Caption$ = AppMeCaption$ & " - " & szFile$ + SetWindowText (hForm, Caption$) + Function = TRUE + Else + szFile$ = bakFile$ +' Caption$ = AppMeCaption$ & " - " & szFile$ +' SetWindowText (hForm, Caption$) + Function = FALSE + End If + Else + Function = FALSE + End IF +End Function + +Function FileSaveDefMeEdit (hForm As HWND, hEdit As HWND) + Caption$ = "Mark Editor by AKON (rus)" + SetWindowText (hForm, Caption$) + If SaveOpenFile(hEdit) Then + Caption$ = AppMeCaption$ & " - " & szFile$ + SetWindowText (hForm, Caption$) + Function = TRUE + Else + Function = FALSE + End If +End Function + +Function FileSaveAsMeEdit (hForm As HWND, hEdit As HWND) + szFile$ = "" + szFileTitle$ = "" + InitOpenFileName(hForm) + PopFileSaveDlg (hForm, szFile$, szFileTitle$) + If SaveOpenFile(hEdit) Then + Caption$ = AppMeCaption$ & " - " & szFile$ + SetWindowText (hForm, Caption$) + Function = TRUE + Else + Function = False + End If +End Function + +Function FileSaveMeEdit (hForm As HWND, hEdit As HWND) + IF (szFile$ = "") THEN + bNeedSave = Not (FileSaveAsMeEdit (hForm, hEdit)) + ELSE + bNeedSave = Not (FileSaveDefMeEdit (hForm, hEdit)) + END IF + Function = TRUE +End Function + +Function FileTestSaveMeEdit (hForm As HWND, hEdit As HWND) + Dim i + IF bNeedSave = TRUE THEN + i = (AskAboutSave (Edit1)) + + IF i = IDCANCEL THEN + Function = FALSE + EXIT FUNCTION + END IF + IF i = IDNO THEN + bSave = FALSE + END IF + IF i = IDYES THEN + bSave = TRUE + END IF + + IF bSave THEN + bNeedSave = Not (FileSaveMeEdit (hForm, hEdit)) + END IF + END IF + Function = TRUE +End Function + +Function FileExitMeEdit (hForm As HWND, hEdit As HWND) + If FileTestSaveMeEdit (hForm, hEdit) Then + PostQuitMessage(0) ' Yes .. Terminate program + Function = TRUE + Else + Function = False + End If +End Function + +Sub notice(a$) + MsgBox a$, "Notice", 64 +End Sub diff --git a/src/medlgrcc.basi b/src/medlgrcc.basi new file mode 100644 index 0000000..b970365 --- /dev/null +++ b/src/medlgrcc.basi @@ -0,0 +1,156 @@ +Function DlgRCD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKrp As Double +GLOBAL dPK As Double +GLOBAL d0 As Double +GLOBAL dn As Double +GLOBAL m0 As Double +GLOBAL mn As Double +GLOBAL mrp As Double +GLOBAL l0 As Double +GLOBAL ln As Double +GLOBAL NameRp$ +GLOBAL Rkk As Double +GLOBAL Zkk As Double +GLOBAL Lpk As Double +GLOBAL Gl As Double +GLOBAL SPrl As Double +GLOBAL dSPl As Double +GLOBAL pdSP As Double +GLOBAL SPI As Double +GLOBAL dSP As Double +GLOBAL Yrp As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = MathCstr$(d0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = MathCstr$(m0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = MathCstr$(dn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = MathCstr$(mn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Zkk) + strTxt$ = MathCstr$(Zkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = NameRp$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = MathCstr$(PKrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = MathCstr$(mrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = MathCstr$(Brl,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation Rail size of Circular crooked trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = GetText$(hwSelect) + d0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" d0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = GetText$(hwSelect) + m0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" m0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = GetText$(hwSelect) + dn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" dn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = GetText$(hwSelect) + mn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "R=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Zkk) + strTxt$ = GetText$(hwSelect) + Zkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" z=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = GetText$(hwSelect) + NameRp$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "Rp: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = GetText$(hwSelect) + PKrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" PKrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = GetText$(hwSelect) + mrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = GetText$(hwSelect) + Brl = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Brl=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + l0 = d0-m0 + ln = dn-mn + Lpk = Abs(PKn-PK0) + Gl = (ln-l0)/Lpk + SPrl = MathPowI(Lpk,2)/8/Rkk + dPK = Abs(PKrp-PK0) + dSPl = Lpk/2-dPK + pdSP = Abs(dSPl) + SPI = MathPowI(pdSP,2)/2/Rkk + dSP = (SPrl-SPI) + Yrp = Gl*dPK+mrp+l0+Zkk-Brl-dSP + + strTxt$ = MathCstr$(Yrp,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yrp) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(Yrp,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Yrp=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgrl.basi b/src/medlgrl.basi new file mode 100644 index 0000000..2fda7dd --- /dev/null +++ b/src/medlgrl.basi @@ -0,0 +1,125 @@ +Function DlgRLD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKrp As Double +GLOBAL d0 As Double +GLOBAL dn As Double +GLOBAL m0 As Double +GLOBAL mn As Double +GLOBAL mrp As Double +GLOBAL NameRp$ +GLOBAL l0 As Double +GLOBAL ln As Double +GLOBAL Gl As Double +GLOBAL Yrp As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = MathCstr$(d0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = MathCstr$(m0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = MathCstr$(dn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = MathCstr$(mn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = NameRp$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = MathCstr$(PKrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = MathCstr$(mrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = MathCstr$(Brl,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation Rail size of Linear trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = GetText$(hwSelect) + d0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" d0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = GetText$(hwSelect) + m0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" m0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = GetText$(hwSelect) + dn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" dn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = GetText$(hwSelect) + mn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = GetText$(hwSelect) + NameRp$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "Rp: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = GetText$(hwSelect) + PKrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" PKrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = GetText$(hwSelect) + mrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = GetText$(hwSelect) + Brl = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Brl=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + l0 = d0-m0 + ln = dn-mn + Gl = (ln-l0)*(PKrp-PK0)/(PKn-PK0) + Yrp = Gl+l0+mrp-Brl + + strTxt$ = MathCstr$(Yrp,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yrp) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(Yrp,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Yrp=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgrsc.basi b/src/medlgrsc.basi new file mode 100644 index 0000000..211475d --- /dev/null +++ b/src/medlgrsc.basi @@ -0,0 +1,145 @@ +Function DlgRSD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKrp As Double +GLOBAL dPK As Double +GLOBAL d0 As Double +GLOBAL dn As Double +GLOBAL m0 As Double +GLOBAL mn As Double +GLOBAL mrp As Double +GLOBAL NameRp$ +GLOBAL l0 As Double +GLOBAL ln As Double +GLOBAL Csk As Double +GLOBAL Lpk As Double +GLOBAL ySK As Double +GLOBAL Ml As Double +GLOBAL Yrp As Double +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = MathCstr$(d0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = MathCstr$(m0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = MathCstr$(dn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = MathCstr$(mn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKnsk) + strTxt$ = MathCstr$(PKnsk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Csk) + strTxt$ = MathCstr$(Csk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = NameRp$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = MathCstr$(PKrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = MathCstr$(mrp,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = MathCstr$(Brl,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation Rail size of connecting crooked (Spiral) trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_d0) + strTxt$ = GetText$(hwSelect) + d0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" d0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_M0) + strTxt$ = GetText$(hwSelect) + m0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" m0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_dn) + strTxt$ = GetText$(hwSelect) + dn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" dn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mn) + strTxt$ = GetText$(hwSelect) + mn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKnsk) + strTxt$ = GetText$(hwSelect) + PKnsk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKnsk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Csk) + strTxt$ = GetText$(hwSelect) + Csk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" C=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NameRp) + strTxt$ = GetText$(hwSelect) + NameRp$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "Rp: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKrp) + strTxt$ = GetText$(hwSelect) + PKrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" PKrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Mrp) + strTxt$ = GetText$(hwSelect) + mrp = Val(strTxt$) + strBuffer$ = strBuffer$ & (" mrp=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Brl) + strTxt$ = GetText$(hwSelect) + Brl = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "Brl=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + l0 = d0-m0 + ln = dn-mn + dPK = Abs(PKrp-PKnsk) + ySK = MarkSCY(dPK, Csk) + Ml = l0+mrp+(ln-l0)*Abs(PKrp-PK0)/Abs(PKn-PK0) + Yrp = ySK+Ml+(ySK+Ml)*MarkSCddX(dPK,Csk)-Brl + + strTxt$ = MathCstr$(Yrp,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yrp) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strTxt$ = MathCstr$(Yrp,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Yrp=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgtcc.basi b/src/medlgtcc.basi new file mode 100644 index 0000000..889b745 --- /dev/null +++ b/src/medlgtcc.basi @@ -0,0 +1,235 @@ +Function DlgTCD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKpz As Double +GLOBAL PKpz1 As Double +GLOBAL PKpz2 As Double +GLOBAL dPK As Double +GLOBAL sPK As Double +GLOBAL deltapz As Double +GLOBAL deltapz1 As Double +GLOBAL deltapz2 As Double +GLOBAL Y0 As Double +GLOBAL Yn As Double +GLOBAL Yck As Double +GLOBAL dY As Double +GLOBAL Ypz As Double +GLOBAL X0 As Double +GLOBAL Xn As Double +GLOBAL Xck As Double +GLOBAL dX As Double +GLOBAL Xpz As Double +GLOBAL NamePZ$ +GLOBAL Rkk As Double +GLOBAL R0 As Double +GLOBAL Rn As Double +GLOBAL Rpz As Double +GLOBAL Zsk As Double +GLOBAL Qkk As Double +GLOBAL A0 As Double +GLOBAL An As Double +GLOBAL Apz As Double +GLOBAL dA0 As Double +GLOBAL dAn As Double +GLOBAL Beta As Double +GLOBAL Lpk As Double +GLOBAL sBeta As Double +GLOBAL Agms$ +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = MathCstr$(Y0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = MathCstr$(X0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = MathCstr$(Yn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = MathCstr$(Xn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yck) + strTxt$ = MathCstr$(Yck,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xck) + strTxt$ = MathCstr$(Xck,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Zkk) + strTxt$ = MathCstr$(Zsk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Qkk) + strTxt$ = MathCstr$(Qkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$=NamePZ$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = MathCstr$(Ypz,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = MathCstr$(Xpz,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation on circular crooked trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = GetText$(hwSelect) + Y0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Y0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = GetText$(hwSelect) + X0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" X0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = GetText$(hwSelect) + Yn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Yn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = GetText$(hwSelect) + Xn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yck) + strTxt$ = GetText$(hwSelect) + Yck = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "CENTR: Yck=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xck) + strTxt$ = GetText$(hwSelect) + Xck = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xck=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "R=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Zkk) + strTxt$ = GetText$(hwSelect) + Zsk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" z=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Qkk) + strTxt$ = GetText$(hwSelect) + Qkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" q=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = GetText$(hwSelect) + NamePZ$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "PZ: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = GetText$(hwSelect) + Ypz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Ypz=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = GetText$(hwSelect) + Xpz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + sPK = MathSign(PKn-PK0) + dY = Y0-Yck + dX = X0-Xck + R0 = MarkLen(dY,dX) + A0 = MathAtan(dY,dX) + dY = Yn-Yck + dX = Xn-Xck + Rn = MarkLen(dY,dX) + An = MathAtan(dY,dX) + Beta = An-A0 + If Beta<0 Then Beta = MathPI(2.0)+Beta + If Beta>MathPI(1.0) Then Beta = Beta-MathPI(2.0) + sBeta = 1 + If Beta<0 Then sBeta = -1 + Lpk = sBeta*Rkk*Beta + + strBuffer$ = "" + strTxt$ = MathCstr$(R0,LenFrac) + Agms$ = MathRadToGMS(A0) + strBuffer$ = strBuffer$ & (CRLF$ & "Ankk=" & Agms$ & " Rnkk=" & strTxt$) + strTxt$ = MathCstr$(Rn,LenFrac) + Agms$ = MathRadToGMS(An) + strBuffer$ = strBuffer$ & (CRLF$ & "Akkk=" & Agms$ & " Rkkk=" & strTxt$) + Agms$ = MathRadToGMS(Beta) + strTxt$ = MathCstr$(Lpk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Beta=" & Agms$ & " Lkk=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + + dY = Ypz-Yck + dX = Xpz-Xck + Apz = MathAtan(dY,dX) + Rpz = MarkLen(dY,dX) + dA0 = Apz-A0 + If dA0<0 Then dA0 = MathPI(2.0)+dA0 + If dA0>MathPI(1.0) Then dA0 = dA0-MathPI(2.0) + dAn = Apz-An + If dAn<0 Then dAn = MathPI(2.0)+dAn + If dAn>MathPI(1.0) Then dAn = dAn-MathPI(2.0) + + strBuffer$ = "" + Agms$ = MathRadToGMS(Apz) + strTxt$ = MathCstr$(Rpz,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Apz=" & Agms$ & " Rpz=" & strTxt$) + + If ((Abs(dA0)>Abs(Beta)) OR (Abs(dAn)>Abs(Beta))) Then + PKpz = 0 + deltapz = 0 + strBuffer$ = strBuffer$ & (CRLF$ & "!Point outside of circular crooked!" & CRLF$) + Else + PKpz1 = PK0+sBeta*Rkk*dA0 + PKpz2 = PKn+sBeta*Rkk*dAn + PKpz = (PKpz1+PKpz2)/2 + deltapz = Rpz-(Rkk-Zsk-Qkk) + strTxt$ = MathCstr$(PKpz1,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "PKpz1=" & strTxt$) + strTxt$ = MathCstr$(deltapz,LenFrac) + strBuffer$ = strBuffer$ & (" Dpz=" & strTxt$) + strTxt$ = MathCstr$(PKpz2,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "PKpz2=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + End If + + strTxt$ = MathCstr$(PKpz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + SetText (hwSelect,strTxt$) + + strTxt$ = MathCstr$(deltapz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Dpz) + SetText (hwSelect,strTxt$) + + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgtl.basi b/src/medlgtl.basi new file mode 100644 index 0000000..51d12b6 --- /dev/null +++ b/src/medlgtl.basi @@ -0,0 +1,163 @@ +Function DlgTLD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKn As Double +GLOBAL PKpz As Double +GLOBAL PKpz1 As Double +GLOBAL PKpz2 As Double +GLOBAL dPK As Double +GLOBAL sPK As Double +GLOBAL deltapz As Double +GLOBAL deltapz1 As Double +GLOBAL deltapz2 As Double +GLOBAL Y0 As Double +GLOBAL Yn As Double +GLOBAL dY As Double +GLOBAL Ypz As Double +GLOBAL X0 As Double +GLOBAL Xn As Double +GLOBAL dX As Double +GLOBAL Xpz As Double +GLOBAL NamePZ$ +GLOBAL Lpk As Double +GLOBAL sinA As Double +GLOBAL cosA As Double +GLOBAL Arad As Double +GLOBAL Agms$ +LOCAL Buffer$ +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = MathCstr$(Y0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = MathCstr$(X0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PKn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = MathCstr$(Yn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = MathCstr$(Xn,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = NamePZ$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = MathCstr$(Ypz,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = MathCstr$(Xpz,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation on linear trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = GetText$(hwSelect) + Y0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Y0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = GetText$(hwSelect) + X0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" X0=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PKn = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PKn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = GetText$(hwSelect) + Yn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Yn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = GetText$(hwSelect) + Xn = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xn=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = GetText$(hwSelect) + NamePZ$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "PZ: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = GetText$(hwSelect) + Ypz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Ypz=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = GetText$(hwSelect) + Xpz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + dY = Yn-Y0 + dX = Xn-X0 + Lpk = MarkLen(dY,dX) + sinA = dY/Lpk + cosA = dX/Lpk + Arad = MathAtan(dY,dX) + Agms$ = MathRadToGMS(Arad) + sPK = MathSign(PKn-PK0) + dY = Ypz-Y0 + dX = Xpz-X0 + dPK = MarkPK(dY,dX,sinA,cosA) + PKpz1 = PK0+sPK*dPK + deltapz1 = MarkDelta(dY,dX,sinA,cosA) + deltapz1 = sPK*deltapz1 + dY = Ypz-Yn + dX = Xpz-Xn + dPK = MarkPK(dY,dX,sinA,cosA) + PKpz2 = PKn+sPK*dPK + deltapz2 = MarkDelta(dY,dX,sinA,cosA) + deltapz2 = sPK*deltapz2 + PKpz = (PKpz1+PKpz2)/2 + deltapz = (deltapz1+deltapz2)/2 + + strTxt$ = MathCstr$(PKpz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKpz) + SetText (hwSelect,strTxt$) + + strTxt$ = MathCstr$(deltapz,LenFrac) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Dpz) + SetText (hwSelect,strTxt$) + + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Apk=" & Agms$) + strTxt$ = MathCstr$(Lpk,LenFrac) + strBuffer$ = strBuffer$ & (" Lpk=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + strTxt$ = MathCstr$(PKpz1,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "PKpz1=" & strTxt$) + strTxt$ = MathCstr$(deltapz1,LenFrac) + strBuffer$ = strBuffer$ & (" Dpz1=" & strTxt$) + strTxt$ = MathCstr$(PKpz2,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "PKpz2=" & strTxt$) + strTxt$ = MathCstr$(deltapz2,LenFrac) + strBuffer$ = strBuffer$ & (" Dpz2=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + + AppendText (Edit1,strBuffer$) + strBuffer$ = "" + End If + If wParam = IDCANCEL Then EndDialog (hDlg, 0) + + Case WM_CLOSE + EndDialog ( hDlg,0 ) + + End Select + Function = 0 +End Function diff --git a/src/medlgtsc.basi b/src/medlgtsc.basi new file mode 100644 index 0000000..e2e371c --- /dev/null +++ b/src/medlgtsc.basi @@ -0,0 +1,298 @@ +Function DlgTSD (hDlg AS HWND, Msg, wParam, lParam) +GLOBAL hwSelect As HWND +GLOBAL strTxt$ +GLOBAL strBuffer$ +GLOBAL PK0 As Double +GLOBAL PKl As Double +GLOBAL PKnsk As Double +GLOBAL PKksk As Double +GLOBAL PKpz As Double +GLOBAL dPK As Double +GLOBAL sPK As Double +GLOBAL delta As Double +GLOBAL deltapz As Double +GLOBAL Y0 As Double +GLOBAL Yl As Double +GLOBAL Yck As Double +GLOBAL dY As Double +GLOBAL Ypz As Double +GLOBAL X0 As Double +GLOBAL Xl As Double +GLOBAL Xck As Double +GLOBAL dX As Double +GLOBAL Xpz As Double +GLOBAL NamePZ$ +GLOBAL y0pz As Double +GLOBAL x0pz As Double +GLOBAL x0sc As Double +GLOBAL yipz As Double +GLOBAL xipz As Double +GLOBAL lipz As Double +GLOBAL lipkpz As Double +GLOBAL fipz As Double +GLOBAL Dipz As Double +GLOBAL dxipz As Double +GLOBAL Rkk As Double +GLOBAL Rk As Double +GLOBAL Csk As Double +GLOBAL Lsk As Double +GLOBAL Xsk As Double +GLOBAL Ysk As Double +GLOBAL FIsk As Double +GLOBAL Zsk As Double +GLOBAL Zsk As Double +GLOBAL Qkk As Double +GLOBAL Ask As Double +GLOBAL A1sk As Double +GLOBAL Qpz As Double +GLOBAL A0 As Double +GLOBAL An As Double +GLOBAL Apz As Double +GLOBAL dA0 As Double +GLOBAL dAn As Double +GLOBAL Lpk As Double +GLOBAL sBeta As Double +GLOBAL Agms$ +'LenFrac = 4 + + Select Case Msg + Case WM_INITDIALOG + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = MathCstr$(PKl,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = MathCstr$(Yl,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = MathCstr$(Xl,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = MathCstr$(PK0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = MathCstr$(Y0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = MathCstr$(X0,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yck) + strTxt$ = MathCstr$(Yck,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xck) + strTxt$ = MathCstr$(Xck,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = MathCstr$(Rkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lsk) + strTxt$ = MathCstr$(Lsk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Qkk) + strTxt$ = MathCstr$(Qkk,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = NamePZ$ + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = MathCstr$(Ypz,LenFrac) + SetText (hwSelect,strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = MathCstr$(Xpz,LenFrac) + SetText (hwSelect,strTxt$) + Center (hDlg) + + Case WM_COMMAND + If wParam = IDOK Then + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Calculation on connecting crooked (spiral) trace" & CRLF$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PK0) + strTxt$ = GetText$(hwSelect) + PKl = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK_l=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Y0) + strTxt$ = GetText$(hwSelect) + Yl = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Y_l=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_X0) + strTxt$ = GetText$(hwSelect) + Xl = Val(strTxt$) + strBuffer$ = strBuffer$ & (" X_l=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_PKn) + strTxt$ = GetText$(hwSelect) + PK0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "PK_nkk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yn) + strTxt$ = GetText$(hwSelect) + Y0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Y_nkk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xn) + strTxt$ = GetText$(hwSelect) + X0 = Val(strTxt$) + strBuffer$ = strBuffer$ & (" X_nkk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Yck) + strTxt$ = GetText$(hwSelect) + Yck = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "CENTR: Yck=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xck) + strTxt$ = GetText$(hwSelect) + Xck = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xck=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Rkk) + strTxt$ = GetText$(hwSelect) + Rkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (CRLF$ & "R_kk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Lsk) + strTxt$ = GetText$(hwSelect) + Lsk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" L_sk=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Qkk) + strTxt$ = GetText$(hwSelect) + Qkk = Val(strTxt$) + strBuffer$ = strBuffer$ & (" q=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_NamePz) + strTxt$ = GetText$(hwSelect) + NamePZ$ = strTxt$ + strBuffer$ = strBuffer$ & (CRLF$ & "PZ: " & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Ypz) + strTxt$ = GetText$(hwSelect) + Ypz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Ypz=" & strTxt$) + hwSelect = GetDlgItem(hDlg,IDC_Edit_Xpz) + strTxt$ = GetText$(hwSelect) + Xpz = Val(strTxt$) + strBuffer$ = strBuffer$ & (" Xpz=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + dY = Y0-Yl + dX = X0-Xl + Lpk = MarkLen(dY,dX) + sinA = dY/Lpk + cosA = dX/Lpk + Arad = MathAtan(dY,dX) + Agms$ = MathRadToGMS(Arad) + sPK = MathSign(PK0-PKl) + dY = Yck-Y0 + dX = Xck-X0 + delta = MarkDelta(dY,dX,sinA,cosA) + Rk = MarkLen(dY,dX) + + strBuffer$ = "" + strBuffer$ = strBuffer$ & (CRLF$ & "Apk=" & Agms$) + strTxt$ = MathCstr$(Lpk,LenFrac) + strBuffer$ = strBuffer$ & (" Lpk=" & strTxt$) + strTxt$ = MathCstr$(Rk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "Rk=" & strTxt$) + sBeta = MathSign(delta) + If sBeta<0 Then + strBuffer$ = strBuffer$ & (" !Left!") + Else + strBuffer$ = strBuffer$ & (" !Right!") + End If + Csk = Rkk*Lsk + Ask = MarkSCa(Lsk,Csk) + A1sk = MarkSCa1(Lsk,Csk) + Xsk = MarkSCX(Lsk,Csk) + Ysk = MarkSCY(Lsk,Csk) + Zsk = MarkSCZ(Lsk,Csk) + FIsk = MarkSCFi(Lsk,Csk) + PKnsk = PK0-sPK*Ask + PKksk = PKnsk+sPK*Lsk + strTxt$ = MathCstr$(Csk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "C=" & strTxt$) + strTxt$ = MathCstr$(Ask,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "a=" & strTxt$) + strTxt$ = MathCstr$(A1sk,LenFrac) + strBuffer$ = strBuffer$ & (" a1=" & strTxt$) + strTxt$ = MathCstr$(Xsk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "(X)=" & strTxt$) + strTxt$ = MathCstr$(Ysk,LenFrac) + strBuffer$ = strBuffer$ & (" (Y)=" & strTxt$) + strTxt$ = MathCstr$(Zsk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "(Z)=" & strTxt$) + strTxt$ = MathRadToGMS(FIsk) + strBuffer$ = strBuffer$ & (" (FI)=" & strTxt$) + strTxt$ = MathCstr$(PKnsk,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "PKnsk=" & strTxt$) + strTxt$ = MathCstr$(PKksk,LenFrac) + strBuffer$ = strBuffer$ & (" PKksk=" & strTxt$) + strBuffer$ = strBuffer$ & CRLF$ + AppendText (Edit1,strBuffer$) + strBuffer = "" + + dY = Ypz-Y0 + dX = Xpz-X0 + x0pz = MarkPK(dY,dX,sinA,cosA) + x0pz = x0pz+Ask + y0pz = MarkDelta(dY,dX,sinA,cosA) + y0pz = sBeta*y0pz + strBuffer$ = "" + strTxt$ = MathCstr$(x0pz,LenFrac) + strBuffer$ = strBuffer$ & (CRLF$ & "(x)pz=" & strTxt$) + strTxt$ = MathCstr$(y0pz,LenFrac) + strBuffer$ = strBuffer$ & (" (y)pz=" & strTxt$) + + x0sc = MarkSChigh(Xsk, Ysk, FIsk, y0pz) + If ((x0pz<0) OR (x0pz>x0sc)) Then + PKpz = 0 + deltapz = 0 + strBuffer$ = strBuffer$ & (CRLF$ & "!Point outside of connecting crooked!") + If x0pz<0 Then strBuffer$ = strBuffer$ & (CRLF$ & "(x0)pz = NSK" & MathCstr$(x0pz,LenFrac)) + If x0pz>x0sc Then strBuffer$ = strBuffer$ & (CRLF$ & "(x0)pz = KSK+" & MathCstr$((x0pz-x0sc),LenFrac)) + strBuffer$ = strBuffer$ & CRLF$ + Else + yipz = y0pz + xipz = x0pz + lipz = x0pz + Do + fipz = MarkSCFi(lipz,Csk) + Dipz = (y0pz-MarkSCY(lipz,Csk))/cos(fipz) + xipz = MarkSCX(lipz,Csk)-Dipz*sin(fipz) + dxipz = ABS(x0pz-xipz) + lipz = lipz+(x0pz-xipz) + Loop Until (dxipz0 Then + For tI = 1 To tPow + tRes = tRes*tVar + Next tI + End If + End If + End If + Function = tRes +End Function + +Function MathPI(tVar As Double) As Double +Dim varPI As Double + varPI = 3.14159265358979*tVar + Function = varPI +End Function + +Function MathEps(tVar As Double) As Double +Dim varEps As Double + varEps = MathPowI(10,-7)*tVar + Function = varEps +End Function + +Function MathRound(tVar As Double,tFix As Integer) As Double +Dim tDiv As Double +Dim tRes As Double + tDiv = MathPowI(10,tFix) + If tVar=0 Then + tRes = 0 + Else + tRes = MathSign(tVar)*Int(Abs(tVar)*tDiv+0.5)/tDiv + End If + Function = tRes +End Function + +Function MathCstr(tVar As Double,tFixN As Integer) As String +Dim tDiv As Double +Dim tSign As Double +Dim tFix As Double +Dim tFrac As Double +Dim tRes As Double +Dim tStrFix$ +Dim tStrFrac$ +Dim tStr$ + If tFixN > 0 Then + tDiv = MathPowI(10,tFixN) + tRes = tVar + If tVar<0 Then tRes = -tRes + tRes = tRes+0.5/tDiv + tFix = Int(tRes) + tFrac = Int((tRes-tFix)*tDiv) + tStrFix$ = Trim$(Str$(tFix)) + tStrFrac$ = Trim$(Str$(tFrac)) + If tVar<0 Then tStrFix$ = "-" & tStrFix$ + Do While (Len(tStrFrac$) +#include "..\MarkEdit.h" + +#include "meicon.rci" +#include "meinfo.rci" +#include "memenu.rci" +#include "medlgabout.rci" +#include "medlgopt.rci" +#include "medlgtl.rci" +#include "medlgtcc.rci" +#include "medlgtsc.rci" +#include "medlgrl.rci" +#include "medlgrcc.rci" +#include "medlgrsc.rci" +#include "medlgevl.rci" +#include "medlgevc.rci" +#include "medlgchc.rci" +#include "medlgchs.rci" +#include "medlgint.rci" diff --git a/src/res/medlgabout.rci b/src/res/medlgabout.rci new file mode 100644 index 0000000..1a6d794 --- /dev/null +++ b/src/res/medlgabout.rci @@ -0,0 +1,14 @@ +IDD_ABOUT DIALOG DISCARDABLE 22, 17, 167, 73 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "About Mark Editor" +FONT 10, "Helv" +BEGIN + DEFPUSHBUTTON "OK",IDOK,132,2,32,14,WS_GROUP + ICON IDI_MEICON,-1,3,2,32,32 + LTEXT "MarkEdit",IDC_ABOUT_Name,30,2,100,8 + LTEXT "editor and mark calculator",IDC_ABOUT_Coment,30,11,100,8 + LTEXT "Version 1.0.0.3",IDC_ABOUT_Version,30,20,137,8 + LTEXT "Copyright \251 2010 Akon && TerraNoNames",IDC_ABOUT_Copy,30,29,137,8 + LTEXT "GNU General Public License",IDC_ABOUT_License,30,47,136,27 + CONTROL "",IDC_ABOUT_Line,"Static",SS_BLACKRECT,29,43,138,1 +END diff --git a/src/res/medlgchc.rci b/src/res/medlgchc.rci new file mode 100644 index 0000000..cc25d76 --- /dev/null +++ b/src/res/medlgchc.rci @@ -0,0 +1,20 @@ +IDD_CHCD DIALOG 60, 40, 350, 160 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Chords circular" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "R", IDC_Label_Rkk, 20, 35, 20, 12 + EDITTEXT IDC_Edit_Rkk, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "L_ch", IDC_Label_Lch, 120, 35, 20, 12 + EDITTEXT IDC_Edit_Lch, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "d_L", IDC_Label_dLch, 220, 35, 20, 12 + EDITTEXT IDC_Edit_dLch, 240, 35, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Calc, 16, 80, 320, 32 + PUSHBUTTON "CALC", IDOK, 26, 90, 60, 14 + LTEXT "N", IDC_Label_N, 115, 90, 25, 12 + EDITTEXT IDC_Edit_N, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "B", IDC_Label_B, 220, 90, 20, 12 + EDITTEXT IDC_Edit_B, 240, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 130, 40, 14 +end diff --git a/src/res/medlgchs.rci b/src/res/medlgchs.rci new file mode 100644 index 0000000..0fdb007 --- /dev/null +++ b/src/res/medlgchs.rci @@ -0,0 +1,24 @@ +IDD_CHSD DIALOG 60, 40, 350, 175 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Chords spiral" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "R", IDC_Label_Rkk, 20, 35, 20, 12 + EDITTEXT IDC_Edit_Rkk, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "L_sk", IDC_Label_Lsk, 120, 35, 20, 12 + EDITTEXT IDC_Edit_Lsk, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "L0", IDC_Label_L0, 20, 50, 20, 12 + EDITTEXT IDC_Edit_L0, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Ln", IDC_Label_Ln, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Ln, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "d_L", IDC_Label_dLch, 220, 50, 20, 12 + EDITTEXT IDC_Edit_dLch, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Calc, 16, 95, 320, 32 + PUSHBUTTON "CALC", IDOK, 26, 105, 60, 14 + LTEXT "N", IDC_Label_N, 115, 105, 25, 12 + EDITTEXT IDC_Edit_N, 140, 105, 60, 12, ES_AUTOHSCROLL + LTEXT "B", IDC_Label_B, 220, 105, 20, 12 + EDITTEXT IDC_Edit_B, 240, 105, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 145, 40, 14 +end diff --git a/src/res/medlgevc.rci b/src/res/medlgevc.rci new file mode 100644 index 0000000..68d1f64 --- /dev/null +++ b/src/res/medlgevc.rci @@ -0,0 +1,38 @@ +IDD_EVCD DIALOG 60, 40, 350, 270 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Elevation Circular" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "H_A", IDC_Label_H0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_H0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "i_A", IDC_Label_i0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_i0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "H_B", IDC_Label_Hn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Hn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "i_B", IDC_Label_in, 220, 50, 20, 12 + EDITTEXT IDC_Edit_in, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Crooked, 16, 80, 320, 32 + LTEXT "Circular", IDC_Label_Crooked, 20, 90, 100, 12 + LTEXT "R_v", IDC_Label_Rkk, 120, 90, 20, 12 + EDITTEXT IDC_Edit_Rkk, 140, 90, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Rp, 16, 120, 320, 32 + LTEXT "point PZ", IDC_Label_NamePz, 20, 130, 100, 12 + EDITTEXT IDC_Edit_NamePz, 60, 130, 40, 12, ES_AUTOHSCROLL + LTEXT "PK_pz", IDC_Label_PKpz, 120, 130, 20, 12 + EDITTEXT IDC_Edit_PKpz, 140, 130, 60, 12, ES_AUTOHSCROLL + LTEXT "H_pz", IDC_Label_Hpz, 220, 130, 20, 12 + EDITTEXT IDC_Edit_Hpz, 240, 130, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 160, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 190, 320, 32 + LTEXT "point PZ", IDC_Label_Pz, 20, 200, 100, 12 + LTEXT "H0_pz", IDC_Label_H0pz, 115, 200, 25, 12 + EDITTEXT IDC_Edit_H0pz, 140, 200, 60, 12, ES_AUTOHSCROLL + LTEXT "dH_pz", IDC_Label_dHpz, 220, 200, 20, 12 + EDITTEXT IDC_Edit_dHpz, 240, 200, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 230, 40, 14 +end diff --git a/src/res/medlgevl.rci b/src/res/medlgevl.rci new file mode 100644 index 0000000..a17595c --- /dev/null +++ b/src/res/medlgevl.rci @@ -0,0 +1,30 @@ +IDD_EVLD DIALOG 60, 40, 350, 230 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Elevation Linear" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "H_A", IDC_Label_H0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_H0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "H_B", IDC_Label_Hn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Hn, 140, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Pz, 16, 80, 320, 32 + LTEXT "point PZ", IDC_Label_NamePz, 20, 90, 100, 12 + EDITTEXT IDC_Edit_NamePz, 60, 90, 40, 12, ES_AUTOHSCROLL + LTEXT "PK_pz", IDC_Label_PKpz, 120, 90, 20, 12 + EDITTEXT IDC_Edit_PKpz, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "H_pz", IDC_Label_Hpz, 220, 90, 20, 12 + EDITTEXT IDC_Edit_Hpz, 240, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 120, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 150, 320, 32 + LTEXT "point PZ", IDC_Label_Pz, 20, 160, 100, 12 + LTEXT "H0_pz", IDC_Label_H0pz, 115, 160, 25, 12 + EDITTEXT IDC_Edit_H0pz, 140, 160, 60, 12, ES_AUTOHSCROLL + LTEXT "dH_pz", IDC_Label_dHpz, 220, 160, 20, 12 + EDITTEXT IDC_Edit_dHpz, 240, 160, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 190, 40, 14 +end diff --git a/src/res/medlgint.rci b/src/res/medlgint.rci new file mode 100644 index 0000000..ed6c319 --- /dev/null +++ b/src/res/medlgint.rci @@ -0,0 +1,22 @@ +IDD_INTER DIALOG 60, 40, 350, 160 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Interpolation" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "Y0", IDC_Label_YY0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_YY0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "Yn", IDC_Label_YYn, 120, 35, 20, 12 + EDITTEXT IDC_Edit_YYn, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "X0", IDC_Label_XX0, 20, 50, 20, 12 + EDITTEXT IDC_Edit_XX0, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Xn", IDC_Label_XXn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_XXn, 140, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Calc, 16, 80, 320, 32 + LTEXT "Yi", IDC_Label_YYi, 20, 90, 25, 12 + EDITTEXT IDC_Edit_YYi, 40, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 120, 90, 60, 14 + LTEXT "Xi", IDC_Label_XXi, 220, 90, 20, 12 + EDITTEXT IDC_Edit_XXi, 240, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 130, 40, 14 +end diff --git a/src/res/medlgopt.rci b/src/res/medlgopt.rci new file mode 100644 index 0000000..f88cfd1 --- /dev/null +++ b/src/res/medlgopt.rci @@ -0,0 +1,16 @@ +IDD_OPTD DIALOG 22, 17, 167, 73 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Mark Editor Options" +FONT 10, "Helv" +BEGIN + ICON IDI_MEICON,-1,3,2,32,32 + LTEXT "MarkEdit",IDC_ABOUT_Name,30,2,100,8 + LTEXT "Truncation of importances:",IDC_Label_Trunc,30,11,100,8 + LTEXT "Linears",IDC_Label_LenFrac,30,23,60,12 + EDITTEXT IDC_Edit_LenFrac, 90, 23, 60, 12, ES_AUTOHSCROLL + LTEXT "Angles",IDC_Label_LenFracA,30,35,60,12 + EDITTEXT IDC_Edit_LenFracA, 90, 35, 60, 12, ES_AUTOHSCROLL + CONTROL "",IDC_ABOUT_Line,"Static",SS_BLACKRECT,29,50,138,1 + PUSHBUTTON "OK",IDOK,25,55,32,14 + DEFPUSHBUTTON "Close",IDCANCEL,100,55,40,14,WS_GROUP +END diff --git a/src/res/medlgrcc.rci b/src/res/medlgrcc.rci new file mode 100644 index 0000000..0c1737f --- /dev/null +++ b/src/res/medlgrcc.rci @@ -0,0 +1,40 @@ +IDD_RCD DIALOG 60, 40, 350, 270 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Rail size of Circular crooked trace" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "d_A", IDC_Label_d0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_d0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "m_A", IDC_Label_M0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_M0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "d_B", IDC_Label_dn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_dn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "m_B", IDC_Label_Mn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Mn, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Crooked, 16, 80, 320, 32 + LTEXT "Circular", IDC_Label_Crooked, 20, 90, 100, 12 + LTEXT "R", IDC_Label_Rkk, 120, 90, 20, 12 + EDITTEXT IDC_Edit_Rkk, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "z", IDC_Label_Zkk, 220, 90, 20, 12 + EDITTEXT IDC_Edit_Zkk, 240, 90, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Rp, 16, 120, 320, 32 + LTEXT "point Rp", IDC_Label_NameRp, 20, 130, 100, 12 + EDITTEXT IDC_Edit_NameRp, 60, 130, 40, 12, ES_AUTOHSCROLL + LTEXT "Pk_rp", IDC_Label_PKrp, 120, 130, 20, 12 + EDITTEXT IDC_Edit_PKrp, 140, 130, 60, 12, ES_AUTOHSCROLL + LTEXT "m_rp", IDC_Label_Mrp, 220, 130, 20, 12 + EDITTEXT IDC_Edit_Mrp, 240, 130, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 160, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 190, 320, 32 + LTEXT "point Rp", IDC_Label_Rp, 20, 200, 100, 12 + LTEXT "B_rl", IDC_Label_Brl, 115, 200, 25, 12 + EDITTEXT IDC_Edit_Brl, 140, 200, 60, 12, ES_AUTOHSCROLL + LTEXT "y_rp", IDC_Label_Yrp, 220, 200, 20, 12 + EDITTEXT IDC_Edit_Yrp, 240, 200, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 230, 40, 14 +end diff --git a/src/res/medlgrl.rci b/src/res/medlgrl.rci new file mode 100644 index 0000000..3edfa58 --- /dev/null +++ b/src/res/medlgrl.rci @@ -0,0 +1,34 @@ +IDD_RLD DIALOG 60, 40, 350, 230 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Rail size of Linear trace" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "d_A", IDC_Label_d0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_d0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "m_A", IDC_Label_M0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_M0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "d_B", IDC_Label_dn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_dn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "m_B", IDC_Label_Mn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Mn, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Rp, 16, 80, 320, 32 + LTEXT "point Rp", IDC_Label_NameRp, 20, 90, 100, 12 + EDITTEXT IDC_Edit_NameRp, 60, 90, 40, 12, ES_AUTOHSCROLL + LTEXT "Pk_rp", IDC_Label_PKrp, 120, 90, 20, 12 + EDITTEXT IDC_Edit_PKrp, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "m_rp", IDC_Label_Mrp, 220, 90, 20, 12 + EDITTEXT IDC_Edit_Mrp, 240, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 120, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 150, 320, 32 + LTEXT "point Rp", IDC_Label_Rp, 20, 160, 100, 12 + LTEXT "B_rl", IDC_Label_Brl, 115, 160, 25, 12 + EDITTEXT IDC_Edit_Brl, 140, 160, 60, 12, ES_AUTOHSCROLL + LTEXT "y_rp", IDC_Label_Yrp, 220, 160, 20, 12 + EDITTEXT IDC_Edit_Yrp, 240, 160, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 190, 40, 14 +end diff --git a/src/res/medlgrsc.rci b/src/res/medlgrsc.rci new file mode 100644 index 0000000..3494c02 --- /dev/null +++ b/src/res/medlgrsc.rci @@ -0,0 +1,40 @@ +IDD_RSD DIALOG 60, 40, 350, 270 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Rail size of Connecting crooked (Spiral) trace" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "d'_A", IDC_Label_d0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_d0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "m_A", IDC_Label_M0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_M0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "d'_B", IDC_Label_dn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_dn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "m_B", IDC_Label_Mn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Mn, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Crooked, 16, 80, 320, 32 + LTEXT "Spiral", IDC_Label_Crooked, 20, 90, 100, 12 + LTEXT "PKnsk", IDC_Label_PKnsk, 120, 90, 20, 12 + EDITTEXT IDC_Edit_PKnsk, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "C", IDC_Label_Csk, 220, 90, 20, 12 + EDITTEXT IDC_Edit_Csk, 240, 90, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Rp, 16, 120, 320, 32 + LTEXT "point Rp", IDC_Label_NameRp, 20, 130, 100, 12 + EDITTEXT IDC_Edit_NameRp, 60, 130, 40, 12, ES_AUTOHSCROLL + LTEXT "Pk_rp", IDC_Label_PKrp, 120, 130, 20, 12 + EDITTEXT IDC_Edit_PKrp, 140, 130, 60, 12, ES_AUTOHSCROLL + LTEXT "m_rp", IDC_Label_Mrp, 220, 130, 20, 12 + EDITTEXT IDC_Edit_Mrp, 240, 130, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 160, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 190, 320, 32 + LTEXT "point Rp", IDC_Label_Rp, 20, 200, 100, 12 + LTEXT "B_rl", IDC_Label_Brl, 115, 200, 25, 12 + EDITTEXT IDC_Edit_Brl, 140, 200, 60, 12, ES_AUTOHSCROLL + LTEXT "y_rp", IDC_Label_Yrp, 220, 200, 20, 12 + EDITTEXT IDC_Edit_Yrp, 240, 200, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 230, 40, 14 +end diff --git a/src/res/medlgtcc.rci b/src/res/medlgtcc.rci new file mode 100644 index 0000000..206dd69 --- /dev/null +++ b/src/res/medlgtcc.rci @@ -0,0 +1,46 @@ +IDD_TCD DIALOG 60, 40, 350, 260 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Trace Circular Crooked" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 92 + LTEXT "PK_nk", IDC_Label_PK0, 20, 35, 25, 12 + EDITTEXT IDC_Edit_PK0, 50, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_nk", IDC_Label_Y0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_Y0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "X_nk", IDC_Label_X0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_X0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_kk", IDC_Label_PKn, 20, 50, 25, 12 + EDITTEXT IDC_Edit_PKn, 50, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_kk", IDC_Label_Yn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Yn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "X_kk", IDC_Label_Xn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Xn, 240, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Center KK", IDC_Label_Center, 20, 65, 100, 12 + LTEXT "Y_ck", IDC_Label_Yck, 120, 65, 20, 12 + EDITTEXT IDC_Edit_Yck, 140, 65, 60, 12, ES_AUTOHSCROLL + LTEXT "X_ck", IDC_Label_Xck, 220, 65, 20, 12 + EDITTEXT IDC_Edit_Xck, 240, 65, 60, 12, ES_AUTOHSCROLL + LTEXT "R_kk", IDC_Label_Rkk, 20, 80, 20, 12 + EDITTEXT IDC_Edit_Rkk, 50, 80, 60, 12, ES_AUTOHSCROLL + LTEXT "z", IDC_Label_Zkk, 120, 80, 20, 12 + EDITTEXT IDC_Edit_Zkk, 140, 80, 60, 12, ES_AUTOHSCROLL + LTEXT "q", IDC_Label_Qkk, 220, 80, 20, 12 + EDITTEXT IDC_Edit_Qkk, 240, 80, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Pz, 16, 110, 320, 32 + LTEXT "point PZ", IDC_Label_NamePz, 20, 120, 100, 12 + EDITTEXT IDC_Edit_NamePz, 60, 120, 40, 12, ES_AUTOHSCROLL + LTEXT "Y_pz", IDC_Label_Ypz, 120, 120, 20, 12 + EDITTEXT IDC_Edit_Ypz, 140, 120, 60, 12, ES_AUTOHSCROLL + LTEXT "X_pz", IDC_Label_Xpz, 220, 120, 20, 12 + EDITTEXT IDC_Edit_Xpz, 240, 120, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 150, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 180, 320, 32 + LTEXT "point PZ", IDC_Label_Pz, 20, 190, 100, 12 + LTEXT "PK_pz", IDC_Label_PKpz, 115, 190, 25, 12 + EDITTEXT IDC_Edit_PKpz, 140, 190, 60, 12, ES_AUTOHSCROLL + LTEXT "d_pz", IDC_Label_Dpz, 220, 190, 20, 12 + EDITTEXT IDC_Edit_Dpz, 240, 190, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 220, 40, 14 +end diff --git a/src/res/medlgtl.rci b/src/res/medlgtl.rci new file mode 100644 index 0000000..bedef09 --- /dev/null +++ b/src/res/medlgtl.rci @@ -0,0 +1,34 @@ +IDD_TLD DIALOG 60, 40, 350, 230 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Trace Linear" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 62 + LTEXT "PK_A", IDC_Label_PK0, 20, 35, 20, 12 + EDITTEXT IDC_Edit_PK0, 40, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_A", IDC_Label_Y0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_Y0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "X_A", IDC_Label_X0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_X0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_B", IDC_Label_PKn, 20, 50, 20, 12 + EDITTEXT IDC_Edit_PKn, 40, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_B", IDC_Label_Yn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Yn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "X_B", IDC_Label_Xn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Xn, 240, 50, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Pz, 16, 80, 320, 32 + LTEXT "point PZ", IDC_Label_NamePz, 20, 90, 100, 12 + EDITTEXT IDC_Edit_NamePz, 60, 90, 40, 12, ES_AUTOHSCROLL + LTEXT "Y_pz", IDC_Label_Ypz, 120, 90, 20, 12 + EDITTEXT IDC_Edit_Ypz, 140, 90, 60, 12, ES_AUTOHSCROLL + LTEXT "X_pz", IDC_Label_Xpz, 220, 90, 20, 12 + EDITTEXT IDC_Edit_Xpz, 240, 90, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 120, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 150, 320, 32 + LTEXT "point PZ", IDC_Label_Pz, 20, 160, 100, 12 + LTEXT "PK_pz", IDC_Label_PKpz, 115, 160, 25, 12 + EDITTEXT IDC_Edit_PKpz, 140, 160, 60, 12, ES_AUTOHSCROLL + LTEXT "d_pz", IDC_Label_Dpz, 220, 160, 20, 12 + EDITTEXT IDC_Edit_Dpz, 240, 160, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 190, 40, 14 +end diff --git a/src/res/medlgtsc.rci b/src/res/medlgtsc.rci new file mode 100644 index 0000000..7945865 --- /dev/null +++ b/src/res/medlgtsc.rci @@ -0,0 +1,45 @@ +IDD_TSD DIALOG 60, 40, 350, 260 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Trace Connecting Crooked (Spiral)" +FONT 10, "Helv" +begin + GROUPBOX "", IDC_Group_Base, 16, 12, 320, 92 + LTEXT "PK_line", IDC_Label_PK0, 20, 35, 25, 12 + EDITTEXT IDC_Edit_PK0, 50, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_lin", IDC_Label_Y0, 120, 35, 20, 12 + EDITTEXT IDC_Edit_Y0, 140, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "X_lin", IDC_Label_X0, 220, 35, 20, 12 + EDITTEXT IDC_Edit_X0, 240, 35, 60, 12, ES_AUTOHSCROLL + LTEXT "PK_nkk", IDC_Label_PKn, 20, 50, 25, 12 + EDITTEXT IDC_Edit_PKn, 50, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Y_nkk", IDC_Label_Yn, 120, 50, 20, 12 + EDITTEXT IDC_Edit_Yn, 140, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "X_nkk", IDC_Label_Xn, 220, 50, 20, 12 + EDITTEXT IDC_Edit_Xn, 240, 50, 60, 12, ES_AUTOHSCROLL + LTEXT "Center KK", IDC_Label_Crooked, 20, 65, 100, 12 + LTEXT "Y_ck", IDC_Label_Yck, 120, 65, 20, 12 + EDITTEXT IDC_Edit_Yck, 140, 65, 60, 12, ES_AUTOHSCROLL + LTEXT "X_ck", IDC_Label_Xck, 220, 65, 20, 12 + EDITTEXT IDC_Edit_Xck, 240, 65, 60, 12, ES_AUTOHSCROLL + LTEXT "R_kk", IDC_Label_Rkk, 20, 80, 20, 12 + EDITTEXT IDC_Edit_Rkk, 50, 80, 60, 12, ES_AUTOHSCROLL + LTEXT "L_sk", IDC_Label_Lsk, 120, 80, 20, 12 + EDITTEXT IDC_Edit_Lsk, 140, 80, 60, 12, ES_AUTOHSCROLL + LTEXT "q", IDC_Label_Qkk, 220, 80, 20, 12 + EDITTEXT IDC_Edit_Qkk, 240, 80, 60, 12, ES_AUTOHSCROLL + GROUPBOX "", IDC_Group_Pz, 16, 110, 320, 32 + LTEXT "point PZ", IDC_Label_NamePz, 20, 120, 100, 12 + EDITTEXT IDC_Edit_NamePz, 60, 120, 40, 12, ES_AUTOHSCROLL + LTEXT "Y_pz", IDC_Label_Ypz, 120, 120, 20, 12 + EDITTEXT IDC_Edit_Ypz, 140, 120, 60, 12, ES_AUTOHSCROLL + LTEXT "X_pz", IDC_Label_Xpz, 220, 120, 20, 12 + EDITTEXT IDC_Edit_Xpz, 240, 120, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "CALC", IDOK, 16, 150, 60, 14 + GROUPBOX "", IDC_Group_Calc, 16, 180, 320, 32 + LTEXT "point PZ", IDC_Label_Pz, 20, 190, 100, 12 + LTEXT "PK_pz", IDC_Label_PKpz, 115, 190, 25, 12 + EDITTEXT IDC_Edit_PKpz, 140, 190, 60, 12, ES_AUTOHSCROLL + LTEXT "d_pz", IDC_Label_Dpz, 220, 190, 20, 12 + EDITTEXT IDC_Edit_Dpz, 240, 190, 60, 12, ES_AUTOHSCROLL + PUSHBUTTON "Close", IDCANCEL, 16, 220, 40, 14 +end diff --git a/src/res/meicon.rci b/src/res/meicon.rci new file mode 100644 index 0000000..8378e86 --- /dev/null +++ b/src/res/meicon.rci @@ -0,0 +1,2 @@ +IDI_MEICON ICON "MarkEdit.ico" +IDI_BCXICON ICON "BCX.ico" diff --git a/src/res/meinfo.rci b/src/res/meinfo.rci new file mode 100644 index 0000000..f76548f --- /dev/null +++ b/src/res/meinfo.rci @@ -0,0 +1,29 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,3 +PRODUCTVERSION 1,0,0,3 +FILEOS 0x4 +FILETYPE 0x1 +begin + BLOCK "StringFileInfo" + begin + BLOCK "040904E4" + begin + VALUE "Comments", "MarkEditor its BCX-project:\t\t Source Code: MarkEdit.bas,\t\t Translator: BASIC to C/C++ Translator by Kevin Diggins \251 1999-2010 Version 6.1.6 (2010/08/02),\t\t Compiler: Pelles C - The Free C/C++ Compiler for Windows \251 1999 - 2010 Pelle Orinius,\t\t Alt Compiler: Lcc-Win32 \251 2000-2006 Jacob Navia and Q Software Solutions GmbH." + VALUE "CompanyName", "Akon & TerraNoNames" + VALUE "FileDescription", "MarkEdit: editor and mark calculator" + VALUE "FileVersion", "1.0.0.3" + VALUE "InternalName", "MarkEdit" + VALUE "LegalCopyright", "Copyright\251 2010-2011 AKON & TerraNoNames." +// VALUE "LegalTrademarks", "" + VALUE "OriginalFilename", "markedit.exe" + VALUE "PrivateBuild", "License this product: GNU General Public License" + VALUE "ProductName", "MarkEdit" + VALUE "ProductVersion", "1.0.0.3" + VALUE "SpecialBuild", "made in: Akon&TerraNoNames \t mailto: mykaralw@yandex.ru \t home: http://mykaralw.narod.ru/" + end + end + BLOCK "VarFileInfo" + begin + VALUE "Translation", 0x0409 0x04B0 + end +end diff --git a/src/res/memenu.rci b/src/res/memenu.rci new file mode 100644 index 0000000..2e8e19b --- /dev/null +++ b/src/res/memenu.rci @@ -0,0 +1,62 @@ +IDMAINMENU MENU +begin + POPUP "&File" + begin + MENUITEM "&New", IDM_NEW + MENUITEM "&Open", IDM_OPEN + MENUITEM "&Save", IDM_SAVE + MENUITEM "Save &As...", IDM_SAVEAS + MENUITEM "", 32 + MENUITEM "&Print", IDM_PRINT + MENUITEM "", 32 + MENUITEM "&E&xit", IDM_EXIT + end + POPUP "&Edit" + begin + MENUITEM "&Undo Ctrl+Z", IDM_UNDO + MENUITEM "&Select All", IDM_SELECTALL + MENUITEM "", 32 + MENUITEM "Cu&t Ctrl+X", IDM_CUT + MENUITEM "&Copy Ctrl+C", IDM_COPY + MENUITEM "&Paste Ctrl+V", IDM_PASTE + end + POPUP "&Mark" + begin + POPUP "&Trace" + begin + MENUITEM "&Linear", IDM_TLD + MENUITEM "&Circular", IDM_TCD + MENUITEM "C&onnecting", IDM_TSD + end + POPUP "&Rail" + begin + MENUITEM "&Linear", IDM_RLD + MENUITEM "&Circular", IDM_RCD + MENUITEM "C&onnecting", IDM_RSD + end + POPUP "&Elev" + begin + MENUITEM "&Linear", IDM_EVLD + MENUITEM "&Circular", IDM_EVCD + end + POPUP "&Chords" + begin + MENUITEM "&Circular", IDM_CHCD + MENUITEM "C&onnecting", IDM_CHSD + end + MENUITEM "&Interpolation", IDM_INTER + end + POPUP "&Settings" + begin + MENUITEM "&Options", IDM_OPTION + end + POPUP "&Help" + begin + MENUITEM "&About", IDM_ABOUT + end +end + +IDACCEL ACCELERATORS +begin + 81, IDM_EXIT, VIRTKEY, CONTROL +end diff --git a/src/setpath.cmd b/src/setpath.cmd new file mode 100644 index 0000000..252a950 --- /dev/null +++ b/src/setpath.cmd @@ -0,0 +1,9 @@ +@echo off +echo . +echo Path compiler set... +SET IDEPATH=C:\IDE +SET BCXPATH=%IDEPATH%\BCX +SET LCCPATH=%IDEPATH%\LCC +SET POCCPATH=%IDEPATH%\PellesC +SET UPXPATH=%IDEPATH%\FREEUPX +echo OK. diff --git a/src/setproject.cmd b/src/setproject.cmd new file mode 100644 index 0000000..d8ac3c5 --- /dev/null +++ b/src/setproject.cmd @@ -0,0 +1,11 @@ +@echo off +echo . +echo Project set... +set PRJNAME=markedit +set CC=POCC +set RC=TRUE +set RESPATH=RES +set RESNAME=%PRJNAME% +set UPX=TRUE +set INSTALLPATH=C:\MARKSOFT\MarkEdit +echo OK.