C# Class hoTools.Query.SqlTabPagesCntrl

SqlTabPagesCntrl creates and handles TabPages of a ControlTab to work with *.sql files. - Create Menu Items -- Templates SQL -- Templates Macros - Events - SQL File properties
Afficher le fichier Open project: Helmut-Ortmann/EnterpriseArchitect_hoTools Class Usage Examples

Méthodes publiques

Свойство Type Description
MenuLoadTabFileText string
MenuLoadTabFileTooltip string
MenuLoadTabFromRecentFileText string
MenuLoadTabFromRecentFileTooltip string
MenuNewTabFromRecentText string
MenuNewTabFromRecentTooltip string
MenuNewTabText string
MenuNewTabTooltip string
MenuNewTabWithFileDialogText string
MenuNewTabWithFileDialogTooltip string
MenuReLoadTabText string
MenuReLoadTabTooltip string

Méthodes publiques

Méthode Description
AddTab ( ) : TabPage

Add an Tab to the tab control and load the Element Template as default. The Text box is unchanged because it's just a template.

AddTab ( string content ) : TabPage

Add a tab to the tab control and load content into the tab.If the content is empty nothing is loaded.

AddTabWithFileDialog ( ) : TabPage

Add Tab with file dialog to load file

Close ( TabPage tabPage ) : void

Close TabPage - Ask to store content if changed

CloseAll ( ) : void

Close all Tab Pages

LoadTabPagePerFileDialog ( ) : void

Load sql string from *.sql File into active TabPage with TextBox inside. - Update and save the list of sql files

RedoText ( ) : void

Redo changes in current active TextBoxUndo

ReloadTabPage ( ) : void

Reload current Tab

ReloadTabPageWithAsk ( ) : void

Reload current tab and ask if the user wants it. It checks the file for differences before asking.

RunSqlTabPage ( ) : void

Run SQL for selected TabPage

Save ( bool configSave = true ) : void

Save current active TabPage

SaveAll ( ) : void

Save all unchanged Tabs.

SaveAs ( ) : void

Save sql Tab As...

SaveSqlTabAs ( ) : void

Save current Tab into desired file

SqlTabPagesCntrl ( Model model, AddinSettings settings, System components, TabControl tabControl, TextBox sqlTextBoxSearchTerm, ToolStripMenuItem fileNewTabAndLoadRecentFileMenuItem, ToolStripMenuItem fileLoadTabRecentFileMenuItem, string addinTabName ) : System

Constructor to Initialize TabControl, create ToolStripItems (New Tab from, Recent Files) with file history.

UndoText ( ) : void

Undo changes in current active TextBoxUndo

Private Methods

Méthode Description
BranchConstantPackageTemplateText ( SqlTemplate template, string templateText ) : string

Insert Branch for a constant package like: '#Branch={.....guid...}'. If the context Element is a package it inserts the Package Id.

GetMacroMenuItems ( ) : ToolStripMenuItem

Get Macro Menu Items. Every item contains: - Macro name - Tooltip - Tag Template - Event Handler insertTemplate_Click

GetTemplateMenuItems ( ) : ToolStripMenuItem

Get Template Menu Items. Every item contains: - Template name - Tooltip - Tag Template - Event Handler insertTemplate_Click

GuidConstant ( SqlTemplate template, string templateText ) : string

Returns guid of it selected and has a supported type (Package, Diagram, Element, Attribute, Operation)

IdConstant ( SqlTemplate template, string templateText ) : string

Returns string of id of it selected and has a supported type (Package, Diagram, Element, Attribute, Operation).It also copies the id to Clipboard.

InsertRecentFileLists ( string fileName ) : void

Insert recent file lists - SqlFile -OpenedTabs

LoadOpenedTabsFromLastSession ( ) : void

Load all tabs which were opened in the last session

LoadRecentFilesIntoToolStripItems ( ) : void

Update the following Menu Items with recent files: -File, Load Tab from.. -File, Add Tab from.. -Tab, Load Tab from.. -Tab, Add Tab from..

LoadRecentFilesMenuItems ( ToolStripMenuItem loadRecentFileStripMenuItem, EventHandler eventHandlerClick ) : void

Load RecentFiles MenuItems into MenuItemStrip

LoadTabPage ( string tabContent ) : void

Load string for tab Page

LoadTabPageFromFile ( TabPage tabPage, string fileName, bool notUpdateLastOpenedList = false ) : void

Load file for tab Page

Save ( TabPage tabPage, bool configSave = true ) : void

Save sql TabPage in *.sql File. Store the save time to distinguish hoTools writes from other

SaveAs ( TabPage tabPage ) : void

Save As... TabPage in *.sql File.

ToolstripMenuItemInsertTemplateFromId ( SqlTemplates id, string caption ) : ToolStripMenuItem

New ToolStripItem to insert a template. The EventHandler is: insertTemplate_Click. It sets: Caption text, Tooltip, EventHandler, Tag with the template itself

addTabFileDialogMenuItem_Click ( object sender, EventArgs e ) : void

Add Tab with File Dialog

addTabMenuItem_Click ( object sender, EventArgs e ) : void

Add tab fired by TabControl or TabPage

closeMenuItem_Click ( object sender, EventArgs e ) : void

Event Close TabPage

fileLoadMenuItem_Click ( object sender, EventArgs e ) : void

Event File Load fired by TabControl

fileRunMenuItem_Click ( object sender, EventArgs e ) : void
fileRunSelectedMenuItem_Click ( object sender, EventArgs e ) : void

Run sql for selected Text

fileSaveAllMenuItem_Click ( object sender, EventArgs e ) : void

