C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
MenuLoadTabFileText string
MenuLoadTabFileTooltip string
MenuLoadTabFromRecentFileText string
MenuLoadTabFromRecentFileTooltip string
MenuNewTabFromRecentText string
MenuNewTabFromRecentTooltip string
MenuNewTabText string
MenuNewTabTooltip string
MenuNewTabWithFileDialogText string
MenuNewTabWithFileDialogTooltip string
MenuReLoadTabText string
MenuReLoadTabTooltip string

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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)

Описание методов

AddTab() публичный Метод

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
Результат System.Windows.Forms.TabPage

AddTab() публичный Метод

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
Результат System.Windows.Forms.TabPage

AddTabWithFileDialog() публичный Метод

Add Tab with file dialog to load file
public AddTabWithFileDialog ( ) : TabPage
Результат System.Windows.Forms.TabPage

Close() публичный Метод

Close TabPage - Ask to store content if changed
public Close ( TabPage tabPage ) : void
tabPage System.Windows.Forms.TabPage
Результат void

CloseAll() публичный Метод

Close all Tab Pages
public CloseAll ( ) : void
Результат void

LoadTabPagePerFileDialog() публичный Метод

Load sql string from *.sql File into active TabPage with TextBox inside. - Update and save the list of sql files
public LoadTabPagePerFileDialog ( ) : void
Результат void

RedoText() публичный Метод

Redo changes in current active TextBoxUndo
public RedoText ( ) : void
Результат void

ReloadTabPage() публичный Метод

Reload current Tab
public ReloadTabPage ( ) : void
Результат void

ReloadTabPageWithAsk() публичный Метод

Reload current tab and ask if the user wants it. It checks the file for differences before asking.
public ReloadTabPageWithAsk ( ) : void
Результат void

RunSqlTabPage() публичный Метод

Run SQL for selected TabPage
public RunSqlTabPage ( ) : void
Результат void

Save() публичный Метод

Save current active TabPage
public Save ( bool configSave = true ) : void
configSave bool Default: true, whether to store the configuration
Результат void

SaveAll() публичный Метод

Save all unchanged Tabs.
public SaveAll ( ) : void
Результат void

SaveAs() публичный Метод

Save sql Tab As...
public SaveAs ( ) : void
Результат void

SaveSqlTabAs() публичный Метод

Save current Tab into desired file
public SaveSqlTabAs ( ) : void
Результат void

SqlTabPagesCntrl() публичный Метод

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
Результат System

UndoText() публичный Метод

Undo changes in current active TextBoxUndo
public UndoText ( ) : void
Результат void

Описание свойств

MenuLoadTabFileText публичное статическое свойство

public static string MenuLoadTabFileText
Результат string

MenuLoadTabFileTooltip публичное статическое свойство

public static string MenuLoadTabFileTooltip
Результат string

MenuLoadTabFromRecentFileText публичное статическое свойство

public static string MenuLoadTabFromRecentFileText
Результат string

MenuLoadTabFromRecentFileTooltip публичное статическое свойство

public static string MenuLoadTabFromRecentFileTooltip
Результат string

MenuNewTabFromRecentText публичное статическое свойство

public static string MenuNewTabFromRecentText
Результат string

MenuNewTabFromRecentTooltip публичное статическое свойство

public static string MenuNewTabFromRecentTooltip
Результат string

MenuNewTabText публичное статическое свойство

public static string MenuNewTabText
Результат string

MenuNewTabTooltip публичное статическое свойство

public static string MenuNewTabTooltip
Результат string

MenuNewTabWithFileDialogText публичное статическое свойство

public static string MenuNewTabWithFileDialogText
Результат string

MenuNewTabWithFileDialogTooltip публичное статическое свойство

public static string MenuNewTabWithFileDialogTooltip
Результат string

MenuReLoadTabText публичное статическое свойство

public static string MenuReLoadTabText
Результат string

MenuReLoadTabTooltip публичное статическое свойство

public static string MenuReLoadTabTooltip
Результат string