C# - First Application

[Top]  [Chapter]  [Previous]  [Next]

We create a new empty project and add the TextDynamic control. We also add a menu control and a status bar with 4 sub panels.

 

Also required is a reference to the WPDynamic namespace:

 

clip0114

 

When the application runs it will look like

 

clip0089

 

Now we want to add a toolbar. We use the SetLayout method to load the PCC file. We use the standard buttons.PCC file - it is in the same directory as the kernel DLL.

 

IMPORTANT:

With licensed version please make sure you call wpdllInt1.EditorStart with your license name/key before doing anything else.  The license information is confidential and must not be made visible in the application.

 

using WPDynamic;

 

namespace WindowsFormsApplication1

{

  public partial class Form1 : Form

   {

      public Form1()

       {

           InitializeComponent();

 

          // Initialize the Editor

         // Set your License key:

           wpdllInt1.EditorStart("your_name", "your_key");

          // Load the PCC file (no password)

           wpdllInt1.SetLayout("buttons.pcc", "");

          // Initialize the editor

           wpdllInt1.SetEditorMode(

              // as single editor (no splitscreen)

           EditorMode.wpmodSingleEditor,

              // with 16x16 toolbar (for 24x24 use wpmodexToolbarLG)

           EditorXMode.wpmodexToolbar |

              // and PDF, Spellcheck and table support.

           EditorXMode.wpmodexPDFExport |

           EditorXMode.wpmodexSpellcheck |

           EditorXMode.wpmodexTables,

              // Select the GUI elements ruler, scrollbars and

              // the lower left panel to change zooming and layout

           EditorGUI.wpguiRuler |

           EditorGUI.wpguiHorzScrollBar |

           EditorGUI.wpguiVertScrollBar |

           EditorGUI.wpguiPanelH1,

              // We have no second editor window, so use wpguiDontSet

           EditorGUI.wpguiDontSet);

       }

 

At runtime the application now looks like

 

clip0091

 

Now we can already load text. Even the PDF export works. (The demo version includes all options - in the full version options such as spellcheck, PDF, reporting are optional). Table support is always included.

 

To remove certain elements off the toolbar edit the PCC file using the Package File Manager.

 

 

 

 

 

 


[firstcapplication.htm]    Copyright © 2007 by WPCubed GmbH