Event File Save

fileSaveAsMenuItem_Click ( object sender, EventArgs e ) : void

Event File Save As

fileSaveMenuItem_Click ( object sender, EventArgs e ) : void

Event File Save

insertTemplate_Click ( object sender, EventArgs e ) : void

Inserts the selected macro at the cursor position or replace the selected text by the macro. The template is identified by the .Tag property of the menuItem passed by the sender parameter.

loadFromHistoryEntry_Click ( object sender, EventArgs e ) : void

Load from history item in active tab. If no active tab exists create one.

newTabAndLoadFromHistoryEntry_Click ( object sender, EventArgs e ) : void

New Tab and Load from history item

reLoadTabMenuItem_Click ( object sender, EventArgs e ) : void
sqlTextBox_KeyUp ( object sender, KeyEventArgs e ) : void

Handle CTRL sequences for CTRL+S (Store sql) and CTRL+R (RUN sql)

Method Details

AddTab() public méthode

Add an Tab to the tab control and load the Element Template as default. The Text box is unchanged because it's just a template.
public AddTab ( ) : TabPage
Résultat System.Windows.Forms.TabPage

AddTab() public méthode

Add a tab to the tab control and load content into the tab.If the content is empty nothing is loaded.
public AddTab ( string content ) : TabPage
content string Content of the Tab
Résultat System.Windows.Forms.TabPage

AddTabWithFileDialog() public méthode

Add Tab with file dialog to load file
public AddTabWithFileDialog ( ) : TabPage
Résultat System.Windows.Forms.TabPage

Close() public méthode

Close TabPage - Ask to store content if changed
public Close ( TabPage tabPage ) : void
tabPage System.Windows.Forms.TabPage
Résultat void

CloseAll() public méthode

Close all Tab Pages
public CloseAll ( ) : void
Résultat void

LoadTabPagePerFileDialog() public méthode

Load sql string from *.sql File into active TabPage with TextBox inside. - Update and save the list of sql files
public LoadTabPagePerFileDialog ( ) : void
Résultat void

RedoText() public méthode

Redo changes in current active TextBoxUndo
public RedoText ( ) : void
Résultat void

ReloadTabPage() public méthode

Reload current Tab
public ReloadTabPage ( ) : void
Résultat void

ReloadTabPageWithAsk() public méthode

Reload current tab and ask if the user wants it. It checks the file for differences before asking.
public ReloadTabPageWithAsk ( ) : void
Résultat void

RunSqlTabPage() public méthode

Run SQL for selected TabPage
public RunSqlTabPage ( ) : void
Résultat void

Save() public méthode

Save current active TabPage
public Save ( bool configSave = true ) : void
configSave bool Default: true, whether to store the configuration
Résultat void

SaveAll() public méthode

Save all unchanged Tabs.
public SaveAll ( ) : void
Résultat void

SaveAs() public méthode

Save sql Tab As...
public SaveAs ( ) : void
Résultat void

SaveSqlTabAs() public méthode

Save current Tab into desired file
public SaveSqlTabAs ( ) : void
Résultat void

SqlTabPagesCntrl() public méthode

Constructor to Initialize TabControl, create ToolStripItems (New Tab from, Recent Files) with file history.
public SqlTabPagesCntrl ( Model model, AddinSettings settings, System components, TabControl tabControl, TextBox sqlTextBoxSearchTerm, ToolStripMenuItem fileNewTabAndLoadRecentFileMenuItem, ToolStripMenuItem fileLoadTabRecentFileMenuItem, string addinTabName ) : System
model EAAddinFramework.Utils.Model
settings hoTools.Settings.AddinSettings
components System
tabControl System.Windows.Forms.TabControl
sqlTextBoxSearchTerm System.Windows.Forms.TextBox
fileNewTabAndLoadRecentFileMenuItem System.Windows.Forms.ToolStripMenuItem File, New Tab from recent files
fileLoadTabRecentFileMenuItem System.Windows.Forms.ToolStripMenuItem File, Load Tab from recent files
addinTabName string
Résultat System

UndoText() public méthode

Undo changes in current active TextBoxUndo
public UndoText ( ) : void
Résultat void

Property Details

MenuLoadTabFileText public_oe static_oe property

public static string MenuLoadTabFileText
Résultat string

MenuLoadTabFileTooltip public_oe static_oe property

public static string MenuLoadTabFileTooltip
Résultat string

MenuLoadTabFromRecentFileText public_oe static_oe property

public static string MenuLoadTabFromRecentFileText
Résultat string

MenuLoadTabFromRecentFileTooltip public_oe static_oe property

public static string MenuLoadTabFromRecentFileTooltip
Résultat string

MenuNewTabFromRecentText public_oe static_oe property

public static string MenuNewTabFromRecentText
Résultat string

MenuNewTabFromRecentTooltip public_oe static_oe property

public static string MenuNewTabFromRecentTooltip
Résultat string

MenuNewTabText public_oe static_oe property

public static string MenuNewTabText
Résultat string

MenuNewTabTooltip public_oe static_oe property

public static string MenuNewTabTooltip
Résultat string

MenuNewTabWithFileDialogText public_oe static_oe property

public static string MenuNewTabWithFileDialogText
Résultat string

MenuNewTabWithFileDialogTooltip public_oe static_oe property

public static string MenuNewTabWithFileDialogTooltip
Résultat string

MenuReLoadTabText public_oe static_oe property

public static string MenuReLoadTabText
Résultat string

MenuReLoadTabTooltip public_oe static_oe property

public static string MenuReLoadTabTooltip
Résultat string