Changeset 1181


Ignore:
Timestamp:
Feb 24, 2010, 4:51:08 PM (12 years ago)
Author:
Patrick Vacek
Message:

HowTo: small changes and revisions over the first 18 pages

Location:
trunk/Documentation/Developer/PluginHowTo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Documentation/Developer/PluginHowTo/HowToDeveloper.tex

    r1156 r1181  
    161161\begin{document}
    162162        \maketitle
    163        
     163
    164164        \begin{abstract}
    165      CrypTool 2 is the modern successor of the well-known e-learning platform for cryptography and cryptanalysis \htmladdnormallink{CrypTool 1}{http://www.cryptool.org}, which is used world-wide for educational purposes at school and universities and in companies and agencies.
     165     CrypTool 2 is the modern successor of the well-known e-learning platform for cryptography and cryptanalysis \htmladdnormallink{CrypTool 1}{http://www.cryptool.org}, which is used world-wide for educational purposes at schools and universities and in companies and agencies.
    166166
    167      Since the first launch of CrypTool 1 in 1999 the art of software development has changed dramatically. The CrypTool 2 team began working in 2008 to develop a completely new e-learning application, embracing the newest trends in both didactics and software architecture to delight the end-user with an entirely new experience.
     167     Since the first launch of CrypTool 1 in 1999 the art of software development has changed dramatically. The CrypTool 2 team began working in 2008 to develop a completely new e-learning application, embracing the newest trends in both didactics and software architecture to delight the end-user with an entirely new experience.\\
    168168
    169169     CrypTool 2 is built using
    170170
    171171\begin{itemize}
    172         \item .NET (a modern software framework with solutions to common programming problems form Microsoft),
     172        \item .NET (a modern software framework with solutions to common programming problems from Microsoft),
    173173        \item C\# (a modern object-oriented programming language, comparable to Java), and
    174174    \item WPF (a modern purely vector-based graphical subsystem for rendering user interfaces in Windows-based applications), plus
  • trunk/Documentation/Developer/PluginHowTo/part1.tex

    r1156 r1181  
    88        \item Getting all prerequisites and installing them
    99        \item Accessing and downloading the source code with SVN
    10         \item Compiling the source code for the first time
     10        \item Compiling the current source code for the first time
    1111\end{itemize}
    1212
     
    1616Since CrypTool 2.0 is based on Microsoft .NET 3.5, you will need a Microsoft Windows environment. (Currently no plans exist for porting this project to mono or to other platforms.) We have successfully tested with \textbf{Windows XP}, \textbf{Windows Vista} and \textbf{Windows 7}.
    1717
    18 Since you are reading the developer guidlines, you probably want to develop something. Hence, you will need a development environment. In order to compile our sources you need \textbf{Microsoft Visual Studio 2008 Professional}. Please always install the latest service packs for Visual Studio. Unfortunately, our sources do not work (smoothly) with the freely available Visual Studio Express (C\#) versions. This is due to the fact that CrypWin uses a commercial component and is therefore distributed only as binary. However, the C\# Express version cannot handle a binary as a start project, and thus debugging becomes cumbersome.
     18Since you are reading the developer guidelines, you probably want to develop something. Hence, you will need a development environment. In order to compile our sources you need \textbf{Microsoft Visual Studio 2008 Professional}. Please always install the latest service packs for Visual Studio. Unfortunately, our sources do not work (smoothly) with the freely available Visual Studio Express (C\#) versions. This is due to the fact that CrypWin uses a commercial component and is therefore distributed only as binary, and the current version of C\# Express cannot handle a binary as a start project, which makes debugging cumbersome. This will be resolved later in 2010 when the project is moved to Visual Studio 2010.
    1919
    20 Usually the installation of Visual Studio also installs the .NET framework. In order to run or compile our source code you will need (at the time of writing) at least \textbf{Microsoft .NET 3.5 with Service Pack 1 (SP1)}. You can get this for free from Microsoft's \href{http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe}{webpage}.
    21 
    22 After the last step, your development environment should be ready for our source code. Now you will need a way of accessing and downloading the entire sources. In the CrypTool 2.0 project we use Subversion (SVN) for version control, and hence you need an \textbf{SVN client}, e.g. \textbf{TortoiseSVN} or the \textbf{svn commandline from cygwin}. It does not matter which one you use, but if you have never worked with SVN before, we suggest using \href{http://www.tortoisesvn.net/}{TortoiseSVN}, since it offers a nice Windows Explorer integration of SVN.
     20Usually the installation of Visual Studio also installs the .NET framework. In order to run or compile our source code you will need (at the time of writing) at least \textbf{Microsoft .NET 3.5 with Service Pack 1 (SP1)}. You can get this for free from Microsoft's \href{http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe}{webpage}. Once that has been installed, your development environment should be ready for our source code.
    2321
    2422\section{Accessing Subversion (SVN)}
    2523\label{AccessingSubversion}
    2624
    27 This section describes how to access our SVN repository and how to configure the basic settings.
     25Now you will need a way of accessing and downloading the source code. In the CrypTool 2.0 project we use Subversion (SVN) for version control, and hence you need an \textbf{SVN client}, e.g.\ \textbf{TortoiseSVN} or the \textbf{svn commandline from cygwin}. It does not matter which client you use, but if you have never worked with SVN before, we suggest using \href{http://www.tortoisesvn.net/}{TortoiseSVN}, since it offers a nice Windows Explorer integration of SVN.
    2826
    2927\subsection*{The CrypTool2 SVN URL}
     
    3432\url{https://www.cryptool.org/svn/CrypTool2/}
    3533
    36 To access the repository, you must provide a username and password. If you are a guest and just want to download our source code, you can use ``anonymous" as the username and an empty password. If you are a registered developer, just use your provided username and password (which is the same as for the wiki).
     34To access the repository, you must provide a username and password. If you are a guest and just want to download our source code, you can use ``anonymous" as the username and an empty password. If you are a registered developer, just use your provided username and password (which should be the same as for the wiki).
    3735
    3836\subsection*{Accessing the repository with TortoiseSVN}
     
    4139As mentioned above, in order to access the SVN repository one of the best options is \href{http://www.tortoisesvn.net/}{TortoiseSVN}. We will describe here how to use the basics of the program, although you should be able to use any SVN client in a similar fashion.
    4240
    43 First install TortoiseSVN (which unfortunately requires you to reboot your computer) and then create a directory (for instance ``CrypTool2") for storing the local working files somewhere on your computer. Right-click on this directory and select ``SVN Checkout" from the context menu. A window will appear in which you will be asked for the URL of the repository as given above. The ``Checkout directory" should already be filled in correctly with your new folder. Then just hit ok, accept the certificate (if necessary), and enter your login information as described above. Mark the checkbox for saving your credentials if you don't want to enter them every time you work with the repository. Then hit ok, and now the whole CrypTool2 repository should be checked out into your chosen directory.
     41First install TortoiseSVN (which unfortunately requires you to reboot your computer) and then create a directory (for instance ``CrypTool2") for storing the local working files somewhere on your computer. Right-click on this directory and select ``SVN Checkout" from the context menu. A window will appear in which you will be asked for the URL of the repository as given above. The ``Checkout directory" should already be filled in correctly with your new folder. Then just hit ``OK", accept the certificate (if necessary), and enter your login information as described above. Mark the checkbox for saving your credentials if you don't want to enter them every time you work with the repository. Then hit ``OK", and now the whole CrypTool2 repository should be checked out into your chosen directory.
    4442
    45 Later on, if changes have been made in the repository and you want to update your working copy, you can do this by right-clicking on any directory within the working files and choosing ``SVN Update" from the context menu. If you are a registered developer, have changed a file, and want your changes to be reflected in the repository, you should choose ``SVN Commit" from the context menu to upload your changes. Please always provide \textit{meaningful descriptions} of your updates. You should commit your sources to our SVN repository as often as you can. This will ensure your interoperability with the rest of the project for further development.
     43Later on, if changes have been made in the repository and you want to update your working copy, you can do this by right-clicking on any directory within the working files and choosing ``SVN Update" from the context menu. You should do this often to maintain a current version of the files.
    4644
    4745A TortoiseSVN tutorial can be found \href{http://www.mind.ilstu.edu/research/robots/iris4/developers/svntutorial}{here}.
    4846
    49 \subsection*{Ignore patterns}
    50 \label{IgnorePatterns}
     47\subsection*{Committing your changes}
     48\label{CommitingYourChanges}
    5149
    52 Please only check in clean code by using the following \textbf{ignore patterns}:
    53 
    54 \begin{center}
    55 \textit{obj bin debug release *.pdb *.suo *.exe *.dll}
    56 \end{center}
    57 
    58 This basically means that you should never check in compiled and user-generated files. For example, please do not check in the entire \textit{bin/} and \textit{obj/} directories that Visual Studio generates. Note that the server will reject your commits if you try to do so. If you want to submit a component (binary file) despite the ignore patterns you can still add \textit{*.dll} files by using the context menu and add that file explicitly - but please be absolutely sure, that you know what you are doing. Additionally you need to explicitly provide a list of file names respectively directory names which shall override the ignore pattern. Example, you want to check in a file named someLib.dll, you must write a comment which looks like this:
    59 
    60 \begin{center}
    61 \fbox{\parbox{15cm}
    62 {\tt
    63 The lib is required by all developers, so I'm adding it explicitly to the repository.
    64 
    65 override-bad-extension: someLib.dll
    66 }}
    67 \end{center}
    68 
    69 Please note that any text after the colon and the whitespace will be treated as the file name. Please do not use quotes and do not write any text after the name.
    70 
    71 
    72 \subsection*{Committing your changes}
    73 \label{CommitingChanges}
    74 
    75 If you have an SVN account (not anonymous access), you can commit your file changes to the public CrypTool2 repository. Choose ''SVN Commit'' from the context menu in order to upload your changes. Please always provide meaningful descriptions of your updates.
     50If you are a registered developer, you can commit your file changes to the public CrypTool2 repository. Right-click on the directory within the working files that contains your changes and select ``SVN Commit" from the context menu to upload your changes. Please always provide \textit{meaningful descriptions} of your updates. You should commit your sources to our SVN repository as often as you can to ensure your interoperability with the rest of the project, but only commit code that successfully compiles and runs!
    7651
    7752You can use command words in the SVN comment to link your changes to a particular ticket. The command syntax is as follows:
     
    8661}}
    8762\end{center}
    88 
    8963
    9064You can have more than one command in a message. The following commands are supported. There is more than one spelling for each command, to make this as user-friendly as possible.
     
    10882\fbox{\parbox{15cm}
    10983{\tt
    110 Changed blah and foo to do this or that. Fixes \#10 and \#12, and refs \#12.
     84Changed blah and foo to do this or that.\ Fixes \#10 and \#12, and refs \#12.
    11185}}
    11286\end{center}
    11387
    114 
    11588This will close \#10 and \#12, and add a note to \#12.
    11689
     90\subsection*{Ignore patterns}
     91\label{IgnorePatterns}
    11792
     93Please only check in proper source code by using the following \textbf{ignore patterns}:
     94
     95\begin{center}
     96\textit{obj bin debug release *.pdb *.suo *.exe *.dll *.aux *.dvi *.log *.bak *.bbl *.blg *.user}
     97\end{center}
     98
     99This basically means that you should never check in compiled and automatically generated files. For example, please do not check in the entire \textit{bin/} and \textit{obj/} directories that Visual Studio generates. Note that the server will reject your commits if you try to do so. If you want to submit a component (binary file) despite the ignore patterns you can still add \textit{*.dll} files by using the context menu and adding the file explicitly - but please be absolutely sure that you know what you are doing. Additionally, you need to provide an explicit list of file and directory names which should override the ignore pattern. For example, if you want to check in a file named someLib.dll, you must write a comment which looks like this:
     100
     101\begin{center}
     102\fbox{\parbox{15cm}
     103{\tt
     104The lib is required by all developers, so I am adding it explicitly to the repository.
     105
     106override-bad-extension:\ someLib.dll
     107}}
     108\end{center}
     109
     110Please note that any text after the colon and the whitespace will be treated as the file name. Therefore, do not use quotation marks and do not write any text after the file name.
    118111
    119112\section{Compiling the sources}
    120113\label{CompilingTheSources}
    121114
    122 By this point you should have checked out a copy of the entire CrypTool repository. Compiling is pretty easy; just go to the \textit{trunk/} directory and open the \textbf{\textit{CrypTool 2.0.sln}} Visual Studio solution. The Visual Studio IDE should open with all the working plugins components nicely arranged. In case you are now starting Visual Studio for the first time, you will have to choose your settings. Just select either ``most common" or ``C\#" --- you can change this at any time later. On the right side is the project explorer, where you can see all the subprojects included in the solution. Look for the project \textbf{\textit{CrypWin.exe}} there. Once you have found it, right-click on it and select ``Set as StartUp-Project" from the context menu. Next, go to the menu bar and select ``Build" $\rightarrow$ ``Build Solution". Then go to ``Debug" and select ``Start Debugging" --- now CrypTool 2.0 should start for the first time with your own compiled code. Presumably you have not changed anything yet, but you now have your own build of all the components (with the exception of CrypWin and AnotherEditor, since they are available only as binaries). If the program does not compile or start correctly, please consult our \href{https://www.cryptool.org/trac/CrypTool2/wiki/FAQ}{FAQ} and let us know if you found a bug.
     115By this point you should have checked out a copy of the entire CrypTool repository. Compiling is pretty easy; just go to the \textit{trunk/} directory and open the \textbf{\textit{CrypTool 2.0.sln}} Visual Studio solution. The Visual Studio IDE should open with all the working plugins components nicely arranged. In case you are now starting Visual Studio for the first time, you will have to choose your settings. Just select either ``most common" or ``C\#" --- you can change this at any time later. On the right side is the project explorer, where you can see all the subprojects included in the solution. Look for the project \textbf{\textit{CrypWin.exe}} there. Once you have found it, right-click on it and select ``Set as StartUp-Project" from the context menu. Next, go to the menu bar and select ``Build" $\rightarrow$ ``Build Solution".
    123116
    124 If you are a core developer, hence somebody who can also compile CryWin and AnotherEditor, you should use the \textbf{\textit{CrypTool 2.0.sln}} solution from the \textit{trunk/CoreDeveloper/} directory (which will \textit{not} be visible to you if you are not a core developer). As a core developer, be aware that when you compile, you \textbf{change the \textit{CryWin.exe}} which is visible to everybody else. Thus, when doing a check-in, please make sure you \textit{really} want to check in a new binary. As core developer you can also build a new setup and publish it as beta release on the website. This process is explained in the wiki: \url{https://www.cryptool.org/trac/CrypTool2/wiki/BuildSetup}.
     117Then go to ``Debug" and select ``Start Debugging". CrypTool 2.0 should now start for the first time with your own compiled code. Presumably you have not changed anything yet, but you now have your own build of all the components (with the exception of CrypWin and AnotherEditor, since they are available only as binaries). If the program does not compile or start correctly, please consult our \href{https://www.cryptool.org/trac/CrypTool2/wiki/FAQ}{FAQ} and let us know if you found a bug.
     118
     119If you are a \textbf{core developer}, hence somebody who can also compile CryWin and AnotherEditor, you should use the \textbf{\textit{CrypTool 2.0.sln}} solution from the \textit{trunk/CoreDeveloper/} directory (which will \textit{not} be visible to you if you are not a core developer). As a core developer, be aware that when you compile, you \textbf{change the \textit{CryWin.exe}} that is visible to everybody else. Thus, when doing a check-in, please make sure you \textit{really} want to check in a new binary. Core developers can also build a new setup and publish it as beta release on the website. This process is explained in the wiki at \url{https://www.cryptool.org/trac/CrypTool2/wiki/BuildSetup}.
  • trunk/Documentation/Developer/PluginHowTo/part2.tex

    r1145 r1181  
    11\chapter{Plugin Implementation}
    22\label{sec:PluginImplementation}
    3 In this chapter we provide step-by-step instructions for implementing your own CrypTool 2.0 plugin. The given instructions refer mostly to the usage of MS Visual C\# 2008 Express Edition, hence before starting you should have a copy of \textbf{Microsoft Visual Studio 2008} or \textbf{Microsoft Visual C\# 2008 Express Edition} installed on your computer. We will use the \textbf{Caesar cipher} (also known as the \textbf{shift cipher}) for our example implemenation.
     3In this chapter we provide step-by-step instructions for implementing your own CrypTool 2.0 plugin. The given instructions refer mostly to the usage of the Visual C\# Express and Visual Studio Professional 2008 editions, so before starting you should have a copy of \textbf{Microsoft Visual Studio 2008} (or \textbf{Microsoft Visual C\# 2008 Express Edition}) installed on your computer. We will use the \textbf{Caesar cipher} (also known as the \textbf{shift cipher}) for our example implemenation.
    44
    55\section{Creating a new project}
    66\label{sec:CreatingANewProject}
    77
    8 To begin, open Visual Studio 2008 or C\# 2008 Express Edition, go to the menu bar and select ``File"~$\rightarrow$ ``New" $\rightarrow$ ``Project\ldots ". The following window will appear:
     8To begin, open Visual Studio, go to the menu bar and select ``File"~$\rightarrow$ ``New" $\rightarrow$ ``Project\ldots ". The following window will appear:
    99
    1010\begin{figure}[h!]
    1111        \centering
    1212                \includegraphics[width=1.00\textwidth]{figures/vs_create_new_project.jpg}
    13         \caption{Creating a new Visual Studio/C\# Express project.}
     13        \caption{Creating a new Visual Studio project.}
    1414        \label{fig:vs_create_new_project}
    1515\end{figure}
    1616
    17 If you are using Visual Studio 2008, select \textbf{``.NET-Framework 3.5"} as the target framework; the Express Edition will automatically choose the target framework. Then choose \textbf{``Class Library"} as the default template, as this will build the project as a DLL file. Give the project a unique and meaningful name (such as ``Caesar" in our case), and choose a location to save it to. (The Express Edition will ask for a save location later when you close your project or environment). Select the subdirectory ``CrypPlugins" from your SVN trunk as the location. Finally, confirm by pressing the ``OK" button. Note that creating a new project in this manner also creates a new solution into which the project is placed.
     17\noindent If you are using Visual Studio 2008, select \textbf{``.NET-Framework 3.5"} as the target framework; the Express Edition will automatically choose the target framework. Then choose \textbf{``Class Library"} as the default template, as this will build the project for your plugin as a DLL file. Give the project a unique and meaningful name (such as ``Caesar" in our case), and choose a location to save it to. (The Express Edition will ask for a save location later when you close your project or environment). Select the subdirectory ``CrypPlugins" from your SVN trunk as the location. Finally, confirm by pressing the ``OK" button. Note that creating a new project in this manner also creates a new solution into which the project is placed.
    1818
    1919\begin{figure}[h!]
    2020        \centering
    2121                \includegraphics[width=0.80\textwidth]{figures/save_solution_csharp_express.JPG}
    22         \caption{The Microsoft C\# Express Edition Save Project dialog window.}
     22        \caption{The Microsoft C\# Express Edition ``Save Project" dialog window.}
    2323        \label{fig:save_solution_csharp_express}
    2424\end{figure}
    2525
    26 At this point, your Visual Studio\slash C\# Express solution should look like this:
     26\noindent At this point, your Visual Studio\slash C\# Express solution should look like this:
    2727
    2828\begin{figure}[h!]
     
    3737\label{sec:InterfaceSelection}
    3838
    39 First we must add a reference to the CrypTool library, \textbf{\textit{CrypPluginBase.dll}}, where all the necessary CrypTool plugin interfaces are declared.
     39To include our new plugin in the CrypTool program, we must first add a reference to the CrypTool library, \textbf{\textit{CrypPluginBase.dll}}, where all the necessary CrypTool plugin interfaces are declared.
    4040
    4141\begin{figure}[h!]
     
    4545\end{figure}
    4646
    47 Right-click in the Solution Explorer on the ``Reference" item and choose ``Add Reference". A window like the following should appear:
     47\noindent Right-click in the Solution Explorer on the ``Reference" item and choose ``Add Reference". A window like the following should appear:
    4848
    4949\begin{figure}[h!]
     
    5555\clearpage
    5656
    57 Select the project ``CrypPluginBase". If you do not have the ``CrypPluginBase" source code, it is also possible to add a reference the the binary DLL. In this case browse to the path where the library file \textit{CrypPluginBase.dll} is located, e.g.\ \textit{C:\textbackslash Documents and Settings\textbackslash $<$Username$>$\textbackslash My Documents\textbackslash Visual Studio 2008\textbackslash Projects\textbackslash CrypPluginBase\textbackslash bin\textbackslash Debug} and select the library by double clicking the file or pressing the ``OK" button. (You can also select the binary DLL located in the folder where \textit{CrypWin.exe} was placed when you downloaded CrypTool2.)
     57\noindent Select the project ``CrypPluginBase". If you do not have the ``CrypPluginBase" source code, it is also possible to add a reference the binary DLL. In this case browse to the path where the library file \textit{CrypPluginBase.dll} is located, e.g.\ \textit{C:\textbackslash Documents and Settings\textbackslash $<$Username$>$\textbackslash My Documents\textbackslash Visual Studio 2008\textbackslash Projects\textbackslash CrypPluginBase\textbackslash bin\textbackslash Debug} and select the library by double clicking the file or pressing the ``OK" button. (You can also select the binary DLL located in the folder where \textit{CrypWin.exe} was placed when you downloaded CrypTool2.)
    5858
    5959\begin{figure}[h!]
     
    6464\end{figure}
    6565
    66 Besides CrypPluginBase you will need to add three assembly references to provide the necessary ``Windows" namespaces for the \textbf{user control} functions ``Presentation" and ``QuickWatchPresentation". This can be done in the same manner as before with the ``CrypPluginBase" but by selecting the ``.NET" tab. Select the following .NET components:
     66\noindent Besides CrypPluginBase you will need to add three assembly references to provide the necessary ``Windows" namespaces for the \textbf{user control} functions ``Presentation" and ``QuickWatchPresentation". This can be done in the same manner as before with the ``CrypPluginBase" but by selecting the ``.NET" tab. Select the following .NET components:
    6767
    6868\begin{itemize}
     
    7373\clearpage
    7474
    75 Afterwards your reference tree view should look like this:
     75\noindent Afterwards your reference tree view should look like this:
    7676
    7777\begin{figure}[h!]
     
    8181\end{figure}
    8282
    83 If your plugin will be based on other additional libraries, you can add them in the same way.
     83\noindent If your plugin will be based on other additional libraries, you can add them in the same way.
    8484
    8585\section{Modifing the project properties}
     
    9393\end{itemize}
    9494
    95 This section of your assembly file should now look something like this:
     95\noindent This section of your assembly file should now look something like this:
    9696
    9797\begin{lstlisting}
     
    117117%\clearpage
    118118
    119 Both options will achieve the same results. We will guide you through the second method. First, delete ``Class1.cs".
     119\noindent Both options will achieve the same results. We will guide you through the second method. First, delete ``Class1.cs".
    120120
    121121\begin{figure}[h!]
     
    127127\clearpage
    128128
    129 Then right-click on the project item (in our case, ``Caesar") and select ``Add $\rightarrow$ Class\ldots ":
     129\noindent Then right-click on the project item (in our case, ``Caesar") and select ``Add $\rightarrow$ Class\ldots ":
    130130
    131131\begin{figure}[h]
     
    137137\clearpage
    138138
    139 Finally, give your class a unique name. We will call our class ``Caesar.cs" and define it as public so that it will be available to other classes.
     139\noindent Finally, give your class a unique name. We will call our class ``Caesar.cs" and define it as public so that it will be available to other classes.
    140140
    141141\begin{figure}[h!]
     
    146146\end{figure}
    147147
     148\noindent Visual Studio will automatically generate a basic code outline for the new class. In our example, we will not use the all the namespaces that are automatically imported, so you can delete the lines \texttt{using System;} and \texttt{using System.Linq;}.
     149
    148150\subsection{Creating a settings class}
    149151\label{sec:CreatingASettingsClass}
     
    152154\clearpage
    153155
    154 Below is an example of what a completed TaskPane for the existing Caesar plugin in CrypTool 2 looks like:
     156\noindent Below is an example of what a completed TaskPane for the existing Caesar plugin in CrypTool 2 looks like:
    155157
    156158\begin{figure}[h!]
     
    181183\end{itemize}
    182184
    183 In our example, the Caesar algorithm necessitates the inclusion of the following namespaces:
     185\noindent In our example, the Caesar algorithm necessitates the inclusion of the following namespaces:
    184186
    185187\begin{itemize}
    186         \item ''Cryptool.PluginBase'' --- to provide ''ISettings'' for the CaesarSettings class
    187         \item ''Cryptool.PluginBase.Cryptography'' --- to provide ''IEncryption'' for the Caesar class
    188         \item ''Cryptool.PluginBase.IO'' --- to provide CryptoolStream for the input and output Data
    189         \item ''Cryptool.PluginBase.Miscellaneous'' --- to use the entire CrypTool event handler
     188        \item Cryptool.PluginBase --- to implement ISettings in the CaesarSettings class.
     189        \item Cryptool.PluginBase.Cryptography --- to implement IEncryption in the Caesar class.
     190        \item Cryptool.PluginBase.IO --- to use CryptoolStream for data input and output.
     191        \item Cryptool.PluginBase.Miscellaneous --- to use the CrypTool event handler.
    190192\end{itemize}
    191193
    192 It is important to define a new default namespace of our public class (''Caesar''). In CrypTool the default namespace is presented by ''Cryptool.[name of class]''. Therefore our namespace has to be defined as follows: ''Cryptool.Caesar''.\clearpage
    193 
    194 Up to now the source code should look as you can see below:
     194\noindent It is important to define a new default namespace for our public class (``Caesar"). In CrypTool 2.0  the standard namespace convention is \textit{Cryptool.[name of class]}. Therefore our namespace will be defined as \textit{Cryptool.Caesar}.\clearpage
     195
     196\noindent At this point, the source code should look like the following:
    195197
    196198\begin{lstlisting}
     
    198200using System.Text;
    199201
    200 //needed CrypTool namespaces
     202//required CrypTool namespaces
    201203using Cryptool.PluginBase;
    202204using Cryptool.PluginBase.Cryptography;
     
    211213}
    212214\end{lstlisting}
    213 Next let your class ''Caesar'' inherit from IEncryption by inserting of the following statement:
     215
     216\ \\ % ugly but functional
     217\noindent Next we should let the ``Caesar" class inherit from IEncryption by making the following alteration:
     218
    214219\begin{lstlisting}
    215220namespace Cryptool.Caesar
    216221{
    217         public class Caesar: IEncryption
     222        public class Caesar : IEncryption
    218223        {
    219224        }
    220225}
    221226\end{lstlisting}
    222 \subsection{Add the interface functions for the class Caesar}
    223 \label{sec:AddTheInterfaceFunctionsForTheClassCaesar}
     227
     228\subsection{Adding interface functions for the Caesar class}
     229\label{sec:AddingInterfaceFunctionsForTheCaesarClass}
     230
    224231There is an underscore at the ''I'' in IEncryption statement. Move your mouse over it or place the cursor at it and press ''Shift+Alt+F10'' and you will see the following submenu:
    225232\begin{figure}[h!]
Note: See TracChangeset for help on using the changeset viewer.