First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,48 @@
Partial Class Dashboard_VC
<System.Diagnostics.DebuggerNonUserCode()> _
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
'Required for Windows.Forms Class Composition Designer support
Container.Add(Me)
End Sub
'Component overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.aDashboard_SaveDashDesForBusinessDirectory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aDashboard_SaveDashDesForBusinessDirectory
'
Me.aDashboard_SaveDashDesForBusinessDirectory.Caption = "aDashboard_SaveDashDesForBusinessDirectory"
Me.aDashboard_SaveDashDesForBusinessDirectory.ConfirmationMessage = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.Id = "aDashboard_SaveDashDesForBusinessDirectory"
Me.aDashboard_SaveDashDesForBusinessDirectory.ImageName = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.Shortcut = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.Tag = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.TargetObjectsCriteria = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.TargetViewId = "Dashboard_DetailView_Designer"
Me.aDashboard_SaveDashDesForBusinessDirectory.ToolTip = Nothing
Me.aDashboard_SaveDashDesForBusinessDirectory.TypeOfView = Nothing
End Sub
Friend WithEvents aDashboard_SaveDashDesForBusinessDirectory As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="aDashboard_SaveDashDesForBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>161, 121</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,205 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.CloneObject
Imports DevExpress.Data.Filtering
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.DashboardCommon
Imports DevExpress.Xpo
Imports System.IO
Imports System.Xml
Imports System.Reflection
Imports DevExpress.DashboardWin
Public Class Dashboard_VC
Inherits Nuvolar.Module.Dashboard_VC
Private _DashboardViewer As DashboardViewer
Private _DashboardDesigner As DashboardDesigner
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "Dashboard_DetailView_Viewer" Then
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Dim _DetailView As DetailView = TryCast(View, DetailView)
Dim _DashboardViewer_ViewItem As ViewItem = _DetailView.FindItem("DashboardViewer")
If _DashboardViewer_ViewItem IsNot Nothing Then
AddHandler _DashboardViewer_ViewItem.ControlCreated, AddressOf DashboardViewer_ViewItem_ControlCreated
End If
End If
If View.Id = "Dashboard_DetailView_Designer" Then
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Dim _DetailView As DetailView = TryCast(View, DetailView)
Dim _DashboardDesigner_ViewItem As ViewItem = _DetailView.FindItem("DashboardDesigner")
If _DashboardDesigner_ViewItem IsNot Nothing Then
AddHandler _DashboardDesigner_ViewItem.ControlCreated, AddressOf DashboardDesigner_ViewItem_ControlCreated
End If
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "Dashboard_DetailView_Viewer" Or
View.Id = "Dashboard_DetailView_Designer" Then
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub DashboardViewer_ViewItem_ControlCreated(sender As Object, e As EventArgs)
Dim _Dashboard As Dashboard = TryCast(View.SelectedObjects(0), Dashboard)
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
Dim _DashboardViewerUserControl As DashboardViewerUserControl = TryCast(_ItemControl, DashboardViewerUserControl)
_DashboardViewer = _DashboardViewerUserControl.DashboardViewer1
If _DashboardViewer IsNot Nothing Then
With _DashboardViewerUserControl
.UserName = _Dashboard.UserName
.Password = _Dashboard.Password
.SQLType = _Dashboard.SQLType
.SQLServer = _Dashboard.SQLServer
.Database = _Dashboard.Database
End With
Dim _MemoryStream As New IO.MemoryStream()
_Dashboard.XMLFileData.SaveToStream(_MemoryStream)
_MemoryStream.Seek(0, IO.SeekOrigin.Begin)
With _DashboardViewer
.LoadDashboard(_MemoryStream)
End With
End If
End Sub
Private Sub DashboardDesigner_ViewItem_ControlCreated(sender As Object, e As EventArgs)
Dim _Dashboard As Dashboard = TryCast(View.SelectedObjects(0), Dashboard)
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
Dim _DashboardDesignerUserControl As DashboardDesignerUserControl = TryCast(_ItemControl, DashboardDesignerUserControl)
_DashboardDesigner = _DashboardDesignerUserControl.DashboardDesigner1
If _DashboardDesigner IsNot Nothing Then
If Not _Dashboard.IsNewDashboard Then
With _DashboardDesignerUserControl
.UserName = _Dashboard.UserName
.Password = _Dashboard.Password
.SQLType = _Dashboard.SQLType
.SQLServer = _Dashboard.SQLServer
.Database = _Dashboard.Database
End With
Dim _MemoryStream As New IO.MemoryStream()
_Dashboard.XMLFileData.SaveToStream(_MemoryStream)
_MemoryStream.Seek(0, IO.SeekOrigin.Begin)
With _DashboardDesigner
.LoadDashboard(_MemoryStream)
.ConfirmSaveOnClose = False
End With
End If
End If
End Sub
Private Sub aDashboard_SaveDashDesForBusinessDirectory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aDashboard_SaveDashDesForBusinessDirectory.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Dashboard As Dashboard = _ocur.GetObject(TryCast(View.SelectedObjects(0), Dashboard))
Dim _FileName As String = IO.Path.GetTempPath
If _Dashboard.IsNewDashboard Then
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _BusinessDirectory As New BusinessDirectory(_onew.Session)
With _BusinessDirectory
.IsDashBoard = True
_FileName += _DashboardDesigner.SelectedDataSource.Name + ".xml"
_DashboardDesigner.Dashboard.SaveToXml(_FileName)
If IO.File.Exists(_FileName) Then
_BusinessDirectory.FileData = Nothing
_BusinessDirectory.FileData = LoadOtherFile(_FileName, New FileData(_onew.Session))
End If
End With
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "BusinessDirectory_DetailView", True, _BusinessDirectory)
Else
Select Case _Dashboard.Object_Type
Case GetType(BusinessDirectory)
Dim _BusinessDirectory As BusinessDirectory = _ocur.FindObject(Of BusinessDirectory)(CriteriaOperator.Parse("Oid=?", _Dashboard.Object_Oid))
If _BusinessDirectory IsNot Nothing Then
_FileName += _BusinessDirectory.FileData.FileName
_DashboardDesigner.Dashboard.SaveToXml(_FileName)
If IO.File.Exists(_FileName) Then
_BusinessDirectory.FileData = Nothing
_BusinessDirectory.FileData = LoadOtherFile(_FileName, New FileData(_ocur.Session))
End If
End If
Case Else
MsgBox("Almafa!")
End Select
'Dim _da As New DevExpress.DashboardCommon.Dashboard
'Dim _dd As New DevExpress.XtraDashboard.DashboardDesigner
'_dd.LoadDashboard(_FileName)
'Beep()
'_dd.d()
''_dd.DataBindings
_ocur.CommitChanges()
End If
End Sub
Private Function LoadOtherFile(ByVal _ActFile As String, _FileData As FileData) As FileData
Dim _StreamFile = New System.IO.FileStream(_ActFile, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim _StreamReader As New System.IO.StreamReader(_StreamFile)
_StreamFile.Seek(0, System.IO.SeekOrigin.Begin)
_FileData.LoadFromStream(_ActFile, _StreamFile)
_FileData.FileName = System.IO.Path.GetFileName(_ActFile)
_StreamReader.Close()
_StreamFile.Close()
Return _FileData
End Function
Private Sub GetXMLInfo(_FileName As String)
Dim reader As New XmlTextReader("books.xml")
While reader.Read()
Select Case reader.NodeType
Case XmlNodeType.Element
' A csomópont egy összetevõ.
Console.Write("<" & reader.Name)
Console.WriteLine(">")
Exit Select
Case XmlNodeType.Text
'Az egyes összetevõk szövegének megjelenítése.
Console.WriteLine(reader.Value)
Exit Select
Case XmlNodeType.EndElement
'Az összetevõ végének megjelenítése.
Console.Write("</" & reader.Name)
Console.WriteLine(">")
Exit Select
End Select
End While
Console.ReadLine()
End Sub
End Class