Difference between revisions of "Csharp forms dll"

From OpenKM Documentation
Jump to: navigation, search
(TreeForm)
(TreeForm)
Line 28: Line 28:
 
<source lang="csharp">
 
<source lang="csharp">
 
public class Example : TreeHandler {
 
public class Example : TreeHandler {
public Example(Dictionary dictionry) {
+
  public Example(Dictionary dictionry) {
TreeForm treeForm = new TreeForm(this, dictionary, Program.okmWebservice);
+
    TreeForm treeForm = new TreeForm(this, dictionary, Program.okmWebservice);
}
+
  }
  
// showTree
+
  // showTree
public void showNavigatorTree() {
+
  public void showNavigatorTree() {
try
+
    try
{
+
    {
treeForm.setFirstTime(true);
+
      treeForm.setFirstTime(true);
treeForm.ShowDialog();
+
      treeForm.ShowDialog();
}
+
    }
catch (Exception e)
+
    catch (Exception e)
{
+
    {
Logger.Instance.error("treeForm", e);
+
      Logger.Instance.error("treeForm", e);
}
+
    }
  
}
+
  }
  
// treeButtonCancelled
+
  // treeButtonCancelled
public void treeButtonCancelled()
+
  public void treeButtonCancelled()
{
+
  {
// something to do here
+
    // something to do here
}
+
  }
  
//treeButtonAccepted
+
  //treeButtonAccepted
public void treeButtonAccepted(String fldPath, String fldUuid)
+
  public void treeButtonAccepted(String fldPath, String fldUuid)
{
+
  {
// something to do here
+
    // something to do here
}
+
  }
 
}
 
}
 
</source>
 
</source>

Revision as of 16:45, 23 September 2013


Nota clasica.png DLL have been compiled for net 2.0 that should ensure go with any upper .net version

OKMForm DLL library has general purpose forms to help work with OpenKM.

Understanding the basics

  • TreeForm ( tree navigator across taxonomy, templates and personal folder)
  • SearchForm ( search form across taxonomy, tamplates and personal folder )
  • ConfigurationForm ( form to display OpenKM configuration parameters ).

TreeForm

TreeForm display navigator tree which can be switched between taxonomy, templates and personal context.

Translations properties needed:

form.tree.title=Navigation tree
form.tree.context.root=Taxonomy
form.tree.context.templates=Templates
form.tree.context.personal=Personal
form.tree.contextmenu.newfolder=New folder
form.tree.contextmenu.renamefolder=Rename folder
form.tree.contextmenu.deletefolder=Delete folder
form.tree.button.accept=Sign
form.tree.input.title=Folder management

Example:

public class Example : TreeHandler {
  public Example(Dictionary dictionry) {
    TreeForm treeForm = new TreeForm(this, dictionary, Program.okmWebservice);
  }

  // showTree
  public void showNavigatorTree() {
    try
    {
      treeForm.setFirstTime(true);
      treeForm.ShowDialog();
    }
    catch (Exception e)
    {
      Logger.Instance.error("treeForm", e);
    }

  }

  // treeButtonCancelled
  public void treeButtonCancelled()
  {
    // something to do here
  }

  //treeButtonAccepted
  public void treeButtonAccepted(String fldPath, String fldUuid)
  {
    // something to do here
  }
}