IVVUtility
The function which supports image processing, file processing, etc. are provided for this interface which gets by GetUtility method of IVVPlugin.
string GetShortcutTypeName(Shortcut sc)
Gets the function corresponding to the shortcut key specified by a user by string. Either of the following strings is returned in the current version.
None, Open, Save, SaveAs, Connect, Print, New, Property, Help, Undo, Redo, Cut, Copy, Paste, SelectAll, Delete, Search, Replace, LineJump, ChangeHtmlMode, RemoveFormat, Bold, Italic, Underline, Strike, Subscript, Superscript, Outdent, Indent, OrderedList, UnorderedList, InsHorizon, InsLink, InsImage, JustifyLeft, JustifyRight, JustifyCenter, JustifyTop, JustifyBottom, JustifyMiddle, JustifyWidth, JustifyHeight, JustifySize, MoveTop, SkipPrev, MovePrev, MoveNext, SkipForward, MoveLast, Jump, ApplyCard, DeleteCard, ResetCard, RecordStopMacro, PausePlayMacro, LoadMacro, SaveMacro, Extra1, Extra2, Extra3, Extra4, Extra5, Extra6, Extra7, Extra8, Extra9, Extra10Shortcut GetShortcutFromName(string name)
Gets the combination of the shortcut key corresponding to the specified above-mentioned string(case-insensitive).
void ModifyShortcutToMenu(ToolStripMenuItem item, string shortcuttype)
Shows the shortcut key corresponding to the specified above-mentioned string on the menu of your plugin.
- item
The menu item which updates displaying. - shortcuttype
The string which shows the function corresponding to a shortcut key.
Form MainForm { get }
Gets the main window class of VidyaVitamin.
T[] EnumTarget<T>(TreeNode basenode, bool currenttableonly)
From a project tree, enumerates the specified class or interface. Usually, uses in order to search for forms with IReceiveCard.
- T
The class or interface for search. - basenode
The tree node used as the basis to search. - currenttableonly
If it is true, the target of search will be extracted only to the table belonging to basenode. If it is false, all the basic tables in the file will be searched.
IVVForm AppendNewPluginForm(TreeNode tablenode, IVVCardFormPlugin fp)
Adds form to a project newly. Usually, uses together with EnumPlugins. If creation is successful, the form class which implemented IVVForm will return.
- table
The database table associated with form. - tablenode
The tree node made into the basis added to the project. - fp
The plugin interface used as the basis which creates form.
string ToRelativePath(string basefolder, string targetpath)
Converts an absolute path into a relative path.
- basefolder
The folder name made into the basis of a relative path. - targetpath
The full path to convert.
string ToAbsolutePath(string basepath, string targetpath)
Converts a relative path into an absolute path.
- basepath
The folder name made into the basis of a absolute path. - targetpath
The target file path.
string ConfigDir { get }
Gets the place of the folder in which the configuration file of VidyaVitamin is contained.
Size GetThumbnailSize(Size bound, Size imagesize)
Size GetThumbnailSize(Size bound, Size imagesize)
Gets the size held in the specified area.
- bound
Size of the maximum space. - imagesize
Original size to calculate.
Rectangle GetThumbnailRect(Rectangle bound, Size imagesize)
Gets the area held in the center of the specified area.
- bound
Size of the maximum space. - imagesize
Original size to calculate.
Rectangle GetPictureRect(Rectangle bound, Size imagesize)
Gets the area whose target size an aspect ratio matches.
- bound
Size of the maximum space. - imagesize
Target size.
Image CreateThumbnail(string path, Size size, bool usesystem, bool prio_quality)
Image CreateThumbnail(string path, Size size)
Image CreateThumbnail(string path, Size size, bool usesystem)
Image CreateThumbnail(Stream stream, Size size)
Gets a thumbnail image.
- path
Path of file. - stream
The stream which gets a thumbnail. - size
Size made into a thumbnail. - usesystem
It is true if it gets the thumbnail made by OS. - prio_quality
It is true if it precedes to image quality.
public Image ExtractImage(string path, Size size)
Gets the thumbnail created by OS.
- path
Path of file. - size
Size made into a thumbnail.
IEnumerable<T> EnumPlugins<T>()
Enumerates the class of plugins which implemented the specified interface.
- T
The type of the interface to search.
DialogResult ShowInputDialog(Control parent, string title, string description, ref string restext)
Shows a input dialog. If the OK button is pressed, DialogResult.OK will return. Otherwise, DialogResult.Cancel will return
- parent
The parent window of this dialog. - title
The text shown on a title bar. - description
The text shown on a dialog. - ref restext
Specifies a default text and the text inputted in the dialog is contained in this.
int ShowSelectDialog(Control parent, string title, string description, object[] items)
Shows the dialog for selecting only one from multiple items. In cancellation or not selecting, it returnes -1. Otherwise, the array of numbers returns.
- parent
The parent window of this dialog. - title
The text shown on a title bar. - description
The text shown on a dialog. - items
The array in which the selection candidate was contained.
bool ShowInformationDialog(Control parent, string title, string description)
Shows a information dialog. If "Don't show again" checks, it returns true.
- parent
The parent window of this dialog. - title
The text shown on a title bar. - description
The text shown on a dialog.