📄 mainform.vb
字号:
Imports System.IO
Imports Microsoft.Win32
Imports System.Threading
Public Class MainForm
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'workaround for OS thread culture (check documentation for more info)
Dim selectedLanguage As String = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName
Dim regKey As RegistryKey = Registry.CurrentUser.OpenSubKey(c_RegistryKey)
Try
If Not regKey Is Nothing AndAlso Not regKey.GetValue("Language") Is Nothing Then
selectedLanguage = CType(regKey.GetValue("Language"), String)
regKey.Close()
Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo(selectedLanguage)
End If
Catch ex As Exception
LogError.Write(ex.Message & vbNewLine & ex.StackTrace)
End Try
'This call is required by the Windows Form Designer.
InitializeComponent()
'get the my documents path
m_MyDocumentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\"
'set the correct menu item to be checked
If (selectedLanguage = c_GermanCultureName) Then
miLanguageGerman.Checked = True
miLanguageEnglish.Checked = False
Else
miLanguageGerman.Checked = False
miLanguageEnglish.Checked = True
End If
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents mMenuTop As System.Windows.Forms.MainMenu
Friend WithEvents miFile As System.Windows.Forms.MenuItem
Friend WithEvents miView As System.Windows.Forms.MenuItem
Friend WithEvents miManage As System.Windows.Forms.MenuItem
Friend WithEvents miHelp As System.Windows.Forms.MenuItem
Friend WithEvents miHelpAboutTaskVision As System.Windows.Forms.MenuItem
Friend WithEvents miFileNewTask As System.Windows.Forms.MenuItem
Friend WithEvents miFileChangePassword As System.Windows.Forms.MenuItem
Friend WithEvents miFilePrintPreview As System.Windows.Forms.MenuItem
Friend WithEvents miFileExit As System.Windows.Forms.MenuItem
Friend WithEvents miFilePrint As System.Windows.Forms.MenuItem
Friend WithEvents miManageUsers As System.Windows.Forms.MenuItem
Friend WithEvents miViewPreviewPane As System.Windows.Forms.MenuItem
Friend WithEvents miFileExportToExcel As System.Windows.Forms.MenuItem
Friend WithEvents sbrBottom As System.Windows.Forms.StatusBar
Friend WithEvents btnNewTask As System.Windows.Forms.ToolBarButton
Friend WithEvents btnWorkOffline As System.Windows.Forms.ToolBarButton
Friend WithEvents btnSearch As System.Windows.Forms.ToolBarButton
Friend WithEvents tbrTop As System.Windows.Forms.ToolBar
Friend WithEvents pnlPreview As System.Windows.Forms.Panel
Friend WithEvents xpList As XPanderControl.XPanderList
Friend WithEvents xpProject As XPanderControl.XPander
Friend WithEvents xpProgress As XPanderControl.XPander
Friend WithEvents xpHistory As XPanderControl.XPander
Friend WithEvents xpPriority As XPanderControl.XPander
Friend WithEvents dgTasks As System.Windows.Forms.DataGrid
Friend WithEvents trayIcon As System.Windows.Forms.NotifyIcon
Friend WithEvents trayMenu As System.Windows.Forms.ContextMenu
Friend WithEvents sbrPanelRight As System.Windows.Forms.StatusBarPanel
Friend WithEvents sbrPanelLeft As System.Windows.Forms.StatusBarPanel
Friend WithEvents txtDescriptionText As System.Windows.Forms.TextBox
Friend WithEvents lblModifiedBy As System.Windows.Forms.Label
Friend WithEvents lblAssignedTo As System.Windows.Forms.Label
Friend WithEvents lblSummary As System.Windows.Forms.Label
Friend WithEvents lblSummaryText As System.Windows.Forms.Label
Friend WithEvents lblModifiedByText As System.Windows.Forms.Label
Friend WithEvents lblAssignedToText As System.Windows.Forms.Label
Friend WithEvents gbPreview As System.Windows.Forms.GroupBox
Friend WithEvents cbProjects As System.Windows.Forms.ComboBox
Friend WithEvents cbFilter As System.Windows.Forms.ComboBox
Friend WithEvents chartPriority As VertigoSoftware.Controls.ChartControl.CustomChart
Friend WithEvents chartProgress As VertigoSoftware.Controls.ProgressControl.ProgressControl
Friend WithEvents lblSelectProject As System.Windows.Forms.Label
Friend WithEvents lblSelectFilter As System.Windows.Forms.Label
Friend WithEvents PrintPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog
Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog
Friend WithEvents PrintDocument1 As System.Drawing.Printing.PrintDocument
Friend WithEvents miContextExit As System.Windows.Forms.MenuItem
Friend WithEvents miContextAbout As System.Windows.Forms.MenuItem
Friend WithEvents miViewCustomizeColumns As System.Windows.Forms.MenuItem
Friend WithEvents miManageAddProject As System.Windows.Forms.MenuItem
Friend WithEvents Splitter1 As System.Windows.Forms.Splitter
Friend WithEvents Splitter2 As System.Windows.Forms.Splitter
Friend WithEvents AppUpdater1 As Microsoft.Samples.AppUpdater.AppUpdater
Friend WithEvents lblOverDue As System.Windows.Forms.Label
Friend WithEvents hPanel As TaskVision.TaskHistoryPanel
Friend WithEvents miViewSearchProject As System.Windows.Forms.MenuItem
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents tmrGetTasks As System.Windows.Forms.Timer
Friend WithEvents tmrGetProjectHistory As System.Windows.Forms.Timer
Friend WithEvents ilToolbar As System.Windows.Forms.ImageList
Friend WithEvents miSeparator1 As System.Windows.Forms.MenuItem
Friend WithEvents miSeparator2 As System.Windows.Forms.MenuItem
Friend WithEvents miSeparator3 As System.Windows.Forms.MenuItem
Friend WithEvents miLanguageEnglish As System.Windows.Forms.MenuItem
Friend WithEvents miLanguageGerman As System.Windows.Forms.MenuItem
Friend WithEvents miLanguage As System.Windows.Forms.MenuItem
Friend WithEvents miManagersForceUpdateCheck As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(MainForm))
Dim configurationAppSettings As System.Configuration.AppSettingsReader = New System.Configuration.AppSettingsReader()
Me.mMenuTop = New System.Windows.Forms.MainMenu()
Me.miFile = New System.Windows.Forms.MenuItem()
Me.miFileNewTask = New System.Windows.Forms.MenuItem()
Me.miFileExportToExcel = New System.Windows.Forms.MenuItem()
Me.miSeparator1 = New System.Windows.Forms.MenuItem()
Me.miFileChangePassword = New System.Windows.Forms.MenuItem()
Me.miSeparator2 = New System.Windows.Forms.MenuItem()
Me.miFilePrintPreview = New System.Windows.Forms.MenuItem()
Me.miFilePrint = New System.Windows.Forms.MenuItem()
Me.miSeparator3 = New System.Windows.Forms.MenuItem()
Me.miFileExit = New System.Windows.Forms.MenuItem()
Me.miView = New System.Windows.Forms.MenuItem()
Me.miViewPreviewPane = New System.Windows.Forms.MenuItem()
Me.miViewCustomizeColumns = New System.Windows.Forms.MenuItem()
Me.miViewSearchProject = New System.Windows.Forms.MenuItem()
Me.miManage = New System.Windows.Forms.MenuItem()
Me.miManageUsers = New System.Windows.Forms.MenuItem()
Me.miManageAddProject = New System.Windows.Forms.MenuItem()
Me.miManagersForceUpdateCheck = New System.Windows.Forms.MenuItem()
Me.miLanguage = New System.Windows.Forms.MenuItem()
Me.miLanguageEnglish = New System.Windows.Forms.MenuItem()
Me.miLanguageGerman = New System.Windows.Forms.MenuItem()
Me.miHelp = New System.Windows.Forms.MenuItem()
Me.miHelpAboutTaskVision = New System.Windows.Forms.MenuItem()
Me.sbrBottom = New System.Windows.Forms.StatusBar()
Me.sbrPanelLeft = New System.Windows.Forms.StatusBarPanel()
Me.sbrPanelRight = New System.Windows.Forms.StatusBarPanel()
Me.tbrTop = New System.Windows.Forms.ToolBar()
Me.btnNewTask = New System.Windows.Forms.ToolBarButton()
Me.btnWorkOffline = New System.Windows.Forms.ToolBarButton()
Me.btnSearch = New System.Windows.Forms.ToolBarButton()
Me.ilToolbar = New System.Windows.Forms.ImageList(Me.components)
Me.dgTasks = New System.Windows.Forms.DataGrid()
Me.xpList = New XPanderControl.XPanderList()
Me.xpPriority = New XPanderControl.XPander()
Me.chartPriority = New VertigoSoftware.Controls.ChartControl.CustomChart()
Me.xpHistory = New XPanderControl.XPander()
Me.hPanel = New TaskVision.TaskHistoryPanel()
Me.xpProgress = New XPanderControl.XPander()
Me.chartProgress = New VertigoSoftware.Controls.ProgressControl.ProgressControl()
Me.xpProject = New XPanderControl.XPander()
Me.lblSelectFilter = New System.Windows.Forms.Label()
Me.lblSelectProject = New System.Windows.Forms.Label()
Me.cbFilter = New System.Windows.Forms.ComboBox()
Me.cbProjects = New System.Windows.Forms.ComboBox()
Me.Splitter1 = New System.Windows.Forms.Splitter()
Me.pnlPreview = New System.Windows.Forms.Panel()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -