Difference between revisions of "Csharp forms dll"
From OpenKM Documentation
(→TreeForm) |
(→TreeForm) |
||
Line 37: | Line 37: | ||
'''Example:''' | '''Example:''' | ||
<source lang="csharp"> | <source lang="csharp"> | ||
− | + | public class Example : TreeHandler { | |
− | |||
− | public class Example : | ||
public Example(Dictionary dictionry, OKMWebservice webservice) { | public Example(Dictionary dictionry, OKMWebservice webservice) { | ||
− | + | TreeForm treeForm = new TreeForm(this, dictionary, webservice); | |
} | } | ||
− | + | ||
// showTree | // showTree | ||
− | public void | + | public void showNavigatorTree() { |
− | + | try | |
− | + | { | |
− | + | treeForm.setFirstTime(true); | |
− | + | treeForm.ShowDialog(); | |
− | + | } | |
− | + | catch (Exception e) | |
− | + | { | |
− | + | Logger.Instance.error("treeForm", e); | |
+ | } | ||
+ | |||
} | } | ||
− | + | ||
− | + | // treeButtonCancelled | |
− | public void | + | public void treeButtonCancelled() |
{ | { | ||
− | // | + | // something to do here |
} | } | ||
− | + | ||
− | // | + | //treeButtonAccepted |
− | public void | + | public void treeButtonAccepted(String fldPath, String fldUuid) |
{ | { | ||
− | + | // something to do here | |
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
</source> | </source> |
Revision as of 18:25, 23 September 2013
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.
Events:
- Button cancel trigger treeButtonCancelled method in TreeHander.
- Button accept trigger treeButtonAccepted method in TreeHander.
TreeForm needs DictionaryHelper for UI translatiosn take a look at Csharp_utils_dll#DictionaryHelper |
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, OKMWebservice webservice) {
TreeForm treeForm = new TreeForm(this, dictionary, webservice);
}
// 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
}
}
Search form
SearchForm display search form which can be switched between taxonomy, templates and personal context.
Are needed at least tree characters to be able to do a search.
Events:
- Button cancel trigger searchButtonCancelled method in SearchHander.
- Button accept trigger searchSelectedFolder method in SearchHander when is looking for folders.
- Button accept trigger searchSelectedDocument method in SearchHander when is looking for document.
- Button accept trigger searchSelectedMail method in SearchHander when is looking for mail.
- Button accept trigger searchSelectedRecord method in SearchHander when is looking for record.
SearchForm needs DictionaryHelper for UI translatiosn take a look at Csharp_utils_dll#DictionaryHelper |
Translations properties needed:
form.search.title=Search
form.search.msg.min.char=At least you need to add tree characters
form.search.msg.empty=Search has return empty results