Commit for development environment setup
This commit is contained in:
400
.gitignore
vendored
Normal file
400
.gitignore
vendored
Normal file
@@ -0,0 +1,400 @@
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -22,7 +23,12 @@
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
@@ -33,6 +39,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -41,6 +48,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -49,6 +57,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
@@ -1,6 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||
|
BIN
PROMS/AnalyzeLinx.7z
Normal file
BIN
PROMS/AnalyzeLinx.7z
Normal file
Binary file not shown.
20
PROMS/AnalyzeLinx/AnalyzeLinx.sln
Normal file
20
PROMS/AnalyzeLinx/AnalyzeLinx.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FindLinx", "FindLinx\FindLinx.csproj", "{48CD3831-84A5-45AB-BD36-213359779E21}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{48CD3831-84A5-45AB-BD36-213359779E21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{48CD3831-84A5-45AB-BD36-213359779E21}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{48CD3831-84A5-45AB-BD36-213359779E21}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48CD3831-84A5-45AB-BD36-213359779E21}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
78
PROMS/AnalyzeLinx/FindLinx/FindLinx.csproj
Normal file
78
PROMS/AnalyzeLinx/FindLinx/FindLinx.csproj
Normal file
@@ -0,0 +1,78 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{48CD3831-84A5-45AB-BD36-213359779E21}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FindLinx</RootNamespace>
|
||||
<AssemblyName>FindLinx</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="frmFindLinx.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmFindLinx.Designer.cs">
|
||||
<DependentUpon>frmFindLinx.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="frmFindLinx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmFindLinx.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
20
PROMS/AnalyzeLinx/FindLinx/Program.cs
Normal file
20
PROMS/AnalyzeLinx/FindLinx/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FindLinx
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmFindLinx());
|
||||
}
|
||||
}
|
||||
}
|
33
PROMS/AnalyzeLinx/FindLinx/Properties/AssemblyInfo.cs
Normal file
33
PROMS/AnalyzeLinx/FindLinx/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("FindLinx")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FindLinx")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("864d5e18-264c-4257-98d3-a50da715ca19")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
PROMS/AnalyzeLinx/FindLinx/Properties/Resources.Designer.cs
generated
Normal file
71
PROMS/AnalyzeLinx/FindLinx/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.5477
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FindLinx.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FindLinx.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
PROMS/AnalyzeLinx/FindLinx/Properties/Resources.resx
Normal file
117
PROMS/AnalyzeLinx/FindLinx/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
PROMS/AnalyzeLinx/FindLinx/Properties/Settings.Designer.cs
generated
Normal file
30
PROMS/AnalyzeLinx/FindLinx/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.5477
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FindLinx.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
PROMS/AnalyzeLinx/FindLinx/Properties/Settings.settings
Normal file
7
PROMS/AnalyzeLinx/FindLinx/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
153
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.Designer.cs
generated
Normal file
153
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.Designer.cs
generated
Normal file
@@ -0,0 +1,153 @@
|
||||
namespace FindLinx
|
||||
{
|
||||
partial class frmFindLinx
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.chooseDBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.findLinxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.allDBsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.tsslStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.tbResults = new System.Windows.Forms.TextBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.chooseDBToolStripMenuItem,
|
||||
this.findLinxToolStripMenuItem,
|
||||
this.allDBsToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(642, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// chooseDBToolStripMenuItem
|
||||
//
|
||||
this.chooseDBToolStripMenuItem.Name = "chooseDBToolStripMenuItem";
|
||||
this.chooseDBToolStripMenuItem.Size = new System.Drawing.Size(77, 20);
|
||||
this.chooseDBToolStripMenuItem.Text = "Choose DB";
|
||||
this.chooseDBToolStripMenuItem.Click += new System.EventHandler(this.chooseDBToolStripMenuItem_Click);
|
||||
//
|
||||
// findLinxToolStripMenuItem
|
||||
//
|
||||
this.findLinxToolStripMenuItem.Enabled = false;
|
||||
this.findLinxToolStripMenuItem.Name = "findLinxToolStripMenuItem";
|
||||
this.findLinxToolStripMenuItem.Size = new System.Drawing.Size(63, 20);
|
||||
this.findLinxToolStripMenuItem.Text = "FindLinx";
|
||||
this.findLinxToolStripMenuItem.Click += new System.EventHandler(this.findLinxToolStripMenuItem_Click);
|
||||
//
|
||||
// allDBsToolStripMenuItem
|
||||
//
|
||||
this.allDBsToolStripMenuItem.Name = "allDBsToolStripMenuItem";
|
||||
this.allDBsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||
this.allDBsToolStripMenuItem.Text = "All DBs";
|
||||
this.allDBsToolStripMenuItem.Click += new System.EventHandler(this.allDBsToolStripMenuItem_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsslStatus});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 328);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(642, 22);
|
||||
this.statusStrip1.TabIndex = 1;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// tsslStatus
|
||||
//
|
||||
this.tsslStatus.Name = "tsslStatus";
|
||||
this.tsslStatus.Size = new System.Drawing.Size(39, 17);
|
||||
this.tsslStatus.Text = "Ready";
|
||||
//
|
||||
// tbResults
|
||||
//
|
||||
this.tbResults.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbResults.Location = new System.Drawing.Point(0, 24);
|
||||
this.tbResults.Multiline = true;
|
||||
this.tbResults.Name = "tbResults";
|
||||
this.tbResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.tbResults.Size = new System.Drawing.Size(642, 304);
|
||||
this.tbResults.TabIndex = 2;
|
||||
//
|
||||
// frmFindLinx
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(642, 350);
|
||||
this.Controls.Add(this.tbResults);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "frmFindLinx";
|
||||
this.Text = "Find Links";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem chooseDBToolStripMenuItem;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsslStatus;
|
||||
private System.Windows.Forms.ToolStripMenuItem findLinxToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox tbResults;
|
||||
private System.Windows.Forms.ToolStripMenuItem allDBsToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
378
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.cs
Normal file
378
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.cs
Normal file
@@ -0,0 +1,378 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FindLinx
|
||||
{
|
||||
public partial class frmFindLinx : Form
|
||||
{
|
||||
public frmFindLinx()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public string MyStatus
|
||||
{
|
||||
get { return tsslStatus.Text; }
|
||||
set { tsslStatus.Text = value; Application.DoEvents(); }
|
||||
}
|
||||
private static string _SelectedDatabase = null;
|
||||
public static string SelectedDatabase
|
||||
{
|
||||
get { return frmFindLinx._SelectedDatabase; }
|
||||
set
|
||||
{
|
||||
frmFindLinx._SelectedDatabase = value;
|
||||
_ConnectionString = _MenuConnectionString.Replace("{MENU}", SelectedDatabase);
|
||||
}
|
||||
}
|
||||
private static string _MenuConnectionString = @"Data Source=VOLIAN-SERVER;User Id=proms2010;password=proms2010;Initial Catalog={MENU}";
|
||||
private static string _ConnectionString = null;
|
||||
private Dictionary<int, string> _MyContents = null;
|
||||
private void chooseDBToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChooseDatabase();
|
||||
findLinxToolStripMenuItem.Enabled = true;
|
||||
LoadContents();
|
||||
ResetLinks();
|
||||
FindLinks();
|
||||
//ShowLinks(SelectedDatabase);
|
||||
}
|
||||
private void ChooseDatabase()
|
||||
{
|
||||
System.Windows.Forms.ContextMenuStrip cms = BuildDatabaseMenu();
|
||||
SelectedDatabase = null;
|
||||
while (SelectedDatabase == null)
|
||||
{
|
||||
cms.Show(new System.Drawing.Point((System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width - cms.Width) / 2, (System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height - cms.Height) / 2));
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
}
|
||||
}
|
||||
private static System.Windows.Forms.ContextMenuStrip BuildDatabaseMenu()
|
||||
{
|
||||
System.Windows.Forms.ContextMenuStrip cms = new System.Windows.Forms.ContextMenuStrip();
|
||||
cms.Items.Add("Choose Database");
|
||||
System.Windows.Forms.ToolStripMenuItem tsmi = cms.Items[0] as System.Windows.Forms.ToolStripMenuItem;
|
||||
tsmi.BackColor = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.ActiveCaption);// System.Drawing.Color.Pink;
|
||||
tsmi.ForeColor = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.ActiveCaptionText);
|
||||
tsmi.Font = new System.Drawing.Font(tsmi.Font, System.Drawing.FontStyle.Bold);
|
||||
foreach (string name in DBNames)
|
||||
cms.Items.Add(name, null, new EventHandler(Database_Click));
|
||||
return cms;
|
||||
}
|
||||
private static List<string> _DBNames;
|
||||
public static List<string> DBNames
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_DBNames == null)
|
||||
_DBNames = GetDatabases();
|
||||
return _DBNames;
|
||||
}
|
||||
}
|
||||
private static List<string> GetDatabases()
|
||||
{
|
||||
List<string> dbNames;
|
||||
dbNames = new List<string>();
|
||||
SelectedDatabase = "master";
|
||||
SqlConnection cn = new SqlConnection(_ConnectionString);
|
||||
cn.Open();
|
||||
// SqlDataAdapter da = new SqlDataAdapter("select name from sysdatabases where name like 'VEP%' order by name", cn);
|
||||
//SqlDataAdapter da = new SqlDataAdapter("select name, case when object_id('[' + name + ']..Items') is null then 'Not PROMS' when object_id('[' + name + ']..Revisions') is not null then 'Approval' when object_id('[' + name + ']..ContentAudits') is not null then 'Change Manager' else 'Original' end functionality from sysdatabases where name not in ('master','model','msdb','tempdb') order by name", cn);
|
||||
SqlDataAdapter da = new SqlDataAdapter("select name from sysdatabases where name not in ('master','model','msdb','tempdb') and name like 'VEPROMS%' order by name", cn);
|
||||
da.SelectCommand.CommandTimeout = 300; // 300 sec timeout
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
da.Fill(ds);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(ex.GetType().Name, ex.Message);
|
||||
throw (new Exception("Cannot Load Data List", ex));
|
||||
}
|
||||
cn.Close();
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
dbNames.Add(dr["name"].ToString());
|
||||
return dbNames;
|
||||
}
|
||||
private static void Database_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Windows.Forms.ToolStripMenuItem tsmi = sender as System.Windows.Forms.ToolStripMenuItem;
|
||||
if (tsmi != null)
|
||||
{
|
||||
SelectedDatabase = tsmi.Text;
|
||||
}
|
||||
}
|
||||
private void findLinxToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FindLinks();
|
||||
}
|
||||
private Dictionary<string, int> DicPrefix;
|
||||
private Dictionary<string, int> DicSuffix;
|
||||
private void ResetLinks()
|
||||
{
|
||||
DicPrefix = new Dictionary<string, int>();
|
||||
DicSuffix = new Dictionary<string, int>();
|
||||
}
|
||||
private void ShowLinks(string selectedDatabase)
|
||||
{
|
||||
tbResults.Clear();
|
||||
SortedList<int, string> srtPrefixes = new SortedList<int, string>(new DegreeComparer());
|
||||
foreach (string pre in DicPrefix.Keys)
|
||||
{
|
||||
srtPrefixes.Add(-DicPrefix[pre], pre);
|
||||
}
|
||||
tbResults.AppendText(string.Format("{0} Prefixes\r\n", selectedDatabase));
|
||||
foreach (string pre in srtPrefixes.Values)
|
||||
{
|
||||
tbResults.AppendText(string.Format("{0},'{1}'\r\n", DicPrefix[pre], pre));
|
||||
}
|
||||
SortedList<int, string> srtSuffixes = new SortedList<int, string>(new DegreeComparer());
|
||||
foreach (string suf in DicSuffix.Keys)
|
||||
{
|
||||
srtSuffixes.Add(-DicSuffix[suf], suf);
|
||||
}
|
||||
tbResults.AppendText(string.Format("\r\n{0} Suffixes\r\n", selectedDatabase));
|
||||
foreach (string suf in srtSuffixes.Values)
|
||||
{
|
||||
tbResults.AppendText(string.Format("{0},'{1}'\r\n", DicSuffix[suf], suf));
|
||||
}
|
||||
}
|
||||
private void FindLinks()
|
||||
{
|
||||
// loop through contents
|
||||
foreach (int ic in _MyContents.Keys)// for each content record
|
||||
{
|
||||
string Text = _MyContents[ic];
|
||||
// find all links
|
||||
//string findLink = @"<START\](.*?)#Link:T(.*?)\[END>"; // need to only process transitions (no ros)
|
||||
string findLink = @"<START\](.*?)\[END>"; // need to only process transitions (no ros)
|
||||
MatchCollection ms = Regex.Matches(Text, findLink);
|
||||
int ii = 0;
|
||||
foreach (Match mlink in ms)// for each link
|
||||
{
|
||||
if (mlink.ToString().Contains("#Link:T"))
|
||||
{
|
||||
string key = string.Format("{0}.{1}.{2}", _SelectedDatabase, ic, ii);
|
||||
if (key == "VEPROMS_BWD.16964.0") Console.WriteLine("Here");
|
||||
string oldval = OldTransitionValue(mlink.ToString());
|
||||
string newval = NewTransitionValue(mlink.ToString());
|
||||
//if (oldval != newval && (!(oldval == "" && newval.Contains("Prerequisite {Prereq")) && !oldval.Contains("{First Step")) && !oldval.Contains("{Page Num")) tbResults.AppendText(string.Format("'{0}','{1}','{2}'\r\n", _SelectedDatabase, oldval, newval));
|
||||
if (oldval != newval) tbResults.AppendText(string.Format("'{0}','{1}','{2}','{3}'\r\n", _SelectedDatabase, oldval, newval, mlink.ToString()));
|
||||
ii++; // instance of transition
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private string OldTransitionValue(string _TextAndLink)
|
||||
{
|
||||
Match m = Regex.Match(_TextAndLink, @"<START\](\\[^v \\]+)*\\v0(\\[^v \{\\]+)* (.*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:(.*?)\[END>");
|
||||
return m.Groups[3].ToString();
|
||||
}
|
||||
private string NewTransitionValue(string _TextAndLink)
|
||||
{
|
||||
Match m = Regex.Match(_TextAndLink, @"<START\](.*?)#Link:(.*?)\[END>"); // get value string including formatting.
|
||||
string mtxt = m.Groups[1].ToString();
|
||||
mtxt = Regex.Replace(mtxt, @"^(\\[^v \\]+)*\\v0", ""); // replace the rtf commands that occur prior to the value string
|
||||
if (mtxt.StartsWith(" ")) mtxt = mtxt.Substring(1);
|
||||
mtxt = Regex.Replace(mtxt, @"\\v(\\[^v \\]+)* $", ""); // replace the rtf commands that occur after to the value string
|
||||
mtxt = Regex.Replace(mtxt, @"(\\ulnone|\\b0)+$", "");
|
||||
return mtxt;
|
||||
}
|
||||
private string GetValuePrefix(string Text, Match mlink, int lastlink)
|
||||
{
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
private string SuffixPattern(string suffix)
|
||||
{
|
||||
string firstchar = "";
|
||||
suffix = suffix.Replace("\r", "{CR}");
|
||||
suffix = suffix.Replace("\n", "{LF}");
|
||||
if (Regex.IsMatch(suffix, @"^(\\(b0|b|ulnone|ul))+\\"))
|
||||
{
|
||||
firstchar = "{RTFCommand}";
|
||||
suffix = Regex.Replace(suffix, @"^(\\(b0|b|ulnone|ul))+", "");
|
||||
}
|
||||
if (suffix == @"\v0 ")
|
||||
return @"Pattern','" + firstchar + @"\v0{Space}";
|
||||
if (suffix == @"\v0")
|
||||
return @"Pattern','" + firstchar + @"\v0";
|
||||
return _SelectedDatabase + "','" + suffix;
|
||||
}
|
||||
private string GetSuffix(string Text, Match mlink, int iEnd)
|
||||
{
|
||||
int iStart = mlink.Index + mlink.Length;
|
||||
//int iEnd = (mlink.NextMatch() == null) ? Text.Length : mlink.NextMatch().Index;
|
||||
string follows = Text.Substring(iStart,iEnd-iStart);
|
||||
int iEndComment = follows.IndexOf("\\v0");
|
||||
if (follows.Length > 3 + iEndComment)
|
||||
{
|
||||
if (follows.Substring(iEndComment + 3, 1) == " ")
|
||||
return follows.Substring(0, iEndComment + 4);
|
||||
if (follows.Substring(iEndComment + 3, 1) == "\\")
|
||||
return follows.Substring(0, iEndComment + 3);
|
||||
return follows.Substring(0, iEndComment + 3);
|
||||
}
|
||||
return follows;
|
||||
}
|
||||
public class DegreeComparer : IComparer<int>
|
||||
{
|
||||
#region IComparer<int> Members
|
||||
public int Compare(int x, int y)
|
||||
{
|
||||
if (x < y)
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
private string PrefixPattern(string prefix)
|
||||
{
|
||||
string firstchar = "";
|
||||
if(prefix.StartsWith(" "))
|
||||
{
|
||||
firstchar = "{Space}";
|
||||
prefix = prefix.Substring(1);
|
||||
}
|
||||
else if (prefix.StartsWith("\n"))
|
||||
{
|
||||
firstchar = "{Newline}";
|
||||
prefix = prefix.Substring(1);
|
||||
}
|
||||
else if (prefix.StartsWith("\xa0"))
|
||||
{
|
||||
firstchar = "{HardSpace}";
|
||||
prefix = prefix.Substring(1);
|
||||
}
|
||||
else if (Regex.IsMatch(prefix, @"^\\u[0-9]{1,4}\?"))
|
||||
{
|
||||
firstchar = "{Unicode}";
|
||||
prefix=Regex.Replace(prefix, @"^\\u[0-9]{1,4}\?","");
|
||||
}
|
||||
else if (Regex.IsMatch(prefix, @"^\\'[0-9a-fA-F]{2}"))
|
||||
{
|
||||
firstchar = "{Hexcode}";
|
||||
prefix = Regex.Replace(prefix, @"^\\'[0-9a-fA-F]{2}", "");
|
||||
}
|
||||
else if (Regex.IsMatch(prefix, @"^[:.()\[\]""*=<>]"))
|
||||
{
|
||||
firstchar = "{Punctuation}";
|
||||
prefix = Regex.Replace(prefix, @"^[:.()\[\]""*=<>]", "");
|
||||
}
|
||||
else if (Regex.IsMatch(prefix, @"^\\[{}~]"))
|
||||
{
|
||||
firstchar = "{Special}";
|
||||
prefix = Regex.Replace(prefix, @"^\\[{}~]", "");
|
||||
}
|
||||
else if (Regex.IsMatch(prefix, @"^\\(b0|b|ulnone|ul|line)\\"))
|
||||
{
|
||||
firstchar = "{RTFCommand}";
|
||||
prefix = Regex.Replace(prefix, @"^\\(b0|b|ulnone|ul|line)", "");
|
||||
}
|
||||
if (prefix == @"\v ")
|
||||
return @"Pattern','" + firstchar +@"\v ";
|
||||
//if (prefix == @" \v ")
|
||||
// return @"Pattern-{Space}\v ";
|
||||
//if (prefix == "\xA0\\v ")
|
||||
// return @"Pattern-{HardSpace}\v ";
|
||||
//if (Regex.IsMatch(prefix, @"^\\u[0-9]{1,4}\?\\v $"))
|
||||
// return @"Pattern-" + firstchar + @"{Unicode}\v ";
|
||||
//if (Regex.IsMatch(prefix, @"^\\u[0-9]{1,4}\?.*\\v $"))
|
||||
// return @"Pattern-" + firstchar + @"{Unicode}{Text}\v ";
|
||||
// if (Regex.IsMatch(prefix, @"^\\[{}~]\\v $"))
|
||||
// return @"Pattern-" + firstchar + @"{Special}\v ";
|
||||
// if (Regex.IsMatch(prefix, @"^ ?[()""\[\]]\\v $"))
|
||||
// return @"Pattern-" + firstchar + @"{Puctuation}\v ";
|
||||
if (Regex.IsMatch(prefix, @"^ ?[-%A-Za-z0-9.,/()\[\]]+\\v $"))
|
||||
return @"Pattern','" + firstchar + @"{Text}\v ";
|
||||
//if (prefix == "\n\\v ")
|
||||
// return @"Pattern-{Newline}\v ";
|
||||
return SelectedDatabase + "','" + prefix;
|
||||
}
|
||||
private string GetPrefix(string Text, Match mlink, int lastlink)
|
||||
{
|
||||
string precedes = Text.Substring(lastlink, mlink.Index - lastlink);
|
||||
if(mlink.Index - lastlink <= 3)
|
||||
return precedes;
|
||||
|
||||
if (precedes.EndsWith(@"\v "))
|
||||
{
|
||||
//int indexSpace = Text.LastIndexOf(' ', mlink.Index - 4);
|
||||
////if (indexSpace > mlink.Index) indexSpace = 0;
|
||||
//int indexCR = Text.LastIndexOf('\n', mlink.Index - 4);
|
||||
////if (indexCR > mlink.Index) indexCR = 0;
|
||||
//if (indexCR >= 0 && indexCR > indexSpace)
|
||||
// indexSpace = indexCR;
|
||||
//int indexHS = Text.LastIndexOf('\xA0', mlink.Index - 4);
|
||||
////if (indexHS > mlink.Index) indexHS = 0;
|
||||
//if (indexHS >= 0 && indexHS > indexSpace)
|
||||
// indexSpace = indexHS;
|
||||
int indexSpace = Text.LastIndexOfAny(" \n\xA0:.()[]\"<>*=".ToCharArray(), mlink.Index - 4);
|
||||
int indexSlash = Text.LastIndexOf('\\', mlink.Index - 4);
|
||||
if (indexSlash >= 0)
|
||||
{
|
||||
if (indexSlash > indexSpace)
|
||||
return Text.Substring(indexSlash, mlink.Index - indexSlash);
|
||||
}
|
||||
if (indexSpace >= 0)
|
||||
{
|
||||
return Text.Substring(indexSpace, mlink.Index - indexSpace);
|
||||
}
|
||||
}
|
||||
return precedes;
|
||||
}
|
||||
private void LoadContents()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection(_ConnectionString);
|
||||
cn.Open();
|
||||
//SqlDataAdapter da = new SqlDataAdapter("select ContentID,Text from Contents where ContentID in(select fromID from transitions union select contentid from rousages)", cn);
|
||||
SqlDataAdapter da = new SqlDataAdapter("select ContentID,Text from Contents where ContentID in(select fromID from transitions)", cn);
|
||||
da.SelectCommand.CommandTimeout = 300; // 300 sec timeout
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
da.Fill(ds);
|
||||
_MyContents = new Dictionary<int, string>();
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
{
|
||||
_MyContents.Add((int)dr["ContentID"], dr["Text"].ToString());
|
||||
}
|
||||
//MessageBox.Show(string.Format("{0} Content Records Found", ds.Tables[0].Rows.Count), "Contents Loaded", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message, ex.GetType().Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
throw (new Exception("Cannot Load Data List", ex));
|
||||
}
|
||||
cn.Close();
|
||||
}
|
||||
|
||||
private void allDBsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime tStart = DateTime.Now;
|
||||
ResetLinks();
|
||||
foreach (string dbName in DBNames)
|
||||
{
|
||||
SelectedDatabase = dbName;
|
||||
LoadContents();
|
||||
MyStatus = string.Format("{0} - {1} Contents", SelectedDatabase, _MyContents.Count);
|
||||
FindLinks();
|
||||
}
|
||||
//ShowLinks("All Databases");
|
||||
DateTime tEnd = DateTime.Now;
|
||||
TimeSpan ts = TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks);
|
||||
MyStatus = string.Format("{0:0.000} Seconds", ts.TotalSeconds);
|
||||
}
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
126
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.resx
Normal file
126
PROMS/AnalyzeLinx/FindLinx/frmFindLinx.resx
Normal file
@@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="Baseline.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="Baseline.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<Baseline.Properties.Settings>
|
||||
<setting name="Compare1" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="Compare2" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="Location" serializeAs="String">
|
||||
<value>0, 0</value>
|
||||
@@ -35,7 +35,7 @@
|
||||
<value>167</value>
|
||||
</setting>
|
||||
<setting name="Ignore" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
</Baseline.Properties.Settings>
|
||||
</userSettings>
|
||||
|
@@ -9,16 +9,15 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Baseline</RootNamespace>
|
||||
<AssemblyName>Baseline</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -36,9 +35,6 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -80,7 +76,6 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\DataSources\IgnoreLines.datasource" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
|
22
PROMS/ClassLibrary1/ClassLibrary1.sln
Normal file
22
PROMS/ClassLibrary1/ClassLibrary1.sln
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
12
PROMS/ClassLibrary1/ClassLibrary1/Class1.cs
Normal file
12
PROMS/ClassLibrary1/ClassLibrary1/Class1.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClassLibrary1
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
53
PROMS/ClassLibrary1/ClassLibrary1/ClassLibrary1.csproj
Normal file
53
PROMS/ClassLibrary1/ClassLibrary1/ClassLibrary1.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EEA3D698-C9BC-4A38-9D5F-B89CBC68B739}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ClassLibrary1</RootNamespace>
|
||||
<AssemblyName>ClassLibrary1</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
36
PROMS/ClassLibrary1/ClassLibrary1/Properties/AssemblyInfo.cs
Normal file
36
PROMS/ClassLibrary1/ClassLibrary1/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ClassLibrary1")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Windows User")]
|
||||
[assembly: AssemblyProduct("ClassLibrary1")]
|
||||
[assembly: AssemblyCopyright("Copyright © Windows User 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1223b3df-00ea-4978-8df2-cb49ac67e751")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
25
PROMS/CopyFormatsAndUpdateSQLDatabase.bat
Normal file
25
PROMS/CopyFormatsAndUpdateSQLDatabase.bat
Normal file
@@ -0,0 +1,25 @@
|
||||
@ECHO OFF
|
||||
if not exist g:\ goto :NoGDrive
|
||||
if "%1" NEQ "" goto :passedparam
|
||||
set /p DBNAME=Restore Database[%_DBNAME_TOG%]: || set DBNAME=%_DBNAME_TOG%
|
||||
SETX _DBNAME_TOG %DBNAME%
|
||||
goto :paramdone
|
||||
:passedparam
|
||||
set DBNAME=%1
|
||||
:paramdone
|
||||
xcopy C:\Development\Proms\Formats\fmtall\. c:\development\fmtall /Y
|
||||
if ERRORLEVEL 1 GOTO :OOPS
|
||||
xcopy c:\Development\Proms\Formats\genmacall\. c:\development\genmacall /Y
|
||||
if ERRORLEVEL 1 GOTO :OOPS
|
||||
for /F "tokens=1" %%i in ('"DIR /B /OD G:\Backup2008\%DBNAME%\*.bak"') DO SET _FileName=G:\Backup2008\%DBNAME%\%%i
|
||||
ECHO Copy Formats "%_FileName%" to VEPROMS_G%DBNAME%
|
||||
"C:\Development\Proms\VEPROMS User Interface\bin\Debug\VEPROMS.exe" /UF=C:\Development /P= /DB=._SQL2008Express:VEPROMS_G%DBNAME%
|
||||
if ERRORLEVEL 1 GOTO :OOPS
|
||||
ECHO Restored "%_FileName%" to VEPROMS_G%DBNAME%
|
||||
timeout /T 10
|
||||
goto :eof
|
||||
:NoGDrive
|
||||
Echo No G Drive
|
||||
:oops
|
||||
@ECHO ON
|
||||
Pause
|
@@ -0,0 +1,3 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
</assembly>
|
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Demo/dsoframer.res
Normal file
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Demo/dsoframer.res
Normal file
Binary file not shown.
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Demo/vc80.idb
Normal file
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Demo/vc80.idb
Normal file
Binary file not shown.
281
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframer.idl
Normal file
281
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframer.idl
Normal file
@@ -0,0 +1,281 @@
|
||||
/***************************************************************************
|
||||
* DSOFRAMER.IDL - DSO Framer ActiveX Control Type Library
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
/***************************************************************************
|
||||
*
|
||||
* IMPORTANT: You should not attempt to modify this library unless you are
|
||||
* sure you do not break binary compatibility, or you change all the GUIDs
|
||||
* listed in version.h so as to build a completely new control.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <olectl.h>
|
||||
#include "..\version.h"
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_TLIB), helpstring(DSOFRAMERCTL_FULLNAME),
|
||||
version(DSOFRAMERCTL_VERSION), lcid(0x0000), control
|
||||
]
|
||||
library DSOFramer
|
||||
{
|
||||
importlib("STDOLE2.TLB");
|
||||
|
||||
typedef enum dsoBorderStyle
|
||||
{
|
||||
dsoBorderNone = 0,
|
||||
dsoBorderFlat,
|
||||
dsoBorder3D,
|
||||
dsoBorder3DThin
|
||||
} dsoBorderStyle;
|
||||
|
||||
typedef enum dsoShowDialogType
|
||||
{
|
||||
dsoDialogNew = 0,
|
||||
dsoDialogOpen,
|
||||
dsoDialogSave,
|
||||
dsoDialogSaveCopy,
|
||||
dsoDialogPrint,
|
||||
dsoDialogPageSetup,
|
||||
dsoDialogProperties
|
||||
} dsoShowDialogType;
|
||||
|
||||
typedef enum dsoFileCommandType
|
||||
{
|
||||
dsoFileNew = 0,
|
||||
dsoFileOpen,
|
||||
dsoFileClose,
|
||||
dsoFileSave,
|
||||
dsoFileSaveAs,
|
||||
dsoFilePrint,
|
||||
dsoFilePageSetup,
|
||||
dsoFileProperties,
|
||||
dsoFilePrintPreview
|
||||
} dsoFileCommandType;
|
||||
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_INTERFACE), hidden, version(DSOFRAMERCTL_VERSION),
|
||||
dual, oleautomation, odl
|
||||
]
|
||||
interface _FramerControl : IDispatch
|
||||
{
|
||||
[id(0x00010001), helpstring("Activates the current document object.")]
|
||||
HRESULT Activate();
|
||||
|
||||
[propget, id(0x00010002), helpstring("Returns the Automation interface of the document object.")]
|
||||
HRESULT ActiveDocument([out,retval] IDispatch** ppdisp);
|
||||
|
||||
[id(0x00010003), helpstring("Creates a new document based on the ProgId or Template file provided.")]
|
||||
HRESULT CreateNew([in] BSTR ProgIdOrTemplate);
|
||||
|
||||
[id(0x00010004), helpstring("Opens a document from a file, URL, or Automation object.")]
|
||||
HRESULT Open([in] VARIANT Document, [in, optional] VARIANT ReadOnly, [in, optional] VARIANT ProgId, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword);
|
||||
|
||||
[id(0x00010005), helpstring("Saves the document to specified location or its original location.")]
|
||||
HRESULT Save([in, optional] VARIANT SaveAsDocument, [in, optional] VARIANT OverwriteExisting, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword);
|
||||
|
||||
[id(0x00010008), hidden]
|
||||
HRESULT _PrintOutOld([in, optional] VARIANT PromptToSelectPrinter);
|
||||
|
||||
[id(0x00010009), helpstring("Closes the currently open document.")]
|
||||
HRESULT Close();
|
||||
|
||||
[propput, id(0x0001000A), helpstring("Returns/sets the titlebar caption.")]
|
||||
HRESULT Caption([in] BSTR bstr);
|
||||
[propget, id(0x0001000A)]
|
||||
HRESULT Caption([out,retval] BSTR* pbstr);
|
||||
|
||||
[propput, id(0x0001000B), helpstring("Returns/sets whether the titlebar should be displayed.")]
|
||||
HRESULT Titlebar([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000B)]
|
||||
HRESULT Titlebar([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x0001000C), helpstring("Returns/sets whether toolbars should be displayed.")]
|
||||
HRESULT Toolbars([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000C)]
|
||||
HRESULT Toolbars([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, nonbrowsable, id(0x0001000D), helpstring("Returns/sets the controls modal state.")]
|
||||
HRESULT ModalState([in] VARIANT_BOOL vbool);
|
||||
[propget, nonbrowsable, id(0x0001000D)]
|
||||
HRESULT ModalState([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[id(0x0001000E), helpstring("Displays a modal dialog of the given type for user action.")]
|
||||
HRESULT ShowDialog([in] dsoShowDialogType DlgType);
|
||||
|
||||
[propput, id(0x0001000F), helpstring("Returns/sets whether a specific action item is enabled.")]
|
||||
HRESULT EnableFileCommand([in] dsoFileCommandType Item, [in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000F)]
|
||||
HRESULT EnableFileCommand([in] dsoFileCommandType Item, [out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(DISPID_BORDERSTYLE), helpstring("Returns/sets the border style for the control.")]
|
||||
HRESULT BorderStyle([in] dsoBorderStyle style);
|
||||
[propget, id(DISPID_BORDERSTYLE)]
|
||||
HRESULT BorderStyle([out, retval] dsoBorderStyle* pstyle);
|
||||
|
||||
[propput, id(DISPID_BORDERCOLOR), helpstring("Returns/sets the border color of the control.")]
|
||||
HRESULT BorderColor([in] OLE_COLOR clr);
|
||||
[propget, id(DISPID_BORDERCOLOR)]
|
||||
HRESULT BorderColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(DISPID_BACKCOLOR), helpstring("Returns/sets the background color of the control.")]
|
||||
HRESULT BackColor([in] OLE_COLOR clr);
|
||||
[propget, id(DISPID_BACKCOLOR)]
|
||||
HRESULT BackColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(DISPID_FORECOLOR), helpstring("Returns/sets the foreground color of the control.")]
|
||||
HRESULT ForeColor([in]OLE_COLOR clr);
|
||||
[propget, id(DISPID_FORECOLOR)]
|
||||
HRESULT ForeColor([out,retval]OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(0x00010010), helpstring("Returns/sets the color of the titlebar.")]
|
||||
HRESULT TitlebarColor([in] OLE_COLOR clr);
|
||||
[propget, id(0x00010010)]
|
||||
HRESULT TitlebarColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(0x00010011), helpstring("Returns/sets the color of text for the titlebar.")]
|
||||
HRESULT TitlebarTextColor([in] OLE_COLOR clr);
|
||||
[propget, id(0x00010011)]
|
||||
HRESULT TitlebarTextColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[id(0x00010012), helpstring("Calls IOleCommandTarget::Exec on embedded object.")]
|
||||
HRESULT ExecOleCommand([in] LONG OLECMDID, [in, optional] VARIANT Options, [in, optional] VARIANT* vInParam, [in, out, optional] VARIANT* vInOutParam);
|
||||
|
||||
[propput, id(0x00010013), helpstring("Returns/sets whether a menu bar should be displayed.")]
|
||||
HRESULT Menubar([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x00010013)]
|
||||
HRESULT Menubar([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x00010014), helpstring("Returns/sets host application name (used in embedding).")]
|
||||
HRESULT HostName([in] BSTR bstr);
|
||||
[propget, id(0x00010014)]
|
||||
HRESULT HostName([out,retval] BSTR* pbstr);
|
||||
|
||||
[propget, id(0x00010015), helpstring("Returns full document path name for object.")]
|
||||
HRESULT DocumentFullName([out,retval] BSTR* pbstr);
|
||||
|
||||
[id(0x00010016), helpstring("Prints current document to specific printer with settings.")]
|
||||
HRESULT PrintOut([in, optional] VARIANT PromptUser, [in, optional] VARIANT PrinterName, [in, optional] VARIANT Copies,
|
||||
[in, optional] VARIANT FromPage, [in, optional] VARIANT ToPage, [in, optional] VARIANT OutputFile);
|
||||
|
||||
[id(0x00010017), helpstring("Starts a print preview (if document supports it).")]
|
||||
HRESULT PrintPreview();
|
||||
|
||||
[id(0x00010018), helpstring("Exits a current print preview.")]
|
||||
HRESULT PrintPreviewExit();
|
||||
|
||||
[propget, id(0x00010019), helpstring("Returns True/False if file was open read-only, or has not been saved.")]
|
||||
HRESULT IsReadOnly([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propget, id(0x0001001A), helpstring("Returns True/False if file has been altered or needs save.")]
|
||||
HRESULT IsDirty([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x0001001B), helpstring("Sets lock on the current embed server to keep it running (document must be open first).")]
|
||||
HRESULT LockServer([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001001B)]
|
||||
HRESULT LockServer([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[id(0x0001001C), nonbrowsable, helpstring("Gets the content of the body of the document (excluding headers/footers).")]
|
||||
HRESULT GetDataObjectContent([in] VARIANT ClipFormatNameOrNumber, [out,retval] VARIANT *pvResults);
|
||||
|
||||
[id(0x0001001D), nonbrowsable, helpstring("Sets the content of the body of the document.")]
|
||||
HRESULT SetDataObjectContent([in] VARIANT ClipFormatNameOrNumber, [in] VARIANT DataByteArray);
|
||||
|
||||
[propput, id(0x0001001E), helpstring("Allows host to set policy on activation behavior.")]
|
||||
HRESULT ActivationPolicy([in] enum dsoActivationPolicy lPolicy);
|
||||
[propget, id(0x0001001E)]
|
||||
HRESULT ActivationPolicy([out,retval] enum dsoActivationPolicy *plPolicy);
|
||||
|
||||
[propput, id(0x0001001F), helpstring("Allows host to set policy on use of the frame hook.")]
|
||||
HRESULT FrameHookPolicy([in] enum dsoFrameHookPolicy lPolicy);
|
||||
[propget, id(0x0001001F)]
|
||||
HRESULT FrameHookPolicy([out,retval] enum dsoFrameHookPolicy *plPolicy);
|
||||
|
||||
[propput, id(0x00010020), helpstring("Gets/sets whether control should try to handle menu accelerators or pass to host window.")]
|
||||
HRESULT MenuAccelerators([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x00010020)]
|
||||
HRESULT MenuAccelerators([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[propput, nonbrowsable, id(0x00010021), helpstring("Gets/sets whether control events are raised.")]
|
||||
HRESULT EventsEnabled([in] VARIANT_BOOL vbool);
|
||||
[propget, nonbrowsable, id(0x00010021)]
|
||||
HRESULT EventsEnabled([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[propget, id(0x00010022), helpstring("Returns just the document name (excluding path).")]
|
||||
HRESULT DocumentName([out,retval] BSTR* pbstr);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_DISPEVTS), hidden
|
||||
]
|
||||
dispinterface _DFramerCtlEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(DSOF_DISPID_FILECMD), helpstring("Called when File menu item is selected by user (may be canceled).")]
|
||||
HRESULT OnFileCommand([in] dsoFileCommandType Item, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_DOCOPEN), helpstring("Called when document is opened or new document added.")]
|
||||
HRESULT OnDocumentOpened([in] BSTR File, [in] IDispatch* Document);
|
||||
|
||||
[id(DSOF_DISPID_DOCCLOSE), helpstring("Called when document is closed.")]
|
||||
HRESULT OnDocumentClosed();
|
||||
|
||||
[id(DSOF_DISPID_ACTIVATE), helpstring("Called when component gains/loses activation.")]
|
||||
HRESULT OnActivationChange([in] VARIANT_BOOL fGoingActive);
|
||||
|
||||
[id(DSOF_DISPID_BDOCCLOSE), helpstring("Called before document is closed (may be canceled).")]
|
||||
HRESULT BeforeDocumentClosed([in] IDispatch* Document, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_BDOCSAVE), helpstring("Called before document is saved (may be canceled).")]
|
||||
HRESULT BeforeDocumentSaved([in] IDispatch* Document, [in] BSTR Location, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_ENDPREVIEW), helpstring("Called when print preview is closed.")]
|
||||
HRESULT OnPrintPreviewExit();
|
||||
|
||||
[id(DSOF_DISPID_SAVECOMPLETE), helpstring("Called when save is successful.")]
|
||||
HRESULT OnSaveCompleted([in] IDispatch* Document, [in] BSTR DocName, [in] BSTR FullFileLocation);
|
||||
|
||||
};
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_CLSID),
|
||||
helpstring(DSOFRAMERCTL_SHORTNAME), control
|
||||
]
|
||||
coclass FramerControl
|
||||
{
|
||||
[default] interface _FramerControl;
|
||||
[default, source] dispinterface _DFramerCtlEvents;
|
||||
};
|
||||
|
||||
|
||||
typedef enum dsoFrameHookPolicy
|
||||
{
|
||||
dsoNormalBehavior = 0,
|
||||
dsoSetOnFirstOpen,
|
||||
dsoResetNow,
|
||||
dsoDisableHook = 0xFFFFFFFF
|
||||
} dsoFrameHookPolicy;
|
||||
|
||||
typedef enum dsoActivationPolicy
|
||||
{
|
||||
dsoDefaultBehavior = 0,
|
||||
dsoKeepUIActiveOnAppDeactive = 0x01,
|
||||
dsoCompDeactivateOnLostFocus = 0x02,
|
||||
dsoIPDeactivateOnCompDeactive = 0x04
|
||||
} dsoActivationPolicy;
|
||||
|
||||
};
|
||||
|
88
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframerlib.c
Normal file
88
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframerlib.c
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
|
||||
|
||||
/* link this file in with the server and any clients */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 6.00.0366 */
|
||||
/* at Tue Aug 25 13:23:33 2009
|
||||
*/
|
||||
/* Compiler settings for .\Lib\dsoframer.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run)
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
//@@MIDL_FILE_HEADING( )
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#ifdef _MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef INITGUID
|
||||
#define INITGUID
|
||||
#include <guiddef.h>
|
||||
#undef INITGUID
|
||||
#else
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
|
||||
|
||||
#else // !_MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef __IID_DEFINED__
|
||||
#define __IID_DEFINED__
|
||||
|
||||
typedef struct _IID
|
||||
{
|
||||
unsigned long x;
|
||||
unsigned short s1;
|
||||
unsigned short s2;
|
||||
unsigned char c[8];
|
||||
} IID;
|
||||
|
||||
#endif // __IID_DEFINED__
|
||||
|
||||
#ifndef CLSID_DEFINED
|
||||
#define CLSID_DEFINED
|
||||
typedef IID CLSID;
|
||||
#endif // CLSID_DEFINED
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
|
||||
#endif !_MIDL_USE_GUIDDEF_
|
||||
|
||||
MIDL_DEFINE_GUID(IID, LIBID_DSOFramer,0x00460180,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(IID, IID__FramerControl,0x00460181,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(IID, DIID__DFramerCtlEvents,0x00460185,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(CLSID, CLSID_FramerControl,0x00460182,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
#undef MIDL_DEFINE_GUID
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
1601
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframerlib.h
Normal file
1601
PROMS/DSOFramer/DSOFramer/Source2005/Lib/dsoframerlib.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Res/dso.ico
Normal file
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Res/dso.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
154
PROMS/DSOFramer/DSOFramer/Source2005/Res/dsoframer.rc
Normal file
154
PROMS/DSOFramer/DSOFramer/Source2005/Res/dsoframer.rc
Normal file
@@ -0,0 +1,154 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "..\version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TYPELIB
|
||||
//
|
||||
#ifdef _DEBUG
|
||||
IDR_TYPELIB TYPELIB DISCARDABLE "..\\Debug\\dsoframer.tlb"
|
||||
#else
|
||||
IDR_TYPELIB TYPELIB DISCARDABLE "..\\Release\\dsoframer.tlb"
|
||||
#endif // _DEBUG
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION DSOFRAMERCTL_VERSION_MAJOR,DSOFRAMERCTL_VERSION_MINOR,DSOFRAMERCTL_VERSION_BUILD,0
|
||||
PRODUCTVERSION DSOFRAMERCTL_VERSION_MAJOR,DSOFRAMERCTL_VERSION_MINOR,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "UNSUPPORTED BY MICROSOFT\0"
|
||||
VALUE "CompanyName", "Your Company\0"
|
||||
VALUE "FileDescription", "Your Company's Office Framer Control Sample\0"
|
||||
VALUE "FileVersion", DSOFRAMERCTL_VERSIONSTRFULL "\0"
|
||||
VALUE "OriginalFilename", "dsoframer.ocx\0"
|
||||
VALUE "ProductName", "DSOFRAMER\0"
|
||||
VALUE "ProductVersion", DSOFRAMERCTL_VERSIONSTR "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_TOOLBOX BITMAP DISCARDABLE "toolbox.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_SMALLOFFDOC ICON DISCARDABLE "dso.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
RES_DSO_E_UNKNOWN "An unknown problem has occurred."
|
||||
RES_DSO_E_INVALIDPROGID "The ProgID/Template could not be found or is not associated with a COM server."
|
||||
RES_DSO_E_INVALIDSERVER "The associated COM server does not support ActiveX Document embedding."
|
||||
RES_DSO_E_COMMANDNOTSUPPORTED
|
||||
"The command is not supported by the document server."
|
||||
RES_DSO_E_DOCUMENTREADONLY
|
||||
"Unable to perform action because document was opened in read-only mode."
|
||||
RES_DSO_E_REQUIRESMSDAIPP
|
||||
"The Microsoft Internet Publishing Provider is not installed, so the URL document cannot be open for write access."
|
||||
RES_DSO_E_DOCUMENTNOTOPEN "No document is open to perform the operation requested."
|
||||
RES_DSO_E_INMODALSTATE "Cannot access document when in modal condition."
|
||||
RES_DSO_E_NOTBEENSAVED "Cannot Save file without a file path."
|
||||
RES_DSO_E_FRAMEHOOKFAILED "Unable to set frame hook for the parent window."
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
39
PROMS/DSOFramer/DSOFramer/Source2005/Res/resource.h
Normal file
39
PROMS/DSOFramer/DSOFramer/Source2005/Res/resource.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by dsoframer.rc
|
||||
//
|
||||
#define IDR_TYPELIB 1
|
||||
#define RES_DSO_E_UNKNOWN 1
|
||||
#define RES_DSO_E_INVALIDPROGID 2
|
||||
#define RES_DSO_E_INVALIDSERVER 3
|
||||
#define RES_DSO_E_COMMANDNOTSUPPORTED 4
|
||||
#define RES_DSO_E_DOCUMENTREADONLY 5
|
||||
#define RES_DSO_E_REQUIRESMSDAIPP 6
|
||||
#define RES_DSO_E_DOCUMENTNOTOPEN 7
|
||||
#define RES_DSO_E_INMODALSTATE 8
|
||||
#define RES_DSO_E_NOTBEENSAVED 9
|
||||
#define RES_DSO_E_FRAMEHOOKFAILED 10
|
||||
#define IDB_TOOLBOX 102
|
||||
#define IDB_TOOLBAR 103
|
||||
#define IDR_BINDMENU 104
|
||||
#define IDI_SMALLOFFDOC 105
|
||||
#define MNU_NEW 40001
|
||||
#define MNU_OPEN 40002
|
||||
#define MNU_CLOSE 40003
|
||||
#define MNU_SAVE 40004
|
||||
#define MNU_SAVEAS 40005
|
||||
#define MNU_PGSETUP 40006
|
||||
#define MNU_PRINT 40007
|
||||
#define MNU_PROPS 40008
|
||||
#define MNU_PRINTPV 40009
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 107
|
||||
#define _APS_NEXT_COMMAND_VALUE 40011
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Res/toolbox.bmp
Normal file
BIN
PROMS/DSOFramer/DSOFramer/Source2005/Res/toolbox.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 334 B |
118
PROMS/DSOFramer/DSOFramer/Source2005/classfactory.cpp
Normal file
118
PROMS/DSOFramer/DSOFramer/Source2005/classfactory.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/***************************************************************************
|
||||
* CLASSFACTORY.CPP
|
||||
*
|
||||
* CDsoFramerClassFactory: The Class Factroy for the control.
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include "dsoframer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory - IClassFactory Implementation
|
||||
//
|
||||
// This is a fairly simple CF. We don't provide support for licensing
|
||||
// in this sample because it is just a sample. If licensing is important
|
||||
// you should change the class to support IClassFactory2.
|
||||
//
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory::QueryInterface
|
||||
//
|
||||
STDMETHODIMP CDsoFramerClassFactory::QueryInterface(REFIID riid, void** ppv)
|
||||
{
|
||||
ODS("CDsoFramerClassFactory::QueryInterface\n");
|
||||
CHECK_NULL_RETURN(ppv, E_POINTER);
|
||||
|
||||
if ((IID_IUnknown == riid) || (IID_IClassFactory == riid))
|
||||
{
|
||||
SAFE_SET_INTERFACE(*ppv, (IClassFactory*)this);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory::AddRef
|
||||
//
|
||||
STDMETHODIMP_(ULONG) CDsoFramerClassFactory::AddRef(void)
|
||||
{
|
||||
TRACE1("CDsoFramerClassFactory::AddRef - %d\n", m_cRef+1);
|
||||
return ++m_cRef;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory::Release
|
||||
//
|
||||
STDMETHODIMP_(ULONG) CDsoFramerClassFactory::Release(void)
|
||||
{
|
||||
TRACE1("CDsoFramerClassFactory::Release - %d\n", m_cRef-1);
|
||||
if (0 != --m_cRef) return m_cRef;
|
||||
|
||||
ODS("CDsoFramerClassFactory delete\n");
|
||||
InterlockedDecrement((LPLONG)&v_cLocks);
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory::CreateInstance
|
||||
//
|
||||
// Creates an instance of our control.
|
||||
//
|
||||
STDMETHODIMP CDsoFramerClassFactory::CreateInstance(LPUNKNOWN punk, REFIID riid, void** ppv)
|
||||
{
|
||||
HRESULT hr;
|
||||
CDsoFramerControl* pocx;
|
||||
IUnknown* pnkInternal;
|
||||
|
||||
ODS("CDsoFramerClassFactory::CreateInstance\n");
|
||||
CHECK_NULL_RETURN(ppv, E_POINTER); *ppv = NULL;
|
||||
|
||||
// Aggregation requires you ask for (internal) IUnknown
|
||||
if ((punk) && (riid != IID_IUnknown))
|
||||
return E_INVALIDARG;
|
||||
|
||||
// Create a new instance of the control...
|
||||
pocx = new CDsoFramerControl(punk);
|
||||
CHECK_NULL_RETURN(pocx, E_OUTOFMEMORY);
|
||||
|
||||
// Grab the internal IUnknown to use for the QI (you don't agg in CF:CreateInstance)...
|
||||
pnkInternal = (IUnknown*)&(pocx->m_xInternalUnknown);
|
||||
|
||||
// Initialize the control (windows, etc.) and QI for requested interface...
|
||||
if (SUCCEEDED(hr = pocx->InitializeNewInstance()) &&
|
||||
SUCCEEDED(hr = pnkInternal->QueryInterface(riid, ppv)))
|
||||
{
|
||||
InterlockedIncrement((LPLONG)&v_cLocks); // on success, bump up the lock count...
|
||||
}
|
||||
else {delete pocx; *ppv = NULL;} // else cleanup the object
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerClassFactory::LockServer
|
||||
//
|
||||
// Keeps the server loaded in memory.
|
||||
//
|
||||
STDMETHODIMP CDsoFramerClassFactory::LockServer(BOOL fLock)
|
||||
{
|
||||
TRACE1("CDsoFramerClassFactory::LockServer - %d\n", fLock);
|
||||
if (fLock) InterlockedIncrement((LPLONG)&v_cLocks);
|
||||
else InterlockedDecrement((LPLONG)&v_cLocks);
|
||||
return S_OK;
|
||||
}
|
||||
|
1321
PROMS/DSOFramer/DSOFramer/Source2005/dsofauto.cpp
Normal file
1321
PROMS/DSOFramer/DSOFramer/Source2005/dsofauto.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4313
PROMS/DSOFramer/DSOFramer/Source2005/dsofcontrol.cpp
Normal file
4313
PROMS/DSOFramer/DSOFramer/Source2005/dsofcontrol.cpp
Normal file
File diff suppressed because it is too large
Load Diff
3253
PROMS/DSOFramer/DSOFramer/Source2005/dsofdocobj.cpp
Normal file
3253
PROMS/DSOFramer/DSOFramer/Source2005/dsofdocobj.cpp
Normal file
File diff suppressed because it is too large
Load Diff
350
PROMS/DSOFramer/DSOFramer/Source2005/dsofdocobj.h
Normal file
350
PROMS/DSOFramer/DSOFramer/Source2005/dsofdocobj.h
Normal file
@@ -0,0 +1,350 @@
|
||||
/***************************************************************************
|
||||
* DSOFDOCOBJ.H
|
||||
*
|
||||
* DSOFramer: OLE DocObject Site component (used by the control)
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef DS_DSOFDOCOBJ_H
|
||||
#define DS_DSOFDOCOBJ_H
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Declarations for Interfaces used in DocObject Containment
|
||||
//
|
||||
#include <docobj.h> // Standard DocObjects (common to all AxDocs)
|
||||
#include "ipprevw.h" // PrintPreview (for select Office apps)
|
||||
#include "rbbinder.h" // Internet Publishing (for Web Folder write access)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Microsoft Office 97-2003 Document Object GUIDs
|
||||
//
|
||||
DEFINE_GUID(CLSID_WORD_DOCUMENT_DOC, 0x00020906, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_EXCEL_WORKBOOK_XLS, 0x00020820, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_EXCEL_CHART_XLS, 0x00020821, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_PPT_PRESENTATION_PPT, 0x64818D10, 0x4F9B, 0x11CF, 0x86, 0xEA, 0x00, 0xAA, 0x00, 0xB9, 0x29, 0xE8);
|
||||
DEFINE_GUID(CLSID_VISIO_DRAWING_VSD, 0x00021A13, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_PROJECT_DOCUMENT_MPP, 0x74B78F3A, 0xC8C8, 0x11D1, 0xBE, 0x11, 0x00, 0xC0, 0x4F, 0xB6, 0xFA, 0xF1);
|
||||
DEFINE_GUID(CLSID_MSHTML_DOCUMENT, 0x25336920, 0x03F9, 0x11CF, 0x8F, 0xD0, 0x00, 0xAA, 0x00, 0x68, 0x6F, 0x13);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Microsoft Office 2007 Document GUIDs
|
||||
//
|
||||
DEFINE_GUID(CLSID_WORD_DOCUMENT_DOCX, 0xF4754C9B, 0x64F5, 0x4B40, 0x8A, 0xF4, 0x67, 0x97, 0x32, 0xAC, 0x06, 0x07);
|
||||
DEFINE_GUID(CLSID_WORD_DOCUMENT_DOCM, 0x18A06B6B, 0x2F3F, 0x4E2B, 0xA6, 0x11, 0x52, 0xBE, 0x63, 0x1B, 0x2D, 0x22);
|
||||
DEFINE_GUID(CLSID_EXCEL_WORKBOOK_XLSX, 0x00020830, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_EXCEL_WORKBOOK_XLSM, 0x00020832, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_EXCEL_WORKBOOK_XLSB, 0x00020833, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
DEFINE_GUID(CLSID_PPT_PRESENTATION_PPTX, 0xCF4F55F4, 0x8F87, 0x4D47, 0x80, 0xBB, 0x58, 0x08, 0x16, 0x4B, 0xB3, 0xF8);
|
||||
DEFINE_GUID(CLSID_PPT_PRESENTATION_PPTM, 0xDC020317, 0xE6E2, 0x4A62, 0xB9, 0xFA, 0xB3, 0xEF, 0xE1, 0x66, 0x26, 0xF4);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// IDsoDocObjectSite -- {444CA1F7-B405-4002-95C3-A455BC9F4F55}
|
||||
//
|
||||
// Implemented by control host for callbacks. Required interface.
|
||||
//
|
||||
interface IDsoDocObjectSite : public IServiceProvider
|
||||
{
|
||||
STDMETHOD(GetWindow)(HWND* phWnd) PURE;
|
||||
STDMETHOD(GetBorder)(LPRECT prcBorder) PURE;
|
||||
STDMETHOD(SetStatusText)(LPCOLESTR pszText) PURE;
|
||||
STDMETHOD(GetHostName)(LPWSTR *ppwszHostName) PURE;
|
||||
STDMETHOD(SysMenuCommand)(UINT uiCharCode) PURE;
|
||||
};
|
||||
DEFINE_GUID(IID_IDsoDocObjectSite, 0x444CA1F7, 0xB405, 0x4002, 0x95, 0xC3, 0xA4, 0x55, 0xBC, 0x9F, 0x4F, 0x55);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// CDsoDocObject -- ActiveDocument Container Site Object
|
||||
//
|
||||
// The CDsoDocObject object handles all the DocObject embedding for the
|
||||
// control and os fairly self-contained. Like the control it has its
|
||||
// own window, but it merely acts as a parent for the embedded object
|
||||
// window(s) which it activates.
|
||||
//
|
||||
// CDsoDocObject works by taking a file (or automation object) and
|
||||
// copying out the OLE storage used for its persistent data. It then
|
||||
// creates a new embedding based on the data. If a storage is not
|
||||
// avaiable, it will attempt to oad the file directly, but the results
|
||||
// are less predictable using this manner since DocObjects are embeddings
|
||||
// and not links and this component has limited support for links. As a
|
||||
// result, we will attempt to keep our own storage copy in most cases.
|
||||
//
|
||||
// You should note that this approach is different than one taken by the
|
||||
// web browser control, which is basically a link container which will
|
||||
// try to embed (ip activate) if allowed, but if not it opens the file
|
||||
// externally and keeps the link. If CDsoDocObject cannot embed the object,
|
||||
// it returns an error. It will not open the object external.
|
||||
//
|
||||
// Like the control, this object also uses nested classes for the OLE
|
||||
// interfaces used in the embedding. They are easier to track and easier
|
||||
// to debug if a specific interface is over/under released. Again this was
|
||||
// a design decision to make the sample easier to break apart, but not required.
|
||||
//
|
||||
// Because the object is not tied to the top-level window, it constructs
|
||||
// the OLE merged menu as a set of popup menus which the control then displays
|
||||
// in whatever form it wants. You would need to customize this if you used
|
||||
// the control in a host and wanted the menus to merge with the actual host
|
||||
// menu bar (on the top-level window or form).
|
||||
//
|
||||
class CDsoDocObject : public IUnknown
|
||||
{
|
||||
public:
|
||||
CDsoDocObject();
|
||||
~CDsoDocObject();
|
||||
|
||||
// Static Create Method (Host Provides Site Interface)
|
||||
static STDMETHODIMP_(CDsoDocObject*) CreateInstance(IDsoDocObjectSite* phost);
|
||||
|
||||
// IUnknown Implementation
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
|
||||
STDMETHODIMP_(ULONG) AddRef(void);
|
||||
STDMETHODIMP_(ULONG) Release(void);
|
||||
|
||||
// IOleClientSite Implementation
|
||||
BEGIN_INTERFACE_PART(OleClientSite, IOleClientSite)
|
||||
STDMETHODIMP SaveObject(void);
|
||||
STDMETHODIMP GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker** ppmk);
|
||||
STDMETHODIMP GetContainer(IOleContainer** ppContainer);
|
||||
STDMETHODIMP ShowObject(void);
|
||||
STDMETHODIMP OnShowWindow(BOOL fShow);
|
||||
STDMETHODIMP RequestNewObjectLayout(void);
|
||||
END_INTERFACE_PART(OleClientSite)
|
||||
|
||||
// IOleInPlaceSite Implementation
|
||||
BEGIN_INTERFACE_PART(OleInPlaceSite, IOleInPlaceSite)
|
||||
STDMETHODIMP GetWindow(HWND* phwnd);
|
||||
STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);
|
||||
STDMETHODIMP CanInPlaceActivate(void);
|
||||
STDMETHODIMP OnInPlaceActivate(void);
|
||||
STDMETHODIMP OnUIActivate(void);
|
||||
STDMETHODIMP GetWindowContext(IOleInPlaceFrame** ppFrame, IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo);
|
||||
STDMETHODIMP Scroll(SIZE sz);
|
||||
STDMETHODIMP OnUIDeactivate(BOOL fUndoable);
|
||||
STDMETHODIMP OnInPlaceDeactivate(void);
|
||||
STDMETHODIMP DiscardUndoState(void);
|
||||
STDMETHODIMP DeactivateAndUndo(void);
|
||||
STDMETHODIMP OnPosRectChange(LPCRECT lprcPosRect);
|
||||
END_INTERFACE_PART(OleInPlaceSite)
|
||||
|
||||
// IOleDocumentSite Implementation
|
||||
BEGIN_INTERFACE_PART(OleDocumentSite, IOleDocumentSite)
|
||||
STDMETHODIMP ActivateMe(IOleDocumentView* pView);
|
||||
END_INTERFACE_PART(OleDocumentSite)
|
||||
|
||||
// IOleInPlaceFrame Implementation
|
||||
BEGIN_INTERFACE_PART(OleInPlaceFrame, IOleInPlaceFrame)
|
||||
STDMETHODIMP GetWindow(HWND* phWnd);
|
||||
STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);
|
||||
STDMETHODIMP GetBorder(LPRECT prcBorder);
|
||||
STDMETHODIMP RequestBorderSpace(LPCBORDERWIDTHS pBW);
|
||||
STDMETHODIMP SetBorderSpace(LPCBORDERWIDTHS pBW);
|
||||
STDMETHODIMP SetActiveObject(LPOLEINPLACEACTIVEOBJECT pIIPActiveObj, LPCOLESTR pszObj);
|
||||
STDMETHODIMP InsertMenus(HMENU hMenu, LPOLEMENUGROUPWIDTHS pMGW);
|
||||
STDMETHODIMP SetMenu(HMENU hMenu, HOLEMENU hOLEMenu, HWND hWndObj);
|
||||
STDMETHODIMP RemoveMenus(HMENU hMenu);
|
||||
STDMETHODIMP SetStatusText(LPCOLESTR pszText);
|
||||
STDMETHODIMP EnableModeless(BOOL fEnable);
|
||||
STDMETHODIMP TranslateAccelerator(LPMSG pMSG, WORD wID);
|
||||
END_INTERFACE_PART(OleInPlaceFrame)
|
||||
|
||||
// IOleCommandTarget Implementation
|
||||
BEGIN_INTERFACE_PART(OleCommandTarget , IOleCommandTarget)
|
||||
STDMETHODIMP QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText);
|
||||
STDMETHODIMP Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvaIn, VARIANTARG *pvaOut);
|
||||
END_INTERFACE_PART(OleCommandTarget)
|
||||
|
||||
// IServiceProvider Implementation
|
||||
BEGIN_INTERFACE_PART(ServiceProvider , IServiceProvider)
|
||||
STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void **ppv);
|
||||
END_INTERFACE_PART(ServiceProvider)
|
||||
|
||||
// IAuthenticate Implementation
|
||||
BEGIN_INTERFACE_PART(Authenticate , IAuthenticate)
|
||||
STDMETHODIMP Authenticate(HWND *phwnd, LPWSTR *pszUsername, LPWSTR *pszPassword);
|
||||
END_INTERFACE_PART(Authenticate)
|
||||
|
||||
// IContinueCallback Implementation
|
||||
BEGIN_INTERFACE_PART(ContinueCallback , IContinueCallback)
|
||||
STDMETHODIMP FContinue(void);
|
||||
STDMETHODIMP FContinuePrinting(LONG cPagesPrinted, LONG nCurrentPage, LPOLESTR pwszPrintStatus);
|
||||
END_INTERFACE_PART(ContinueCallback)
|
||||
|
||||
// IOlePreviewCallback Implementation
|
||||
BEGIN_INTERFACE_PART(PreviewCallback , IOlePreviewCallback)
|
||||
STDMETHODIMP Notify(DWORD wStatus, LONG nLastPage, LPOLESTR pwszPreviewStatus);
|
||||
END_INTERFACE_PART(PreviewCallback)
|
||||
|
||||
// DocObject Class Methods IDsoDocObjectSite
|
||||
STDMETHODIMP InitializeNewInstance(IDsoDocObjectSite* phost);
|
||||
STDMETHODIMP CreateDocObject(REFCLSID rclsid);
|
||||
STDMETHODIMP CreateDocObject(IStorage *pstg);
|
||||
STDMETHODIMP CreateFromFile(LPWSTR pwszFile, REFCLSID rclsid, LPBIND_OPTS pbndopts);
|
||||
STDMETHODIMP CreateFromURL(LPWSTR pwszUrlFile, REFCLSID rclsid, LPBIND_OPTS pbndopts, LPWSTR pwszUserName, LPWSTR pwszPassword);
|
||||
STDMETHODIMP CreateFromRunningObject(LPUNKNOWN punkObj, LPWSTR pwszObjectName, LPBIND_OPTS pbndopts);
|
||||
STDMETHODIMP IPActivateView();
|
||||
STDMETHODIMP IPDeactivateView();
|
||||
STDMETHODIMP UIActivateView();
|
||||
STDMETHODIMP UIDeactivateView();
|
||||
STDMETHODIMP_(BOOL) IsDirty();
|
||||
STDMETHODIMP Save();
|
||||
STDMETHODIMP SaveToFile(LPWSTR pwszFile, BOOL fOverwriteFile);
|
||||
STDMETHODIMP SaveToURL(LPWSTR pwszURL, BOOL fOverwriteFile, LPWSTR pwszUserName, LPWSTR pwszPassword);
|
||||
STDMETHODIMP PrintDocument(LPCWSTR pwszPrinter, LPCWSTR pwszOutput, UINT cCopies, UINT nFrom, UINT nTo, BOOL fPromptUser);
|
||||
STDMETHODIMP StartPrintPreview();
|
||||
STDMETHODIMP ExitPrintPreview(BOOL fForceExit);
|
||||
STDMETHODIMP DoOleCommand(DWORD dwOleCmdId, DWORD dwOptions, VARIANT* vInParam, VARIANT* vInOutParam);
|
||||
STDMETHODIMP Close();
|
||||
|
||||
// Control should notify us on these conditions (so we can pass to IP object)...
|
||||
STDMETHODIMP_(void) OnNotifySizeChange(LPRECT prc);
|
||||
STDMETHODIMP_(void) OnNotifyAppActivate(BOOL fActive, DWORD dwThreadID);
|
||||
STDMETHODIMP_(void) OnNotifyPaletteChanged(HWND hwndPalChg);
|
||||
STDMETHODIMP_(void) OnNotifyChangeToolState(BOOL fShowTools);
|
||||
STDMETHODIMP_(void) OnNotifyControlFocus(BOOL fGotFocus);
|
||||
|
||||
STDMETHODIMP HrGetDataFromObject(VARIANT *pvtType, VARIANT *pvtOutput);
|
||||
STDMETHODIMP HrSetDataInObject(VARIANT *pvtType, VARIANT *pvtInput, BOOL fMbcsString);
|
||||
|
||||
STDMETHODIMP_(BOOL) GetDocumentTypeAndFileExtension(WCHAR** ppwszFileType, WCHAR** ppwszFileExt);
|
||||
|
||||
// Inline accessors for control to get IP object info...
|
||||
inline IOleInPlaceActiveObject* GetActiveObject(){return m_pipactive;}
|
||||
inline IOleObject* GetOleObject(){return m_pole;}
|
||||
inline HWND GetDocWindow(){return m_hwnd;}
|
||||
inline HWND GetActiveWindow(){return m_hwndUIActiveObj;}
|
||||
inline BOOL IsReadOnly(){return m_fOpenReadOnly;}
|
||||
inline BOOL InPrintPreview(){return ((m_pprtprv != NULL) || (m_fInPptSlideShow));}
|
||||
inline HWND GetMenuHWND(){return m_hwndMenuObj;}
|
||||
inline HMENU GetActiveMenu(){return m_hMenuActive;}
|
||||
inline HMENU GetMergedMenu(){return m_hMenuMerged;}
|
||||
inline void SetMergedMenu(HMENU h){m_hMenuMerged = h;}
|
||||
inline LPCWSTR GetSourceName(){return ((m_pwszWebResource) ? m_pwszWebResource : m_pwszSourceFile);}
|
||||
inline LPCWSTR GetSourceDocName(){return ((m_pwszSourceFile) ? &m_pwszSourceFile[m_idxSourceName] : NULL);}
|
||||
inline CLSID* GetServerCLSID(){return &m_clsidObject;}
|
||||
inline BOOL IsIPActive(){return (m_pipobj != NULL);}
|
||||
|
||||
BOOL IsWordObject()
|
||||
{return ((m_clsidObject == CLSID_WORD_DOCUMENT_DOC) ||
|
||||
(m_clsidObject == CLSID_WORD_DOCUMENT_DOCX) ||
|
||||
(m_clsidObject == CLSID_WORD_DOCUMENT_DOCM));
|
||||
}
|
||||
BOOL IsExcelObject()
|
||||
{return ((m_clsidObject == CLSID_EXCEL_WORKBOOK_XLS) ||
|
||||
(m_clsidObject == CLSID_EXCEL_WORKBOOK_XLSX) ||
|
||||
(m_clsidObject == CLSID_EXCEL_WORKBOOK_XLSM) ||
|
||||
(m_clsidObject == CLSID_EXCEL_WORKBOOK_XLSB) ||
|
||||
(m_clsidObject == CLSID_EXCEL_CHART_XLS));
|
||||
}
|
||||
BOOL IsPPTObject()
|
||||
{return ((m_clsidObject == CLSID_PPT_PRESENTATION_PPT) ||
|
||||
(m_clsidObject == CLSID_PPT_PRESENTATION_PPTX) ||
|
||||
(m_clsidObject == CLSID_PPT_PRESENTATION_PPTM));
|
||||
}
|
||||
BOOL IsVisioObject()
|
||||
{return (m_clsidObject == CLSID_VISIO_DRAWING_VSD);}
|
||||
|
||||
STDMETHODIMP SetRunningServerLock(BOOL fLock);
|
||||
|
||||
protected:
|
||||
// Internal helper methods...
|
||||
STDMETHODIMP InstantiateDocObjectServer(REFCLSID rclsid, IOleObject **ppole);
|
||||
STDMETHODIMP CreateObjectStorage(REFCLSID rclsid);
|
||||
STDMETHODIMP SaveObjectStorage();
|
||||
STDMETHODIMP SaveDocToMoniker(IMoniker *pmk, IBindCtx *pbc, BOOL fKeepLock);
|
||||
STDMETHODIMP SaveDocToFile(LPWSTR pwszFullName, BOOL fKeepLock);
|
||||
STDMETHODIMP ValidateDocObjectServer(REFCLSID rclsid);
|
||||
STDMETHODIMP_(BOOL) ValidateFileExtension(WCHAR* pwszFile, WCHAR** ppwszOut);
|
||||
|
||||
STDMETHODIMP_(void) OnDraw(DWORD dvAspect, HDC hdcDraw, LPRECT prcBounds, LPRECT prcWBounds, HDC hicTargetDev, BOOL fOptimize);
|
||||
|
||||
STDMETHODIMP EnsureOleServerRunning(BOOL fLockRunning);
|
||||
STDMETHODIMP_(void) FreeRunningLock();
|
||||
STDMETHODIMP_(void) TurnOffWebToolbar(BOOL fTurnedOff);
|
||||
STDMETHODIMP_(void) ClearMergedMenu();
|
||||
STDMETHODIMP_(DWORD) CalcDocNameIndex(LPCWSTR pwszPath);
|
||||
STDMETHODIMP_(void) CheckForPPTPreviewChange();
|
||||
|
||||
// These functions allow the component to access files in a Web Folder for
|
||||
// write access using the Microsoft Provider for Internet Publishing (MSDAIPP),
|
||||
// which is installed by Office and comes standard in Windows 2000/ME/XP/2003. The
|
||||
// provider is not required to use the component, only if you wish to save to
|
||||
// an FPSE or DAV Web Folder (URL).
|
||||
STDMETHODIMP_(IUnknown*) CreateIPPBindResource();
|
||||
STDMETHODIMP IPPDownloadWebResource(LPWSTR pwszURL, LPWSTR pwszFile, IStream** ppstmKeepForSave);
|
||||
STDMETHODIMP IPPUploadWebResource(LPWSTR pwszFile, IStream** ppstmSave, LPWSTR pwszURLSaveTo, BOOL fOverwriteFile);
|
||||
|
||||
static STDMETHODIMP_(LRESULT) FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// The private class variables...
|
||||
private:
|
||||
ULONG m_cRef; // Reference count
|
||||
HWND m_hwnd; // our window
|
||||
HWND m_hwndCtl; // The control's window
|
||||
RECT m_rcViewRect; // Viewable area (set by host)
|
||||
IDsoDocObjectSite *m_psiteCtl; // The control's site interface
|
||||
IOleCommandTarget *m_pcmdCtl; // IOCT of host (for frame msgs)
|
||||
|
||||
LPWSTR m_pwszHostName; // Ole Host Name for container
|
||||
LPWSTR m_pwszSourceFile; // Path to Source File (on Open)
|
||||
IMoniker *m_pmkSourceFile; // Moniker to original source file
|
||||
IBindCtx *m_pbctxSourceFile; // Bind context used to original source file
|
||||
IStorage *m_pstgSourceFile; // Original File Storage (if open/save file)
|
||||
DWORD m_idxSourceName; // Index to doc name in m_pwszSourceFile
|
||||
|
||||
CLSID m_clsidObject; // CLSID of the embedded object
|
||||
IStorage *m_pstgroot; // Root temp storage
|
||||
IStorage *m_pstgfile; // In-memory file storage
|
||||
IStream *m_pstmview; // In-memory view info stream
|
||||
|
||||
LPWSTR m_pwszWebResource; // The full URL to the web resource
|
||||
IStream *m_pstmWebResource; // Original Download Stream (if open/save URL)
|
||||
IUnknown *m_punkIPPResource; // MSDAIPP provider resource (for URL authoring)
|
||||
LPWSTR m_pwszUsername; // Username and password used by MSDAIPP
|
||||
LPWSTR m_pwszPassword; // for Authentication (see IAuthenticate)
|
||||
|
||||
IOleObject *m_pole; // Embedded OLE Object (OLE)
|
||||
IOleInPlaceObject *m_pipobj; // The IP object methods (OLE)
|
||||
IOleInPlaceActiveObject *m_pipactive; // The UI Active object methods (OLE)
|
||||
IOleDocumentView *m_pdocv; // MSO Document View (DocObj)
|
||||
IOleCommandTarget *m_pcmdt; // MSO Command Target (DocObj)
|
||||
IOleInplacePrintPreview *m_pprtprv; // MSO Print Preview (DocObj)
|
||||
|
||||
HMENU m_hMenuActive; // The menu supplied by embedded object
|
||||
HMENU m_hMenuMerged; // The merged menu (set by control host)
|
||||
HOLEMENU m_holeMenu; // The OLE Menu Descriptor
|
||||
HWND m_hwndMenuObj; // The window for menu commands
|
||||
HWND m_hwndIPObject; // IP active object window
|
||||
HWND m_hwndUIActiveObj; // UI Active object window
|
||||
DWORD m_dwObjectThreadID; // Thread Id of UI server
|
||||
BORDERWIDTHS m_bwToolSpace; // Toolspace...
|
||||
|
||||
// Bitflags (state info)...
|
||||
unsigned int m_fDisplayTools:1;
|
||||
unsigned int m_fDisconnectOnQuit:1;
|
||||
unsigned int m_fAppWindowActive:1;
|
||||
unsigned int m_fOpenReadOnly:1;
|
||||
unsigned int m_fObjectInModalCondition:1;
|
||||
unsigned int m_fObjectIPActive:1;
|
||||
unsigned int m_fObjectUIActive:1;
|
||||
unsigned int m_fObjectActivateComplete:1;
|
||||
unsigned int m_fLockedServerRunning:1;
|
||||
unsigned int m_fLoadedFromAuto:1;
|
||||
unsigned int m_fInClose:1;
|
||||
unsigned int m_fAttemptPptPreview:1;
|
||||
unsigned int m_fInPptSlideShow:1;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //DS_DSOFDOCOBJ_H
|
419
PROMS/DSOFramer/DSOFramer/Source2005/dsofprint.cpp
Normal file
419
PROMS/DSOFramer/DSOFramer/Source2005/dsofprint.cpp
Normal file
@@ -0,0 +1,419 @@
|
||||
/***************************************************************************
|
||||
* DSOFPRINT.CPP
|
||||
*
|
||||
* CDsoDocObject: Print Code for CDsoDocObject object
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include "dsoframer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerControl::_PrintOutOld
|
||||
//
|
||||
// Prints the current object by calling IOleCommandTarget for Print.
|
||||
//
|
||||
STDMETHODIMP CDsoFramerControl::_PrintOutOld(VARIANT PromptToSelectPrinter)
|
||||
{
|
||||
DWORD dwOption = BOOL_FROM_VARIANT(PromptToSelectPrinter, FALSE)
|
||||
? OLECMDEXECOPT_PROMPTUSER : OLECMDEXECOPT_DODEFAULT;
|
||||
|
||||
TRACE1("CDsoFramerControl::_PrintOutOld(%d)\n", dwOption);
|
||||
CHECK_NULL_RETURN(m_pDocObjFrame, ProvideErrorInfo(DSO_E_DOCUMENTNOTOPEN));
|
||||
|
||||
// Cannot access object if in modal condition...
|
||||
if ((m_fModalState) || (m_pDocObjFrame->InPrintPreview()))
|
||||
return ProvideErrorInfo(DSO_E_INMODALSTATE);
|
||||
|
||||
return m_pDocObjFrame->DoOleCommand(OLECMDID_PRINT, dwOption, NULL, NULL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerControl::PrintOut
|
||||
//
|
||||
// Prints document using either IPrint or IOleCommandTarget, depending
|
||||
// on parameters passed. This offers a bit more control over printing if
|
||||
// the doc object server supports IPrint interface.
|
||||
//
|
||||
STDMETHODIMP CDsoFramerControl::PrintOut(VARIANT PromptUser, VARIANT PrinterName,
|
||||
VARIANT Copies, VARIANT FromPage, VARIANT ToPage, VARIANT OutputFile)
|
||||
{
|
||||
HRESULT hr;
|
||||
BOOL fPromptUser = BOOL_FROM_VARIANT(PromptUser, FALSE);
|
||||
LPWSTR pwszPrinter = LPWSTR_FROM_VARIANT(PrinterName);
|
||||
LPWSTR pwszOutput = LPWSTR_FROM_VARIANT(OutputFile);
|
||||
LONG lCopies = LONG_FROM_VARIANT(Copies, 1);
|
||||
LONG lFrom = LONG_FROM_VARIANT(FromPage, 0);
|
||||
LONG lTo = LONG_FROM_VARIANT(ToPage, 0);
|
||||
|
||||
TRACE3("CDsoFramerControl::PrintOut(%d, %S, %d)\n", fPromptUser, pwszPrinter, lCopies);
|
||||
CHECK_NULL_RETURN(m_pDocObjFrame, ProvideErrorInfo(DSO_E_DOCUMENTNOTOPEN));
|
||||
|
||||
// First we do validation of all parameters passed to the function...
|
||||
if ((pwszPrinter) && (*pwszPrinter == L'\0'))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if ((pwszOutput) && (*pwszOutput == L'\0'))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if ((lCopies < 1) || (lCopies > 200))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (((lFrom != 0) || (lTo != 0)) && ((lFrom < 1) || (lTo < lFrom)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
// Cannot access object if in modal condition...
|
||||
if ((m_fModalState) || (m_pDocObjFrame->InPrintPreview()))
|
||||
return ProvideErrorInfo(DSO_E_INMODALSTATE);
|
||||
|
||||
// If no printer name was provided, we can print to the default device
|
||||
// using IOleCommandTarget with OLECMDID_PRINT...
|
||||
if (pwszPrinter == NULL)
|
||||
return _PrintOutOld(PromptUser);
|
||||
|
||||
// Ask the embedded document to print itself to specific printer...
|
||||
hr = m_pDocObjFrame->PrintDocument(pwszPrinter, pwszOutput, (UINT)lCopies,
|
||||
(UINT)lFrom, (UINT)lTo, fPromptUser);
|
||||
|
||||
// If call failed because interface doesn't exist, change error
|
||||
// to let caller know it is because DocObj doesn't support this command...
|
||||
if (FAILED(hr) && (hr == E_NOINTERFACE))
|
||||
hr = DSO_E_COMMANDNOTSUPPORTED;
|
||||
|
||||
return ProvideErrorInfo(hr);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerControl::PrintPreview
|
||||
//
|
||||
// Asks embedded object to attempt a print preview (only Office docs do this).
|
||||
//
|
||||
STDMETHODIMP CDsoFramerControl::PrintPreview()
|
||||
{
|
||||
HRESULT hr;
|
||||
ODS("CDsoFramerControl::PrintPreview\n");
|
||||
CHECK_NULL_RETURN(m_pDocObjFrame, ProvideErrorInfo(DSO_E_DOCUMENTNOTOPEN));
|
||||
|
||||
if (m_fModalState) // Cannot access object if in modal condition...
|
||||
return ProvideErrorInfo(DSO_E_INMODALSTATE);
|
||||
|
||||
// Try to set object into print preview mode...
|
||||
hr = m_pDocObjFrame->StartPrintPreview();
|
||||
|
||||
// If call failed because interface doesn't exist, change error
|
||||
// to let caller know it is because DocObj doesn't support this command...
|
||||
if (FAILED(hr) && (hr == E_NOINTERFACE))
|
||||
hr = DSO_E_COMMANDNOTSUPPORTED;
|
||||
|
||||
return ProvideErrorInfo(hr);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerControl::PrintPreviewExit
|
||||
//
|
||||
// Closes an active preview.
|
||||
//
|
||||
STDMETHODIMP CDsoFramerControl::PrintPreviewExit()
|
||||
{
|
||||
ODS("CDsoFramerControl::PrintPreviewExit\n");
|
||||
CHECK_NULL_RETURN(m_pDocObjFrame, ProvideErrorInfo(DSO_E_DOCUMENTNOTOPEN));
|
||||
|
||||
// Try to set object out of print preview mode...
|
||||
if (m_pDocObjFrame->InPrintPreview())
|
||||
m_pDocObjFrame->ExitPrintPreview(TRUE);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoDocObject::PrintDocument
|
||||
//
|
||||
// We can use the IPrint interface for an ActiveX Document object to
|
||||
// selectively print object to a given printer.
|
||||
//
|
||||
STDMETHODIMP CDsoDocObject::PrintDocument(LPCWSTR pwszPrinter, LPCWSTR pwszOutput, UINT cCopies, UINT nFrom, UINT nTo, BOOL fPromptUser)
|
||||
{
|
||||
HRESULT hr;
|
||||
IPrint *print;
|
||||
HANDLE hPrint;
|
||||
DVTARGETDEVICE* ptd = NULL;
|
||||
|
||||
ODS("CDsoDocObject::PrintDocument\n");
|
||||
CHECK_NULL_RETURN(m_pole, E_UNEXPECTED);
|
||||
|
||||
// First thing we need to do is ask object for IPrint. If it does not
|
||||
// support it, we cannot continue. It is up to DocObj if this is allowed...
|
||||
hr = m_pole->QueryInterface(IID_IPrint, (void**)&print);
|
||||
RETURN_ON_FAILURE(hr);
|
||||
|
||||
// Now setup printer settings into DEVMODE for IPrint. Open printer
|
||||
// settings and gather default DEVMODE...
|
||||
if (FOpenPrinter(pwszPrinter, &hPrint))
|
||||
{
|
||||
LPDEVMODEW pdevMode = NULL;
|
||||
LPWSTR pwszDefProcessor = NULL;
|
||||
LPWSTR pwszDefDriver = NULL;
|
||||
LPWSTR pwszDefPort = NULL;
|
||||
LPWSTR pwszPort;
|
||||
DWORD cbDevModeSize;
|
||||
|
||||
if (FGetPrinterSettings(hPrint, &pwszDefProcessor,
|
||||
&pwszDefDriver, &pwszDefPort, &pdevMode, &cbDevModeSize) && (pdevMode))
|
||||
{
|
||||
DWORD cbPrintName, cbDeviceName, cbOutputName;
|
||||
DWORD cbDVTargetSize;
|
||||
|
||||
pdevMode->dmFields |= DM_COPIES;
|
||||
pdevMode->dmCopies = (WORD)((cCopies) ? cCopies : 1);
|
||||
|
||||
pwszPort = ((pwszOutput) ? (LPWSTR)pwszOutput : pwszDefPort);
|
||||
|
||||
// We calculate the size we will need for the TARGETDEVICE structure...
|
||||
cbPrintName = ((lstrlenW(pwszDefProcessor) + 1) * sizeof(WCHAR));
|
||||
cbDeviceName = ((lstrlenW(pwszDefDriver) + 1) * sizeof(WCHAR));
|
||||
cbOutputName = ((lstrlenW(pwszPort) + 1) * sizeof(WCHAR));
|
||||
|
||||
cbDVTargetSize = sizeof(DWORD) + sizeof(DEVNAMES) + cbPrintName +
|
||||
cbDeviceName + cbOutputName + cbDevModeSize;
|
||||
|
||||
// Allocate new target device using COM Task Allocator...
|
||||
ptd = (DVTARGETDEVICE*)CoTaskMemAlloc(cbDVTargetSize);
|
||||
if (ptd)
|
||||
{
|
||||
// Copy all the data in the DVT...
|
||||
DWORD dwOffset = sizeof(DWORD) + sizeof(DEVNAMES);
|
||||
ptd->tdSize = cbDVTargetSize;
|
||||
|
||||
ptd->tdDriverNameOffset = (WORD)dwOffset;
|
||||
memcpy((BYTE*)(((BYTE*)ptd) + dwOffset), pwszDefProcessor, cbPrintName);
|
||||
dwOffset += cbPrintName;
|
||||
|
||||
ptd->tdDeviceNameOffset = (WORD)dwOffset;
|
||||
memcpy((BYTE*)(((BYTE*)ptd) + dwOffset), pwszDefDriver, cbDeviceName);
|
||||
dwOffset += cbDeviceName;
|
||||
|
||||
ptd->tdPortNameOffset = (WORD)dwOffset;
|
||||
memcpy((BYTE*)(((BYTE*)ptd) + dwOffset), pwszPort, cbOutputName);
|
||||
dwOffset += cbOutputName;
|
||||
|
||||
ptd->tdExtDevmodeOffset = (WORD)dwOffset;
|
||||
memcpy((BYTE*)(((BYTE*)ptd) + dwOffset), pdevMode, cbDevModeSize);
|
||||
dwOffset += cbDevModeSize;
|
||||
|
||||
ASSERT(dwOffset == cbDVTargetSize);
|
||||
}
|
||||
else hr = E_OUTOFMEMORY;
|
||||
|
||||
// We're done with the devmode...
|
||||
DsoMemFree(pdevMode);
|
||||
}
|
||||
else hr = E_WIN32_LASTERROR;
|
||||
|
||||
SAFE_FREESTRING(pwszDefPort);
|
||||
SAFE_FREESTRING(pwszDefDriver);
|
||||
SAFE_FREESTRING(pwszDefProcessor);
|
||||
ClosePrinter(hPrint);
|
||||
}
|
||||
else hr = E_WIN32_LASTERROR;
|
||||
|
||||
// If we were successful in getting TARGETDEVICE struct, provide the page range
|
||||
// for the print job and ask docobj server to print it...
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
PAGESET *ppgset;
|
||||
DWORD cbPgRngSize = sizeof(PAGESET) + sizeof(PAGERANGE);
|
||||
LONG cPages, cLastPage;
|
||||
DWORD grfPrintFlags;
|
||||
|
||||
// Setup the page range to print...
|
||||
if ((ppgset = (PAGESET*)CoTaskMemAlloc(cbPgRngSize)) != NULL)
|
||||
{
|
||||
ppgset->cbStruct = cbPgRngSize;
|
||||
ppgset->cPageRange = 1;
|
||||
ppgset->fOddPages = TRUE;
|
||||
ppgset->fEvenPages = TRUE;
|
||||
ppgset->cPageRange = 1;
|
||||
ppgset->rgPages[0].nFromPage = ((nFrom) ? nFrom : 1);
|
||||
ppgset->rgPages[0].nToPage = ((nTo) ? nTo : PAGESET_TOLASTPAGE);
|
||||
|
||||
// Give indication we are waiting (on the print)...
|
||||
HCURSOR hCur = SetCursor(LoadCursor(NULL, IDC_WAIT));
|
||||
|
||||
SEH_TRY
|
||||
|
||||
// Setup the initial page number (optional)...
|
||||
print->SetInitialPageNum(ppgset->rgPages[0].nFromPage);
|
||||
|
||||
grfPrintFlags = (PRINTFLAG_MAYBOTHERUSER | PRINTFLAG_RECOMPOSETODEVICE);
|
||||
if (fPromptUser) grfPrintFlags |= PRINTFLAG_PROMPTUSER;
|
||||
if (pwszOutput) grfPrintFlags |= PRINTFLAG_PRINTTOFILE;
|
||||
|
||||
// Now ask server to print it using settings passed...
|
||||
hr = print->Print(grfPrintFlags, &ptd, &ppgset, NULL, (IContinueCallback*)&m_xContinueCallback,
|
||||
ppgset->rgPages[0].nFromPage, &cPages, &cLastPage);
|
||||
|
||||
SEH_EXCEPT(hr)
|
||||
|
||||
SetCursor(hCur);
|
||||
|
||||
if (ppgset)
|
||||
CoTaskMemFree(ppgset);
|
||||
}
|
||||
else hr = E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
// We are done...
|
||||
if (ptd) CoTaskMemFree(ptd);
|
||||
print->Release();
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoDocObject::StartPrintPreview
|
||||
//
|
||||
// Ask embedded object to go into print preview (if supportted).
|
||||
//
|
||||
STDMETHODIMP CDsoDocObject::StartPrintPreview()
|
||||
{
|
||||
HRESULT hr;
|
||||
IOleInplacePrintPreview *prev;
|
||||
HCURSOR hCur;
|
||||
|
||||
ODS("CDsoDocObject::StartPrintPreview\n");
|
||||
CHECK_NULL_RETURN(m_pole, E_UNEXPECTED);
|
||||
|
||||
// No need to do anything if already in preview...
|
||||
if (InPrintPreview()) return S_FALSE;
|
||||
|
||||
// Otherwise, ask document server if it supports preview...
|
||||
hr = m_pole->QueryInterface(IID_IOleInplacePrintPreview, (void**)&prev);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// Tell user we waiting (switch to preview can be slow for very large docs)...
|
||||
hCur = SetCursor(LoadCursor(NULL, IDC_WAIT));
|
||||
|
||||
// If it does, make sure it can go into preview mode...
|
||||
hr = prev->QueryStatus();
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
SEH_TRY
|
||||
|
||||
if (m_hwndCtl) // Notify the control that preview started...
|
||||
SendMessage(m_hwndCtl, DSO_WM_ASYNCH_STATECHANGE, DSO_STATE_INTERACTIVE, (LPARAM)FALSE);
|
||||
|
||||
// We will allow application to bother user and switch printers...
|
||||
hr = prev->StartPrintPreview(
|
||||
(PREVIEWFLAG_MAYBOTHERUSER | PREVIEWFLAG_PROMPTUSER | PREVIEWFLAG_USERMAYCHANGEPRINTER),
|
||||
NULL, (IOlePreviewCallback*)&m_xPreviewCallback, 1);
|
||||
|
||||
SEH_EXCEPT(hr)
|
||||
|
||||
// If the call succeeds, we keep hold of interface to close preview later
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
SAFE_SET_INTERFACE(m_pprtprv, prev);
|
||||
}
|
||||
else
|
||||
{ // Otherwise, notify the control that preview failed...
|
||||
if (m_hwndCtl)
|
||||
PostMessage(m_hwndCtl, DSO_WM_ASYNCH_STATECHANGE, DSO_STATE_INTERACTIVE, (LPARAM)TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SetCursor(hCur);
|
||||
prev->Release();
|
||||
}
|
||||
else if (IsPPTObject() && (m_hwndUIActiveObj))
|
||||
{
|
||||
// PowerPoint doesn't have print preview, but it does have slide show mode, so we can use this to
|
||||
// toggle the viewing into slideshow...
|
||||
if (PostMessage(m_hwndUIActiveObj, WM_KEYDOWN, VK_F5, 0x00000001) &&
|
||||
PostMessage(m_hwndUIActiveObj, WM_KEYUP, VK_F5, 0xC0000001))
|
||||
{
|
||||
hr = S_OK; m_fAttemptPptPreview = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoDocObject::ExitPrintPreview
|
||||
//
|
||||
// Drop out of print preview and restore items as needed.
|
||||
//
|
||||
STDMETHODIMP CDsoDocObject::ExitPrintPreview(BOOL fForceExit)
|
||||
{
|
||||
TRACE1("CDsoDocObject::ExitPrintPreview(fForceExit=%d)\n", (DWORD)fForceExit);
|
||||
|
||||
// Need to be in preview to run this function...
|
||||
if (!InPrintPreview()) return S_FALSE;
|
||||
|
||||
// If the user closes the app or otherwise terminates the preview, we need
|
||||
// to notify the ActiveDocument server to leave preview mode...
|
||||
if (m_pprtprv)
|
||||
{
|
||||
if (fForceExit) // Tell docobj we want to end preview...
|
||||
{
|
||||
HRESULT hr = m_pprtprv->EndPrintPreview(TRUE);
|
||||
ASSERT(SUCCEEDED(hr)); (void)hr;
|
||||
}
|
||||
}
|
||||
else if (m_fInPptSlideShow)
|
||||
{
|
||||
if ((fForceExit) && (m_hwndUIActiveObj))
|
||||
{
|
||||
// HACK: When it goes into slideshow, PPT 2007 changes the active window but
|
||||
// doesn't call SetActiveObject to update us with new object and window handle.
|
||||
// If we post VK_ESCAPE to the window handle we have, it can fail. It needs to go
|
||||
// to the slideshow window that PPT failed to give us handle for. As workaround,
|
||||
// setting focus to the UI window we have handle for will automatically forward
|
||||
// to the right window, so we can use that trick to get the right window and
|
||||
// make the call in a way that that should succeed regardless of PPT version...
|
||||
SetFocus(m_hwndUIActiveObj);
|
||||
PostMessage(GetFocus(), WM_KEYDOWN, VK_ESCAPE, 0x00000001);
|
||||
PostMessage(GetFocus(), WM_KEYUP, VK_ESCAPE, 0xC0000001);
|
||||
}
|
||||
m_fAttemptPptPreview = FALSE;
|
||||
m_fInPptSlideShow = FALSE;
|
||||
}
|
||||
|
||||
if (m_hwndCtl) // Notify the control that preview ended...
|
||||
SendMessage(m_hwndCtl, DSO_WM_ASYNCH_STATECHANGE, DSO_STATE_INTERACTIVE, (LPARAM)TRUE);
|
||||
|
||||
// Free our reference to preview interface...
|
||||
SAFE_RELEASE_INTERFACE(m_pprtprv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CDsoDocObject::CheckForPPTPreviewChange
|
||||
//
|
||||
// Used to update control when PPT goes in/out of slideshow asynchronously.
|
||||
//
|
||||
STDMETHODIMP_(void) CDsoDocObject::CheckForPPTPreviewChange()
|
||||
{
|
||||
if (m_fInPptSlideShow)
|
||||
{
|
||||
ExitPrintPreview(FALSE);
|
||||
}
|
||||
else if (m_fAttemptPptPreview)
|
||||
{
|
||||
m_fInPptSlideShow = TRUE;
|
||||
m_fAttemptPptPreview = FALSE;
|
||||
if (m_hwndCtl) // Notify the control that preview started...
|
||||
SendMessage(m_hwndCtl, DSO_WM_ASYNCH_STATECHANGE, DSO_STATE_INTERACTIVE, (LPARAM)FALSE);
|
||||
}
|
||||
}
|
6
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.def
Normal file
6
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.def
Normal file
@@ -0,0 +1,6 @@
|
||||
LIBRARY dsoframer.ocx
|
||||
EXPORTS
|
||||
DllGetClassObject PRIVATE
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
689
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.h
Normal file
689
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.h
Normal file
@@ -0,0 +1,689 @@
|
||||
/***************************************************************************
|
||||
* DSOFRAMER.H
|
||||
*
|
||||
* Developer Support Office ActiveX Document Framer Control Sample
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only.
|
||||
*
|
||||
* You have a royalty-free right to use, modify, reproduce and distribute
|
||||
* this sample application, and/or any modified version, in any way you
|
||||
* find useful, provided that you agree that Microsoft has no warranty,
|
||||
* obligations or liability for the code or information provided herein.
|
||||
*
|
||||
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* See the EULA.TXT file included in the KB download for full terms of use
|
||||
* and restrictions. You should consult documentation on MSDN Library for
|
||||
* possible updates or changes to behaviors or interfaces used in this sample.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef DS_DSOFRAMER_H
|
||||
#define DS_DSOFRAMER_H
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// We compile at level 4 and disable some unnecessary warnings...
|
||||
//
|
||||
#pragma warning(push, 4) // Compile at level-4 warnings
|
||||
#pragma warning(disable: 4100) // unreferenced formal parameter (in OLE this is common)
|
||||
#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning(disable: 4268) // const static/global data initialized with compiler generated default constructor
|
||||
#pragma warning(disable: 4310) // cast truncates constant value
|
||||
#pragma warning(disable: 4786) // identifier was truncated in the debug information
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Compile Options For Modified Behavior...
|
||||
//
|
||||
#define DSO_MSDAIPP_USE_DAVONLY // Default to WebDAV protocol for open by HTTP/HTTPS
|
||||
#define DSO_WORD12_PERSIST_BUG // Perform workaround for IPersistFile bug in Word 2007
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Needed include files (both standard and custom)
|
||||
//
|
||||
#include <windows.h>
|
||||
#include <ole2.h>
|
||||
#include <olectl.h>
|
||||
#include <oleidl.h>
|
||||
#include <objsafe.h>
|
||||
|
||||
#include "version.h"
|
||||
#include "utilities.h"
|
||||
#include "dsofdocobj.h"
|
||||
#include ".\lib\dsoframerlib.h"
|
||||
#include ".\res\resource.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Global Variables
|
||||
//
|
||||
extern HINSTANCE v_hModule;
|
||||
extern CRITICAL_SECTION v_csecThreadSynch;
|
||||
extern HICON v_icoOffDocIcon;
|
||||
extern ULONG v_cLocks;
|
||||
extern BOOL v_fUnicodeAPI;
|
||||
extern BOOL v_fWindows2KPlus;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Custom Errors - we support a very limited set of custom error messages
|
||||
//
|
||||
#define DSO_E_ERR_BASE 0x80041100
|
||||
#define DSO_E_UNKNOWN 0x80041101 // "An unknown problem has occurred."
|
||||
#define DSO_E_INVALIDPROGID 0x80041102 // "The ProgID/Template could not be found or is not associated with a COM server."
|
||||
#define DSO_E_INVALIDSERVER 0x80041103 // "The associated COM server does not support ActiveX Document embedding."
|
||||
#define DSO_E_COMMANDNOTSUPPORTED 0x80041104 // "The command is not supported by the document server."
|
||||
#define DSO_E_DOCUMENTREADONLY 0x80041105 // "Unable to perform action because document was opened in read-only mode."
|
||||
#define DSO_E_REQUIRESMSDAIPP 0x80041106 // "The Microsoft Internet Publishing Provider is not installed, so the URL document cannot be open for write access."
|
||||
#define DSO_E_DOCUMENTNOTOPEN 0x80041107 // "No document is open to perform the operation requested."
|
||||
#define DSO_E_INMODALSTATE 0x80041108 // "Cannot access document when in modal condition."
|
||||
#define DSO_E_NOTBEENSAVED 0x80041109 // "Cannot Save file without a file path."
|
||||
#define DSO_E_FRAMEHOOKFAILED 0x8004110A // "Unable to set frame hook for the parent window."
|
||||
#define DSO_E_ERR_MAX 0x8004110B
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Custom OLE Command IDs - we use for special tasks
|
||||
//
|
||||
#define OLECMDID_GETDATAFORMAT 0x7001 // 28673
|
||||
#define OLECMDID_SETDATAFORMAT 0x7002 // 28674
|
||||
#define OLECMDID_LOCKSERVER 0x7003 // 28675
|
||||
#define OLECMDID_RESETFRAMEHOOK 0x7009 // 28681
|
||||
#define OLECMDID_NOTIFYACTIVE 0x700A // 28682
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Custom Window Messages (only apply to CDsoFramerControl window proc)
|
||||
//
|
||||
#define DSO_WM_ASYNCH_OLECOMMAND (WM_USER + 300)
|
||||
#define DSO_WM_ASYNCH_STATECHANGE (WM_USER + 301)
|
||||
|
||||
#define DSO_WM_HOOK_NOTIFY_COMPACTIVE (WM_USER + 400)
|
||||
#define DSO_WM_HOOK_NOTIFY_APPACTIVATE (WM_USER + 401)
|
||||
#define DSO_WM_HOOK_NOTIFY_FOCUSCHANGE (WM_USER + 402)
|
||||
#define DSO_WM_HOOK_NOTIFY_SYNCPAINT (WM_USER + 403)
|
||||
#define DSO_WM_HOOK_NOTIFY_PALETTECHANGE (WM_USER + 404)
|
||||
|
||||
// State Flags for DSO_WM_ASYNCH_STATECHANGE:
|
||||
#define DSO_STATE_MODAL 1
|
||||
#define DSO_STATE_ACTIVATION 2
|
||||
#define DSO_STATE_INTERACTIVE 3
|
||||
#define DSO_STATE_RETURNFROMMODAL 4
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Menu Bar Items
|
||||
//
|
||||
#define DSO_MAX_MENUITEMS 16
|
||||
#define DSO_MAX_MENUNAME_LENGTH 32
|
||||
|
||||
#ifndef DT_HIDEPREFIX
|
||||
#define DT_HIDEPREFIX 0x00100000
|
||||
#define DT_PREFIXONLY 0x00200000
|
||||
#endif
|
||||
|
||||
#define SYNCPAINT_TIMER_ID 4
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Control Class Factory
|
||||
//
|
||||
class CDsoFramerClassFactory : public IClassFactory
|
||||
{
|
||||
public:
|
||||
CDsoFramerClassFactory(): m_cRef(0){}
|
||||
~CDsoFramerClassFactory(void){}
|
||||
|
||||
// IUnknown Implementation
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv);
|
||||
STDMETHODIMP_(ULONG) AddRef(void);
|
||||
STDMETHODIMP_(ULONG) Release(void);
|
||||
|
||||
// IClassFactory Implementation
|
||||
STDMETHODIMP CreateInstance(LPUNKNOWN punk, REFIID riid, void** ppv);
|
||||
STDMETHODIMP LockServer(BOOL fLock);
|
||||
|
||||
private:
|
||||
ULONG m_cRef; // Reference count
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// CDsoFramerControl -- Main Control (OCX) Object
|
||||
//
|
||||
// The CDsoFramerControl control is standard OLE control designed around
|
||||
// the OCX94 specification. Because we plan on doing custom integration to
|
||||
// act as both OLE object and OLE host, it does not use frameworks like ATL
|
||||
// or MFC which would only complicate the nature of the sample.
|
||||
//
|
||||
// The control inherits from its automation interface, but uses nested
|
||||
// classes for all OLE interfaces. This is not a requirement but does help
|
||||
// to clearly seperate the tasks done by each interface and makes finding
|
||||
// ref count problems easier to spot since each interface carries its own
|
||||
// counter and will assert (in debug) if interface is over or under released.
|
||||
//
|
||||
// The control is basically a stage for the ActiveDocument embedding, and
|
||||
// handles any external (user) commands. The task of actually acting as
|
||||
// a DocObject host is done in the site object CDsoDocObject, which this
|
||||
// class creates and uses for the embedding.
|
||||
//
|
||||
class CDsoFramerControl : public _FramerControl
|
||||
{
|
||||
public:
|
||||
CDsoFramerControl(LPUNKNOWN punk);
|
||||
~CDsoFramerControl(void);
|
||||
|
||||
// IUnknown Implementation -- Always delgates to outer unknown...
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv){return m_pOuterUnknown->QueryInterface(riid, ppv);}
|
||||
STDMETHODIMP_(ULONG) AddRef(void){return m_pOuterUnknown->AddRef();}
|
||||
STDMETHODIMP_(ULONG) Release(void){return m_pOuterUnknown->Release();}
|
||||
|
||||
// IDispatch Implementation
|
||||
STDMETHODIMP GetTypeInfoCount(UINT* pctinfo);
|
||||
STDMETHODIMP GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo);
|
||||
STDMETHODIMP GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId);
|
||||
STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr);
|
||||
|
||||
// _FramerControl Implementation
|
||||
STDMETHODIMP Activate();
|
||||
STDMETHODIMP get_ActiveDocument(IDispatch** ppdisp);
|
||||
STDMETHODIMP CreateNew(BSTR ProgIdOrTemplate);
|
||||
STDMETHODIMP Open(VARIANT Document, VARIANT ReadOnly, VARIANT ProgId, VARIANT WebUsername, VARIANT WebPassword);
|
||||
STDMETHODIMP Save(VARIANT SaveAsDocument, VARIANT OverwriteExisting, VARIANT WebUsername, VARIANT WebPassword);
|
||||
STDMETHODIMP _PrintOutOld(VARIANT PromptToSelectPrinter);
|
||||
STDMETHODIMP Close();
|
||||
STDMETHODIMP put_Caption(BSTR bstr);
|
||||
STDMETHODIMP get_Caption(BSTR* pbstr);
|
||||
STDMETHODIMP put_Titlebar(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_Titlebar(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP put_Toolbars(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_Toolbars(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP put_ModalState(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_ModalState(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP ShowDialog(dsoShowDialogType DlgType);
|
||||
STDMETHODIMP put_EnableFileCommand(dsoFileCommandType Item, VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_EnableFileCommand(dsoFileCommandType Item, VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP put_BorderStyle(dsoBorderStyle style);
|
||||
STDMETHODIMP get_BorderStyle(dsoBorderStyle* pstyle);
|
||||
STDMETHODIMP put_BorderColor(OLE_COLOR clr);
|
||||
STDMETHODIMP get_BorderColor(OLE_COLOR* pclr);
|
||||
STDMETHODIMP put_BackColor(OLE_COLOR clr);
|
||||
STDMETHODIMP get_BackColor(OLE_COLOR* pclr);
|
||||
STDMETHODIMP put_ForeColor(OLE_COLOR clr);
|
||||
STDMETHODIMP get_ForeColor(OLE_COLOR* pclr);
|
||||
STDMETHODIMP put_TitlebarColor(OLE_COLOR clr);
|
||||
STDMETHODIMP get_TitlebarColor(OLE_COLOR* pclr);
|
||||
STDMETHODIMP put_TitlebarTextColor(OLE_COLOR clr);
|
||||
STDMETHODIMP get_TitlebarTextColor(OLE_COLOR* pclr);
|
||||
STDMETHODIMP ExecOleCommand(LONG OLECMDID, VARIANT Options, VARIANT* vInParam, VARIANT* vInOutParam);
|
||||
STDMETHODIMP put_Menubar(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_Menubar(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP put_HostName(BSTR bstr);
|
||||
STDMETHODIMP get_HostName(BSTR* pbstr);
|
||||
STDMETHODIMP get_DocumentFullName(BSTR* pbstr);
|
||||
STDMETHODIMP PrintOut(VARIANT PromptUser, VARIANT PrinterName, VARIANT Copies, VARIANT FromPage, VARIANT ToPage, VARIANT OutputFile);
|
||||
STDMETHODIMP PrintPreview();
|
||||
STDMETHODIMP PrintPreviewExit();
|
||||
STDMETHODIMP get_IsReadOnly(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP get_IsDirty(VARIANT_BOOL* pbool);
|
||||
STDMETHODIMP put_LockServer(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_LockServer(VARIANT_BOOL* pvbool);
|
||||
STDMETHODIMP GetDataObjectContent(VARIANT ClipFormatNameOrNumber, VARIANT *pvResults);
|
||||
STDMETHODIMP SetDataObjectContent(VARIANT ClipFormatNameOrNumber, VARIANT DataByteArray);
|
||||
STDMETHODIMP put_ActivationPolicy(dsoActivationPolicy lPolicy);
|
||||
STDMETHODIMP get_ActivationPolicy(dsoActivationPolicy *plPolicy);
|
||||
STDMETHODIMP put_FrameHookPolicy(dsoFrameHookPolicy lPolicy);
|
||||
STDMETHODIMP get_FrameHookPolicy(dsoFrameHookPolicy *plPolicy);
|
||||
STDMETHODIMP put_MenuAccelerators(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_MenuAccelerators(VARIANT_BOOL* pvbool);
|
||||
STDMETHODIMP put_EventsEnabled(VARIANT_BOOL vbool);
|
||||
STDMETHODIMP get_EventsEnabled(VARIANT_BOOL* pvbool);
|
||||
STDMETHODIMP get_DocumentName(BSTR* pbstr);
|
||||
|
||||
// IInternalUnknown Implementation
|
||||
BEGIN_INTERFACE_PART(InternalUnknown, IUnknown)
|
||||
END_INTERFACE_PART(InternalUnknown)
|
||||
|
||||
// IPersistStreamInit Implementation
|
||||
BEGIN_INTERFACE_PART(PersistStreamInit, IPersistStreamInit)
|
||||
STDMETHODIMP GetClassID(CLSID *pClassID);
|
||||
STDMETHODIMP IsDirty(void);
|
||||
STDMETHODIMP Load(LPSTREAM pStm);
|
||||
STDMETHODIMP Save(LPSTREAM pStm, BOOL fClearDirty);
|
||||
STDMETHODIMP GetSizeMax(ULARGE_INTEGER* pcbSize);
|
||||
STDMETHODIMP InitNew(void);
|
||||
END_INTERFACE_PART(PersistStreamInit)
|
||||
|
||||
// IPersistPropertyBag Implementation
|
||||
BEGIN_INTERFACE_PART(PersistPropertyBag, IPersistPropertyBag)
|
||||
STDMETHODIMP GetClassID(CLSID *pClassID);
|
||||
STDMETHODIMP InitNew(void);
|
||||
STDMETHODIMP Load(IPropertyBag* pPropBag, IErrorLog* pErrorLog);
|
||||
STDMETHODIMP Save(IPropertyBag* pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties);
|
||||
END_INTERFACE_PART(PersistPropertyBag)
|
||||
|
||||
// IPersistStorage Implementation
|
||||
BEGIN_INTERFACE_PART(PersistStorage, IPersistStorage)
|
||||
STDMETHODIMP GetClassID(CLSID *pClassID);
|
||||
STDMETHODIMP IsDirty(void);
|
||||
STDMETHODIMP InitNew(LPSTORAGE pStg);
|
||||
STDMETHODIMP Load(LPSTORAGE pStg);
|
||||
STDMETHODIMP Save(LPSTORAGE pStg, BOOL fSameAsLoad);
|
||||
STDMETHODIMP SaveCompleted(LPSTORAGE pStg);
|
||||
STDMETHODIMP HandsOffStorage(void);
|
||||
END_INTERFACE_PART(PersistStorage)
|
||||
|
||||
// IOleObject Implementation
|
||||
BEGIN_INTERFACE_PART(OleObject, IOleObject)
|
||||
STDMETHODIMP SetClientSite(IOleClientSite *pClientSite);
|
||||
STDMETHODIMP GetClientSite(IOleClientSite **ppClientSite);
|
||||
STDMETHODIMP SetHostNames(LPCOLESTR szContainerApp, LPCOLESTR szContainerObj);
|
||||
STDMETHODIMP Close(DWORD dwSaveOption);
|
||||
STDMETHODIMP SetMoniker(DWORD dwWhichMoniker, IMoniker *pmk);
|
||||
STDMETHODIMP GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk);
|
||||
STDMETHODIMP InitFromData(IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved);
|
||||
STDMETHODIMP GetClipboardData(DWORD dwReserved, IDataObject **ppDataObject);
|
||||
STDMETHODIMP DoVerb(LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect);
|
||||
STDMETHODIMP EnumVerbs(IEnumOLEVERB **ppEnumOleVerb);
|
||||
STDMETHODIMP Update();
|
||||
STDMETHODIMP IsUpToDate();
|
||||
STDMETHODIMP GetUserClassID(CLSID *pClsid);
|
||||
STDMETHODIMP GetUserType(DWORD dwFormOfType, LPOLESTR *pszUserType);
|
||||
STDMETHODIMP SetExtent(DWORD dwDrawAspect, SIZEL *psizel);
|
||||
STDMETHODIMP GetExtent(DWORD dwDrawAspect, SIZEL *psizel);
|
||||
STDMETHODIMP Advise(IAdviseSink *pAdvSink, DWORD *pdwConnection);
|
||||
STDMETHODIMP Unadvise(DWORD dwConnection);
|
||||
STDMETHODIMP EnumAdvise(IEnumSTATDATA **ppenumAdvise);
|
||||
STDMETHODIMP GetMiscStatus(DWORD dwAspect, DWORD *pdwStatus);
|
||||
STDMETHODIMP SetColorScheme(LOGPALETTE *pLogpal);
|
||||
END_INTERFACE_PART(OleObject)
|
||||
|
||||
// IOleControl Implementation
|
||||
BEGIN_INTERFACE_PART(OleControl, IOleControl)
|
||||
STDMETHODIMP GetControlInfo(CONTROLINFO* pCI);
|
||||
STDMETHODIMP OnMnemonic(LPMSG pMsg);
|
||||
STDMETHODIMP OnAmbientPropertyChange(DISPID dispID);
|
||||
STDMETHODIMP FreezeEvents(BOOL bFreeze);
|
||||
END_INTERFACE_PART(OleControl)
|
||||
|
||||
// IOleInplaceObject Implementation
|
||||
BEGIN_INTERFACE_PART(OleInplaceObject, IOleInPlaceObject)
|
||||
STDMETHODIMP GetWindow(HWND *phwnd);
|
||||
STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);
|
||||
STDMETHODIMP InPlaceDeactivate();
|
||||
STDMETHODIMP UIDeactivate();
|
||||
STDMETHODIMP SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect);
|
||||
STDMETHODIMP ReactivateAndUndo();
|
||||
END_INTERFACE_PART(OleInplaceObject)
|
||||
|
||||
// IOleInplaceActiveObject Implementation
|
||||
BEGIN_INTERFACE_PART(OleInplaceActiveObject, IOleInPlaceActiveObject)
|
||||
STDMETHODIMP GetWindow(HWND *phwnd);
|
||||
STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);
|
||||
STDMETHODIMP TranslateAccelerator(LPMSG lpmsg);
|
||||
STDMETHODIMP OnFrameWindowActivate(BOOL fActivate);
|
||||
STDMETHODIMP OnDocWindowActivate(BOOL fActivate);
|
||||
STDMETHODIMP ResizeBorder(LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow);
|
||||
STDMETHODIMP EnableModeless(BOOL fEnable);
|
||||
END_INTERFACE_PART(OleInplaceActiveObject)
|
||||
|
||||
// IViewObjectEx Implementation
|
||||
BEGIN_INTERFACE_PART(ViewObjectEx, IViewObjectEx)
|
||||
STDMETHODIMP Draw(DWORD dwDrawAspect, LONG lIndex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDevice, HDC hdcDraw, LPCRECTL prcBounds, LPCRECTL prcWBounds, BOOL (__stdcall *pfnContinue)(DWORD dwContinue), DWORD dwContinue);
|
||||
STDMETHODIMP GetColorSet(DWORD dwAspect, LONG lindex, void* pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE** ppColorSet);
|
||||
STDMETHODIMP Freeze(DWORD dwAspect, LONG lindex, void* pvAspect, DWORD* pdwFreeze);
|
||||
STDMETHODIMP Unfreeze(DWORD dwFreeze);
|
||||
STDMETHODIMP SetAdvise(DWORD dwAspect, DWORD advf, IAdviseSink* pAdviseSink);
|
||||
STDMETHODIMP GetAdvise(DWORD* pdwAspect, DWORD* padvf, IAdviseSink** ppAdviseSink);
|
||||
STDMETHODIMP GetExtent(DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL psizel);
|
||||
STDMETHODIMP GetRect(DWORD dwAspect, LPRECTL pRect);
|
||||
STDMETHODIMP GetViewStatus(DWORD* pdwStatus);
|
||||
STDMETHODIMP QueryHitPoint(DWORD dwAspect, LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult);
|
||||
STDMETHODIMP QueryHitRect(DWORD dwAspect, LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult);
|
||||
STDMETHODIMP GetNaturalExtent(DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel);
|
||||
END_INTERFACE_PART(ViewObjectEx)
|
||||
|
||||
// IDataObject Implementation
|
||||
BEGIN_INTERFACE_PART(DataObject, IDataObject)
|
||||
STDMETHODIMP GetData(FORMATETC *pfmtc, STGMEDIUM *pstgm);
|
||||
STDMETHODIMP GetDataHere(FORMATETC *pfmtc, STGMEDIUM *pstgm);
|
||||
STDMETHODIMP QueryGetData(FORMATETC *pfmtc);
|
||||
STDMETHODIMP GetCanonicalFormatEtc(FORMATETC * pfmtcIn, FORMATETC * pfmtcOut);
|
||||
STDMETHODIMP SetData(FORMATETC *pfmtc, STGMEDIUM *pstgm, BOOL fRelease);
|
||||
STDMETHODIMP EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenum);
|
||||
STDMETHODIMP DAdvise(FORMATETC *pfmtc, DWORD advf, IAdviseSink *psink, DWORD *pdwConnection);
|
||||
STDMETHODIMP DUnadvise(DWORD dwConnection);
|
||||
STDMETHODIMP EnumDAdvise(IEnumSTATDATA **ppenum);
|
||||
END_INTERFACE_PART(DataObject)
|
||||
|
||||
// IProvideClassInfo Implementation
|
||||
BEGIN_INTERFACE_PART(ProvideClassInfo, IProvideClassInfo)
|
||||
STDMETHODIMP GetClassInfo(ITypeInfo** ppTI);
|
||||
END_INTERFACE_PART(ProvideClassInfo)
|
||||
|
||||
// IConnectionPointContainer Implementation
|
||||
BEGIN_INTERFACE_PART(ConnectionPointContainer, IConnectionPointContainer)
|
||||
STDMETHODIMP EnumConnectionPoints(IEnumConnectionPoints **ppEnum);
|
||||
STDMETHODIMP FindConnectionPoint(REFIID riid, IConnectionPoint **ppCP);
|
||||
END_INTERFACE_PART(ConnectionPointContainer)
|
||||
|
||||
// IEnumConnectionPoints Implementation
|
||||
BEGIN_INTERFACE_PART(EnumConnectionPoints, IEnumConnectionPoints)
|
||||
STDMETHODIMP Next(ULONG cConnections, IConnectionPoint **rgpcn, ULONG *pcFetched);
|
||||
STDMETHODIMP Skip(ULONG cConnections);
|
||||
STDMETHODIMP Reset(void);
|
||||
STDMETHODIMP Clone(IEnumConnectionPoints **ppEnum);
|
||||
END_INTERFACE_PART(EnumConnectionPoints)
|
||||
|
||||
// IConnectionPoint Implementation
|
||||
BEGIN_INTERFACE_PART(ConnectionPoint, IConnectionPoint)
|
||||
STDMETHODIMP GetConnectionInterface(IID *pIID);
|
||||
STDMETHODIMP GetConnectionPointContainer(IConnectionPointContainer **ppCPC);
|
||||
STDMETHODIMP Advise(IUnknown *pUnk, DWORD *pdwCookie);
|
||||
STDMETHODIMP Unadvise(DWORD dwCookie);
|
||||
STDMETHODIMP EnumConnections(IEnumConnections **ppEnum);
|
||||
END_INTERFACE_PART(ConnectionPoint)
|
||||
|
||||
// IOleCommandTarget Implementation
|
||||
BEGIN_INTERFACE_PART(OleCommandTarget , IOleCommandTarget)
|
||||
STDMETHODIMP QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText);
|
||||
STDMETHODIMP Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvaIn, VARIANTARG *pvaOut);
|
||||
END_INTERFACE_PART(OleCommandTarget)
|
||||
|
||||
// ISupportErrorInfo Implementation
|
||||
BEGIN_INTERFACE_PART(SupportErrorInfo, ISupportErrorInfo)
|
||||
STDMETHODIMP InterfaceSupportsErrorInfo(REFIID riid);
|
||||
END_INTERFACE_PART(SupportErrorInfo)
|
||||
|
||||
// IObjectSafety Implementation
|
||||
BEGIN_INTERFACE_PART(ObjectSafety, IObjectSafety)
|
||||
STDMETHODIMP GetInterfaceSafetyOptions(REFIID riid, DWORD *pdwSupportedOptions,DWORD *pdwEnabledOptions);
|
||||
STDMETHODIMP SetInterfaceSafetyOptions(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions);
|
||||
END_INTERFACE_PART(ObjectSafety)
|
||||
|
||||
// IDsoDocObjectSite Implementation (for DocObject Callbacks to control)
|
||||
BEGIN_INTERFACE_PART(DsoDocObjectSite, IDsoDocObjectSite)
|
||||
STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void **ppv);
|
||||
STDMETHODIMP GetWindow(HWND* phWnd);
|
||||
STDMETHODIMP GetBorder(LPRECT prcBorder);
|
||||
STDMETHODIMP GetHostName(LPWSTR *ppwszHostName);
|
||||
STDMETHODIMP SysMenuCommand(UINT uiCharCode);
|
||||
STDMETHODIMP SetStatusText(LPCOLESTR pszText);
|
||||
END_INTERFACE_PART(DsoDocObjectSite)
|
||||
|
||||
STDMETHODIMP InitializeNewInstance();
|
||||
|
||||
STDMETHODIMP InPlaceActivate(LONG lVerb);
|
||||
STDMETHODIMP UIActivate(BOOL fForceUIActive);
|
||||
STDMETHODIMP_(void) SetInPlaceVisible(BOOL fShow);
|
||||
STDMETHODIMP_(void) UpdateModalState(BOOL fModeless, BOOL fNotifyIPObject);
|
||||
STDMETHODIMP_(void) UpdateInteractiveState(BOOL fActive);
|
||||
STDMETHODIMP_(void) EnableDropFile(BOOL fEnable);
|
||||
|
||||
STDMETHODIMP_(void) OnDraw(DWORD dvAspect, HDC hdcDraw, LPRECT prcBounds, LPRECT prcWBounds, HDC hicTargetDev, BOOL fOptimize);
|
||||
STDMETHODIMP_(void) OnDestroyWindow();
|
||||
STDMETHODIMP_(void) OnResize();
|
||||
STDMETHODIMP_(void) OnMouseMove(UINT x, UINT y);
|
||||
STDMETHODIMP_(void) OnButtonDown(UINT x, UINT y);
|
||||
STDMETHODIMP_(void) OnMenuMessage(UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
STDMETHODIMP_(void) OnToolbarAction(DWORD cmd);
|
||||
STDMETHODIMP_(void) OnDropFile(HDROP hdrpFile);
|
||||
STDMETHODIMP_(void) OnTimer(UINT id);
|
||||
|
||||
STDMETHODIMP_(void) OnForegroundCompChange(BOOL fCompActive);
|
||||
STDMETHODIMP_(void) OnAppActivationChange(BOOL fActive, DWORD dwThreadID);
|
||||
STDMETHODIMP_(void) OnComponentActivationChange(BOOL fActivate);
|
||||
STDMETHODIMP_(void) OnCtrlFocusChange(BOOL fCtlGotFocus, HWND hFocusWnd);
|
||||
STDMETHODIMP_(void) OnUIFocusChange(BOOL fUIActive);
|
||||
|
||||
STDMETHODIMP_(void) OnPaletteChanged(HWND hwndPalChg);
|
||||
STDMETHODIMP_(void) OnSyncPaint();
|
||||
STDMETHODIMP_(void) OnWindowEnable(BOOL fEnable){TRACE1("CDsoFramerControl::OnWindowEnable(%d)\n", fEnable);}
|
||||
STDMETHODIMP_(BOOL) OnSysCommandMenu(CHAR ch);
|
||||
|
||||
STDMETHODIMP_(HMENU) GetActivePopupMenu();
|
||||
STDMETHODIMP_(BOOL) FAlertUser(HRESULT hr, LPWSTR pwsFileName);
|
||||
STDMETHODIMP_(BOOL) FRunningInDesignMode();
|
||||
STDMETHODIMP DoDialogAction(dsoShowDialogType item);
|
||||
|
||||
STDMETHODIMP_(void) RaiseActivationEvent(BOOL fActive);
|
||||
|
||||
STDMETHODIMP ProvideErrorInfo(HRESULT hres);
|
||||
STDMETHODIMP RaiseAutomationEvent(DISPID did, ULONG cargs, VARIANT *pvtargs);
|
||||
|
||||
STDMETHODIMP SetTempServerLock(BOOL fLock);
|
||||
STDMETHODIMP ResetFrameHook(HWND hwndFrameWindow);
|
||||
|
||||
// Some inline methods are provided for common tasks such as site notification
|
||||
// or calculation of draw size based on user selection of tools and border style.
|
||||
|
||||
void __fastcall ViewChanged()
|
||||
{
|
||||
if (m_pDataAdviseHolder) // Send data change notification.
|
||||
m_pDataAdviseHolder->SendOnDataChange((IDataObject*)&m_xDataObject, NULL, 0);
|
||||
|
||||
if (m_pViewAdviseSink) // Send the view change notification....
|
||||
{
|
||||
m_pViewAdviseSink->OnViewChange(DVASPECT_CONTENT, -1);
|
||||
if (m_fViewAdviseOnlyOnce) // If they asked to be advised once, kill the connection
|
||||
m_xViewObjectEx.SetAdvise(DVASPECT_CONTENT, 0, NULL);
|
||||
}
|
||||
InvalidateRect(m_hwnd, NULL, TRUE); // Ensure a full repaint...
|
||||
}
|
||||
|
||||
void __fastcall GetSizeRectAfterBorder(LPRECT lprcx, LPRECT lprc)
|
||||
{
|
||||
if (lprcx) CopyRect(lprc, lprcx);
|
||||
else SetRect(lprc, 0, 0, m_Size.cx, m_Size.cy);
|
||||
if (m_fBorderStyle) InflateRect(lprc, -(4-m_fBorderStyle), -(4-m_fBorderStyle));
|
||||
}
|
||||
|
||||
void __fastcall GetSizeRectAfterTitlebar(LPRECT lprcx, LPRECT lprc)
|
||||
{
|
||||
GetSizeRectAfterBorder(lprcx, lprc);
|
||||
if (m_fShowTitlebar) lprc->top += 21;
|
||||
}
|
||||
|
||||
void __fastcall GetSizeRectForMenuBar(LPRECT lprcx, LPRECT lprc)
|
||||
{
|
||||
GetSizeRectAfterTitlebar(lprcx, lprc);
|
||||
lprc->bottom = lprc->top + 24;
|
||||
}
|
||||
|
||||
void __fastcall GetSizeRectForDocument(LPRECT lprcx, LPRECT lprc)
|
||||
{
|
||||
GetSizeRectAfterTitlebar(lprcx, lprc);
|
||||
if (m_fShowMenuBar) lprc->top += 24;
|
||||
if (lprc->top > lprc->bottom) lprc->top = lprc->bottom;
|
||||
}
|
||||
|
||||
|
||||
void __fastcall RedrawCaption()
|
||||
{
|
||||
RECT rcT;
|
||||
if ((m_hwnd) && (m_fShowTitlebar))
|
||||
{ GetClientRect(m_hwnd, &rcT); rcT.bottom = 21;
|
||||
InvalidateRect(m_hwnd, &rcT, FALSE);
|
||||
}
|
||||
if ((m_hwnd) && (m_fShowMenuBar))
|
||||
{ GetSizeRectForMenuBar(NULL, &rcT);
|
||||
InvalidateRect(m_hwnd, &rcT, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL __fastcall FUseFrameHook(){return (m_lHookPolicy != dsoDisableHook);};
|
||||
BOOL __fastcall FDelayFrameHookSet(){return (m_lHookPolicy == dsoSetOnFirstOpen);};
|
||||
|
||||
BOOL __fastcall FDrawBitmapOnAppDeactive(){return (!(m_lActivationPolicy & dsoKeepUIActiveOnAppDeactive));}
|
||||
BOOL __fastcall FChangeObjActiveOnFocusChange(){return (m_lActivationPolicy & dsoCompDeactivateOnLostFocus);};
|
||||
BOOL __fastcall FIPDeactivateOnCompChange(){return (m_lActivationPolicy & dsoIPDeactivateOnCompDeactive);};
|
||||
|
||||
// The control window proceedure is handled through static class method.
|
||||
static STDMETHODIMP_(LRESULT) ControlWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// Force redaw of all child windows...
|
||||
STDMETHODIMP_(BOOL) InvalidateAllChildWindows(HWND hwnd);
|
||||
static STDMETHODIMP_(BOOL) InvalidateAllChildWindowsCallback(HWND hwnd, LPARAM lParam);
|
||||
|
||||
// The variables for the control are kept private but accessible to the
|
||||
// nested classes for each interface.
|
||||
private:
|
||||
|
||||
ULONG m_cRef; // Reference count
|
||||
IUnknown *m_pOuterUnknown; // Outer IUnknown (points to m_xInternalUnknown if not agg)
|
||||
ITypeInfo *m_ptiDispType; // ITypeInfo Pointer (IDispatch Impl)
|
||||
EXCEPINFO *m_pDispExcep; // EXCEPINFO Pointer (IDispatch Impl)
|
||||
|
||||
HWND m_hwnd; // our window
|
||||
HWND m_hwndParent; // immediate parent window
|
||||
SIZEL m_Size; // the size of this control
|
||||
RECT m_rcLocation; // where we at
|
||||
|
||||
IOleClientSite *m_pClientSite; // active client site of host containter
|
||||
IOleControlSite *m_pControlSite; // control site
|
||||
IOleInPlaceSite *m_pInPlaceSite; // inplace site
|
||||
IOleInPlaceFrame *m_pInPlaceFrame; // inplace frame
|
||||
IOleInPlaceUIWindow *m_pInPlaceUIWindow; // inplace ui window
|
||||
|
||||
IAdviseSink *m_pViewAdviseSink; // advise sink for view (only 1 allowed)
|
||||
IOleAdviseHolder *m_pOleAdviseHolder; // OLE advise holder (for oleobject sinks)
|
||||
IDataAdviseHolder *m_pDataAdviseHolder; // OLE data advise holder (for dataobject sink)
|
||||
IDispatch *m_dispEvents; // event sink (we only support 1 at a time)
|
||||
IStorage *m_pOleStorage; // IStorage for OLE hosts.
|
||||
|
||||
CDsoDocObject *m_pDocObjFrame; // The Embedding Class
|
||||
CDsoDocObject *m_pServerLock; // Optional Server Lock for out-of-proc DocObject
|
||||
|
||||
OLE_COLOR m_clrBorderColor; // Control Colors
|
||||
OLE_COLOR m_clrBackColor; // "
|
||||
OLE_COLOR m_clrForeColor; // "
|
||||
OLE_COLOR m_clrTBarColor; // "
|
||||
OLE_COLOR m_clrTBarTextColor; // "
|
||||
|
||||
BSTR m_bstrCustomCaption; // A custom caption (if provided)
|
||||
HMENU m_hmenuFilePopup; // The File menu popup
|
||||
WORD m_wFileMenuFlags; // Bitflags of enabled file menu items.
|
||||
WORD m_wSelMenuItem; // Which item (if any) is selected
|
||||
WORD m_cMenuItems; // Count of items on menu bar
|
||||
RECT m_rgrcMenuItems[DSO_MAX_MENUITEMS]; // Menu bar items
|
||||
CHAR m_rgchMenuAccel[DSO_MAX_MENUITEMS]; // Menu bar accelerators
|
||||
LPWSTR m_pwszHostName; // Custom name for SetHostNames
|
||||
|
||||
class CDsoFrameHookManager* m_pHookManager; // Frame Window Hook Manager Class
|
||||
LONG m_lHookPolicy; // Policy on how to use frame hook for this host.
|
||||
LONG m_lActivationPolicy; // Policy on activation behavior for comp focus
|
||||
HBITMAP m_hbmDeactive; // Bitmap used for IPDeactiveOnXXX policies
|
||||
UINT m_uiSyncPaint; // Sync paint counter for draw issues with UIDeactivateOnXXX
|
||||
|
||||
unsigned int m_fDirty:1; // does the control need to be resaved?
|
||||
unsigned int m_fInPlaceActive:1; // are we in place active or not?
|
||||
unsigned int m_fInPlaceVisible:1; // we are in place visible or not?
|
||||
unsigned int m_fUIActive:1; // are we UI active or not.
|
||||
unsigned int m_fHasFocus:1; // do we have current focus.
|
||||
unsigned int m_fViewAdvisePrimeFirst: 1;// for IViewobject2::setadvise
|
||||
unsigned int m_fViewAdviseOnlyOnce: 1; // for IViewobject2::setadvise
|
||||
unsigned int m_fUsingWindowRgn:1; // for SetObjectRects and clipping
|
||||
unsigned int m_fFreezeEvents:1; // should events be frozen?
|
||||
unsigned int m_fDesignMode:1; // are we in design mode?
|
||||
unsigned int m_fModeFlagValid:1; // has mode changed since last check?
|
||||
unsigned int m_fBorderStyle:2; // the border style
|
||||
unsigned int m_fShowTitlebar:1; // should we show titlebar?
|
||||
unsigned int m_fShowToolbars:1; // should we show toolbars?
|
||||
unsigned int m_fModalState:1; // are we modal?
|
||||
unsigned int m_fObjectMenu:1; // are we over obj menu item?
|
||||
unsigned int m_fConCntDone:1; // for enum connectpts
|
||||
unsigned int m_fAppActive:1; // is the app active?
|
||||
unsigned int m_fComponentActive:1; // is the component active?
|
||||
unsigned int m_fShowMenuBar:1; // should we show menubar?
|
||||
unsigned int m_fInDocumentLoad:1; // set when loading file
|
||||
unsigned int m_fNoInteractive:1; // set when we don't allow interaction with docobj
|
||||
unsigned int m_fShowMenuPrev:1; // were menus visible before loss of interactivity?
|
||||
unsigned int m_fShowToolsPrev:1; // were toolbars visible before loss of interactivity?
|
||||
unsigned int m_fSyncPaintTimer:1; // is syncpaint timer running?
|
||||
unsigned int m_fInControlActivate:1; // is currently in activation call?
|
||||
unsigned int m_fInFocusChange:1; // are we in a focus change?
|
||||
unsigned int m_fActivateOnStatus:1; // we need to activate on change of status
|
||||
unsigned int m_fDisableMenuAccel:1; // using menu accelerators
|
||||
unsigned int m_fBkgrdPaintTimer:1; // using menu accelerators
|
||||
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// CDsoFrameWindowHook -- Frame Window Hook Class
|
||||
//
|
||||
// Used by the control to allow for proper host notification of focus
|
||||
// and activation events occurring at top-level window frame. Because
|
||||
// this DocObject host is an OCX, we don't own these notifications and
|
||||
// have to "steal" them from our parent using a subclass.
|
||||
//
|
||||
// IMPORTANT: Since the parent frame may exist on a separate thread, this
|
||||
// class does nothing but the hook. The code to notify the active component
|
||||
// is in a separate global class that is shared by all threads.
|
||||
//
|
||||
class CDsoFrameWindowHook
|
||||
{
|
||||
public:
|
||||
CDsoFrameWindowHook(){ODS("CDsoFrameWindowHook created\n");m_cHookCount=0;m_hwndTopLevelHost=NULL;m_pfnOrigWndProc=NULL;m_fHostUnicodeWindow=FALSE;}
|
||||
~CDsoFrameWindowHook(){ODS("CDsoFrameWindowHook deleted\n");}
|
||||
|
||||
static STDMETHODIMP_(CDsoFrameWindowHook*) AttachToFrameWindow(HWND hwndParent);
|
||||
STDMETHODIMP Detach();
|
||||
|
||||
static STDMETHODIMP_(CDsoFrameWindowHook*) GetHookFromWindow(HWND hwnd);
|
||||
inline STDMETHODIMP_(void) AddRef(){InterlockedIncrement((LONG*)&m_cHookCount);}
|
||||
|
||||
static STDMETHODIMP_(LRESULT)
|
||||
HostWindowProcHook(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
protected:
|
||||
DWORD m_cHookCount;
|
||||
HWND m_hwndTopLevelHost; // Top-level host window (hooked)
|
||||
WNDPROC m_pfnOrigWndProc;
|
||||
BOOL m_fHostUnicodeWindow;
|
||||
};
|
||||
|
||||
// THE MAX NUMBER OF DSOFRAMER CONTROLS PER PROCESS
|
||||
#define DSOF_MAX_CONTROLS 20
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// CDsoFrameHookManager -- Hook Manager Class
|
||||
//
|
||||
// Used to keep track of which control is active and forward notifications
|
||||
// to it using window messages (to cross thread boundaries).
|
||||
//
|
||||
class CDsoFrameHookManager
|
||||
{
|
||||
public:
|
||||
CDsoFrameHookManager(){ODS("CDsoFrameHookManager created\n"); m_fAppActive=TRUE; m_idxActive=DSOF_MAX_CONTROLS; m_cComponents=0;}
|
||||
~CDsoFrameHookManager(){ODS("CDsoFrameHookManager deleted\n");}
|
||||
|
||||
static STDMETHODIMP_(CDsoFrameHookManager*)
|
||||
RegisterFramerControl(HWND hwndParent, HWND hwndControl);
|
||||
|
||||
STDMETHODIMP AddComponent(HWND hwndParent, HWND hwndControl);
|
||||
STDMETHODIMP DetachComponent(HWND hwndControl);
|
||||
STDMETHODIMP SetActiveComponent(HWND hwndControl);
|
||||
STDMETHODIMP OnComponentNotify(DWORD msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
inline STDMETHODIMP_(HWND)
|
||||
GetActiveComponentWindow(){return m_pComponents[m_idxActive].hwndControl;}
|
||||
|
||||
inline STDMETHODIMP_(CDsoFrameWindowHook*)
|
||||
GetActiveComponentFrame(){return m_pComponents[m_idxActive].phookFrame;}
|
||||
|
||||
STDMETHODIMP_(BOOL) SendNotifyMessage(HWND hwnd, DWORD msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
protected:
|
||||
BOOL m_fAppActive;
|
||||
DWORD m_idxActive;
|
||||
DWORD m_cComponents;
|
||||
struct FHOOK_COMPONENTS
|
||||
{
|
||||
HWND hwndControl;
|
||||
CDsoFrameWindowHook *phookFrame;
|
||||
} m_pComponents[DSOF_MAX_CONTROLS];
|
||||
};
|
||||
|
||||
#endif //DS_DSOFRAMER_H
|
69
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln
Normal file
69
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln
Normal file
@@ -0,0 +1,69 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsoframer", "dsoframer.vcproj", "{005801E1-A867-4CBB-995F-BA2EF4360BDF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
77
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln.bak
Normal file
77
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln.bak
Normal file
@@ -0,0 +1,77 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsoframer", "dsoframer.vcproj", "{005801E1-A867-4CBB-995F-BA2EF4360BDF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleCSharp", "..\SampleCSharp\SampleCSharp.csproj", "{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestC1DockingTab", "..\TestC1DockingTab\TestC1DockingTab.csproj", "{D066A5C4-72B8-45F8-A117-B967019F41AE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetBarDockable", "..\DotNetBarDockable\DotNetBarDockable.csproj", "{96DC8B48-A4E2-4826-A182-BE112B628B50}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetBarControl", "..\DotNetBarControl\DotNetBarControl.csproj", "{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E7C7BC82-10A6-459B-8D48-9CE1C070E9FD}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D066A5C4-72B8-45F8-A117-B967019F41AE}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{96DC8B48-A4E2-4826-A182-BE112B628B50}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9939DC3D-AFB6-4B0D-813A-3EBE3FF7249D}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
21
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln.old
Normal file
21
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.sln.old
Normal file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsoframer", "dsoframer.vcproj", "{005801E1-A867-4CBB-995F-BA2EF4360BDF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug.ActiveCfg = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Debug.Build.0 = Debug|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release.ActiveCfg = Release|Win32
|
||||
{005801E1-A867-4CBB-995F-BA2EF4360BDF}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.suo.old
Normal file
BIN
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.suo.old
Normal file
Binary file not shown.
470
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.vcproj
Normal file
470
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.vcproj
Normal file
@@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="dsoframer"
|
||||
ProjectGUID="{005801E1-A867-4CBB-995F-BA2EF4360BDF}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
|
||||
Outputs="$(OutDir)\regsvr32.trg"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/dsoframer.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
RuntimeLibrary="1"
|
||||
StructMemberAlignment="3"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug/dsoframer.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="oledlg.lib urlmon.lib"
|
||||
OutputFile="Debug/dsoframer.ocx"
|
||||
Version="1.2"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\dsoframer.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/dsoframer.pdb"
|
||||
GenerateMapFile="true"
|
||||
MapFileName=".\Debug/dsoframer.map"
|
||||
SubSystem="2"
|
||||
EntryPointSymbol=""
|
||||
BaseAddress="0x22000000"
|
||||
ImportLibrary=".\Debug/dsoframer.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
|
||||
Outputs="$(OutDir)\regsvr32.trg"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/dsoframer.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
InlineFunctionExpansion="1"
|
||||
FavorSizeOrSpeed="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="3"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release/dsoframer.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="oledlg.lib urlmon.lib"
|
||||
OutputFile="Release/dsoframer.ocx"
|
||||
Version="1.2"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\dsoframer.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Release/dsoframer.pdb"
|
||||
GenerateMapFile="true"
|
||||
MapFileName=".\Release/dsoframer.map"
|
||||
SubSystem="2"
|
||||
OptimizeForWindows98="1"
|
||||
BaseAddress="0x22000000"
|
||||
TurnOffAssemblyGeneration="true"
|
||||
ImportLibrary=".\Release/dsoframer.lib"
|
||||
MergeSections=".rdata=.text"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="c;cpp;rc;idl"
|
||||
>
|
||||
<File
|
||||
RelativePath="classfactory.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofauto.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofcontrol.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofdocobj.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofprint.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lib\dsoframer.idl"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
HeaderFileName=".\lib\dsoframerlib.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName=".\lib\dsoframerlib.c"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\dsoframer.rc"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="res;$(OUTDIR)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="res;$(OUTDIR)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mainentry.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utilities.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;def"
|
||||
>
|
||||
<File
|
||||
RelativePath="dsofdocobj.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsoframer.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsoframer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utilities.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="ico;cur;tlb;bmp"
|
||||
>
|
||||
<File
|
||||
RelativePath="res\dso.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="lib\dsoframer.olb"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\toolbox.bmp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
360
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.vcproj.7.10.old
Normal file
360
PROMS/DSOFramer/DSOFramer/Source2005/dsoframer.vcproj.7.10.old
Normal file
@@ -0,0 +1,360 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="dsoframer"
|
||||
ProjectGUID="{005801E1-A867-4CBB-995F-BA2EF4360BDF}"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
RuntimeLibrary="5"
|
||||
StructMemberAlignment="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Debug/dsoframer.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
|
||||
"
|
||||
Outputs="$(OutDir)\regsvr32.trg"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="oledlg.lib urlmon.lib"
|
||||
OutputFile="Debug/dsoframer.ocx"
|
||||
Version="1.2"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\dsoframer.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/dsoframer.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\Debug/dsoframer.map"
|
||||
SubSystem="2"
|
||||
EntryPointSymbol=""
|
||||
BaseAddress="0x22000000"
|
||||
ImportLibrary=".\Debug/dsoframer.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/dsoframer.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
InlineFunctionExpansion="1"
|
||||
FavorSizeOrSpeed="2"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
StructMemberAlignment="3"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release/dsoframer.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
|
||||
"
|
||||
Outputs="$(OutDir)\regsvr32.trg"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="oledlg.lib urlmon.lib"
|
||||
OutputFile="Release/dsoframer.ocx"
|
||||
Version="1.2"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\dsoframer.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Release/dsoframer.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\Release/dsoframer.map"
|
||||
SubSystem="2"
|
||||
OptimizeForWindows98="1"
|
||||
BaseAddress="0x22000000"
|
||||
TurnOffAssemblyGeneration="TRUE"
|
||||
ImportLibrary=".\Release/dsoframer.lib"
|
||||
MergeSections=".rdata=.text"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/dsoframer.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="c;cpp;rc;idl">
|
||||
<File
|
||||
RelativePath="classfactory.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofauto.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofcontrol.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofdocobj.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsofprint.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lib\dsoframer.idl">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
HeaderFileName=".\lib\dsoframerlib.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName=".\lib\dsoframerlib.c"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\dsoframer.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="res;$(OUTDIR)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="res;$(OUTDIR)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mainentry.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utilities.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;def">
|
||||
<File
|
||||
RelativePath="dsofdocobj.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsoframer.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dsoframer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utilities.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="version.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="ico;cur;tlb;bmp">
|
||||
<File
|
||||
RelativePath="res\dso.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="lib\dsoframer.olb">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\toolbox.bmp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
88
PROMS/DSOFramer/DSOFramer/Source2005/ipprevw.h
Normal file
88
PROMS/DSOFramer/DSOFramer/Source2005/ipprevw.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/***************************************************************************
|
||||
* IPPREVIEW.H
|
||||
*
|
||||
* DSOFramer: IOleInplacePrintPreview/IOlePreviewCallback
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef __IPPREVIEW_H
|
||||
#define __IPPREVIEW_H
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IOlePreviewCallback
|
||||
//
|
||||
// Implemented by host to receive notifaction messages
|
||||
// from ip object while displaying a print preview.
|
||||
//
|
||||
DEFINE_GUID(IID_IOlePreviewCallback, 0xB722BCD5, 0x4E68, 0x101B, 0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IOlePreviewCallback
|
||||
DECLARE_INTERFACE_(IOlePreviewCallback, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
#endif
|
||||
// IOlePreviewCallback methods
|
||||
STDMETHOD(Notify)(THIS_ DWORD wStatus, LONG nLastPage, LPOLESTR pwszPreviewStatus) PURE;
|
||||
};
|
||||
|
||||
#define NOTIFY_FINISHED 1
|
||||
#define NOTIFY_BUSY 2
|
||||
#define NOTIFY_IDLE 4
|
||||
#define NOTIFY_DISABLERESIZE 8
|
||||
#define NOTIFY_QUERYCLOSEPREVIEW 16
|
||||
#define NOTIFY_FORCECLOSEPREVIEW 32
|
||||
#define NOTIFY_UIACTIVE 64
|
||||
#define NOTIFY_UNABLETOPREVIEW 128
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IOleInplacePrintPreview
|
||||
//
|
||||
// Implemented by server to start/stop print preview. Hosts should
|
||||
// call QueryStatus to make sure server is able to enter preview mode
|
||||
// before calling StartPrintPreview.
|
||||
//
|
||||
DEFINE_GUID(IID_IOleInplacePrintPreview, 0xB722BCD4, 0x4E68, 0x101B, 0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IOleInplacePrintPreview
|
||||
DECLARE_INTERFACE_(IOleInplacePrintPreview, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
#endif
|
||||
// IOleInplacePrintPreview methods
|
||||
STDMETHOD(StartPrintPreview)(THIS_ DWORD grfFlags, DVTARGETDEVICE *ptd, IOlePreviewCallback *ppCallback, LONG nFirstPage) PURE;
|
||||
STDMETHOD(EndPrintPreview)(THIS_ BOOL fForceClose) PURE;
|
||||
STDMETHOD(QueryStatus)(THIS_ void) PURE;
|
||||
};
|
||||
|
||||
#define PREVIEWFLAG_MAYBOTHERUSER 1
|
||||
#define PREVIEWFLAG_PROMPTUSER 2
|
||||
#define PREVIEWFLAG_USERMAYCHANGEPRINTER 4
|
||||
#define PREVIEWFLAG_RECOMPOSETODEVICE 8
|
||||
|
||||
|
||||
#endif //__IPPREVIEW_H
|
318
PROMS/DSOFramer/DSOFramer/Source2005/mainentry.cpp
Normal file
318
PROMS/DSOFramer/DSOFramer/Source2005/mainentry.cpp
Normal file
@@ -0,0 +1,318 @@
|
||||
/***************************************************************************
|
||||
* MAINENTRY.CPP
|
||||
*
|
||||
* Main DLL Entry and Required COM Entry Points.
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#define INITGUID // Init the GUIDS for the control...
|
||||
#include "dsoframer.h"
|
||||
|
||||
HINSTANCE v_hModule = NULL; // DLL module handle
|
||||
HANDLE v_hPrivateHeap = NULL; // Private Memory Heap
|
||||
ULONG v_cLocks = 0; // Count of server locks
|
||||
HICON v_icoOffDocIcon = NULL; // Small office icon (for caption bar)
|
||||
BOOL v_fUnicodeAPI = FALSE; // Flag to determine if we should us Unicode API
|
||||
BOOL v_fWindows2KPlus = FALSE;
|
||||
CRITICAL_SECTION v_csecThreadSynch;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// DllMain -- OCX Main Entry
|
||||
//
|
||||
//
|
||||
extern "C" BOOL APIENTRY DllMain(HINSTANCE hDllHandle, DWORD dwReason, LPVOID /*lpReserved*/)
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
v_hModule = hDllHandle;
|
||||
v_hPrivateHeap = HeapCreate(0, 0x1000, 0);
|
||||
v_icoOffDocIcon = (HICON)LoadImage(hDllHandle, MAKEINTRESOURCE(IDI_SMALLOFFDOC), IMAGE_ICON, 16, 16, 0);
|
||||
{
|
||||
DWORD dwVersion = GetVersion();
|
||||
v_fUnicodeAPI = ((dwVersion & 0x80000000) == 0);
|
||||
v_fWindows2KPlus = ((v_fUnicodeAPI) && (LOBYTE(LOWORD(dwVersion)) > 4));
|
||||
}
|
||||
InitializeCriticalSection(&v_csecThreadSynch);
|
||||
DisableThreadLibraryCalls(hDllHandle);
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (v_icoOffDocIcon) DeleteObject(v_icoOffDocIcon);
|
||||
if (v_hPrivateHeap) HeapDestroy(v_hPrivateHeap);
|
||||
DeleteCriticalSection(&v_csecThreadSynch);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef DSO_MIN_CRT_STARTUP
|
||||
extern "C" BOOL APIENTRY _DllMainCRTStartup(HINSTANCE hDllHandle, DWORD dwReason, LPVOID lpReserved)
|
||||
{return DllMain(hDllHandle, dwReason, lpReserved);}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Standard COM DLL Entry Points
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// DllCanUnloadNow
|
||||
//
|
||||
//
|
||||
STDAPI DllCanUnloadNow()
|
||||
{
|
||||
return ((v_cLocks == 0) ? S_OK : S_FALSE);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// DllGetClassObject
|
||||
//
|
||||
// Returns IClassFactory instance for FramerControl. We only support
|
||||
// this one object for creation.
|
||||
//
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
|
||||
{
|
||||
HRESULT hr;
|
||||
CDsoFramerClassFactory* pcf;
|
||||
|
||||
CHECK_NULL_RETURN(ppv, E_POINTER);
|
||||
*ppv = NULL;
|
||||
|
||||
// The only component we can create is the BinderControl...
|
||||
if (rclsid != CLSID_FramerControl)
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
|
||||
// Create the needed class factory...
|
||||
pcf = new CDsoFramerClassFactory();
|
||||
CHECK_NULL_RETURN(pcf, E_OUTOFMEMORY);
|
||||
|
||||
// Get requested interface.
|
||||
if (FAILED(hr = pcf->QueryInterface(riid, ppv)))
|
||||
{
|
||||
*ppv = NULL; delete pcf;
|
||||
}
|
||||
else InterlockedIncrement((LPLONG)&v_cLocks);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// DllRegisterServer
|
||||
//
|
||||
// Registration of the OCX.
|
||||
//
|
||||
STDAPI DllRegisterServer()
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
HKEY hk, hk2;
|
||||
DWORD dwret;
|
||||
CHAR szbuffer[256];
|
||||
LPWSTR pwszModule;
|
||||
ITypeInfo* pti;
|
||||
|
||||
// If we can't find the path to the DLL, we can't register...
|
||||
if (!FGetModuleFileName(v_hModule, &pwszModule))
|
||||
return E_FAIL;
|
||||
|
||||
// Setup the CLSID. This is the most important. If there is a critical failure,
|
||||
// we will set HR = GetLastError and return...
|
||||
if ((dwret = RegCreateKeyEx(HKEY_CLASSES_ROOT,
|
||||
"CLSID\\"DSOFRAMERCTL_CLSIDSTR, 0, NULL, 0, KEY_WRITE, NULL, &hk, NULL)) != ERROR_SUCCESS)
|
||||
{
|
||||
DsoMemFree(pwszModule);
|
||||
return HRESULT_FROM_WIN32(dwret);
|
||||
}
|
||||
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_SHORTNAME);
|
||||
RegSetValueEx(hk, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
|
||||
// Setup the InprocServer32 key...
|
||||
dwret = RegCreateKeyEx(hk, "InprocServer32", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, "Apartment");
|
||||
RegSetValueEx(hk2, "ThreadingModel", 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
|
||||
// We call a wrapper function for this setting since the path should be
|
||||
// stored in Unicode to handle non-ANSI file path names on some systems.
|
||||
// This wrapper will convert the path to ANSI if we are running on Win9x.
|
||||
// The rest of the Reg calls should be OK in ANSI since they do not
|
||||
// contain non-ANSI/Unicode-specific characters...
|
||||
if (!FSetRegKeyValue(hk2, pwszModule))
|
||||
hr = E_ACCESSDENIED;
|
||||
|
||||
RegCloseKey(hk2);
|
||||
|
||||
dwret = RegCreateKeyEx(hk, "ProgID", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_PROGID);
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
|
||||
}
|
||||
else hr = HRESULT_FROM_WIN32(dwret);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
dwret = RegCreateKeyEx(hk, "Control", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
else hr = HRESULT_FROM_WIN32(dwret);
|
||||
}
|
||||
|
||||
|
||||
// If we succeeded so far, andle the remaining (non-critical) reg keys...
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
dwret = RegCreateKeyEx(hk, "ToolboxBitmap32", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
LPWSTR pwszT = DsoCopyStringCat(pwszModule, L",102");
|
||||
if (pwszT)
|
||||
{
|
||||
FSetRegKeyValue(hk2, pwszT);
|
||||
DsoMemFree(pwszT);
|
||||
}
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
|
||||
dwret = RegCreateKeyEx(hk, "TypeLib", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_TLIBSTR);
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
|
||||
dwret = RegCreateKeyEx(hk, "Version", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_VERSIONSTR);
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
|
||||
dwret = RegCreateKeyEx(hk, "MiscStatus", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, "131473");
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
|
||||
dwret = RegCreateKeyEx(hk, "DataFormats\\GetSet\\0", 0, NULL, 0, KEY_WRITE, NULL, &hk2, NULL);
|
||||
if (dwret == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, "3,1,32,1");
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(hk);
|
||||
DsoMemFree(pwszModule);
|
||||
|
||||
// This should catch any critical failures during setup of CLSID...
|
||||
RETURN_ON_FAILURE(hr);
|
||||
|
||||
// Setup the ProgID (non-critical)...
|
||||
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, DSOFRAMERCTL_PROGID, 0,
|
||||
NULL, 0, KEY_WRITE, NULL, &hk, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_FULLNAME);
|
||||
RegSetValueEx(hk, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
|
||||
if (RegCreateKeyEx(hk, "CLSID", 0,
|
||||
NULL, 0, KEY_WRITE, NULL, &hk2, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpy(szbuffer, DSOFRAMERCTL_CLSIDSTR);
|
||||
RegSetValueEx(hk2, NULL, 0, REG_SZ, (BYTE *)szbuffer, lstrlen(szbuffer));
|
||||
RegCloseKey(hk2);
|
||||
}
|
||||
RegCloseKey(hk);
|
||||
}
|
||||
|
||||
// Load the type info (this should register the lib once)...
|
||||
hr = DsoGetTypeInfoEx(LIBID_DSOFramer, 0,
|
||||
DSOFRAMERCTL_VERSION_MAJOR, DSOFRAMERCTL_VERSION_MINOR, v_hModule, CLSID_FramerControl, &pti);
|
||||
if (SUCCEEDED(hr)) pti->Release();
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// RegRecursiveDeleteKey
|
||||
//
|
||||
// Helper function called by DllUnregisterServer for nested key removal.
|
||||
//
|
||||
static HRESULT RegRecursiveDeleteKey(HKEY hkParent, LPCSTR pszSubKey)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
HKEY hk;
|
||||
DWORD dwret, dwsize;
|
||||
FILETIME time ;
|
||||
CHAR szbuffer[512];
|
||||
|
||||
dwret = RegOpenKeyEx(hkParent, pszSubKey, 0, KEY_ALL_ACCESS, &hk);
|
||||
if (dwret != ERROR_SUCCESS)
|
||||
return HRESULT_FROM_WIN32(dwret);
|
||||
|
||||
// Enumerate all of the decendents of this child...
|
||||
dwsize = 510 ;
|
||||
while (RegEnumKeyEx(hk, 0, szbuffer, &dwsize, NULL, NULL, NULL, &time) == ERROR_SUCCESS)
|
||||
{
|
||||
// If there are any sub-folders, delete them first (to make NT happy)...
|
||||
hr = RegRecursiveDeleteKey(hk, szbuffer);
|
||||
if (FAILED(hr)) break;
|
||||
dwsize = 510;
|
||||
}
|
||||
|
||||
// Close the child...
|
||||
RegCloseKey(hk);
|
||||
|
||||
RETURN_ON_FAILURE(hr);
|
||||
|
||||
// Delete this child.
|
||||
dwret = RegDeleteKey(hkParent, pszSubKey);
|
||||
if (dwret != ERROR_SUCCESS)
|
||||
hr = HRESULT_FROM_WIN32(dwret);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// DllUnregisterServer
|
||||
//
|
||||
// Removal code for the OCX.
|
||||
//
|
||||
STDAPI DllUnregisterServer()
|
||||
{
|
||||
HRESULT hr;
|
||||
hr = RegRecursiveDeleteKey(HKEY_CLASSES_ROOT, "CLSID\\"DSOFRAMERCTL_CLSIDSTR);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
RegRecursiveDeleteKey(HKEY_CLASSES_ROOT, DSOFRAMERCTL_PROGID);
|
||||
RegRecursiveDeleteKey(HKEY_CLASSES_ROOT, "TypeLib\\"DSOFRAMERCTL_TLIBSTR);
|
||||
}
|
||||
|
||||
// This means the key does not exist (i.e., the DLL
|
||||
// was alreay unregistered, so return OK)...
|
||||
if (hr == 0x80070002) hr = S_OK;
|
||||
|
||||
return hr;
|
||||
}
|
253
PROMS/DSOFramer/DSOFramer/Source2005/rbbinder.h
Normal file
253
PROMS/DSOFramer/DSOFramer/Source2005/rbbinder.h
Normal file
@@ -0,0 +1,253 @@
|
||||
/***************************************************************************
|
||||
* RBBINDER.H
|
||||
*
|
||||
* DSOFramer: Internet Publishing Provider (MSDAIPP) Compatible Header
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef DS_RBBINDER_H
|
||||
#define DS_RBBINDER_H
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// The Microsoft OLEDB Provider for Internet Publishing (MSDAIPP) is now
|
||||
// standard with MDAC 2.5. However, it will run with MDAC 2.1, so this
|
||||
// header will allow us to safely compile without 2.5.
|
||||
//
|
||||
#define OLEDBVER 0x0250
|
||||
|
||||
#include <oledb.h>
|
||||
#include <oledberr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <pshpack2.h> // 2-byte structure packing
|
||||
|
||||
#ifndef BEGIN_INTERFACE
|
||||
#define BEGIN_INTERFACE
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// MSDAIPP Specific GUIDs (not defined in OLEDB.H)
|
||||
//
|
||||
DEFINE_GUID(CLSID_MSDAIPP_DSO, 0xAF320921L, 0x9381, 0x11d1, 0x9C, 0x3C, 0x00, 0x00, 0xF8, 0x75, 0xAC, 0x61);
|
||||
DEFINE_GUID(CLSID_MSDAIPP_BINDER, 0xE1D2BF40L, 0xA96B, 0x11d1, 0x9C, 0x6B, 0x00, 0x00, 0xF8, 0x75, 0xAC, 0x61);
|
||||
DEFINE_GUID(DBPROPSET_MSDAIPP_INIT, 0x8F1033E3L, 0xB2CD, 0x11d1, 0x9C, 0x74, 0x00, 0x00, 0xF8, 0x75, 0xAC, 0x61);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// OLEDB Additional defines -- included for machines with MDAC 2.0/2.1
|
||||
//
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// OLEDB 2.5 GUIDS Redefined for use here; this is to avoid linker errors
|
||||
// on machines that have different versions of MDAC libs.
|
||||
//
|
||||
DEFINE_GUID(IIDX_IBindResource, 0x0c733ab1L, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(IIDX_IDBBinderProperties, 0x0c733ab3L, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(IIDX_ICreateRow, 0x0c733ab2L, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(IIDX_IAuthenticate, 0x79eac9d0L, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
|
||||
DEFINE_GUID(DBGUIDX_STREAM, 0xc8b522f9L, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// MSDAIPP Binding Interfaces (all this should be standard in MDAC 2.5)
|
||||
//
|
||||
#ifndef __IBindResource_FWD_DEFINED__
|
||||
#define __IBindResource_FWD_DEFINED__
|
||||
|
||||
typedef interface IBindResource IBindResource;
|
||||
|
||||
typedef DWORD DBBINDURLFLAG;
|
||||
enum DBBINDURLFLAGENUM
|
||||
{
|
||||
DBBINDURLFLAG_READ = 0x1L,
|
||||
DBBINDURLFLAG_WRITE = 0x2L,
|
||||
DBBINDURLFLAG_READWRITE = 0x3L,
|
||||
DBBINDURLFLAG_SHARE_DENY_READ = 0x4L,
|
||||
DBBINDURLFLAG_SHARE_DENY_WRITE = 0x8L,
|
||||
DBBINDURLFLAG_SHARE_EXCLUSIVE = 0xcL,
|
||||
DBBINDURLFLAG_SHARE_DENY_NONE = 0x10L,
|
||||
DBBINDURLFLAG_ASYNCHRONOUS = 0x1000L,
|
||||
DBBINDURLFLAG_COLLECTION = 0x2000L,
|
||||
DBBINDURLFLAG_DELAYFETCHSTREAM = 0x4000L,
|
||||
DBBINDURLFLAG_DELAYFETCHCOLUMNS = 0x8000L,
|
||||
DBBINDURLFLAG_RECURSIVE = 0x400000L,
|
||||
DBBINDURLFLAG_OUTPUT = 0x800000L,
|
||||
DBBINDURLFLAG_WAITFORINIT = 0x1000000L,
|
||||
DBBINDURLFLAG_OPENIFEXISTS = 0x2000000L,
|
||||
DBBINDURLFLAG_OVERWRITE = 0x4000000L,
|
||||
DBBINDURLFLAG_ISSTRUCTUREDDOCUMENT = 0x8000000L
|
||||
};
|
||||
|
||||
typedef DWORD DBBINDURLSTATUS;
|
||||
enum DBBINDURLSTATUSENUM
|
||||
{
|
||||
DBBINDURLSTATUS_S_OK = 0L,
|
||||
DBBINDURLSTATUS_S_DENYNOTSUPPORTED = 0x1L,
|
||||
DBBINDURLSTATUS_S_DENYTYPENOTSUPPORTED = 0x4L,
|
||||
DBBINDURLSTATUS_S_REDIRECTED = 0x8L
|
||||
};
|
||||
|
||||
enum DBPROP_OLEDB25_RB
|
||||
{
|
||||
DBPROP_INIT_BINDFLAGS = 0x10eL,
|
||||
DBPROP_INIT_LOCKOWNER = 0x10fL
|
||||
};
|
||||
|
||||
typedef ULONG DBCOUNTITEM;
|
||||
|
||||
typedef struct tagDBIMPLICITSESSION
|
||||
{
|
||||
IUnknown __RPC_FAR *pUnkOuter;
|
||||
IID __RPC_FAR *piid;
|
||||
IUnknown __RPC_FAR *pSession;
|
||||
} DBIMPLICITSESSION;
|
||||
|
||||
#endif //__IBindResource_FWD_DEFINED__
|
||||
|
||||
|
||||
#ifndef __IBindResource_INTERFACE_DEFINED__
|
||||
#define __IBindResource_INTERFACE_DEFINED__
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IBindResource
|
||||
DECLARE_INTERFACE_(IBindResource, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
/* IUnknown methods */
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
#endif
|
||||
/* IBindResource methods */
|
||||
STDMETHOD(Bind)(THIS_
|
||||
/* [in] */ IUnknown __RPC_FAR *pUnkOuter,
|
||||
/* [in] */ LPCOLESTR pwszURL,
|
||||
/* [in] */ DBBINDURLFLAG dwBindURLFlags,
|
||||
/* [in] */ REFGUID rguid,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [in] */ IAuthenticate __RPC_FAR *pAuthenticate,
|
||||
/* [unique][out][in] */ DBIMPLICITSESSION __RPC_FAR *pImplSession,
|
||||
/* [unique][out][in] */ DBBINDURLSTATUS __RPC_FAR *pdwBindStatus,
|
||||
/* [iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk) PURE;
|
||||
};
|
||||
|
||||
#endif //__IBindResource_INTERFACE_DEFINED__
|
||||
|
||||
|
||||
|
||||
#ifndef __ICreateRow_INTERFACE_DEFINED__
|
||||
#define __ICreateRow_INTERFACE_DEFINED__
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ICreateRow
|
||||
DECLARE_INTERFACE_(ICreateRow, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
/* IUnknown methods */
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
#endif
|
||||
/* ICreateRow methods */
|
||||
STDMETHOD(CreateRow)(THIS_
|
||||
/* [unique][in] */ IUnknown __RPC_FAR *pUnkOuter,
|
||||
/* [in] */ LPCOLESTR pwszURL,
|
||||
/* [in] */ DBBINDURLFLAG dwBindURLFlags,
|
||||
/* [in] */ REFGUID rguid,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [unique][in] */ IAuthenticate __RPC_FAR *pAuthenticate,
|
||||
/* [unique][out][in] */ IUnknown __RPC_FAR *pImplSession,
|
||||
/* [unique][out][in] */ DBBINDURLSTATUS __RPC_FAR *pdwBindStatus,
|
||||
/* [out] */ LPOLESTR __RPC_FAR *ppwszNewURL,
|
||||
/* [iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk) PURE;
|
||||
};
|
||||
|
||||
#endif //__ICreateRow_INTERFACE_DEFINED__
|
||||
|
||||
|
||||
#ifndef __IDBBinderProperties_INTERFACE_DEFINED__
|
||||
#define __IDBBinderProperties_INTERFACE_DEFINED__
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDBBinderProperties
|
||||
DECLARE_INTERFACE_(IDBBinderProperties, IDBProperties)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
/* IDBProperties methods */
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetProperties)(THIS_ ULONG cPropertyIDSets, const DBPROPIDSET __RPC_FAR rgPropertyIDSets[], ULONG __RPC_FAR *pcPropertySets, DBPROPSET __RPC_FAR *__RPC_FAR *prgPropertySets) PURE;
|
||||
STDMETHOD(GetPropertyInfo)(THIS_ ULONG cPropertyIDSets, const DBPROPIDSET __RPC_FAR rgPropertyIDSets[], ULONG __RPC_FAR *pcPropertyInfoSets, DBPROPINFOSET __RPC_FAR *__RPC_FAR *prgPropertyInfoSets, OLECHAR __RPC_FAR *__RPC_FAR *ppDescBuffer) PURE;
|
||||
STDMETHOD(SetProperties)(THIS_ ULONG cPropertySets, DBPROPSET __RPC_FAR rgPropertySets[]) PURE;
|
||||
#endif
|
||||
/* IDBBinderProperties methods */
|
||||
STDMETHOD(Reset)(THIS) PURE;
|
||||
};
|
||||
|
||||
#endif //__IDBBinderProperties_INTERFACE_DEFINED__
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// IAuthenticate (borrowed from urlmon.h to avoid extra includes)
|
||||
//
|
||||
#ifndef __IAuthenticate_INTERFACE_DEFINED__
|
||||
#define __IAuthenticate_INTERFACE_DEFINED__
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IAuthenticate
|
||||
DECLARE_INTERFACE_(IAuthenticate, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
#ifndef NO_BASEINTERFACE_FUNCS
|
||||
/* IUnknown methods */
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
#endif
|
||||
/* IAuthenticate methods */
|
||||
STDMETHOD(Authenticate)(THIS_ HWND __RPC_FAR *phwnd, LPWSTR __RPC_FAR *pszUsername, LPWSTR __RPC_FAR *pszPassword) PURE;
|
||||
};
|
||||
|
||||
#endif //__IAuthenticate_INTERFACE_DEFINED__
|
||||
|
||||
//OLEDB 2.1 Error values
|
||||
#ifndef DB_E_READONLY
|
||||
#define DB_E_READONLY ((HRESULT)0x80040E94L)
|
||||
#define DB_E_RESOURCELOCKED ((HRESULT)0x80040E92L)
|
||||
#define DB_E_CANNOTCONNECT ((HRESULT)0x80040E96L)
|
||||
#define DB_E_TIMEOUT ((HRESULT)0x80040E97L)
|
||||
#define DB_E_RESOURCEEXISTS ((HRESULT)0x80040E98L)
|
||||
#define DB_E_OUTOFSPACE ((HRESULT)0x80040E9AL)
|
||||
#endif
|
||||
|
||||
//OLEDB 2.5 Error values
|
||||
#ifndef DB_SEC_E_SAFEMODE_DENIED
|
||||
#define DB_SEC_E_SAFEMODE_DENIED ((HRESULT)0x80040E9BL)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
#endif // DS_RBBINDER_H
|
||||
|
1359
PROMS/DSOFramer/DSOFramer/Source2005/utilities.cpp
Normal file
1359
PROMS/DSOFramer/DSOFramer/Source2005/utilities.cpp
Normal file
File diff suppressed because it is too large
Load Diff
242
PROMS/DSOFramer/DSOFramer/Source2005/utilities.h
Normal file
242
PROMS/DSOFramer/DSOFramer/Source2005/utilities.h
Normal file
@@ -0,0 +1,242 @@
|
||||
/***************************************************************************
|
||||
* UTILITIES.H
|
||||
*
|
||||
* DSOFramer: Common Utilities and Macros (Shared)
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef DS_UTILITIES_H
|
||||
#define DS_UTILITIES_H
|
||||
|
||||
#include <commdlg.h>
|
||||
#include <oledlg.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Fixed Win32 Errors as HRESULTs
|
||||
//
|
||||
#define E_WIN32_BUFFERTOOSMALL 0x8007007A //HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
|
||||
#define E_WIN32_ACCESSVIOLATION 0x800701E7 //HRESULT_FROM_WIN32(ERROR_INVALID_ADDRESS)
|
||||
#define E_WIN32_LASTERROR (0x80070000 | GetLastError()) // Assured Error with last Win32 code
|
||||
#define E_VBA_NOREMOTESERVER 0x800A01CE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Heap Allocation
|
||||
//
|
||||
STDAPI_(LPVOID) DsoMemAlloc(DWORD cbSize);
|
||||
STDAPI_(void) DsoMemFree(LPVOID ptr);
|
||||
|
||||
// Override new/delete to use our task allocator
|
||||
// (removing CRT dependency will improve code performance and size)...
|
||||
void * _cdecl operator new(size_t size);
|
||||
void _cdecl operator delete(void *ptr);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// String Manipulation Functions
|
||||
//
|
||||
STDAPI DsoConvertToUnicodeEx(LPCSTR pszMbcsString, DWORD cbMbcsLen, LPWSTR pwszUnicode, DWORD cbUniLen, UINT uiCodePage);
|
||||
STDAPI DsoConvertToMBCSEx(LPCWSTR pwszUnicodeString, DWORD cbUniLen, LPSTR pwszMbcsString, DWORD cbMbcsLen, UINT uiCodePage);
|
||||
|
||||
STDAPI_(LPWSTR) DsoConvertToLPWSTR(LPCSTR pszMbcsString);
|
||||
STDAPI_(BSTR) DsoConvertToBSTR(LPCSTR pszMbcsString);
|
||||
STDAPI_(LPWSTR) DsoConvertToLPOLESTR(LPCWSTR pwszUnicodeString);
|
||||
STDAPI_(LPSTR) DsoConvertToMBCS(LPCWSTR pwszUnicodeString);
|
||||
STDAPI_(UINT) DsoCompareStringsEx(LPCWSTR pwsz1, INT cch1, LPCWSTR pwsz2, INT cch2);
|
||||
STDAPI_(LPWSTR) DsoCopyString(LPCWSTR pwszString);
|
||||
STDAPI_(LPWSTR) DsoCopyStringCat(LPCWSTR pwszString1, LPCWSTR pwszString2);
|
||||
STDAPI_(LPWSTR) DsoCopyStringCatEx(LPCWSTR pwszBaseString, UINT cStrs, LPCWSTR *ppwszStrs);
|
||||
STDAPI_(LPSTR) DsoCLSIDtoLPSTR(REFCLSID clsid);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// URL Helpers
|
||||
//
|
||||
STDAPI_(BOOL) LooksLikeLocalFile(LPCWSTR pwsz);
|
||||
STDAPI_(BOOL) LooksLikeUNC(LPCWSTR pwsz);
|
||||
STDAPI_(BOOL) LooksLikeHTTP(LPCWSTR pwsz);
|
||||
STDAPI_(BOOL) GetTempPathForURLDownload(WCHAR* pwszURL, WCHAR** ppwszLocalFile);
|
||||
STDAPI URLDownloadFile(LPUNKNOWN punk, WCHAR* pwszURL, WCHAR* pwszLocalFile);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// OLE Conversion Functions
|
||||
//
|
||||
STDAPI_(void) DsoHimetricToPixels(LONG* px, LONG* py);
|
||||
STDAPI_(void) DsoPixelsToHimetric(LONG* px, LONG* py);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// GDI Helper Functions
|
||||
//
|
||||
STDAPI_(HBITMAP) DsoGetBitmapFromWindow(HWND hwnd);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Windows Helper Functions
|
||||
//
|
||||
STDAPI_(BOOL) IsWindowChild(HWND hwndParent, HWND hwndChild);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// OLE/Typelib Function Wrappers
|
||||
//
|
||||
STDAPI DsoGetTypeInfoEx(REFGUID rlibid, LCID lcid, WORD wVerMaj, WORD wVerMin, HMODULE hResource, REFGUID rguid, ITypeInfo** ppti);
|
||||
STDAPI DsoDispatchInvoke(LPDISPATCH pdisp, LPOLESTR pwszname, DISPID dspid, WORD wflags, DWORD cargs, VARIANT* rgargs, VARIANT* pvtret);
|
||||
STDAPI DsoReportError(HRESULT hr, LPWSTR pwszCustomMessage, EXCEPINFO* peiDispEx);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Unicode Win32 API wrappers (handles thunk down for Win9x)
|
||||
//
|
||||
STDAPI_(BOOL) FFileExists(WCHAR* wzPath);
|
||||
STDAPI_(BOOL) FOpenLocalFile(WCHAR* wzFilePath, DWORD dwAccess, DWORD dwShareMode, DWORD dwCreate, HANDLE* phFile);
|
||||
STDAPI_(BOOL) FPerformShellOp(DWORD dwOp, WCHAR* wzFrom, WCHAR* wzTo);
|
||||
STDAPI_(BOOL) FGetModuleFileName(HMODULE hModule, WCHAR** wzFileName);
|
||||
STDAPI_(BOOL) FIsIECacheFile(LPWSTR pwszFile);
|
||||
STDAPI_(BOOL) FDrawText(HDC hdc, WCHAR* pwsz, LPRECT prc, UINT fmt);
|
||||
STDAPI_(BOOL) FSetRegKeyValue(HKEY hk, WCHAR* pwsz);
|
||||
|
||||
STDAPI_(BOOL) FOpenPrinter(LPCWSTR pwszPrinter, LPHANDLE phandle);
|
||||
STDAPI_(BOOL) FGetPrinterSettings(HANDLE hprinter, LPWSTR *ppwszProcessor, LPWSTR *ppwszDevice, LPWSTR *ppwszOutput, LPDEVMODEW *ppdvmode, DWORD *pcbSize);
|
||||
|
||||
STDAPI DsoGetFileFromUser(HWND hwndOwner, LPCWSTR pwzTitle, DWORD dwFlags,
|
||||
LPCWSTR pwzFilter, DWORD dwFiltIdx, LPCWSTR pwszDefExt, LPCWSTR pwszCurrentItem, BOOL fShowSave,
|
||||
BSTR *pbstrFile, BOOL *pfReadOnly);
|
||||
|
||||
STDAPI DsoGetOleInsertObjectFromUser(HWND hwndOwner, LPCWSTR pwzTitle, DWORD dwFlags,
|
||||
BOOL fDocObjectOnly, BOOL fAllowControls, BSTR *pbstrResult, UINT *ptype);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Common macros -- Used to make code more readable.
|
||||
//
|
||||
#define SEH_TRY __try {
|
||||
#define SEH_EXCEPT(hr) } __except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION){hr = E_WIN32_ACCESSVIOLATION;}
|
||||
#define SEH_EXCEPT_NULL } __except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION){}
|
||||
#define SEH_START_FINALLY } __finally {
|
||||
#define SEH_END_FINALLY }
|
||||
|
||||
#define RETURN_ON_FAILURE(x) if (FAILED(x)) return (x)
|
||||
#define GOTO_ON_FAILURE(x, lbl) if (FAILED(x)) goto lbl
|
||||
#define CHECK_NULL_RETURN(v, e) if ((v) == NULL) return (e)
|
||||
|
||||
#define SAFE_ADDREF_INTERFACE if (x) { (x)->AddRef(); }
|
||||
#define SAFE_RELEASE_INTERFACE(x) if (x) { (x)->Release(); (x) = NULL; }
|
||||
#define SAFE_SET_INTERFACE(x, y) if (((x) = (y)) != NULL) ((IUnknown*)(x))->AddRef()
|
||||
#define SAFE_FREESTRING(s) if (s) { DsoMemFree(s); (s) = NULL; }
|
||||
#define SAFE_FREEBSTR(s) if (s) { SysFreeString(s); (s) = NULL; }
|
||||
|
||||
VARIANT* __fastcall DsoPVarFromPVarRef(VARIANT* px);
|
||||
BOOL __fastcall DsoIsVarParamMissing(VARIANT* px);
|
||||
LPWSTR __fastcall DsoPVarWStrFromPVar(VARIANT* px);
|
||||
SAFEARRAY* __fastcall DsoPVarArrayFromPVar(VARIANT* px);
|
||||
IUnknown* __fastcall DsoPVarUnkFromPVar(VARIANT* px);
|
||||
SHORT __fastcall DsoPVarShortFromPVar(VARIANT* px, SHORT fdef);
|
||||
LONG __fastcall DsoPVarLongFromPVar(VARIANT* px, LONG fdef);
|
||||
BOOL __fastcall DsoPVarBoolFromPVar(VARIANT* px, BOOL fdef);
|
||||
|
||||
#define PARAM_IS_MISSING(x) DsoIsVarParamMissing(DsoPVarFromPVarRef((x)))
|
||||
#define LPWSTR_FROM_VARIANT(x) DsoPVarWStrFromPVar(DsoPVarFromPVarRef(&(x)))
|
||||
#define LONG_FROM_VARIANT(x, y) DsoPVarLongFromPVar(DsoPVarFromPVarRef(&(x)), (y))
|
||||
#define BOOL_FROM_VARIANT(x, y) DsoPVarBoolFromPVar(DsoPVarFromPVarRef(&(x)), (y))
|
||||
#define PUNK_FROM_VARIANT(x) DsoPVarUnkFromPVar(DsoPVarFromPVarRef(&(x)))
|
||||
#define PSARRAY_FROM_VARIANT(x) DsoPVarArrayFromPVar(DsoPVarFromPVarRef(&(x)))
|
||||
|
||||
#define ASCII_UPPERCASE(x) ((((x) > 96) && ((x) < 123)) ? (x) - 32 : (x))
|
||||
#define ASCII_LOWERCASE(x) ((((x) > 64) && ((x) < 91)) ? (x) + 32 : (x))
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Debug macros
|
||||
//
|
||||
#ifdef _DEBUG
|
||||
|
||||
#define ASSERT(x) if(!(x)) DebugBreak()
|
||||
#define ODS(x) OutputDebugString(x)
|
||||
|
||||
#define TRACE1(sz, arg1) { \
|
||||
CHAR ach[1024]; \
|
||||
wsprintf(ach, (sz), (arg1)); \
|
||||
ODS(ach); }
|
||||
|
||||
#define TRACE2(sz, arg1, arg2) { \
|
||||
CHAR ach[1024]; \
|
||||
wsprintf(ach, (sz), (arg1), (arg2)); \
|
||||
ODS(ach); }
|
||||
|
||||
#define TRACE3(sz, arg1, arg2, arg3) { \
|
||||
CHAR ach[1024]; \
|
||||
wsprintf(ach, (sz), (arg1), (arg2), (arg3)); \
|
||||
ODS(ach); }
|
||||
|
||||
#define TRACE_LPRECT(sz, lprc) { \
|
||||
CHAR ach[1024]; \
|
||||
wsprintf(ach, "RECT %s - left=%d, top=%d, right=%d, bottom=%d\n", \
|
||||
(sz), (lprc)->left, (lprc)->top, (lprc)->right, (lprc)->bottom); \
|
||||
ODS(ach); }
|
||||
|
||||
#else // !defined(_DEBUG)
|
||||
|
||||
#define ASSERT(x)
|
||||
#define ODS(x)
|
||||
#define TRACE1(sz, arg1)
|
||||
#define TRACE2(sz, arg1, arg2)
|
||||
#define TRACE3(sz, arg1, arg2, arg3)
|
||||
#define TRACE_LPRECT(sz, lprc)
|
||||
|
||||
#endif // (_DEBUG)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Macros for Nested COM Interfaces
|
||||
//
|
||||
#ifdef _DEBUG
|
||||
#define DEFINE_REFCOUNT ULONG m_cRef;
|
||||
#define IMPLEMENT_DEBUG_ADDREF m_cRef++;
|
||||
#define IMPLEMENT_DEBUG_RELEASE(x) ASSERT(m_cRef > 0); m_cRef--; if (m_cRef == 0){ODS(" > I" #x " released\n");}
|
||||
#define IMPLEMENT_DEBUG_REFSET m_cRef = 0;
|
||||
#define IMPLEMENT_DEBUG_REFCHECK(x) ASSERT(m_cRef == 0); if (m_cRef != 0){ODS(" * I" #x " NOT released!!\n");}
|
||||
#else
|
||||
#define DEFINE_REFCOUNT
|
||||
#define IMPLEMENT_DEBUG_ADDREF
|
||||
#define IMPLEMENT_DEBUG_RELEASE(x)
|
||||
#define IMPLEMENT_DEBUG_REFSET
|
||||
#define IMPLEMENT_DEBUG_REFCHECK(x)
|
||||
#endif /* !_DEBUG */
|
||||
|
||||
#define BEGIN_INTERFACE_PART(localClass, baseClass) \
|
||||
class X##localClass : public baseClass \
|
||||
{ public: X##localClass(){IMPLEMENT_DEBUG_REFSET} \
|
||||
~X##localClass(){IMPLEMENT_DEBUG_REFCHECK(##localClass)} \
|
||||
STDMETHOD(QueryInterface)(REFIID iid, PVOID* ppvObj); \
|
||||
STDMETHOD_(ULONG, AddRef)(); \
|
||||
STDMETHOD_(ULONG, Release)(); \
|
||||
DEFINE_REFCOUNT
|
||||
|
||||
#define END_INTERFACE_PART(localClass) \
|
||||
} m_x##localClass; \
|
||||
friend class X##localClass;
|
||||
|
||||
#define METHOD_PROLOGUE(theClass, localClass) \
|
||||
theClass* pThis = \
|
||||
((theClass*)(((BYTE*)this) - (size_t)&(((theClass*)0)->m_x##localClass)));
|
||||
|
||||
#define IMPLEMENT_INTERFACE_UNKNOWN(theClass, localClass) \
|
||||
ULONG theClass::X##localClass::AddRef() { \
|
||||
METHOD_PROLOGUE(theClass, localClass) \
|
||||
IMPLEMENT_DEBUG_ADDREF \
|
||||
return pThis->AddRef(); \
|
||||
} \
|
||||
ULONG theClass::X##localClass::Release() { \
|
||||
METHOD_PROLOGUE(theClass, localClass) \
|
||||
IMPLEMENT_DEBUG_RELEASE(##localClass) \
|
||||
return pThis->Release(); \
|
||||
} \
|
||||
STDMETHODIMP theClass::X##localClass::QueryInterface(REFIID iid, void **ppvObj) { \
|
||||
METHOD_PROLOGUE(theClass, localClass) \
|
||||
return pThis->QueryInterface(iid, ppvObj); \
|
||||
}
|
||||
|
||||
|
||||
#endif //DS_UTILITIES_H
|
59
PROMS/DSOFramer/DSOFramer/Source2005/version.h
Normal file
59
PROMS/DSOFramer/DSOFramer/Source2005/version.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/***************************************************************************
|
||||
* VERSION.H - Contol version defines
|
||||
*
|
||||
* DSOFramer: Version Information Header (Shared)
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
/***************************************************************************
|
||||
*
|
||||
* IMPORTANT: If you modify this sample, you should change all of the values
|
||||
* below to differentiate your control from this sample.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef DS_VERSION_H
|
||||
#define DS_VERSION_H
|
||||
|
||||
#define DSOFRAMERCTL_VERSION 1.3
|
||||
#define DSOFRAMERCTL_VERSION_MAJOR 1
|
||||
#define DSOFRAMERCTL_VERSION_MINOR 3
|
||||
#define DSOFRAMERCTL_VERSION_BUILD 1323
|
||||
#define DSOFRAMERCTL_VERSIONSTR "1.3"
|
||||
#define DSOFRAMERCTL_VERSIONSTRFULL "1.3.1323.1"
|
||||
|
||||
#define DSOFRAMERCTL_FULLNAME "DSO ActiveX Document Framer Control"
|
||||
#define DSOFRAMERCTL_SHORTNAME "DSO Framer Control Object"
|
||||
|
||||
#define DSOFRAMERCTL_PROGID "DSOFramer.FramerControl"
|
||||
|
||||
#define DSOFRAMERCTL_TLIB 00460180-9E5E-11d5-B7C8-B8269041DD57
|
||||
#define DSOFRAMERCTL_TLIBSTR "{00460180-9E5E-11d5-B7C8-B8269041DD57}"
|
||||
|
||||
#define DSOFRAMERCTL_INTERFACE 00460181-9E5E-11d5-B7C8-B8269041DD57
|
||||
|
||||
#define DSOFRAMERCTL_CLSID 00460182-9E5E-11d5-B7C8-B8269041DD57
|
||||
#define DSOFRAMERCTL_CLSIDSTR "{00460182-9E5E-11d5-B7C8-B8269041DD57}"
|
||||
|
||||
#define DSOFRAMERCTL_DISPEVTS 00460185-9E5E-11d5-B7C8-B8269041DD57
|
||||
|
||||
#define DSOF_DISPID_FILECMD 1
|
||||
#define DSOF_DISPID_DOCOPEN 2
|
||||
#define DSOF_DISPID_DOCCLOSE 3
|
||||
#define DSOF_DISPID_ACTIVATE 4
|
||||
#define DSOF_DISPID_BDOCCLOSE 5
|
||||
#define DSOF_DISPID_BDOCSAVE 6
|
||||
#define DSOF_DISPID_ENDPREVIEW 7
|
||||
#define DSOF_DISPID_SAVECOMPLETE 8
|
||||
|
||||
#endif //DS_VERSION_H
|
281
PROMS/DSOFramer/Source2005/Lib/dsoframer.idl
Normal file
281
PROMS/DSOFramer/Source2005/Lib/dsoframer.idl
Normal file
@@ -0,0 +1,281 @@
|
||||
/***************************************************************************
|
||||
* DSOFRAMER.IDL - DSO Framer ActiveX Control Type Library
|
||||
*
|
||||
* Copyright <20>1999-2004; Microsoft Corporation. All rights reserved.
|
||||
* Written by Microsoft Developer Support Office Integration (PSS DSOI)
|
||||
*
|
||||
* This code is provided via KB 311765 as a sample. It is not a formal
|
||||
* product and has not been tested with all containers or servers. Use it
|
||||
* for educational purposes only. See the EULA.TXT file included in the
|
||||
* KB download for full terms of use and restrictions.
|
||||
*
|
||||
* THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
/***************************************************************************
|
||||
*
|
||||
* IMPORTANT: You should not attempt to modify this library unless you are
|
||||
* sure you do not break binary compatibility, or you change all the GUIDs
|
||||
* listed in version.h so as to build a completely new control.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <olectl.h>
|
||||
#include "..\version.h"
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_TLIB), helpstring(DSOFRAMERCTL_FULLNAME),
|
||||
version(DSOFRAMERCTL_VERSION), lcid(0x0000), control
|
||||
]
|
||||
library DSOFramer
|
||||
{
|
||||
importlib("STDOLE2.TLB");
|
||||
|
||||
typedef enum dsoBorderStyle
|
||||
{
|
||||
dsoBorderNone = 0,
|
||||
dsoBorderFlat,
|
||||
dsoBorder3D,
|
||||
dsoBorder3DThin
|
||||
} dsoBorderStyle;
|
||||
|
||||
typedef enum dsoShowDialogType
|
||||
{
|
||||
dsoDialogNew = 0,
|
||||
dsoDialogOpen,
|
||||
dsoDialogSave,
|
||||
dsoDialogSaveCopy,
|
||||
dsoDialogPrint,
|
||||
dsoDialogPageSetup,
|
||||
dsoDialogProperties
|
||||
} dsoShowDialogType;
|
||||
|
||||
typedef enum dsoFileCommandType
|
||||
{
|
||||
dsoFileNew = 0,
|
||||
dsoFileOpen,
|
||||
dsoFileClose,
|
||||
dsoFileSave,
|
||||
dsoFileSaveAs,
|
||||
dsoFilePrint,
|
||||
dsoFilePageSetup,
|
||||
dsoFileProperties,
|
||||
dsoFilePrintPreview
|
||||
} dsoFileCommandType;
|
||||
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_INTERFACE), hidden, version(DSOFRAMERCTL_VERSION),
|
||||
dual, oleautomation, odl
|
||||
]
|
||||
interface _FramerControl : IDispatch
|
||||
{
|
||||
[id(0x00010001), helpstring("Activates the current document object.")]
|
||||
HRESULT Activate();
|
||||
|
||||
[propget, id(0x00010002), helpstring("Returns the Automation interface of the document object.")]
|
||||
HRESULT ActiveDocument([out,retval] IDispatch** ppdisp);
|
||||
|
||||
[id(0x00010003), helpstring("Creates a new document based on the ProgId or Template file provided.")]
|
||||
HRESULT CreateNew([in] BSTR ProgIdOrTemplate);
|
||||
|
||||
[id(0x00010004), helpstring("Opens a document from a file, URL, or Automation object.")]
|
||||
HRESULT Open([in] VARIANT Document, [in, optional] VARIANT ReadOnly, [in, optional] VARIANT ProgId, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword);
|
||||
|
||||
[id(0x00010005), helpstring("Saves the document to specified location or its original location.")]
|
||||
HRESULT Save([in, optional] VARIANT SaveAsDocument, [in, optional] VARIANT OverwriteExisting, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword);
|
||||
|
||||
[id(0x00010008), hidden]
|
||||
HRESULT _PrintOutOld([in, optional] VARIANT PromptToSelectPrinter);
|
||||
|
||||
[id(0x00010009), helpstring("Closes the currently open document.")]
|
||||
HRESULT Close();
|
||||
|
||||
[propput, id(0x0001000A), helpstring("Returns/sets the titlebar caption.")]
|
||||
HRESULT Caption([in] BSTR bstr);
|
||||
[propget, id(0x0001000A)]
|
||||
HRESULT Caption([out,retval] BSTR* pbstr);
|
||||
|
||||
[propput, id(0x0001000B), helpstring("Returns/sets whether the titlebar should be displayed.")]
|
||||
HRESULT Titlebar([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000B)]
|
||||
HRESULT Titlebar([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x0001000C), helpstring("Returns/sets whether toolbars should be displayed.")]
|
||||
HRESULT Toolbars([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000C)]
|
||||
HRESULT Toolbars([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, nonbrowsable, id(0x0001000D), helpstring("Returns/sets the controls modal state.")]
|
||||
HRESULT ModalState([in] VARIANT_BOOL vbool);
|
||||
[propget, nonbrowsable, id(0x0001000D)]
|
||||
HRESULT ModalState([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[id(0x0001000E), helpstring("Displays a modal dialog of the given type for user action.")]
|
||||
HRESULT ShowDialog([in] dsoShowDialogType DlgType);
|
||||
|
||||
[propput, id(0x0001000F), helpstring("Returns/sets whether a specific action item is enabled.")]
|
||||
HRESULT EnableFileCommand([in] dsoFileCommandType Item, [in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001000F)]
|
||||
HRESULT EnableFileCommand([in] dsoFileCommandType Item, [out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(DISPID_BORDERSTYLE), helpstring("Returns/sets the border style for the control.")]
|
||||
HRESULT BorderStyle([in] dsoBorderStyle style);
|
||||
[propget, id(DISPID_BORDERSTYLE)]
|
||||
HRESULT BorderStyle([out, retval] dsoBorderStyle* pstyle);
|
||||
|
||||
[propput, id(DISPID_BORDERCOLOR), helpstring("Returns/sets the border color of the control.")]
|
||||
HRESULT BorderColor([in] OLE_COLOR clr);
|
||||
[propget, id(DISPID_BORDERCOLOR)]
|
||||
HRESULT BorderColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(DISPID_BACKCOLOR), helpstring("Returns/sets the background color of the control.")]
|
||||
HRESULT BackColor([in] OLE_COLOR clr);
|
||||
[propget, id(DISPID_BACKCOLOR)]
|
||||
HRESULT BackColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(DISPID_FORECOLOR), helpstring("Returns/sets the foreground color of the control.")]
|
||||
HRESULT ForeColor([in]OLE_COLOR clr);
|
||||
[propget, id(DISPID_FORECOLOR)]
|
||||
HRESULT ForeColor([out,retval]OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(0x00010010), helpstring("Returns/sets the color of the titlebar.")]
|
||||
HRESULT TitlebarColor([in] OLE_COLOR clr);
|
||||
[propget, id(0x00010010)]
|
||||
HRESULT TitlebarColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[propput, id(0x00010011), helpstring("Returns/sets the color of text for the titlebar.")]
|
||||
HRESULT TitlebarTextColor([in] OLE_COLOR clr);
|
||||
[propget, id(0x00010011)]
|
||||
HRESULT TitlebarTextColor([out,retval] OLE_COLOR* pclr);
|
||||
|
||||
[id(0x00010012), helpstring("Calls IOleCommandTarget::Exec on embedded object.")]
|
||||
HRESULT ExecOleCommand([in] LONG OLECMDID, [in, optional] VARIANT Options, [in, optional] VARIANT* vInParam, [in, out, optional] VARIANT* vInOutParam);
|
||||
|
||||
[propput, id(0x00010013), helpstring("Returns/sets whether a menu bar should be displayed.")]
|
||||
HRESULT Menubar([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x00010013)]
|
||||
HRESULT Menubar([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x00010014), helpstring("Returns/sets host application name (used in embedding).")]
|
||||
HRESULT HostName([in] BSTR bstr);
|
||||
[propget, id(0x00010014)]
|
||||
HRESULT HostName([out,retval] BSTR* pbstr);
|
||||
|
||||
[propget, id(0x00010015), helpstring("Returns full document path name for object.")]
|
||||
HRESULT DocumentFullName([out,retval] BSTR* pbstr);
|
||||
|
||||
[id(0x00010016), helpstring("Prints current document to specific printer with settings.")]
|
||||
HRESULT PrintOut([in, optional] VARIANT PromptUser, [in, optional] VARIANT PrinterName, [in, optional] VARIANT Copies,
|
||||
[in, optional] VARIANT FromPage, [in, optional] VARIANT ToPage, [in, optional] VARIANT OutputFile);
|
||||
|
||||
[id(0x00010017), helpstring("Starts a print preview (if document supports it).")]
|
||||
HRESULT PrintPreview();
|
||||
|
||||
[id(0x00010018), helpstring("Exits a current print preview.")]
|
||||
HRESULT PrintPreviewExit();
|
||||
|
||||
[propget, id(0x00010019), helpstring("Returns True/False if file was open read-only, or has not been saved.")]
|
||||
HRESULT IsReadOnly([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propget, id(0x0001001A), helpstring("Returns True/False if file has been altered or needs save.")]
|
||||
HRESULT IsDirty([out,retval] VARIANT_BOOL* pbool);
|
||||
|
||||
[propput, id(0x0001001B), helpstring("Sets lock on the current embed server to keep it running (document must be open first).")]
|
||||
HRESULT LockServer([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x0001001B)]
|
||||
HRESULT LockServer([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[id(0x0001001C), nonbrowsable, helpstring("Gets the content of the body of the document (excluding headers/footers).")]
|
||||
HRESULT GetDataObjectContent([in] VARIANT ClipFormatNameOrNumber, [out,retval] VARIANT *pvResults);
|
||||
|
||||
[id(0x0001001D), nonbrowsable, helpstring("Sets the content of the body of the document.")]
|
||||
HRESULT SetDataObjectContent([in] VARIANT ClipFormatNameOrNumber, [in] VARIANT DataByteArray);
|
||||
|
||||
[propput, id(0x0001001E), helpstring("Allows host to set policy on activation behavior.")]
|
||||
HRESULT ActivationPolicy([in] enum dsoActivationPolicy lPolicy);
|
||||
[propget, id(0x0001001E)]
|
||||
HRESULT ActivationPolicy([out,retval] enum dsoActivationPolicy *plPolicy);
|
||||
|
||||
[propput, id(0x0001001F), helpstring("Allows host to set policy on use of the frame hook.")]
|
||||
HRESULT FrameHookPolicy([in] enum dsoFrameHookPolicy lPolicy);
|
||||
[propget, id(0x0001001F)]
|
||||
HRESULT FrameHookPolicy([out,retval] enum dsoFrameHookPolicy *plPolicy);
|
||||
|
||||
[propput, id(0x00010020), helpstring("Gets/sets whether control should try to handle menu accelerators or pass to host window.")]
|
||||
HRESULT MenuAccelerators([in] VARIANT_BOOL vbool);
|
||||
[propget, id(0x00010020)]
|
||||
HRESULT MenuAccelerators([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[propput, nonbrowsable, id(0x00010021), helpstring("Gets/sets whether control events are raised.")]
|
||||
HRESULT EventsEnabled([in] VARIANT_BOOL vbool);
|
||||
[propget, nonbrowsable, id(0x00010021)]
|
||||
HRESULT EventsEnabled([out,retval] VARIANT_BOOL* pvbool);
|
||||
|
||||
[propget, id(0x00010022), helpstring("Returns just the document name (excluding path).")]
|
||||
HRESULT DocumentName([out,retval] BSTR* pbstr);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_DISPEVTS), hidden
|
||||
]
|
||||
dispinterface _DFramerCtlEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(DSOF_DISPID_FILECMD), helpstring("Called when File menu item is selected by user (may be canceled).")]
|
||||
HRESULT OnFileCommand([in] dsoFileCommandType Item, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_DOCOPEN), helpstring("Called when document is opened or new document added.")]
|
||||
HRESULT OnDocumentOpened([in] BSTR File, [in] IDispatch* Document);
|
||||
|
||||
[id(DSOF_DISPID_DOCCLOSE), helpstring("Called when document is closed.")]
|
||||
HRESULT OnDocumentClosed();
|
||||
|
||||
[id(DSOF_DISPID_ACTIVATE), helpstring("Called when component gains/loses activation.")]
|
||||
HRESULT OnActivationChange([in] VARIANT_BOOL fGoingActive);
|
||||
|
||||
[id(DSOF_DISPID_BDOCCLOSE), helpstring("Called before document is closed (may be canceled).")]
|
||||
HRESULT BeforeDocumentClosed([in] IDispatch* Document, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_BDOCSAVE), helpstring("Called before document is saved (may be canceled).")]
|
||||
HRESULT BeforeDocumentSaved([in] IDispatch* Document, [in] BSTR Location, [in,out] VARIANT_BOOL* Cancel);
|
||||
|
||||
[id(DSOF_DISPID_ENDPREVIEW), helpstring("Called when print preview is closed.")]
|
||||
HRESULT OnPrintPreviewExit();
|
||||
|
||||
[id(DSOF_DISPID_SAVECOMPLETE), helpstring("Called when save is successful.")]
|
||||
HRESULT OnSaveCompleted([in] IDispatch* Document, [in] BSTR DocName, [in] BSTR FullFileLocation);
|
||||
|
||||
};
|
||||
|
||||
[
|
||||
uuid(DSOFRAMERCTL_CLSID),
|
||||
helpstring(DSOFRAMERCTL_SHORTNAME), control
|
||||
]
|
||||
coclass FramerControl
|
||||
{
|
||||
[default] interface _FramerControl;
|
||||
[default, source] dispinterface _DFramerCtlEvents;
|
||||
};
|
||||
|
||||
|
||||
typedef enum dsoFrameHookPolicy
|
||||
{
|
||||
dsoNormalBehavior = 0,
|
||||
dsoSetOnFirstOpen,
|
||||
dsoResetNow,
|
||||
dsoDisableHook = 0xFFFFFFFF
|
||||
} dsoFrameHookPolicy;
|
||||
|
||||
typedef enum dsoActivationPolicy
|
||||
{
|
||||
dsoDefaultBehavior = 0,
|
||||
dsoKeepUIActiveOnAppDeactive = 0x01,
|
||||
dsoCompDeactivateOnLostFocus = 0x02,
|
||||
dsoIPDeactivateOnCompDeactive = 0x04
|
||||
} dsoActivationPolicy;
|
||||
|
||||
};
|
||||
|
88
PROMS/DSOFramer/Source2005/Lib/dsoframerlib.c
Normal file
88
PROMS/DSOFramer/Source2005/Lib/dsoframerlib.c
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
|
||||
|
||||
/* link this file in with the server and any clients */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 6.00.0366 */
|
||||
/* at Tue Jul 02 06:50:17 2013
|
||||
*/
|
||||
/* Compiler settings for .\Lib\dsoframer.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run)
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
//@@MIDL_FILE_HEADING( )
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#ifdef _MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef INITGUID
|
||||
#define INITGUID
|
||||
#include <guiddef.h>
|
||||
#undef INITGUID
|
||||
#else
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
|
||||
|
||||
#else // !_MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef __IID_DEFINED__
|
||||
#define __IID_DEFINED__
|
||||
|
||||
typedef struct _IID
|
||||
{
|
||||
unsigned long x;
|
||||
unsigned short s1;
|
||||
unsigned short s2;
|
||||
unsigned char c[8];
|
||||
} IID;
|
||||
|
||||
#endif // __IID_DEFINED__
|
||||
|
||||
#ifndef CLSID_DEFINED
|
||||
#define CLSID_DEFINED
|
||||
typedef IID CLSID;
|
||||
#endif // CLSID_DEFINED
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
|
||||
#endif !_MIDL_USE_GUIDDEF_
|
||||
|
||||
MIDL_DEFINE_GUID(IID, LIBID_DSOFramer,0x00460180,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(IID, IID__FramerControl,0x00460181,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(IID, DIID__DFramerCtlEvents,0x00460185,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(CLSID, CLSID_FramerControl,0x00460182,0x9E5E,0x11d5,0xB7,0xC8,0xB8,0x26,0x90,0x41,0xDD,0x57);
|
||||
|
||||
#undef MIDL_DEFINE_GUID
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
1601
PROMS/DSOFramer/Source2005/Lib/dsoframerlib.h
Normal file
1601
PROMS/DSOFramer/Source2005/Lib/dsoframerlib.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
PROMS/DSOFramer/Source2005/Res/Thumbs.db
Normal file
BIN
PROMS/DSOFramer/Source2005/Res/Thumbs.db
Normal file
Binary file not shown.
234
PROMS/DSOFramer/Source2005/dsoframer.vcxproj
Normal file
234
PROMS/DSOFramer/Source2005/dsoframer.vcxproj
Normal file
@@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{005801E1-A867-4CBB-995F-BA2EF4360BDF}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>.\Debug\</OutDir>
|
||||
<IntDir>.\Debug\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>.\Release\</OutDir>
|
||||
<IntDir>.\Release\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Message>Performing registration</Message>
|
||||
<Command>regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)regsvr32.trg"
|
||||
</Command>
|
||||
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/dsoframer.tlb</TypeLibraryName>
|
||||
<HeaderFileName />
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<PrecompiledHeader />
|
||||
<PrecompiledHeaderOutputFile>.\Debug/dsoframer.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>oledlg.lib;urlmon.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>Debug/dsoframer.ocx</OutputFile>
|
||||
<Version>1.2</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\dsoframer.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/dsoframer.pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>.\Debug/dsoframer.map</MapFileName>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EntryPointSymbol />
|
||||
<BaseAddress>0x22000000</BaseAddress>
|
||||
<ImportLibrary>.\Debug/dsoframer.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Message>Performing registration</Message>
|
||||
<Command>regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)regsvr32.trg"
|
||||
</Command>
|
||||
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/dsoframer.tlb</TypeLibraryName>
|
||||
<HeaderFileName />
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\Release/dsoframer.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>oledlg.lib;urlmon.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>Release/dsoframer.ocx</OutputFile>
|
||||
<Version>1.2</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\dsoframer.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Release/dsoframer.pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>.\Release/dsoframer.map</MapFileName>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<BaseAddress>0x22000000</BaseAddress>
|
||||
<TurnOffAssemblyGeneration>true</TurnOffAssemblyGeneration>
|
||||
<ImportLibrary>.\Release/dsoframer.lib</ImportLibrary>
|
||||
<MergeSections>.rdata=.text</MergeSections>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="classfactory.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofauto.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofcontrol.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofdocobj.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofprint.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mainentry.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utilities.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MinSpace</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="Lib\dsoframer.idl">
|
||||
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\lib\dsoframerlib.h</HeaderFileName>
|
||||
<DllDataFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</DllDataFileName>
|
||||
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\lib\dsoframerlib.c</InterfaceIdentifierFileName>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="res\dsoframer.rc">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">res;$(OUTDIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">res;$(OUTDIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dsofdocobj.h" />
|
||||
<ClInclude Include="dsoframer.h" />
|
||||
<ClInclude Include="utilities.h" />
|
||||
<ClInclude Include="version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="dsoframer.def" />
|
||||
<None Include="lib\dsoframer.olb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="res\dso.ico" />
|
||||
<Image Include="res\toolbox.bmp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
80
PROMS/DSOFramer/Source2005/dsoframer.vcxproj.filters
Normal file
80
PROMS/DSOFramer/Source2005/dsoframer.vcxproj.filters
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{bdfc3b0a-cabf-4124-953b-4729b929e053}</UniqueIdentifier>
|
||||
<Extensions>c;cpp;rc;idl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{6016a852-0b50-45a4-b42f-6da4fa81584f}</UniqueIdentifier>
|
||||
<Extensions>h;def</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resources">
|
||||
<UniqueIdentifier>{10808205-29e0-458c-b830-e7849723134d}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;tlb;bmp</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="classfactory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofauto.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofcontrol.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofdocobj.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dsofprint.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mainentry.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utilities.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="Lib\dsoframer.idl">
|
||||
<Filter>Source Files</Filter>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="res\dsoframer.rc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dsofdocobj.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dsoframer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="utilities.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="dsoframer.def">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
<None Include="lib\dsoframer.olb">
|
||||
<Filter>Resources</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="res\dso.ico">
|
||||
<Filter>Resources</Filter>
|
||||
</Image>
|
||||
<Image Include="res\toolbox.bmp">
|
||||
<Filter>Resources</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
177
PROMS/DataLoader/App.config.org
Normal file
177
PROMS/DataLoader/App.config.org
Normal file
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="DataLoader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<log4net>
|
||||
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
|
||||
<param name="File" value="${USERPROFILE}/My Documents/VEPROMS/DMErrorLog.txt" />
|
||||
<param name="AppendToFile" value="false" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<param name="Header" value="[Header]\r\n" />
|
||||
<param name="Footer" value="[Footer]\r\n" />
|
||||
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="--> %date [%thread] %-5level %logger (%property{log4net:HostName}) [%ndc] - %message%newline"/>
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender">
|
||||
<threshold value="WARN" />
|
||||
<mapping>
|
||||
<level value="DEBUG" />
|
||||
<eventLogEntryType value="Information" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="INFO" />
|
||||
<eventLogEntryType value="Information" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="WARN" />
|
||||
<eventLogEntryType value="Warning" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="ERROR" />
|
||||
<eventLogEntryType value="Error" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="FATAL" />
|
||||
<eventLogEntryType value="Error" />
|
||||
</mapping>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<param name="ConversionPattern" value="---> %d [%t] %-5p %c - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
<root>
|
||||
<level value="INFO" />
|
||||
<appender-ref ref="ConsoleAppender" />
|
||||
<appender-ref ref="LogFileAppender" />
|
||||
<appender-ref ref="EventLogAppender" />
|
||||
</root>
|
||||
<logger name="Volian.CSLA.Library">
|
||||
<level value="WARN" />
|
||||
</logger>
|
||||
</log4net>
|
||||
<appSettings>
|
||||
<add key="OperatingMode" value="debug" />
|
||||
<add key="CslaAuthentication" value="Windows" />
|
||||
<!-- Active Connection -->
|
||||
<!-- Inactive Connections
|
||||
-->
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<!--<add name="VEPROMS_RHM_CHANGE"
|
||||
connectionString="Data Source=rhmdesktop\SQLEXPRESS;AttachDbFilename="C:\VS2005Projects\VEPROMS_USERS\VEPROMS_Users.mdf";Integrated Security=True;User Instance=True"
|
||||
providerName="System.Data.SqlClient" />-->
|
||||
<!--<add name="VEPROMS"
|
||||
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=VEPROMS;Integrated Security=True"
|
||||
providerName="System.Data.SqlClient" /> -->
|
||||
<add name="VEPROMS" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
|
||||
</connectionStrings>
|
||||
<userSettings>
|
||||
<DataLoader.Properties.Settings>
|
||||
<setting name="VeSamFilename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="DbfPathname" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="LoadWordDoc" serializeAs="String">
|
||||
<value>Checked</value>
|
||||
</setting>
|
||||
<setting name="LoadRTFDoc" serializeAs="String">
|
||||
<value>Unchecked</value>
|
||||
</setting>
|
||||
<setting name="PurgeData" serializeAs="String">
|
||||
<value>Checked</value>
|
||||
</setting>
|
||||
<setting name="VePromsFilename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="LogFileLoc" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="BackupFileName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="BackupFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ConnectionString" serializeAs="String">
|
||||
<value>Data Source=.\SQLEXPRESS;Initial Catalog={DBName};Integrated Security=True</value>
|
||||
</setting>
|
||||
<setting name="DBName" serializeAs="String">
|
||||
<value>VEPROMS</value>
|
||||
</setting>
|
||||
<setting name="DBPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="PDFFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CheckRTF" serializeAs="String">
|
||||
<value>Unchecked</value>
|
||||
</setting>
|
||||
<setting name="Skip" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="ConvertTo" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="RedPDFs" serializeAs="String">
|
||||
<value>Checked</value>
|
||||
</setting>
|
||||
<setting name="OnlyThisSet" serializeAs="String">
|
||||
<value>Checked</value>
|
||||
</setting>
|
||||
<setting name="ExecutionMode" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="Phase1" serializeAs="String">
|
||||
<value>Phase1</value>
|
||||
</setting>
|
||||
<setting name="Phase2" serializeAs="String">
|
||||
<value>Phase2</value>
|
||||
</setting>
|
||||
<setting name="Phase3" serializeAs="String">
|
||||
<value>Phase3</value>
|
||||
</setting>
|
||||
<setting name="FormatFolder" serializeAs="String">
|
||||
<value>c:\development\fmtall</value>
|
||||
</setting>
|
||||
<setting name="GenMacFolder" serializeAs="String">
|
||||
<value>c:\development\genmacall</value>
|
||||
</setting>
|
||||
<setting name="LoadApproved" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Phase4" serializeAs="String">
|
||||
<value>Phase4</value>
|
||||
</setting>
|
||||
<setting name="ProcessOnlyInLocation" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="WhatROsToConvert" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="SelectedROFst" serializeAs="String">
|
||||
<value>-1</value>
|
||||
</setting>
|
||||
<setting name="AnnotateWhenConvertingToText" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="AnnotateWhenShowingMissingRO" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="AnnotateWhenShowingDifferentRO" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</DataLoader.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
40
PROMS/DataLoader/Applicability.cs.bak
Normal file
40
PROMS/DataLoader/Applicability.cs.bak
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
public Dictionary<string, string> MyProcAPL;
|
||||
private static Dictionary<string, string> GetApple(string proc)
|
||||
{
|
||||
Dictionary<string, string> procAPL = new Dictionary<string, string>();
|
||||
FileInfo myFile = new FileInfo(proc);
|
||||
FileStream fs = myFile.OpenRead();
|
||||
BinaryReader br = new BinaryReader(fs);
|
||||
byte[] myBuff = new byte[myFile.Length];
|
||||
br.Read(myBuff, 0, (int)myFile.Length);
|
||||
br.Close();
|
||||
fs.Close();
|
||||
int offset = 0;
|
||||
while (offset < myBuff.Length)
|
||||
{
|
||||
string recnum = Encoding.Default.GetString(myBuff, offset, 8);
|
||||
//if ((myFile.Name.ToUpper() == "PROC000.APL" && (recnum == "00002491")))
|
||||
// System.Threading.Thread.Sleep(1000);
|
||||
int applicability = BitConverter.ToInt32(myBuff, offset + 8);
|
||||
string applicabilityToStr = string.Format("{0:X8}", applicability);
|
||||
//4294967296
|
||||
if (!procAPL.ContainsKey(recnum))
|
||||
procAPL.Add(recnum, applicabilityToStr);
|
||||
else
|
||||
if (procAPL[recnum] != applicabilityToStr)
|
||||
procAPL[recnum] = applicabilityToStr;
|
||||
offset += 12;
|
||||
}
|
||||
return procAPL;
|
||||
}
|
||||
}
|
||||
}
|
521
PROMS/DataLoader/Approve.cs.bak
Normal file
521
PROMS/DataLoader/Approve.cs.bak
Normal file
@@ -0,0 +1,521 @@
|
||||
//using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using System.IO;
|
||||
using System.Data.OleDb;
|
||||
using System.Data;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
public bool BuildApprovedRevision()
|
||||
{
|
||||
if(!frmMain.RunScript("PROMSApproveApprove.sql", frmMain.MySettings.DBName)) return false;
|
||||
bool rv = false;
|
||||
using (Stage myStage = GetApprovedStage())
|
||||
{
|
||||
if (myStage == null)
|
||||
return rv;
|
||||
DocVersionInfoList dvil = DocVersionInfoList.Get();
|
||||
foreach (DocVersionInfo dvi in dvil)
|
||||
{
|
||||
if (dvi.Procedures.Count > 0)
|
||||
{
|
||||
if (!frmMain.MySettings.OnlyThisSet || frmMain.MySettings.ProcedureSetPath.ToUpper() == dvi.MyFolder.Title.ToUpper())
|
||||
{
|
||||
string approvedFolder = dvi.MyFolder.Title + @"\APPROVED";
|
||||
//B2012-094 fix
|
||||
if (!Directory.Exists(approvedFolder))
|
||||
frmMain.MyWarning = "**** " + dvi.MyFolder.Title + " Approved folder does not exist";
|
||||
else if (!File.Exists(approvedFolder + @"\SET.DBF"))
|
||||
frmMain.MyWarning = "**** " + dvi.MyFolder.Title + " Approved Set.dbf does not exist";
|
||||
else if (!File.Exists(approvedFolder + @"\USAGERO.DBF"))
|
||||
frmMain.MyWarning = "**** " + dvi.MyFolder.Title + " Approved UsageRO.dbf does not exist";
|
||||
else if (!Directory.Exists(approvedFolder + @"\PDFS"))
|
||||
frmMain.MyWarning = "**** " + dvi.MyFolder.Title + " Approved Pdfs folder does not exist";
|
||||
else if (Directory.GetFiles(approvedFolder + @"\PDFS", "*.PDF").Length == 0)
|
||||
frmMain.MyWarning = "**** " + dvi.MyFolder.Title + " Approved Pdfs folder does not contain any pdf files";
|
||||
else rv |= BuildApprovedRevision(myStage, approvedFolder, dvi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
private static Stage GetApprovedStage()
|
||||
{
|
||||
StageInfoList sil = StageInfoList.Get();
|
||||
foreach (StageInfo si in sil)
|
||||
{
|
||||
if (si.Name.ToUpper() == "APPROVED")
|
||||
return si.Get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private bool BuildApprovedRevision(Stage myStage, string approvedFolder, DocVersionInfo dvi)
|
||||
{
|
||||
bool rv = false;
|
||||
if (dvi.MultiUnitCount <= 1)
|
||||
{
|
||||
ApprovedFolder af = new ApprovedFolder(approvedFolder);
|
||||
foreach (ProcedureInfo pi in dvi.Procedures)
|
||||
{
|
||||
rv |= BuildApprovedRevision(myStage, af, pi, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ApprovedFolder af = new ApprovedFolder(approvedFolder, dvi);
|
||||
foreach (ProcedureInfo pi in dvi.Procedures)
|
||||
{
|
||||
for (int i = 1; i <= dvi.MultiUnitCount; i++)
|
||||
rv |= BuildApprovedRevision(myStage, af, pi, i);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
private bool BuildApprovedRevision(Stage myStage, ApprovedFolder af, ProcedureInfo pi, int selectedSlave)
|
||||
{
|
||||
bool rv = false;
|
||||
if (selectedSlave > 0)
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = selectedSlave;
|
||||
frmMain.MyInfo = string.Format("Loading approved data for Procedure: {0}", pi.DisplayNumber);
|
||||
// if working draft procedure does not exist in approved folder, don't bother processing
|
||||
if (!af.EntryFromProc.ContainsKey(pi.DisplayNumber)) return rv;
|
||||
using (Revision revision = CreateRevision(af, pi))
|
||||
{
|
||||
System.DateTime dts = pi.DTS;
|
||||
string userID = af.EntryFromProc[pi.DisplayNumber].UserID;
|
||||
using (Version version = Version.MakeVersion(revision, myStage, GetPDF(af,pi), GetSummaryPDF(), dts, userID))
|
||||
{
|
||||
using (Check check = Check.MakeCheck(revision, myStage, af.BuildConsistencyChecks(pi)))
|
||||
{
|
||||
rv |= true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!rv)
|
||||
frmMain.MyInfo = string.Format("Loading Procedure: {0} FAILED MISERABLY", pi.DisplayNumber);
|
||||
return rv;
|
||||
}
|
||||
private byte[] GetSummaryPDF()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
private byte[] GetPDF(ApprovedFolder af, ProcedureInfo pi)
|
||||
{
|
||||
string pdf = string.Format(@"{0}\PDFS\{1}.pdf", af.Path, pi.DisplayNumber);
|
||||
FileInfo pdfFile = new FileInfo(pdf);
|
||||
if (pdfFile.Exists)
|
||||
{
|
||||
FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
byte[] pdfBuf = new byte[pdfFile.Length];
|
||||
fs.Read(pdfBuf, 0, pdfBuf.Length);
|
||||
fs.Close();
|
||||
return pdfBuf;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private Revision CreateRevision(ApprovedFolder af, ProcedureInfo pi)
|
||||
{
|
||||
int typeID = 1; //revision not tempmod
|
||||
ProcInfo pinf = af.EntryFromProc[pi.DisplayNumber];
|
||||
string revisionNumber = pinf.Rev;
|
||||
System.DateTime revisionDate = System.DateTime.Parse(pinf.RevDate ?? "1/1/1980");
|
||||
string notes = "Migration Of Current Approved Revision";
|
||||
RevisionConfig cfg = new RevisionConfig();
|
||||
cfg.History_StartDate = pinf.StartDateTime;
|
||||
if (pi.MyDocVersion.DocVersionConfig.SelectedSlave > 0)
|
||||
cfg.Applicability_Index = pi.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||
string config = cfg.ToString();
|
||||
System.DateTime dts = pi.DTS;
|
||||
string userID = pinf.UserID;
|
||||
return Revision.MakeRevision(pi.ItemID, typeID, revisionNumber, revisionDate, notes, config, dts, userID);
|
||||
}
|
||||
}
|
||||
public partial class ApprovedFolder
|
||||
{
|
||||
private OleDbConnection _Connection;
|
||||
public OleDbConnection Connection
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_Connection == null)
|
||||
_Connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _Path + ";Extended Properties=dBase III;Persist Security Info=False");
|
||||
return _Connection;
|
||||
}
|
||||
}
|
||||
private string _Path;
|
||||
public string Path
|
||||
{
|
||||
get { return _Path; }
|
||||
set { _Path = value; }
|
||||
}
|
||||
private System.DateTime _ROFstDate = System.DateTime.MinValue;
|
||||
public System.DateTime ROFstDate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ROFstDate == System.DateTime.MinValue)
|
||||
{
|
||||
FileInfo fi = new FileInfo(string.Format(@"{0}\ro.fst",Path));
|
||||
if(fi.Exists)
|
||||
_ROFstDate = fi.LastWriteTimeUtc;
|
||||
}
|
||||
return _ROFstDate;
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<string, string> _ROValues = new Dictionary<string, string>();
|
||||
private Dictionary<string, System.DateTime> _LibDocDates = new Dictionary<string,System.DateTime>();
|
||||
private Dictionary<string, List<string>> _ProcROs = new Dictionary<string,List<string>>();
|
||||
private Dictionary<string, List<string>> _LibROs = new Dictionary<string,List<string>>();
|
||||
private Dictionary<string, List<string>> _LibDocs = new Dictionary<string,List<string>>();
|
||||
|
||||
public string BuildConsistencyChecks(ProcedureInfo proc)
|
||||
{
|
||||
/*
|
||||
<ConsistencyChecks ItemID="1">
|
||||
<ROChecks ROFstDate="2011-04-11T14:13:44">
|
||||
<ROCheck ROID="0001000003960000" ROValue="1430 PSIG" />
|
||||
</ROChecks>
|
||||
<LibDocChecks>
|
||||
<LibDocCheck DocID="1" DocDate="2011-12-06T11:12:40.633" />
|
||||
</LibDocChecks>
|
||||
</ConsistencyChecks>
|
||||
*/
|
||||
ConsistencyChecks cc = new ConsistencyChecks();
|
||||
cc.ItemID = proc.ItemID;
|
||||
BuildROChecks(cc, proc);
|
||||
BuildLibDocChecks(cc, proc);
|
||||
return cc.ToString().Replace("OldDocDate=\"0001-01-01T00:00:00\"", "");
|
||||
}
|
||||
|
||||
private void BuildLibDocChecks(ConsistencyChecks cc, ProcedureInfo proc)
|
||||
{
|
||||
if (_LibDocs.ContainsKey(proc.DisplayNumber))
|
||||
{
|
||||
foreach (string libdoc in _LibDocs[proc.DisplayNumber])
|
||||
{
|
||||
FileInfo fi = new FileInfo(string.Format(@"{0}\RTFFILES\{1}.LIB",Path,libdoc));
|
||||
if (fi.Exists)
|
||||
{
|
||||
//if (proc.MyDocVersion.VersionID > 1)
|
||||
// System.Threading.Thread.Sleep(5000);
|
||||
int docid = GetDocID(libdoc, proc.MyDocVersion.VersionID);
|
||||
if (docid > 0)
|
||||
cc.LibDocConsistency.AddLibDocCheck(docid, fi.LastWriteTimeUtc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int GetDocID(string libdoc, int versionid)
|
||||
{
|
||||
DocumentInfo di = DocumentInfo.GetByLibDocName(libdoc, versionid);
|
||||
return di.DocID;
|
||||
}
|
||||
|
||||
private void BuildROChecks(ConsistencyChecks cc, ProcedureInfo proc)
|
||||
{
|
||||
cc.ROConsistency.ROFstDate = ROFstDate;
|
||||
if (_ProcROs.ContainsKey(proc.DisplayNumber))
|
||||
{
|
||||
foreach (string roid in _ProcROs[proc.DisplayNumber])
|
||||
cc.ROConsistency.AddROCheck(FormatROID(roid), GetROValue(FormatROID(roid)));
|
||||
}
|
||||
//int cnt = cc.ROConsistency.MyROChecks.Length;
|
||||
if (_LibDocs.ContainsKey(proc.DisplayNumber))
|
||||
{
|
||||
foreach (string libdoc in _LibDocs[proc.DisplayNumber])
|
||||
{
|
||||
if (_LibROs.ContainsKey(libdoc))
|
||||
{
|
||||
foreach (string roid in _LibROs[libdoc])
|
||||
cc.ROConsistency.AddROCheck(FormatROID(roid), GetROValue(FormatROID(roid)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string GetROValue(string roid)
|
||||
{
|
||||
if (!_ROValues.ContainsKey(roid))
|
||||
{
|
||||
//if (roid.Contains("000128"))
|
||||
// System.Console.WriteLine();
|
||||
//string ss = _Lookup.GetRoValue(roid);
|
||||
//ss = ItemInfo.ConvertToDisplayText(ss);
|
||||
//ss = ss.Replace('\n', ';');
|
||||
|
||||
_ROValues.Add(roid, PrepareForXML(ItemInfo.ConvertToDisplayText(_Lookup.GetRoValue(roid))));
|
||||
}
|
||||
return _ROValues[roid];
|
||||
}
|
||||
|
||||
private string PrepareForXML(string rovalue)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (char c in rovalue)
|
||||
{
|
||||
if (c < ' ')
|
||||
sb.Append(string.Format(@"\x{0:X4}", (int)c));
|
||||
else
|
||||
sb.Append(c);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
private string FormatROID(string roid)
|
||||
{
|
||||
if (roid.Length == 16 && roid.EndsWith("0000"))
|
||||
return roid.Substring(0, 12).ToUpper();
|
||||
return roid.ToUpper();
|
||||
}
|
||||
|
||||
private Dictionary<string, ProcInfo> _EntryFromProc;
|
||||
public Dictionary<string, ProcInfo> EntryFromProc
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_EntryFromProc == null)
|
||||
_EntryFromProc = FillEntryFromProc();
|
||||
return _EntryFromProc;
|
||||
}
|
||||
}
|
||||
private Dictionary<string, ProcInfo> FillEntryFromProc()
|
||||
{
|
||||
Dictionary<string, ProcInfo> rv = new Dictionary<string, ProcInfo>();
|
||||
using (OleDbDataAdapter da = new OleDbDataAdapter("Select * from [set] where entry is not null", Connection))
|
||||
{
|
||||
using (DataSet ds = new DataSet())
|
||||
{
|
||||
da.Fill(ds);
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
if (!rv.ContainsKey(dr["NUMBER"].ToString()))
|
||||
rv.Add(dr["NUMBER"].ToString(), new ProcInfo(dr, Path));
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
private ROFSTLookup _Lookup;
|
||||
public ApprovedFolder(string path)
|
||||
{
|
||||
_Path = path;
|
||||
FillROs();
|
||||
FillLibDocs();
|
||||
_Lookup = new ROFSTLookup(string.Format(@"{0}\RO.FST", Path));
|
||||
}
|
||||
public ApprovedFolder(string path, DocVersionInfo dvi)
|
||||
{
|
||||
_Path = path;
|
||||
FillROs();
|
||||
FillLibDocs();
|
||||
_Lookup = new ROFSTLookup(string.Format(@"{0}\RO.FST", Path));
|
||||
_EntryFromProc = FillEntryFromProcMulti(dvi);
|
||||
}
|
||||
|
||||
private Dictionary<string, ProcInfo> FillEntryFromProcMulti(DocVersionInfo dvi)
|
||||
{
|
||||
Dictionary<string, ProcInfo> rv = new Dictionary<string, ProcInfo>();
|
||||
for (int i = 1; i <= dvi.MultiUnitCount; i++)
|
||||
{
|
||||
foreach (ProcedureInfo pi in dvi.Procedures)
|
||||
{
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = i;
|
||||
rv.Add(pi.DisplayNumber, new ProcInfo(pi, Path));
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
private void FillLibDocs()
|
||||
{
|
||||
using (OleDbDataAdapter da = new OleDbDataAdapter("Select distinct FROMNUMBER, TONUMBER from [tran] where tonumber like 'DOC%'", Connection))
|
||||
{
|
||||
using (DataSet ds = new DataSet())
|
||||
{
|
||||
da.Fill(ds);
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
{
|
||||
string number = dr["FROMNUMBER"].ToString();
|
||||
string libdoc = dr["TONUMBER"].ToString();
|
||||
if (!_LibDocs.ContainsKey(number))
|
||||
_LibDocs.Add(number, new List<string>());
|
||||
if (!_LibDocs[number].Contains(libdoc))
|
||||
_LibDocs[number].Add(libdoc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void FillROs()
|
||||
{
|
||||
using (OleDbDataAdapter da = new OleDbDataAdapter("Select distinct NUMBER, ROID from [usagero]", Connection))
|
||||
{
|
||||
using (DataSet ds = new DataSet())
|
||||
{
|
||||
da.Fill(ds);
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
{
|
||||
string number = dr["NUMBER"].ToString();
|
||||
string roid = dr["ROID"].ToString();
|
||||
if (number.StartsWith("DOC"))
|
||||
{
|
||||
if (!_LibROs.ContainsKey(number))
|
||||
_LibROs.Add(number, new List<string>());
|
||||
if (!_LibROs[number].Contains(roid))
|
||||
_LibROs[number].Add(roid);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_ProcROs.ContainsKey(number))
|
||||
_ProcROs.Add(number, new List<string>());
|
||||
if (!_ProcROs[number].Contains(roid))
|
||||
_ProcROs[number].Add(roid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public partial class ProcInfo
|
||||
{
|
||||
private log4net.ILog log;
|
||||
private string _Number;
|
||||
public string Number
|
||||
{
|
||||
get { return _Number; }
|
||||
set { _Number = value; }
|
||||
}
|
||||
private string _Entry;
|
||||
public string Entry
|
||||
{
|
||||
get { return _Entry; }
|
||||
set { _Entry = value; }
|
||||
}
|
||||
private string _UserID;
|
||||
public string UserID
|
||||
{
|
||||
get { return _UserID; }
|
||||
set { _UserID = value; }
|
||||
}
|
||||
private System.DateTime _StartDateTime;
|
||||
public System.DateTime StartDateTime
|
||||
{
|
||||
get { return _StartDateTime; }
|
||||
set { _StartDateTime = value; }
|
||||
}
|
||||
private string _Rev;
|
||||
public string Rev
|
||||
{
|
||||
get { return _Rev; }
|
||||
set { _Rev = value; }
|
||||
}
|
||||
private string _RevDate;
|
||||
public string RevDate
|
||||
{
|
||||
get { return _RevDate; }
|
||||
set { _RevDate = value; }
|
||||
}
|
||||
private string _ReviewDate;
|
||||
public string ReviewDate
|
||||
{
|
||||
get { return _ReviewDate; }
|
||||
set { _ReviewDate = value; }
|
||||
}
|
||||
public ProcInfo(ProcedureInfo pi, string afpath)
|
||||
{
|
||||
Number = pi.DisplayNumber;
|
||||
Entry = pi.DisplayText;
|
||||
UserID = pi.UserID;
|
||||
StartDateTime = pi.DTS;
|
||||
RevDate = pi.ProcedureConfig.Print_RevDate;
|
||||
Rev = pi.ProcedureConfig.Print_Rev;
|
||||
}
|
||||
public ProcInfo(DataRow dr, string afpath)
|
||||
{
|
||||
Number = dr["NUMBER"].ToString();
|
||||
Entry = dr["ENTRY"].ToString();
|
||||
UserID = dr["INITIALS"].ToString();
|
||||
if (UserID == string.Empty) UserID = "UNKNOWN";
|
||||
//string date = GetDTS(dr["DATE"].ToString(), dr["TIME"].ToString()).ToString("MM/dd/yyyy HH:MM");//System.DateTime.Parse(dr["DATE"].ToString()).ToString("MM/dd/yyyy");
|
||||
//string time = dr["TIME"].ToString();
|
||||
//if (time.EndsWith(":"))
|
||||
// date += " " + time.Substring(0, 2) + ":" + time.Substring(2, 2);
|
||||
//else
|
||||
// date += " " + time.Substring(0, 2) + ":" + time.Substring(3, 2);
|
||||
//StartDateTime = System.DateTime.Parse(date);
|
||||
StartDateTime = GetDTS(dr["DATE"].ToString(), dr["TIME"].ToString());
|
||||
RevDate = StartDateTime.ToString("MM/dd/yyyy");
|
||||
FixItems fis = new FixItems(new FileInfo(string.Format(@"{0}\{1}.fix", afpath, Entry)));
|
||||
if (fis.Count > 0)
|
||||
{
|
||||
Rev = fis[0].Rev;
|
||||
RevDate = fis[0].RevDate ?? GetDBFRevDate(afpath);
|
||||
ReviewDate = fis[0].ReviewDate;
|
||||
}
|
||||
}
|
||||
public System.DateTime GetDTS(string date, string time)
|
||||
{
|
||||
// Set the date/time stamp. If there is no 'date', set the date
|
||||
// to 1/1/2000 (this can be changed!). If there is not 'time',
|
||||
// set the time to 0:0:0 (midnight).
|
||||
|
||||
System.DateTime dts = System.DateTime.Now;
|
||||
string month = "01";
|
||||
string day = "01";
|
||||
string year = "2000";
|
||||
string hour = "";
|
||||
string minute = "";
|
||||
try
|
||||
{
|
||||
if (date != null && date != "")
|
||||
{
|
||||
int indx1 = date.IndexOf("/");
|
||||
month = date.Substring(0, indx1);
|
||||
int indx2 = date.IndexOf("/", indx1 + 1);
|
||||
day = date.Substring(indx1 + 1, indx2 - indx1 - 1);
|
||||
year = date.Substring(indx2 + 1, 4);
|
||||
}
|
||||
if (time == null || time == "")
|
||||
{
|
||||
hour = "0";
|
||||
minute = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
hour = time.Substring(0, 2);
|
||||
int indxc = time.IndexOfAny(":A-".ToCharArray());
|
||||
if (indxc == time.Length - 1)
|
||||
minute = time.Substring(2, 2);
|
||||
else
|
||||
minute = time.Substring(indxc + 1, time.Length - indxc - 1);
|
||||
}
|
||||
dts = new System.DateTime(System.Convert.ToInt32(year), System.Convert.ToInt32(month), System.Convert.ToInt32(day),
|
||||
System.Convert.ToInt32(hour), System.Convert.ToInt32(minute), 0);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Bad Date/Time {0} {1}. Set to NOW.", date, time);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
//frmMain.AddError(ex, "Bad Date/Time {0} {1}", date, time);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
return dts;
|
||||
}
|
||||
return dts;
|
||||
}
|
||||
|
||||
private string GetDBFRevDate(string afpath)
|
||||
{
|
||||
FileInfo fi = new FileInfo(afpath + @"\" + Entry + ".dbf");
|
||||
if (fi.Exists)
|
||||
return fi.LastWriteTime.ToShortDateString();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
144
PROMS/DataLoader/ConfigInfo.cs.bak
Normal file
144
PROMS/DataLoader/ConfigInfo.cs.bak
Normal file
@@ -0,0 +1,144 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
class ConfigInfo
|
||||
{
|
||||
private XmlDocument xmldoc;
|
||||
public ConfigInfo(string xml)
|
||||
{
|
||||
xmldoc = new XmlDocument();
|
||||
if (xml == null)
|
||||
xmldoc.LoadXml("<Config/>");
|
||||
else
|
||||
xmldoc.LoadXml(xml);
|
||||
}
|
||||
|
||||
public ConfigInfo(string xml, string ename, string aname, string avalue)
|
||||
{
|
||||
xmldoc = new XmlDocument();
|
||||
if (xml == null)
|
||||
xmldoc.LoadXml("<Config/>");
|
||||
else
|
||||
xmldoc.LoadXml(xml);
|
||||
AddItem(ename, aname.Replace(' ','_'), avalue);
|
||||
}
|
||||
public bool AddItem(string ename, string aname, string avalue)
|
||||
{
|
||||
if (aname != null && aname != "")
|
||||
{
|
||||
//if (xmldoc == null)
|
||||
//{
|
||||
// xmldoc = new XmlDocument();
|
||||
// xmldoc.AppendChild(xmldoc.CreateElement("ConfigInfo"));
|
||||
//}
|
||||
// see if ename element exists, use it to add attributes,
|
||||
// otherwise, create the element.
|
||||
|
||||
XmlNode nxml = null;
|
||||
XmlNodeList xl = xmldoc.DocumentElement.SelectNodes(string.Format("//{0}", ename));
|
||||
switch (xl.Count)
|
||||
{
|
||||
case 0: // No nodes found
|
||||
nxml = xmldoc.DocumentElement.AppendChild(xmldoc.CreateElement(ename));
|
||||
break;
|
||||
default: // Found the node
|
||||
nxml = xl[0];
|
||||
if (nxml.GetType() != typeof(XmlElement))
|
||||
{
|
||||
frmLoader._MyLog.ErrorFormat("Invalid xml element type when migrating config data - element = {0}, name = {1} , value = {2}", ename, aname, avalue);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//added by jcb 20131216
|
||||
aname = SanitizeXmlString(aname);
|
||||
XmlAttribute xa = nxml.Attributes.Append(xmldoc.CreateAttribute(aname));
|
||||
//end added by jcb 20131216
|
||||
xa.Value = avalue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//added by jcb 20131216
|
||||
public string SanitizeXmlString(string xml)
|
||||
{
|
||||
if (xml == null)
|
||||
throw new ArgumentNullException("xml");
|
||||
xml = xml.Replace(' ', '_').Replace("/", "_fslash_").Replace("(", "_lparen_").Replace((char)0xA0, '_').Replace((char)0x20, '_').Replace(":", "_colon_");
|
||||
StringBuilder buffer = new StringBuilder(xml.Length);
|
||||
foreach (char c in xml)
|
||||
{
|
||||
if (IsLegalXmlChar(c))
|
||||
buffer.Append(c);
|
||||
}
|
||||
return buffer.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether a given character is allowed by XML 1.0.
|
||||
/// </summary>
|
||||
public bool IsLegalXmlChar(int character)
|
||||
{
|
||||
return
|
||||
(
|
||||
character == 0x9 /* == '\t' == 9 */ ||
|
||||
character == 0xA /* == '\n' == 10 */ ||
|
||||
character == 0xD /* == '\r' == 13 */ ||
|
||||
(character >= 0x20 && character <= 0xD7FF) ||
|
||||
(character >= 0xE000 && character <= 0xFFFD) ||
|
||||
(character >= 0x10000 && character <= 0x10FFFF)
|
||||
);
|
||||
}
|
||||
//end added by jcb 20131216
|
||||
|
||||
public int ItemCount
|
||||
{
|
||||
get { return xmldoc.DocumentElement.ChildNodes.Count; }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (xmldoc != null) return xmldoc.InnerXml;
|
||||
else return null;
|
||||
}
|
||||
public void AddSlaveNode(int index)
|
||||
{
|
||||
XmlElement slaves = xmldoc.SelectSingleNode("Config/Slaves") as XmlElement;
|
||||
if (slaves == null)
|
||||
{
|
||||
slaves = xmldoc.CreateElement("Slaves");
|
||||
xmldoc.DocumentElement.AppendChild(slaves);
|
||||
}
|
||||
XmlElement slave = xmldoc.CreateElement("Slave");
|
||||
XmlAttribute xa = xmldoc.CreateAttribute("index");
|
||||
xa.InnerText = index.ToString();
|
||||
slave.Attributes.Append(xa);
|
||||
slaves.AppendChild(slave);
|
||||
}
|
||||
public void AddSlaveItem(int index, string aname, string avalue)
|
||||
{
|
||||
string srch = "Config/Slaves/Slave[@index='" + index.ToString() + "']";
|
||||
XmlElement slave = xmldoc.SelectSingleNode(srch) as XmlElement;
|
||||
if (slave != null)
|
||||
{
|
||||
XmlAttribute xa = xmldoc.CreateAttribute(aname);
|
||||
xa.InnerText = avalue;
|
||||
slave.Attributes.Append(xa);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -13,15 +14,23 @@
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\veproms\bin\</OutputPath>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -32,54 +41,75 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Csla, Version=2.0.3.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30, processorArchitecture=MSIL">
|
||||
<Reference Include="C1.Win.C1FlexGrid.2, Version=2.6.20142.835, Culture=neutral, PublicKeyToken=79882d576c6336da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\Csla.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IniReader, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="Csla, Version=2.1.4.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\IniReader.dll</HintPath>
|
||||
<HintPath>..\csla20cs-2.1.4-070223\csla20cs\csla20cs\Csla\bin\Debug\Csla.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
|
||||
<Reference Include="Ionic.Zip">
|
||||
<HintPath>..\..\Proms3rdPartyLibraries\Ionic\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MSWord, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\MSWord.dll</HintPath>
|
||||
<HintPath>bin\Debug\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="vlnObject, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\vlnObject.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="vlnServerLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\vlnServerLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Volian.CSLA.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\veproms\bin\Volian.CSLA.Library.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Applicability.cs" />
|
||||
<Compile Include="Approve.cs" />
|
||||
<Compile Include="ConfigInfo.cs" />
|
||||
<Compile Include="ConversionRTBProblems.cs" />
|
||||
<Compile Include="CurSet.cs" />
|
||||
<Compile Include="DataLoaderGlitches.cs" />
|
||||
<Compile Include="DataLoaderSettings.cs" />
|
||||
<Compile Include="dlgExportImport.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgExportImport.designer.cs">
|
||||
<DependentUpon>dlgExportImport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ErrorReport.cs" />
|
||||
<Compile Include="FixItem.cs" />
|
||||
<Compile Include="FolderTreeNode.cs" />
|
||||
<Compile Include="Documents.cs">
|
||||
</Compile>
|
||||
<Compile Include="Formats.cs" />
|
||||
<Compile Include="frmCntTkn.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmCntTkn.designer.cs">
|
||||
<DependentUpon>frmCntTkn.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmErrors.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmErrors.designer.cs">
|
||||
<DependentUpon>frmErrors.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmLoader.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmLoader.Designer.cs">
|
||||
<DependentUpon>frmLoader.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmPG.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmPG.designer.cs">
|
||||
<DependentUpon>frmPG.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GroupProp.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -87,27 +117,43 @@
|
||||
<DependentUpon>GroupProp.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LibDoc.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LoadConfig.cs">
|
||||
</Compile>
|
||||
<Compile Include="Loader.cs" />
|
||||
<Compile Include="LoadTreeNh.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OutsideTransition.cs" />
|
||||
<Compile Include="PrivateProfile.cs" />
|
||||
<Compile Include="Procedures.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="dlgExportImport.resx">
|
||||
<DependentUpon>dlgExportImport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCntTkn.resx">
|
||||
<DependentUpon>frmCntTkn.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmErrors.resx">
|
||||
<DependentUpon>frmErrors.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmLoader.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmLoader.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmPG.resx">
|
||||
<DependentUpon>frmPG.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="GroupProp.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>GroupProp.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@@ -119,7 +165,25 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="App.config" />
|
||||
<None Include="BuildVEPROMS.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="ClassDiagram1.cd" />
|
||||
<None Include="PROMS2010.SQL">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="PROMSApproveApprove.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="PROMSFixes.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="PROMStoAPPR.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="PROMStoCM.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -130,30 +194,59 @@
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="RefObjs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RichTextBox41.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RichTextBox41.Designer.cs">
|
||||
<DependentUpon>RichTextBox41.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ROFixer.cs" />
|
||||
<Compile Include="ROFST.cs" />
|
||||
<Compile Include="SecObj.cs">
|
||||
</Compile>
|
||||
<Compile Include="Sections.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SQLScriptRunner.cs" />
|
||||
<Compile Include="Steps.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Structures.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TextConvert.cs" />
|
||||
<Compile Include="TransitionFixer.cs" />
|
||||
<Compile Include="Transitions.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LoadTreeDB.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DocVersions.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UIFileNameEditor.cs" />
|
||||
<Compile Include="WordDocument.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LBWordLibrary\LBWordLibrary.csproj">
|
||||
<Project>{70F23722-19A3-4AC1-A900-55831C945786}</Project>
|
||||
<Name>LBWordLibrary</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\VEPROMS.CSLA.Library\VEPROMS.CSLA.Library.csproj">
|
||||
<Project>{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}</Project>
|
||||
<Name>VEPROMS.CSLA.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Base.Library\Volian.Base.Library.csproj">
|
||||
<Project>{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}</Project>
|
||||
<Name>Volian.Base.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Controls.Library\Volian.Controls.Library.csproj">
|
||||
<Project>{8556527C-6615-487F-8AF7-22EBC3EF0268}</Project>
|
||||
<Name>Volian.Controls.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Utils.Library\Volian.Utils.Library.csproj">
|
||||
<Project>{62314B9C-DA84-4037-8B68-AA18C1F641F5}</Project>
|
||||
<Name>Volian.Utils.Library</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="vlnControl.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
153
PROMS/DataLoader/DataLoader.sln
Normal file
153
PROMS/DataLoader/DataLoader.sln
Normal file
@@ -0,0 +1,153 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataLoader", "DataLoader.csproj", "{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volian.Utils.Library", "..\Volian.Utils.Library\Volian.Utils.Library.csproj", "{62314B9C-DA84-4037-8B68-AA18C1F641F5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VEPROMS.CSLA.Library", "..\VEPROMS.CSLA.Library\VEPROMS.CSLA.Library.csproj", "{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EPocalipse.IFilter", "..\EPocalipse.IFilter\EPocalipse.IFilter.csproj", "{400462CE-40B3-498F-B95A-B1D2AE679359}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LBWordLibrary", "..\LBWordLibrary\LBWordLibrary.csproj", "{70F23722-19A3-4AC1-A900-55831C945786}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volian.Controls.Library", "..\Volian.Controls.Library\Volian.Controls.Library.csproj", "{8556527C-6615-487F-8AF7-22EBC3EF0268}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volian.Base.Library", "..\Volian.Base.Library\Volian.Base.Library.csproj", "{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XYPlots", "..\XYPlots\XYPlots.csproj", "{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SourceCodeControl) = preSolution
|
||||
SccNumberOfProjects = 7
|
||||
SccProjectUniqueName0 = ..\\Volian.Utils.Library\\Volian.Utils.Library.csproj
|
||||
SccProjectName0 = \u0022$/PROMS/Volian.Utils.Library\u0022,\u0020DICAAAAA
|
||||
SccLocalPath0 = ..\\Volian.Utils.Library
|
||||
SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName1 = ..\\VEPROMS.CSLA.Library\\VEPROMS.CSLA.Library.csproj
|
||||
SccProjectName1 = \u0022$/PROMS/VEPROMS.CSLA.Library\u0022,\u0020TPBAAAAA
|
||||
SccLocalPath1 = ..\\VEPROMS.CSLA.Library
|
||||
SccProvider1 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName2 = DataLoader.csproj
|
||||
SccProjectName2 = \u0022$/PROMS/DataLoader\u0022,\u0020IIAAAAAA
|
||||
SccLocalPath2 = .
|
||||
SccProvider2 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName3 = ..\\Volian.Controls.Library\\Volian.Controls.Library.csproj
|
||||
SccProjectName3 = \u0022$/PROMS/Volian.Controls.Library\u0022,\u0020TVBAAAAA
|
||||
SccLocalPath3 = ..\\Volian.Controls.Library
|
||||
SccProvider3 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName4 = ..\\LBWordLibrary\\LBWordLibrary.csproj
|
||||
SccProjectName4 = \u0022$/PROMS/LBWordLibrary\u0022,\u0020QUDAAAAA
|
||||
SccLocalPath4 = ..\\LBWordLibrary
|
||||
SccProvider4 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName5 = ..\\Volian.Base.Library\\Volian.Base.Library.csproj
|
||||
SccProjectName5 = \u0022$/PROMS/Volian.Base.Library\u0022,\u0020QJEAAAAA
|
||||
SccLocalPath5 = ..\\Volian.Base.Library
|
||||
SccProvider5 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
SccProjectUniqueName6 = ..\\XYPlots\\XYPlots.csproj
|
||||
SccProjectName6 = \u0022$/PROMS/XYPlots\u0022,\u0020BRDAAAAA
|
||||
SccLocalPath6 = ..\\XYPlots
|
||||
SccProvider6 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Demo|Any CPU = Demo|Any CPU
|
||||
Demo|x86 = Demo|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Demo|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Demo|x86.ActiveCfg = Debug|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8E239A2B-B38C-4CD5-BA0D-A41A88BD2AEE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Demo|Any CPU.Build.0 = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Demo|x86.ActiveCfg = Debug|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{62314B9C-DA84-4037-8B68-AA18C1F641F5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Debug|x86.Build.0 = Debug|x86
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Demo|Any CPU.ActiveCfg = Demo|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Demo|Any CPU.Build.0 = Demo|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Demo|x86.ActiveCfg = Demo|x86
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Demo|x86.Build.0 = Demo|x86
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Release|x86.ActiveCfg = Release|x86
|
||||
{41B2D786-1C03-4C1A-9247-DA9F0D6B06D5}.Release|x86.Build.0 = Release|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Debug|x86.Build.0 = Debug|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Demo|Any CPU.ActiveCfg = Demo|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Demo|Any CPU.Build.0 = Demo|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Demo|x86.ActiveCfg = Demo|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Demo|x86.Build.0 = Demo|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Release|x86.ActiveCfg = Release|x86
|
||||
{400462CE-40B3-498F-B95A-B1D2AE679359}.Release|x86.Build.0 = Release|x86
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Demo|Any CPU.Build.0 = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Demo|x86.ActiveCfg = Debug|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{70F23722-19A3-4AC1-A900-55831C945786}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Debug|x86.Build.0 = Debug|x86
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Demo|Any CPU.ActiveCfg = Demo|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Demo|Any CPU.Build.0 = Demo|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Demo|x86.ActiveCfg = Demo|x86
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Demo|x86.Build.0 = Demo|x86
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Release|x86.ActiveCfg = Release|x86
|
||||
{8556527C-6615-487F-8AF7-22EBC3EF0268}.Release|x86.Build.0 = Release|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Debug|x86.Build.0 = Debug|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Demo|Any CPU.ActiveCfg = Debug|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Demo|x86.ActiveCfg = Debug|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Demo|x86.Build.0 = Debug|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Release|x86.ActiveCfg = Release|x86
|
||||
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}.Release|x86.Build.0 = Release|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Debug|x86.Build.0 = Debug|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Demo|Any CPU.ActiveCfg = Demo|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Demo|Any CPU.Build.0 = Demo|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Demo|x86.ActiveCfg = Demo|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Demo|x86.Build.0 = Demo|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Release|x86.ActiveCfg = Release|x86
|
||||
{04E168D0-9CC7-43D9-A9F1-93E481EA86A3}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
127
PROMS/DataLoader/DocVersions.cs.bak
Normal file
127
PROMS/DataLoader/DocVersions.cs.bak
Normal file
@@ -0,0 +1,127 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
public TimeSpan MigrateDocVersion(DocVersion docver)
|
||||
{
|
||||
return MigrateDocVersion(docver, true);
|
||||
}
|
||||
|
||||
private OutsideTransition _OutTran;
|
||||
public int MultiUnitCount = 0;
|
||||
public Dictionary<int, int> Old2NewApple;
|
||||
public Dictionary<int, int> New2OldApple;
|
||||
|
||||
public TimeSpan MigrateDocVersion(DocVersion docver, bool convertProcedures)
|
||||
{
|
||||
long lTime = DateTime.Now.Ticks;
|
||||
string pth = docver.Title;
|
||||
MultiUnitCount = docver.DocVersionConfig.Unit_Count;
|
||||
if (MultiUnitCount > 0)
|
||||
{
|
||||
Old2NewApple = new Dictionary<int, int>();
|
||||
New2OldApple = new Dictionary<int, int>();
|
||||
for (int i = 1; i <= MultiUnitCount; i++)
|
||||
{
|
||||
docver.DocVersionConfig.SelectedSlave = i;
|
||||
int oldindex = int.Parse(docver.DocVersionConfig.Old_Index);
|
||||
Old2NewApple.Add(oldindex, i);
|
||||
New2OldApple.Add(i, oldindex);
|
||||
}
|
||||
}
|
||||
if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return new TimeSpan(); // Open connection
|
||||
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
|
||||
if (convertProcedures)
|
||||
{
|
||||
// JSJ 02/10/2010 - Remove all the .INF files before proceeding to convert.
|
||||
// The INF files contain a path to a corresponding NDX file - had data with bat NDX path
|
||||
DeleteINFFiles(pth);
|
||||
_OutTran = new OutsideTransition(cn);
|
||||
frmMain.AddInfo("Before MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
|
||||
MigrateROFST(pth, docver);
|
||||
GC.Collect();
|
||||
frmMain.AddInfo("After MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
|
||||
// Migrate library documents
|
||||
MigrateLibDocs(cn, pth);
|
||||
// Initialize Dictionaries
|
||||
dicTrans_ItemDone = new Dictionary<string, Item>();
|
||||
dicTrans_ItemIds = new Dictionary<string, Item>();
|
||||
dicTrans_MigrationErrors = new Dictionary<string, List<Item>>();
|
||||
|
||||
// Create a 'dummy' content record. This will be used for any transitions 'to'
|
||||
// that don't exist when dbf is processed. At end, use this to see if there
|
||||
// are missing transitions.
|
||||
TransDummyCont = Content.MakeContent(null, "DUMMY CONTENT FOR TRANSITION MIGRATION", null, null, null);
|
||||
}
|
||||
// Process Procedures
|
||||
Item itm = null;
|
||||
if (convertProcedures || docver.VersionType == (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft || docver.VersionType == (int)VEPROMS.CSLA.Library.VersionTypeEnum.Approved)
|
||||
itm = MigrateProcedures(cn, pth, docver, convertProcedures, docver.MyDocVersionInfo.ActiveFormat);
|
||||
// Show any Missing Transtitons (i.e. Transitions which have not been processed)
|
||||
lTime = DateTime.Now.Ticks - lTime;
|
||||
if (convertProcedures)
|
||||
{
|
||||
ShowMissingTransitions(docver);
|
||||
//frmMain.Status = string.Format("{0}\r\nConversion completed in {1} seconds.", pth, TimeSpan.FromTicks(lTime).TotalSeconds);
|
||||
TimeSpan ts = TimeSpan.FromTicks(lTime);
|
||||
frmMain.Status = string.Format("{0}\r\nConversion completion time: {1:D2}:{2:D2}:{3:D2}.{4} ({5} Total Seconds)", pth, ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds, ts.TotalSeconds);
|
||||
log.InfoFormat("Completed Migration of {0}", pth);
|
||||
|
||||
//MessageBox.Show("Completed Migration of " + pth); //jsj commented out to let it run through
|
||||
if (rofstinfo != null) rofstinfo.ROFSTLookup.Close();
|
||||
dicTrans_ItemDone.Clear();
|
||||
dicTrans_ItemDone = null;
|
||||
}
|
||||
else
|
||||
frmMain.Status = string.Format("{0}\r\nDone.", pth);
|
||||
cn.Close();
|
||||
if (itm != null)
|
||||
{
|
||||
docver.MyItem = itm;
|
||||
if (convertProcedures) docver.Title = ""; // clearing this tell us this docver (path) was converted?
|
||||
if (!docver.IsSavable) ErrorRpt.ErrorReport(docver);
|
||||
if(frmMain.MySettings.ExecutionMode == ExecutionMode.Debug)
|
||||
docver.DocVersionConfig.Print_PDFLocation = frmMain.MySettings.PDFFolder;
|
||||
docver.Save();
|
||||
}
|
||||
return TimeSpan.FromTicks(lTime);
|
||||
}
|
||||
private void DeleteINFFiles(string pth)
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(pth);
|
||||
FileInfo [] myFiles = di.GetFiles("*.INF");
|
||||
foreach (FileInfo myFile in myFiles)
|
||||
myFile.Delete();
|
||||
}
|
||||
private VEPROMS.CSLA.Library.VersionTypeEnum DocVersionType(string s)
|
||||
{
|
||||
if (s.EndsWith("approved")) return VEPROMS.CSLA.Library.VersionTypeEnum.Approved;
|
||||
if (s.EndsWith("chgsht")) return VEPROMS.CSLA.Library.VersionTypeEnum.Revision;
|
||||
if (s.EndsWith("tmpchg")) return VEPROMS.CSLA.Library.VersionTypeEnum.Temporary;
|
||||
return VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft;
|
||||
}
|
||||
}
|
||||
}
|
199
PROMS/DataLoader/Formats.cs.org
Normal file
199
PROMS/DataLoader/Formats.cs.org
Normal file
@@ -0,0 +1,199 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
|
||||
private Format AddFormatToDB(Format parent, string format, bool issub, DateTime Dts, string Userid)
|
||||
{
|
||||
string fmtdata = null;
|
||||
string genmacdata = null;
|
||||
XmlDocument xd = null;
|
||||
|
||||
string path = "c:\\development\\fmtall\\" + format + "all.xml";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
try
|
||||
{
|
||||
StreamReader srf = new StreamReader(path);
|
||||
xd = new XmlDocument();
|
||||
xd.Load(srf);
|
||||
//xd.Load(path);
|
||||
fmtdata = xd.OuterXml;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "AddFormatToDB('{0}','{1}')", parent.Name, path);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Do we need genmac - only if non-subformat
|
||||
if (!issub)
|
||||
{
|
||||
path = "c:\\development\\genmacall\\" + format + ".svg";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
try
|
||||
{
|
||||
StreamReader sr = new StreamReader(path);
|
||||
XmlDocument xdg = new XmlDocument();
|
||||
xdg.Load(sr);
|
||||
//xdg.Load(path);
|
||||
genmacdata = xdg.OuterXml;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "AddFormatToDB('{0}','{1}')", parent.Name, path);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Get the name & then create the record.
|
||||
if (Userid == null || Userid == "") Userid = "Migration";
|
||||
|
||||
string nmattr = "Default";
|
||||
|
||||
// use xpath to get name.
|
||||
if (parent != null)
|
||||
{
|
||||
XmlNode nmnode = xd.SelectSingleNode("//FormatData");
|
||||
if (nmnode is XmlElement)
|
||||
{
|
||||
XmlElement xm = (XmlElement)nmnode;
|
||||
nmattr = xm.GetAttribute("Name");
|
||||
}
|
||||
}
|
||||
// use the format name if base or non sub. If it's a sub, remove the "_".
|
||||
string fname = issub ? format.Replace("_", "") : format;
|
||||
Format rec = null;
|
||||
try
|
||||
{
|
||||
rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, Dts, Userid);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "AddFormatToDB-make format('{0}','{1}')", parent.Name, path);
|
||||
}
|
||||
return rec;
|
||||
}
|
||||
public void LoadAllFormats()
|
||||
{
|
||||
Format basefmt = null;
|
||||
Format parent = null;
|
||||
|
||||
// Load base format.
|
||||
basefmt = AddFormatToDB(null, "base", false, DateTime.Now, "Migration");
|
||||
if (basefmt == null) return;
|
||||
// now loop through all files... If there is an _ in the name, it's a subformat
|
||||
// (for example, AEP_00.xml) skip it in main loop, it's handled for each format.
|
||||
DirectoryInfo di = new DirectoryInfo(@"c:\development\fmtall");
|
||||
FileInfo[] fis = di.GetFiles("*.xml");
|
||||
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
bool issub = (fi.Name.IndexOf("_") > 0) ? true : false;
|
||||
if (!issub && fi.Name.ToLower() != "baseall.xml")
|
||||
{
|
||||
string fmtname = fi.Name.Substring(0, fi.Name.Length - 7);
|
||||
// remove the all.xml part of the filename.
|
||||
try
|
||||
{
|
||||
parent = AddFormatToDB(basefmt, fmtname, issub, DateTime.Now, "Migration");
|
||||
if (parent != null)
|
||||
{
|
||||
// now see if there are any subformats associated with this, if so
|
||||
// add them here...
|
||||
DirectoryInfo sdi = new DirectoryInfo("c:\\development\\fmtall");
|
||||
FileInfo[] sfis = di.GetFiles(fmtname + "_*.xml");
|
||||
foreach (FileInfo sfi in sfis)
|
||||
{
|
||||
string nm = sfi.Name.Substring(0, sfi.Name.Length - 7);
|
||||
//Console.WriteLine("Processing {0}", sfi.Name);
|
||||
frmMain.Status = string.Format("Processing Format {0}", sfi.Name);
|
||||
try
|
||||
{
|
||||
AddFormatToDB(parent, nm, true, DateTime.Now, "Migration");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "LoadAllFormats() '{0}'", sfi.Name);
|
||||
//Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "LoadAllFormats() '{0}'", fi.Name);
|
||||
//Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public FormatInfo GetFormat(string format)
|
||||
{
|
||||
Format parent = null;
|
||||
Format rec = null;
|
||||
|
||||
// get base
|
||||
Format baseparent = Format.Get(1);
|
||||
|
||||
// if there is no format - what should be done? maybe nothing.
|
||||
if (format == null || format == "") return null;
|
||||
|
||||
try
|
||||
{
|
||||
if (format.IndexOf(' ') > -1) // will have spaces if it's a user format
|
||||
{
|
||||
string part1 = format.Substring(0, format.IndexOf(' '));
|
||||
string part2 = format.Substring(format.LastIndexOf(' ') + 1, 2);
|
||||
format = part1 + part2;
|
||||
|
||||
// get the parent format's id (for example, AEP for AEP00).
|
||||
parent = Format.GetByParentID_Name(baseparent.FormatID, part1);
|
||||
}
|
||||
else
|
||||
parent = baseparent;
|
||||
|
||||
// see if the format has been added, if not go get it.
|
||||
rec = Format.GetByParentID_Name(parent.FormatID, format);
|
||||
// JSJ - 02/04/10 this fixes cases where a subformat is no longer available,
|
||||
// default to the parent format
|
||||
if (rec == null)
|
||||
rec = parent;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Error getting xml version of format {0}", ex.Message);
|
||||
frmMain.AddError(ex, "GetFormat('{0}')", format);
|
||||
}
|
||||
FormatInfo recInfo = FormatInfo.Get(rec.FormatID);
|
||||
return recInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
122
PROMS/DataLoader/LibDoc.cs.bak
Normal file
122
PROMS/DataLoader/LibDoc.cs.bak
Normal file
@@ -0,0 +1,122 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Volian.MSWord;
|
||||
using vlnObjectLibrary;
|
||||
using vlnServerLibrary;
|
||||
using Org.Mentalis.Files;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
|
||||
private void MigrateLibDocs(OleDbConnection cn, string pth)
|
||||
{
|
||||
// Get all of the library documents - the first list has the entire list of files
|
||||
// found within the rtffiles folder, the second list contains usages from the 'tran'
|
||||
// file. During processing for procedures/sections occurs, the used library documents
|
||||
// will be migrated. After that, any remaining library documents will be added to
|
||||
// the section table without a reference from the structuretbl.
|
||||
Dictionary<string, int> dicLibDocSect = new Dictionary<string, int>();
|
||||
frmMain.UpdateLabelsLibDocs(0, 0);
|
||||
if (Directory.Exists(pth + "\\rtffiles"))
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(pth + "\\RTFFILES");
|
||||
FileInfo[] fis = di.GetFiles("DOC_*.LIB");
|
||||
frmMain.UpdateLabelsSetProc(fis.Length);
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
frmMain.UpdateLabelsLibDocs(1, 0);
|
||||
dicLibDocSect[fi.Name.Substring(0, 8).ToUpper()] = MigrateLibDoc(fi);
|
||||
}
|
||||
}
|
||||
dicLibDocRef = new Dictionary<string, int>();
|
||||
OleDbDataAdapter da_doc = new OleDbDataAdapter("select [FROMNUMBER], [FROMSEQUEN], [TONUMBER] from [tran] where [TONUMBER] LIKE 'doc_%' or [TONUMBER] like 'DOC_%'", cn);
|
||||
DataSet ds_doc = new DataSet();
|
||||
da_doc.Fill(ds_doc);
|
||||
frmMain.UpdateLabelsSetSect(ds_doc.Tables[0].Rows.Count);
|
||||
foreach (DataRow dr_doc in ds_doc.Tables[0].Rows)
|
||||
{
|
||||
frmMain.UpdateLabelsLibDocs(0, 1);
|
||||
string key = dr_doc["FROMNUMBER"].ToString().PadRight(20) + dr_doc["FROMSEQUEN"].ToString().PadRight(10);
|
||||
if (!dicLibDocSect.ContainsKey(dr_doc["TONUMBER"].ToString().ToUpper()))
|
||||
log.ErrorFormat("Error setting library document references: {0}", dr_doc["TONUMBER"].ToString().ToUpper());
|
||||
else
|
||||
dicLibDocRef[key] = dicLibDocSect[dr_doc["TONUMBER"].ToString().ToUpper()];
|
||||
}
|
||||
da_doc.Dispose();
|
||||
}
|
||||
private int MigrateLibDoc(FileInfo fi)
|
||||
{
|
||||
ConfigInfo ci = new ConfigInfo(null);
|
||||
string title = null; // for docname, remove the '.lib', i.e. substring(0,8)
|
||||
DateTime dts = DateTime.Now;
|
||||
ci.AddItem("Edit", "Initialized", "true");
|
||||
string tmpRtfFileName = GetLibDocData(fi, ci, ref title);
|
||||
int Docid = SaveWordDoc(tmpRtfFileName, title, null, ci, string.Empty);
|
||||
File.Delete(tmpRtfFileName);
|
||||
return Docid;
|
||||
}
|
||||
private string LoadFromLib(BinaryReader br)
|
||||
{
|
||||
int nchar = br.ReadInt16();
|
||||
if (nchar > 0)
|
||||
{
|
||||
string tmp = new string(br.ReadChars(nchar));
|
||||
return tmp.Substring(0, tmp.Length - 1); // remove null at end.
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private string GetLibDocData(FileInfo fi, ConfigInfo ci, ref string title)
|
||||
{
|
||||
title = null;
|
||||
// get the number, title, etc from the file.
|
||||
// use the path to open the file & read the title & comment
|
||||
DateTime dts = fi.LastWriteTimeUtc;
|
||||
FileStream fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
BinaryReader br = new BinaryReader(fs, System.Text.ASCIIEncoding.ASCII);
|
||||
string tmpRtfFileName = Path.GetTempFileName();
|
||||
FileStream tmpfile = new FileStream(tmpRtfFileName, FileMode.Create);
|
||||
BinaryWriter bw = new BinaryWriter(tmpfile, System.Text.Encoding.ASCII);
|
||||
int cntPage = br.ReadInt16();
|
||||
if (cntPage != -1)
|
||||
{ // Not End of File
|
||||
ci.AddItem("Section", "NumPages", cntPage.ToString());
|
||||
string ldtitle = LoadFromLib(br);
|
||||
if (ldtitle != null && ldtitle != "") title = ldtitle;
|
||||
ci.AddItem("LibDoc", "Comment", LoadFromLib(br));
|
||||
long l = br.BaseStream.Length - br.BaseStream.Position;
|
||||
byte[] buf = new byte[l];
|
||||
br.Read(buf, 0, (int)l);
|
||||
bw.Write(buf, 0, (int)l);
|
||||
br.Close();
|
||||
fs.Close();
|
||||
bw.Close();
|
||||
tmpfile.Close();
|
||||
WaitMS(wms); // give it some time to close the tempfile before adding section
|
||||
File.SetLastWriteTimeUtc(tmpRtfFileName, dts);
|
||||
}
|
||||
return tmpRtfFileName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
284
PROMS/DataLoader/LoadTreeDB.cs.bak
Normal file
284
PROMS/DataLoader/LoadTreeDB.cs.bak
Normal file
@@ -0,0 +1,284 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using vlnObjectLibrary;
|
||||
using vlnServerLibrary;
|
||||
using Org.Mentalis.Files;
|
||||
using Config;
|
||||
using Utils;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
private List<Folder> vlnDataPathFolders() // was vlnDataPath
|
||||
{
|
||||
List<Folder> dpf = new List<Folder>();
|
||||
// Get path to config file
|
||||
string sCfg = Environment.GetEnvironmentVariable("veconfig");
|
||||
IniReader cfg = new IniReader(sCfg);
|
||||
// Get DataPath
|
||||
string sDP = cfg.ReadString("menu", "DataPath");
|
||||
// Split DataPath into directories
|
||||
|
||||
// Get the current list of folders so that if it already exists, just get the 'Folder', otherwise
|
||||
// make it. It was done this way because there was no way to get the Folder given a name/Title.
|
||||
FolderInfoList fil = FolderInfoList.Get();
|
||||
|
||||
foreach (string s1 in sDP.Split(";".ToCharArray()))
|
||||
{
|
||||
if (s1.Length > 0)
|
||||
{
|
||||
string[] s2 = s1.Split(",".ToCharArray());
|
||||
Folder fld = GetFolderFromName(s2[1], s2[0], fil);
|
||||
if (fld == null)
|
||||
fld = Folder.MakeFolder(sysFolder, dbConn, s2[1], s2[0], FolderName(s2[0]), null, null, DateTime.Now, "Migration");
|
||||
dpf.Add(fld);
|
||||
}
|
||||
}
|
||||
return dpf;
|
||||
}
|
||||
private Folder GetFolderFromName(string name, string title, FolderInfoList fil)
|
||||
{
|
||||
Folder fld = null;
|
||||
foreach (FolderInfo fi in fil)
|
||||
{
|
||||
if (fi.Name.ToUpper() == name.ToUpper() && fi.Title.ToUpper() == title.ToUpper())
|
||||
{
|
||||
fld = Folder.Get(fi.FolderID);
|
||||
return fld;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private string FolderName(string Path)
|
||||
{
|
||||
int ind = Path.LastIndexOf("\\");
|
||||
if (ind == Path.Length-1 || ind < 0) return Path;
|
||||
return Path.Substring(ind + 1);
|
||||
}
|
||||
private DocVersion GetDocVersionFromName(Folder fld, string f)
|
||||
{
|
||||
DocVersion dv = null;
|
||||
DocVersionInfoList dvil = DocVersionInfoList.GetByFolderID(fld.FolderID);
|
||||
foreach (DocVersionInfo dvi in dvil)
|
||||
{
|
||||
if (dvi.Name.ToUpper() == f.ToUpper())
|
||||
{
|
||||
dv = DocVersion.Get(dvi.VersionID);
|
||||
return dv;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private object cslaObject(vlnObject vb, Connection dbConn, Object parfld, TreeNode tn)
|
||||
{
|
||||
switch (vb.Type)
|
||||
{
|
||||
case "plant":
|
||||
case "set":
|
||||
// if folder exists... get the Folder object, otherwise create it.
|
||||
FolderInfoList fil = FolderInfoList.Get();
|
||||
Folder fld = GetFolderFromName(vb.Title, vb.Path, fil);
|
||||
if (fld==null) fld = Folder.MakeFolder((Folder)parfld, dbConn, vb.Title, vb.Path, FolderName(vb.Path), null, null, DateTime.Now, "Migration");
|
||||
tn.Tag = fld;
|
||||
return (object) fld;
|
||||
case "version":
|
||||
// see if version exists for the input folder, parfld.
|
||||
DocVersion v = GetDocVersionFromName((Folder)parfld, vb.Title);
|
||||
if (v == null)
|
||||
{
|
||||
ConfigFile cfg = new ConfigFile();
|
||||
|
||||
XmlDocument d = cfg.IniToXml(vb.Path + "\\proc.ini");
|
||||
AddSlaveUnits(d, vb.Path);
|
||||
//DocVersionConfig fld_cfg = new DocVersionConfig(d == null ? "" : d.InnerXml);
|
||||
FolderConfig fld_cfg = (d==null)?null:new FolderConfig(d.InnerXml);
|
||||
// translate curset.dat into xml & add to d (somehow).
|
||||
string csfile = string.Format("{0}\\curset.dat",vb.Path);
|
||||
string defPlantFmt = null;
|
||||
if (File.Exists(csfile))
|
||||
{
|
||||
CurSet cs = new CurSet(csfile);
|
||||
try
|
||||
{
|
||||
if (fld_cfg == null) fld_cfg = new FolderConfig();
|
||||
fld_cfg = cs.Convert(fld_cfg);
|
||||
defPlantFmt = cs.GetDefFmt();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("error in convert curset.dat, ex = {0}", ex.Message);
|
||||
frmMain.AddError(ex, "error in convert curset.dat");
|
||||
}
|
||||
}
|
||||
// *** RHM 20120613 - Fix
|
||||
// *** This was naming the DocVersion to the folder name
|
||||
//string titlepath = vb.Path + "\\" + "Title";
|
||||
//FileInfo fi = new FileInfo(titlepath);
|
||||
//string thetitle = vb.Title;
|
||||
//if (File.Exists(titlepath))
|
||||
//{
|
||||
// StreamReader myReader = new StreamReader(titlepath);
|
||||
// thetitle = myReader.ReadLine();
|
||||
// myReader.Close();
|
||||
//}
|
||||
Folder tmpfld = (Folder)parfld;
|
||||
FormatInfo format = null;
|
||||
if (defPlantFmt != null && defPlantFmt != "")
|
||||
{
|
||||
format = GetFormat(defPlantFmt);
|
||||
}
|
||||
else
|
||||
format = FormatInfo.Get(1);
|
||||
|
||||
using(Format fmt = format.Get())
|
||||
v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), vb.Title, vb.Path.ToLower(), null, fmt, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
|
||||
}
|
||||
tn.Tag = v;
|
||||
MigrateDocVersion(v, false);
|
||||
return (object)v;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void AddSlaveUnits(XmlDocument d, string path)
|
||||
{
|
||||
string masterDir = GetMasterDir(d);
|
||||
if (masterDir == null) return;
|
||||
DirectoryInfo master = new DirectoryInfo(path);
|
||||
if (master.Name.ToUpper() != masterDir.ToUpper()) return;
|
||||
List<string> names = GetUnitNames(d);
|
||||
DirectoryInfo[] slaves = master.Parent.GetDirectories(masterDir.ToUpper().Replace(".PRC",".SL*"));
|
||||
XmlDocument units = new XmlDocument();
|
||||
units.LoadXml("<Slaves/>");
|
||||
int idx = 0;
|
||||
foreach (DirectoryInfo slave in slaves)
|
||||
{
|
||||
FileInfo[] inis = slave.GetFiles("proc.ini");
|
||||
if (inis.Length > 0)
|
||||
{
|
||||
FileInfo ini = inis[0];
|
||||
ConfigFile cfg = new ConfigFile();
|
||||
XmlDocument xSlave = cfg.IniToXml(ini.FullName);
|
||||
xSlave.LoadXml(xSlave.OuterXml.Replace("<Unit", "<Slave"));
|
||||
string slaveDir = GetMasterDir(xSlave);
|
||||
if (slaveDir.ToUpper() == masterDir.ToUpper())
|
||||
{
|
||||
XmlNode unit = xSlave.SelectSingleNode("Config/Slave");
|
||||
XmlAttribute oldindex = xSlave.CreateAttribute("oldindex");
|
||||
oldindex.InnerText = slave.Extension.Replace(".SL", "");
|
||||
unit.Attributes.SetNamedItem(oldindex);
|
||||
XmlAttribute index = xSlave.CreateAttribute("index");
|
||||
idx++;
|
||||
index.InnerText = idx.ToString();
|
||||
unit.Attributes.SetNamedItem(index);
|
||||
if (names.Count == slaves.Length)
|
||||
oldindex.InnerText = index.InnerText;
|
||||
if (xSlave.SelectSingleNode("Config/ProcedureSet") != null)
|
||||
{
|
||||
XmlAttribute setName = xSlave.CreateAttribute("SetName");
|
||||
setName.InnerText = xSlave.SelectSingleNode("Config/ProcedureSet/@Name").InnerText;
|
||||
unit.Attributes.SetNamedItem(setName);
|
||||
XmlAttribute setID = xSlave.CreateAttribute("SetID");
|
||||
setID.InnerText = xSlave.SelectSingleNode("Config/ProcedureSet/@ID").InnerText;
|
||||
unit.Attributes.SetNamedItem(setID);
|
||||
}
|
||||
units.DocumentElement.AppendChild(units.ImportNode(unit, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
d.DocumentElement.AppendChild(d.ImportNode(units.DocumentElement, true));
|
||||
//d.DocumentElement.RemoveChild(d.SelectSingleNode("Config/Unit"));
|
||||
Console.WriteLine(d.OuterXml);
|
||||
}
|
||||
|
||||
private List<string> GetUnitNames(XmlDocument d)
|
||||
{
|
||||
XmlNode zapp = d.SelectSingleNode("//Unit");
|
||||
if (zapp == null) return null;
|
||||
XmlNode zmstr = zapp.Attributes.GetNamedItem("Name");
|
||||
if (zmstr == null) return null;
|
||||
string[] names = zmstr.InnerText.Split(",".ToCharArray());
|
||||
return new List<string>(names);
|
||||
}
|
||||
|
||||
private static string GetMasterDir(XmlDocument d)
|
||||
{
|
||||
XmlNode zapp = d.SelectSingleNode("//Applicability");
|
||||
if (zapp == null) return null;
|
||||
XmlNode zmstr = zapp.Attributes.GetNamedItem("MasterDir");
|
||||
if (zmstr == null) return null;
|
||||
return zmstr.InnerText;
|
||||
}
|
||||
private string _OnlyThisFolder;
|
||||
public string OnlyThisFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_OnlyThisFolder == null)
|
||||
{
|
||||
if (frmMain.MySettings.OnlyThisSet)
|
||||
{
|
||||
DirectoryInfo dir = new DirectoryInfo(frmMain.MySettings.ProcedureSetPath);
|
||||
_OnlyThisFolder = dir.Parent.FullName.ToUpper();
|
||||
}
|
||||
else
|
||||
_OnlyThisFolder = "";
|
||||
}
|
||||
return _OnlyThisFolder;
|
||||
}
|
||||
}
|
||||
private bool IsInSelectedPlantData(Object parent)
|
||||
{
|
||||
if (OnlyThisFolder == "")
|
||||
return true;
|
||||
Folder fld = parent as Folder;
|
||||
if (fld == null)
|
||||
return true;
|
||||
if (fld.MyParent.MyParent != null)
|
||||
return true;
|
||||
if (fld.Title.ToUpper() == OnlyThisFolder)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
private void MigrateChildren(vlnObject vb, vlnServer vs, Connection dbConn, Object parent, TreeNode tn)
|
||||
{
|
||||
if (vb.Type != "version")
|
||||
{
|
||||
vb.LoadChildren(vs.GetChildren(vb.ToString()));
|
||||
List<vlnObject> lv = vb.Children;
|
||||
foreach (vlnObject vbc in lv)
|
||||
{
|
||||
if (vbc.Path.ToUpper().StartsWith(OnlyThisFolder) || OnlyThisFolder.StartsWith(vbc.Path.ToUpper()))
|
||||
{
|
||||
TreeNode tnc = tn.Nodes.Add(vbc.Title);
|
||||
object idc = cslaObject(vbc, dbConn, parent, tnc);
|
||||
frmMain.Status = "Loading " + vbc.Title;
|
||||
MigrateChildren(vbc, vs, dbConn, idc, tnc);
|
||||
}
|
||||
}
|
||||
}
|
||||
frmMain.Status = " ";
|
||||
}
|
||||
}
|
||||
}
|
280
PROMS/DataLoader/Loader.cs.bak
Normal file
280
PROMS/DataLoader/Loader.cs.bak
Normal file
@@ -0,0 +1,280 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Volian.MSWord;
|
||||
using vlnObjectLibrary;
|
||||
using vlnServerLibrary;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Config;
|
||||
using Volian.Base.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
#region ClassProperties
|
||||
private int wms = 500;
|
||||
private static int EDDATA = 0x01;
|
||||
private static int PH = 0x02;
|
||||
private static int TOC = 0x04;
|
||||
private static int AUTOIND = 0x08;
|
||||
private static int AUTOGEN = 0x40;
|
||||
|
||||
private static int STP_MULT_CHGID = 1;
|
||||
private static int STP_LNK_SEQ = 2;
|
||||
private static int STP_OVR_TAB = 3;
|
||||
|
||||
private string ProcFileName;
|
||||
private string ProcNumber;
|
||||
private ROFstInfo rofstinfo;
|
||||
private RODb rodb;
|
||||
private int EditSectId;
|
||||
private Dictionary<string, int> dicLibDocRef;
|
||||
|
||||
// have a few variables for storing the database id record & the system record.
|
||||
public Connection dbConn;
|
||||
public Folder sysFolder;
|
||||
public AnnotationType CommentType; // this holds the annotationtype of comment for future use
|
||||
public AnnotationType MigrationErrorType; // this holds the annotationtype of Migration Error for future use
|
||||
public AnnotationType VerificationRequiredType; // Using this to flag table to grid conversions
|
||||
public Document MissingDocument = null; // make a document if there is a missing rtf file
|
||||
// any missing will use this.
|
||||
private Content TransDummyCont;
|
||||
// the following two dictionaries are used to handle migration of the
|
||||
// transitions... dicTrans_ItemDone gets an entry for procnumber, sequence
|
||||
// number and the new item id as a step or section is created (transitions
|
||||
// can go to steps or sections). When a transition is encountered, check this
|
||||
// dictionary to see if the step or section was migrated & use the item
|
||||
// for the step or section if it was migrated. When a transition is migrated where
|
||||
// the 'to' has not been migrated yet, check if an entry exists in dicTrans_ItemIds,
|
||||
// if so, use the item listed here. If no entry exists in dicTrans_ItemIds, create
|
||||
// an item table record and use the id as part of the 'to', and add an entry to
|
||||
// dicTrans_ItemIds to flag that the record was already created. As migrating sections
|
||||
// and steps, check this dicTrans_ItemIds to see if the item record has already
|
||||
// been create, if so use it and remove it from the dicTrans_ItemIds dictionary,
|
||||
// otherwise, create a new item record.
|
||||
private Dictionary<string, Item> dicTrans_ItemDone;
|
||||
private Dictionary<string, Item> dicTrans_ItemIds;
|
||||
private Dictionary<string, List<Item>> dicTrans_MigrationErrors;
|
||||
private Dictionary<object, string> dicOldStepSequence;
|
||||
private Dictionary<TreeNode, TreeNode> dicNeedToLoad;
|
||||
private Dictionary<string, string> dicSetfileEntries;
|
||||
|
||||
private log4net.ILog log;
|
||||
#endregion
|
||||
private frmLoader frmMain;
|
||||
public Loader(log4net.ILog lg, frmLoader fm)
|
||||
{
|
||||
dicNeedToLoad = new Dictionary<TreeNode, TreeNode>();
|
||||
log = lg;
|
||||
frmMain = fm;
|
||||
}
|
||||
public bool LoadFolders(string vepromspath)
|
||||
{
|
||||
try
|
||||
{
|
||||
//_FmtAllPath = frmMain.MySettings.FormatFolder;
|
||||
//_GenmacAllPath = frmMain.MySettings.GenMacFolder;
|
||||
frmMain.Status = "Make Connection";
|
||||
// make the initial database connection record, annotation types & top
|
||||
// system folder.
|
||||
dbConn = Connection.MakeConnection("Default", "Default", frmMain.MySettings.ConnectionString.Replace("{DBName}",frmMain.MySettings.DBName), 1, null, DateTime.Now, "Migration");
|
||||
ConfigFile cfg = new ConfigFile();
|
||||
|
||||
frmMain.Status = "Add AnnotationTypes";
|
||||
CommentType = AnnotationType.MakeAnnotationType("Comment", null);
|
||||
MigrationErrorType = AnnotationType.MakeAnnotationType("Migration Error", null);
|
||||
|
||||
AnnotationType at = AnnotationType.MakeAnnotationType("Reference", null);
|
||||
at = AnnotationType.MakeAnnotationType("Action Items", null);
|
||||
//at = AnnotationType.MakeAnnotationType("Verification Required", null);
|
||||
VerificationRequiredType = AnnotationType.MakeAnnotationType("Verification Required", null);
|
||||
at = AnnotationType.MakeAnnotationType("Volian Comment", null);
|
||||
|
||||
frmMain.Status = "Load veproms.ini";
|
||||
XmlDocument d = cfg.LoadSystemIni(vepromspath);
|
||||
|
||||
frmMain.Status = "Load All Formats";
|
||||
//LoadAllFormats();
|
||||
//Format.UpdateFormats(_FmtAllPath, _GenmacAllPath);
|
||||
|
||||
Format.UpdateFormats(frmMain.MySettings.FormatFolder, frmMain.MySettings.GenMacFolder);
|
||||
|
||||
//Format baseFormat = Format.Get(1);
|
||||
//sysFolder = Folder.MakeFolder(null, dbConn, "VEPROMS", "VEPROMS", "VEPROMS", baseFormat, d.InnerXml, DateTime.Now, "Migration");
|
||||
using (Format baseFormat = Format.Get(1))
|
||||
{
|
||||
sysFolder = Folder.MakeFolder(null, dbConn, "VEPROMS", "VEPROMS", "VEPROMS", baseFormat, d.InnerXml, DateTime.Now, "Migration");
|
||||
}
|
||||
|
||||
// This is to test the vln Libraries
|
||||
List<Folder> lfldr = vlnDataPathFolders();
|
||||
|
||||
List<vlnObject> dp2 = new List<vlnObject>();
|
||||
if (frmMain.createEmptyPROMS) return true;
|
||||
foreach (Folder fldr in lfldr)
|
||||
{
|
||||
TreeNode tn = frmMain.TV.Nodes.Add(fldr.Name);
|
||||
tn.Tag = fldr;
|
||||
vlnObject vb = new vlnObject(null, "datapath", fldr.Name, fldr.Title);
|
||||
dp2.Add(vb);
|
||||
vlnServer vs = new vlnServer();
|
||||
frmMain.Status = "Loading " + fldr.Name;
|
||||
MigrateChildren(vb, vs, dbConn, fldr, tn);
|
||||
if (frmMain.ProcessFailed)
|
||||
return false;
|
||||
tn.Expand();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("Error in LoadFolders", ex);
|
||||
// log.ErrorFormat("Could not load data, error = {0}", ex.Message);
|
||||
//return false;
|
||||
throw new Exception("Error in LoadFolders", ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool LoadFoldersIntoExisting(string s)
|
||||
{
|
||||
try
|
||||
{
|
||||
frmMain.Status = "Getting Connection";
|
||||
// get the connection and annotations from the existing database.
|
||||
dbConn = Connection.GetByName("Default");
|
||||
//dbConn = Connection.MakeConnection("Default", "Default", frmMain.MySettings.ConnectionString.Replace("{DBName}",frmMain.MySettings.DBName), 1, null, DateTime.Now, "Migration");
|
||||
|
||||
frmMain.Status = "Getting AnnotationTypes";
|
||||
CommentType = AnnotationType.GetByName("Comment"); // .MakeAnnotationType("Comment", null);
|
||||
MigrationErrorType = AnnotationType.GetByName("Migration Error");
|
||||
if(MigrationErrorType == null)
|
||||
MigrationErrorType = AnnotationType.MakeAnnotationType("Migration Error", null);
|
||||
VerificationRequiredType = AnnotationType.GetByName("Verification Required");
|
||||
|
||||
List<Folder> lfldr = vlnDataPathFolders(); // get plant level list.
|
||||
|
||||
List<vlnObject> dp2 = new List<vlnObject>();
|
||||
foreach (Folder fldr in lfldr)
|
||||
{
|
||||
TreeNode tn = frmMain.TV.Nodes.Add(fldr.Name);
|
||||
tn.Tag = fldr;
|
||||
vlnObject vb = new vlnObject(null, "datapath", fldr.Name, fldr.Title);
|
||||
dp2.Add(vb);
|
||||
vlnServer vs = new vlnServer();
|
||||
frmMain.Status = "Loading " + fldr.Name;
|
||||
MigrateChildren(vb, vs, dbConn, fldr, tn);
|
||||
if (frmMain.ProcessFailed)
|
||||
return false;
|
||||
tn.Expand();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Could not load data, error = {0}", ex.Message);
|
||||
//return false;
|
||||
throw new Exception("Error in LoadFolders", ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void ClearData()
|
||||
{
|
||||
int ra = PurgeDataCommand.Execute();
|
||||
//Database.PurgeData();
|
||||
}
|
||||
public static string MakeDate(string src)
|
||||
{
|
||||
if (src.Trim() == "") return null;
|
||||
int[] DateOffset ={ 4, 5, 47, 6, 7, 47, 0, 1, 2, 3 }; // 47 = '/'
|
||||
StringBuilder datebuff = new StringBuilder(10);
|
||||
for (int i = 0; i < DateOffset.Length; i++)
|
||||
{
|
||||
if (DateOffset[i] < 9)
|
||||
datebuff.Append(src[DateOffset[i]]);
|
||||
else
|
||||
datebuff.Append(System.Convert.ToChar(DateOffset[i]));
|
||||
}
|
||||
return datebuff.ToString();
|
||||
}
|
||||
public DateTime GetDTS(string date, string time)
|
||||
{
|
||||
// Set the date/time stamp. If there is no 'date', set the date
|
||||
// to 1/1/2000 (this can be changed!). If there is not 'time',
|
||||
// set the time to 0:0:0 (midnight).
|
||||
|
||||
DateTime dts = DateTime.Now;
|
||||
string month = "01";
|
||||
string day = "01";
|
||||
string year = "2000";
|
||||
string hour = "";
|
||||
string minute = "";
|
||||
try
|
||||
{
|
||||
if (date != null && date != "")
|
||||
{
|
||||
int indx1 = date.IndexOf("/");
|
||||
month = date.Substring(0, indx1);
|
||||
int indx2 = date.IndexOf("/", indx1 + 1);
|
||||
day = date.Substring(indx1 + 1, indx2 - indx1 - 1);
|
||||
year = date.Substring(indx2 + 1, 4);
|
||||
}
|
||||
if (time == null || time == "")
|
||||
{
|
||||
hour = "0";
|
||||
minute = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
hour = time.Substring(0, 2);
|
||||
int indxc = time.IndexOfAny(":A-".ToCharArray());
|
||||
if (indxc == time.Length - 1)
|
||||
minute = time.Substring(2, 2);
|
||||
else
|
||||
minute = time.Substring(indxc + 1, time.Length - indxc - 1);
|
||||
}
|
||||
dts = new DateTime(System.Convert.ToInt32(year), System.Convert.ToInt32(month), System.Convert.ToInt32(day),
|
||||
System.Convert.ToInt32(hour), System.Convert.ToInt32(minute), 0);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Bad Date/Time {0} {1}. Set to NOW.", date, time);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
frmMain.AddError(ex, "Bad Date/Time {0} {1}", date, time);
|
||||
//log.ErrorFormat(ex.StackTrace);
|
||||
return dts;
|
||||
}
|
||||
return dts;
|
||||
}
|
||||
|
||||
public bool LoadSecurity(string VeSamPath, string VePromsPath)
|
||||
{
|
||||
Security sec = new Security(VeSamPath, VePromsPath);
|
||||
return sec.Migrate();
|
||||
}
|
||||
private static void WaitMS(int n)
|
||||
{
|
||||
DateTime dtw = DateTime.Now.AddMilliseconds(n);
|
||||
while (DateTime.Now < dtw)
|
||||
{
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
private static void Wait(int n)
|
||||
{
|
||||
DateTime dtw = DateTime.Now.AddSeconds(n);
|
||||
while (DateTime.Now < dtw)
|
||||
{
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10400
PROMS/DataLoader/PROMSFixes.Sql.bak
Normal file
10400
PROMS/DataLoader/PROMSFixes.Sql.bak
Normal file
File diff suppressed because it is too large
Load Diff
284
PROMS/DataLoader/PrivateProfile.cs.bak
Normal file
284
PROMS/DataLoader/PrivateProfile.cs.bak
Normal file
@@ -0,0 +1,284 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
/// <summary>
|
||||
/// PrivateProfile opens a private profile string and stores it's contents in an xml document.
|
||||
/// </summary>
|
||||
public class PrivateProfile
|
||||
{
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
|
||||
private string ppName;
|
||||
private XmlDocument ppXml;
|
||||
private List<string> attr;
|
||||
private List<string> ele;
|
||||
|
||||
private XmlNode AddNode(XmlNode xParent, string sName, string sValue )
|
||||
{
|
||||
XmlNode nd=AddNode(xParent,sName);
|
||||
nd.Value=sValue;
|
||||
return nd;
|
||||
}
|
||||
private XmlNode AddNode(XmlNode xParent, string sName)
|
||||
{
|
||||
XmlNode nd;
|
||||
// Add a node
|
||||
string tsName = sName.Replace(' ', '_').Replace("applicability", "Applicability").Replace("unit", "Unit");
|
||||
nd=xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Element,tsName,"");
|
||||
xParent.AppendChild(nd);
|
||||
return nd;
|
||||
}
|
||||
private void AddAttribute(XmlNode xParent, string sName, string sValue)
|
||||
{
|
||||
XmlNode xa = xParent.Attributes.GetNamedItem(sName);
|
||||
// bug fix. 09/15/03
|
||||
// If there was a space after an equal sign, that space character
|
||||
// was becomming part of the value string (reading the user.CFG file).
|
||||
// This was giving us a "Must have semi-colon" error message.
|
||||
// We now strip spaces before and after any Attribute that is written.
|
||||
sValue = sValue.Trim(' ');
|
||||
sName = sName.Replace(' ', '_');
|
||||
sName = sName.Replace("\\", "_slash_");
|
||||
sName = sName.Replace("/", "_fslash_");
|
||||
if (xParent.Name == "color")
|
||||
{
|
||||
string[] parts = sValue.Split(",".ToCharArray());
|
||||
sValue = ColorConfig.FindKnownColor(int.Parse(parts[0]), int.Parse(parts[1]), int.Parse(parts[2])).ToString();
|
||||
}
|
||||
// Add an attribute
|
||||
if (sValue == "")
|
||||
{
|
||||
if (xa != null)
|
||||
{
|
||||
xParent.Attributes.RemoveNamedItem(sName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (xa == null)
|
||||
{
|
||||
xa = xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Attribute, sName, "");
|
||||
xParent.Attributes.SetNamedItem(xa);
|
||||
}
|
||||
xa.Value = sValue;
|
||||
}
|
||||
|
||||
}
|
||||
private XmlNode AddSection(XmlNode xParent, string sSection)
|
||||
{
|
||||
// get the name. If it's not in the 'migrated elements' list, then
|
||||
// preface the name with a 'z'.
|
||||
string elename = sSection.Substring(1, sSection.IndexOf("]") - 1);
|
||||
while(elename.IndexOf(' ')>-1) elename = elename.Remove(elename.IndexOf(' '),1);
|
||||
if (!ele.Contains(elename.ToLower())) elename = 'z' + elename;
|
||||
elename = elename.Replace("\\", "_slash_");
|
||||
// Add a section [name]
|
||||
XmlNode nd = AddNode(xParent, elename);
|
||||
//AddAttribute(nd,"name",sSection.Substring(1,sSection.IndexOf("]")-1));
|
||||
return nd;
|
||||
}
|
||||
private XmlNode AddSection_UC(XmlNode xParent, string sSection )
|
||||
{
|
||||
// Add a section [name]
|
||||
string name_uc = sSection.Substring(1,sSection.IndexOf("]")-1).ToUpper() + "__UC";
|
||||
XmlNode nd =AddNode(xParent,name_uc);
|
||||
// AddAttribute(nd,"name",name_uc);
|
||||
return nd;
|
||||
}
|
||||
private void AddComment(XmlNode xParent, string sComment)
|
||||
{
|
||||
|
||||
if(xParent.ChildNodes.Count > 0)
|
||||
{
|
||||
XmlNode ndlast=xParent.ChildNodes.Item(xParent.ChildNodes.Count-1);
|
||||
if(ndlast.Name=="comment")
|
||||
{
|
||||
XmlNode xa = ndlast.Attributes.GetNamedItem("text");
|
||||
xa.Value=xa.Value + "\r\n" + sComment;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Add a comment text
|
||||
XmlNode nd =AddNode(xParent,"comment");
|
||||
AddAttribute(nd,"text",sComment);
|
||||
}
|
||||
private void AddLine(XmlNode xParent, string sLine)
|
||||
{
|
||||
// Add a comment text
|
||||
XmlNode nd =AddNode(xParent,"line");
|
||||
AddAttribute(nd,"text",sLine);
|
||||
}
|
||||
private void AddParam(XmlNode xParent, string sParam)
|
||||
{
|
||||
int i = sParam.IndexOf("=");
|
||||
// get the name. If it's not in the 'migrated attribute' list, then
|
||||
// preface the name with a 'z'.
|
||||
string attrname = sParam.Substring(0, i);
|
||||
while (attrname.IndexOf(' ') > -1) attrname = attrname.Remove(attrname.IndexOf(' '), 1);
|
||||
if (!attr.Contains(attrname.ToLower())) attrname = 'z' + attrname;
|
||||
string sValue=sParam.Substring(i+1);
|
||||
string sName = attrname.Trim(' ');
|
||||
sName = sName.Replace("id", "ID").Replace("name", "Name").Replace("number", "Number").Replace("text", "Text").Replace("other", "Other").Replace("masterdir","MasterDir");
|
||||
AddAttribute(xParent, sName, sValue);
|
||||
}
|
||||
private void AddParam_UC(XmlNode xParent, string sParam)
|
||||
{
|
||||
int i = sParam.IndexOf("=");
|
||||
// add a param name=value
|
||||
string sName=sParam.Substring(0,i);
|
||||
string sValue=sParam.Substring(i+1);
|
||||
//XmlNode nd =AddNode(xParent,"paramUC");
|
||||
sName = sName.Trim(' ');
|
||||
AddAttribute(xParent, sName, sValue);
|
||||
//AddAttribute(nd,"name",sName.ToUpper()+"__UC");
|
||||
//AddAttribute(nd,"value",sValue);
|
||||
}
|
||||
private void LoadXML()
|
||||
{
|
||||
string sLine;
|
||||
ppXml.LoadXml("<Config/>");// initialize ppXml
|
||||
XmlNode xmlTop=ppXml.DocumentElement;
|
||||
XmlNode xmlNd=ppXml.DocumentElement;
|
||||
//XmlNode xmlNd_UC=ppXml.DocumentElement;
|
||||
StreamReader myReader = new StreamReader(ppName);// Open file
|
||||
while( (sLine = myReader.ReadLine())!= null)// read line-by-line
|
||||
{
|
||||
// add structure
|
||||
try
|
||||
{
|
||||
if (sLine.Length > 0)
|
||||
{
|
||||
switch (sLine.Substring(0, 1))
|
||||
{
|
||||
case "[":
|
||||
xmlNd = AddSection(xmlTop, sLine);
|
||||
//xmlNd_UC=AddSection_UC(xmlTop, sLine);
|
||||
break;
|
||||
case ";":
|
||||
//AddComment(xmlNd, sLine);
|
||||
break;
|
||||
default:
|
||||
if (sLine.IndexOf("=") >= 0)
|
||||
{
|
||||
AddParam(xmlNd, sLine);
|
||||
//AddParam_UC(xmlNd_UC, sLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
//AddLine(xmlNd, sLine);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("error parsing .INI file:", ex);
|
||||
}
|
||||
}
|
||||
myReader.Close();
|
||||
}
|
||||
public PrivateProfile(string sFileName, List<string> listIni_EleName, List<string> listIni_AttrName)
|
||||
{
|
||||
ppName=sFileName;
|
||||
ppXml= new XmlDocument();
|
||||
attr = listIni_AttrName;
|
||||
ele = listIni_EleName;
|
||||
LoadXML();
|
||||
}
|
||||
~PrivateProfile()
|
||||
{
|
||||
// Clean-up
|
||||
//
|
||||
}
|
||||
public string PrettyNode(XmlNode nd,int level)
|
||||
{
|
||||
string retval="";
|
||||
string prefix=new string(' ',level*2);
|
||||
if(nd.ChildNodes.Count > 0)
|
||||
{
|
||||
retval = prefix + "<" + nd.Name;
|
||||
for(int i=0;i<nd.Attributes.Count;i++)
|
||||
{
|
||||
retval=retval + " " + nd.Attributes.Item(i).Name + "='" + nd.Attributes.Item(i).Value + "'";
|
||||
}
|
||||
retval=retval+">";
|
||||
for(int i=0;i<nd.ChildNodes.Count;i++)
|
||||
{
|
||||
retval=retval+"\r\n"+PrettyNode(nd.ChildNodes.Item(i),level+1);
|
||||
}
|
||||
retval=retval+"\r\n" + prefix + "</" + nd.Name + ">";
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = prefix + "<" + nd.Name;
|
||||
for(int i=0;i<nd.Attributes.Count;i++)
|
||||
{
|
||||
retval=retval + " " + nd.Attributes.Item(i).Name + "='" + nd.Attributes.Item(i).Value + "'";
|
||||
}
|
||||
retval=retval+"/>";
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
public string PrettyXML()
|
||||
{
|
||||
return PrettyNode(ppXml.DocumentElement,0);
|
||||
}
|
||||
public XmlDocument XML()
|
||||
{
|
||||
// return XML Document
|
||||
return ppXml;
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
// return string
|
||||
return "";
|
||||
}
|
||||
public void Save()
|
||||
{
|
||||
SaveAs(ppName);
|
||||
}
|
||||
public void SaveAs(string sName)
|
||||
{
|
||||
}
|
||||
public string Attr(string sPath)
|
||||
{
|
||||
string retval="";
|
||||
XmlNode xn = ppXml.SelectSingleNode(sPath);
|
||||
if(xn != null)
|
||||
{
|
||||
string quots = xn.Value;
|
||||
if (quots.Substring(0,1)=="\"" && quots.Substring(quots.Length-1,1)=="\"")
|
||||
retval = quots.Substring(1,quots.Length-2);
|
||||
else
|
||||
retval=xn.Value;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
public string Attr(string sSection, string sParameter)
|
||||
{
|
||||
string findstr = "/ini/sectionUC[@name='" + sSection.ToUpper() + "__UC']/paramUC[@name='" + sParameter.ToUpper() + "__UC']/@value";
|
||||
return Attr(findstr);
|
||||
}
|
||||
}
|
||||
}
|
294
PROMS/DataLoader/Procedures.cs.bak
Normal file
294
PROMS/DataLoader/Procedures.cs.bak
Normal file
@@ -0,0 +1,294 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
#region Log4Net
|
||||
public static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
//public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
private Item MigrateProcedure(OleDbConnection cn, DataRow dr, Item FromItem, string pth, DocVersion docver, bool convertProcedures)
|
||||
{
|
||||
dicOldStepSequence = new Dictionary<object, string>();
|
||||
Stack<int> SubSectLevels = new Stack<int>(); // levels of subsections
|
||||
ProcFileName = dr["Entry"].ToString();
|
||||
ProcNumber = dr["Number"].ToString();
|
||||
DateTime dts = GetDTS(dr["Date"].ToString(), dr["Time"].ToString());
|
||||
string userid = dr["initials"].ToString().Trim();
|
||||
if (userid == null || userid == "") userid = "Migration";
|
||||
|
||||
ConfigInfo ci = null;
|
||||
string tstr = dr["Proccode"].ToString();
|
||||
if (tstr != null && tstr != "")
|
||||
{
|
||||
ci = new ConfigInfo(null);
|
||||
ci.AddItem("Procedure", "ProcCode", tstr);
|
||||
}
|
||||
|
||||
// check that there is a "Series" column, i.e. the 10th column, some datasets
|
||||
// may not have it, for example vetuec\master.sl1
|
||||
if (dr.ItemArray.Length > 10)
|
||||
{
|
||||
tstr = dr["Series"].ToString();
|
||||
if (tstr != null && tstr != "")
|
||||
{
|
||||
if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Procedure", "Series", tstr);
|
||||
}
|
||||
}
|
||||
|
||||
DataSet ds = new DataSet();
|
||||
DataTable dt = null;
|
||||
|
||||
// check that file exists, i.e. if proc file doesn't exist but has entry in set
|
||||
// file, flag error, but continue.
|
||||
//string fname = frmMain.tbSourceText +"\\"+ dr["entry"] + ".dbf";
|
||||
string fname = pth + "\\" + dr["entry"] + ".dbf";
|
||||
if (File.Exists(fname))
|
||||
{
|
||||
// if the dbt is bad, fix it.
|
||||
DbtOk(dr["entry"].ToString(),pth);
|
||||
// See if there is PSI and if so, add it to the xml.
|
||||
OleDbDataAdapter dapsi = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where [STEP] is null", cn);
|
||||
try
|
||||
{
|
||||
dapsi.Fill(ds);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Application.Exit();
|
||||
}
|
||||
dt = ds.Tables[0];
|
||||
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
DataRow drpsi = dt.Rows[0];
|
||||
string psistr = drpsi["TEXTM"].ToString();
|
||||
if (psistr != null && psistr != "")
|
||||
{
|
||||
StringReader strrd = new StringReader(psistr);
|
||||
|
||||
string sLine;
|
||||
if (ci == null) ci = new ConfigInfo(null);
|
||||
while ((sLine = strrd.ReadLine()) != null)
|
||||
{
|
||||
int indx = sLine.IndexOf(' ');
|
||||
string nm = null;
|
||||
string vl = null;
|
||||
if (indx < 0)
|
||||
nm = sLine;
|
||||
else
|
||||
{
|
||||
nm = sLine.Substring(0, indx);
|
||||
vl = sLine.Substring(indx + 1, sLine.Length - indx - 1);
|
||||
}
|
||||
ci.AddItem("PSI", nm, vl == null ? null : vl);
|
||||
}
|
||||
}
|
||||
}
|
||||
dapsi.Dispose();
|
||||
}
|
||||
else // log an error
|
||||
{
|
||||
log.ErrorFormat("Missing DBF: {0}", fname);
|
||||
}
|
||||
|
||||
// Note, for now the data from the format field will be saved. Later, xpath, ??
|
||||
EditSectId = 0;
|
||||
|
||||
// See if no caret convert...
|
||||
FormatInfo docverFormat = docver.MyDocVersionInfo.ActiveFormat;
|
||||
bool do_cvt = docverFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
|
||||
// pass in a 0 on MakeContent for type of procedure, i.e. procedure = 0 (on type field)
|
||||
|
||||
// can we save itm.ItemID in a dictionary of outside trans? ex: otrans("vehlp\procs\0POP05-EO00",itm.ItemID)?
|
||||
Content cont = null;
|
||||
Item itm =null;
|
||||
string number = TextConvert.ConvertText(dr["Number"].ToString());
|
||||
frmMain.UpdateLabels(1, 0, 0);
|
||||
if (!convertProcedures || docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft)
|
||||
{
|
||||
cont = Content.New(number, TextConvert.ConvertText(dr["Title"].ToString(),do_cvt), 0, null, ci == null ? null : ci.ToString(), dts, userid);
|
||||
itm = Item.MakeItem(FromItem, cont, dts, userid);
|
||||
}
|
||||
else
|
||||
{
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(docver.VersionID);
|
||||
foreach(ItemInfo ii in dvi.Procedures){
|
||||
if (ii.MyContent.Number == number)
|
||||
{
|
||||
Console.WriteLine(number);
|
||||
itm = ii.Get();
|
||||
cont = ii.MyContent.Get();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (convertProcedures /*&& number == "0POP05\\u8209?EO\\u8209?ES32"*/) //0POP05\u8209?EO\u8209?ES32
|
||||
{
|
||||
OleDbDataAdapter da = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where sequence like ' %'", cn);
|
||||
try
|
||||
{
|
||||
LoadSection(ds, da, dr["entry"].ToString());
|
||||
da.SelectCommand.CommandText = "select * from [" + dr["entry"] + "] where step not like ' ' and step not like '%~'";
|
||||
da.Fill(ds, "Steps");
|
||||
dt = ds.Tables["Steps"];
|
||||
dt.CaseSensitive = true;
|
||||
ds.Tables["Steps"].CaseSensitive = true;
|
||||
dt.Columns.Add("CStep", System.Type.GetType("System.String"));
|
||||
dt.Columns.Add("CSequence", System.Type.GetType("System.String"));
|
||||
// set the cstep & csequence - couldn't do it in the add because it needed a sql function
|
||||
foreach (DataRow drw in ds.Tables["Steps"].Rows)
|
||||
{
|
||||
drw["CStep"] = TextConvert.ConvertSeq(drw["Step"].ToString());
|
||||
drw["CSequence"] = TextConvert.ConvertSeq(drw["Sequence"].ToString());
|
||||
}
|
||||
dt.Columns.Add("StepNo", System.Type.GetType("System.Int32"), "Convert(Convert(Substring(CStep,2,1),'System.Char'),'System.Int32')-48");
|
||||
dt.Columns.Add("Level", System.Type.GetType("System.Int32"), "Len(CSequence)");
|
||||
dt.Columns.Add("SubStepNo", System.Type.GetType("System.Int32"), "Convert(Convert(Substring(CSequence,Len(CSequence),1),'System.Char'),'System.Int32')-48");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.Error(ex.StackTrace);
|
||||
}
|
||||
da.Dispose();
|
||||
|
||||
// dicSecCount is dictionary to track number of subsections for the parent at a level
|
||||
// dicSecID is the parent at that level
|
||||
Dictionary<int, int> dicSecCount = new Dictionary<int, int>();
|
||||
Dictionary<int, Item> dicSecParentItem = new Dictionary<int, Item>();
|
||||
frmMain.pbSectMaximum = ds.Tables["Sections"].Rows.Count;
|
||||
frmMain.pbSectValue = 0;
|
||||
|
||||
DataTable dtsect = ds.Tables["Sections"];
|
||||
dtsect.CaseSensitive = true;
|
||||
DataView dv = new DataView(dtsect, "", "locb", DataViewRowState.CurrentRows);
|
||||
Item SectItm = null;
|
||||
int level = 0;
|
||||
bool addpart = true;
|
||||
Item parentitem = itm;
|
||||
foreach (DataRowView drw in dv)
|
||||
{
|
||||
SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver);
|
||||
// if no children, add first child (cont)
|
||||
if (addpart)
|
||||
{
|
||||
// ContentsParts.Add can use 'fromtype', item - fromtype here = 2, section
|
||||
cont.ContentParts.Add(2, SectItm);
|
||||
if (cont.MyZContent.OldStepSequence == null || cont.MyZContent.OldStepSequence == "") cont.MyZContent.OldStepSequence = ProcNumber;
|
||||
if (!cont.IsSavable) ErrorRpt.ErrorReport(cont);
|
||||
cont.Save();
|
||||
addpart = false;
|
||||
}
|
||||
//FrType = 0;
|
||||
dicSecParentItem[level] = SectItm;
|
||||
if (level > 0)
|
||||
{
|
||||
if ((dicSecCount[level]) == 1)
|
||||
// shift up a level, i.e. give me the parent for the previous level
|
||||
SectItm = dicSecParentItem[--level];
|
||||
else
|
||||
dicSecCount[level]--; // decrements number of sections to process
|
||||
}
|
||||
// get number of subsections for this section
|
||||
int subSecs = drw["Sequence"].ToString().PadRight(12, ' ')[5] - 48;
|
||||
if (subSecs > 0)
|
||||
{
|
||||
dicSecCount[++level] = subSecs;
|
||||
cont = SectItm.MyContent;
|
||||
parentitem = SectItm;
|
||||
addpart = true;
|
||||
SectItm = null; // no previous sibling for the first child node.
|
||||
}
|
||||
}
|
||||
// need section start
|
||||
if (EditSectId != 0)
|
||||
{
|
||||
if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Procedure", "SectionStart", string.Format("{0}", EditSectId));
|
||||
itm.MyContent.Config = (ci == null) ? null : ci.ToString();
|
||||
if (!itm.IsSavable) ErrorRpt.ErrorReport(itm);
|
||||
itm.Save();
|
||||
}
|
||||
}
|
||||
ds.Dispose();
|
||||
return itm;
|
||||
}
|
||||
private Item MigrateProcedures(OleDbConnection cn, string pth, DocVersion docver, bool convertProcedures)
|
||||
{
|
||||
Item FirstItm = null;
|
||||
// Loop through Set File for each Procedure
|
||||
int whereami = 0;
|
||||
try
|
||||
{
|
||||
OleDbDataAdapter da = new OleDbDataAdapter("Select * from [set] where entry is not null", cn);
|
||||
DataSet ds = new DataSet();
|
||||
da.Fill(ds);
|
||||
Item FrItm = null;
|
||||
frmMain.pbProcMaximum = ds.Tables[0].Rows.Count;
|
||||
frmMain.UpdateLabels(0, 0, 0);
|
||||
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
{
|
||||
FrItm = MigrateProcedure(cn, dr, FrItm, pth, docver, convertProcedures);
|
||||
if (FirstItm == null) FirstItm = FrItm;
|
||||
}
|
||||
da.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("End of MigrateProcedures - ex = {0}", ex.Message);
|
||||
_MyLog.ErrorFormat("MigrateProcedures - {0} - {1}\r\n\r\n{2}", pth,ex.Message, ex.InnerException);
|
||||
}
|
||||
return FirstItm;
|
||||
}
|
||||
private void DbtOk(string fname, string pth)
|
||||
{
|
||||
//string dbtname = frmMain.tbSourceText + "\\" + fname + ".dbt";
|
||||
string dbtname = pth + "\\" + fname + ".dbt";
|
||||
if (File.Exists(dbtname))
|
||||
{
|
||||
// check if dbt is at least 512, if not append 508 bytes. This is to fix
|
||||
// a problem where dbts were created with only 4 bytes in the 16-bit code.
|
||||
// if only 4 bytes, ado.net gives an "External table not in expected format"
|
||||
// error
|
||||
FileInfo fi = new FileInfo(dbtname);
|
||||
if (fi.Length < 512)
|
||||
{
|
||||
FileStream fs = new FileStream(dbtname, FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
|
||||
BinaryWriter bw = new BinaryWriter(fs);
|
||||
bw.Seek(0, SeekOrigin.End);
|
||||
byte[] wrBytes = new byte[512 - fi.Length];
|
||||
for (int i = 0; i < 512 - fi.Length; i++) wrBytes[i] = 0;
|
||||
wrBytes[4] = 0x02;
|
||||
bw.Write(wrBytes);
|
||||
bw.Close();
|
||||
}
|
||||
fi = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
314
PROMS/DataLoader/Properties/Settings.Designer.cs.org
Normal file
314
PROMS/DataLoader/Properties/Settings.Designer.cs.org
Normal file
@@ -0,0 +1,314 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4216
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DataLoader.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string VeSamFilename {
|
||||
get {
|
||||
return ((string)(this["VeSamFilename"]));
|
||||
}
|
||||
set {
|
||||
this["VeSamFilename"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DbfPathname {
|
||||
get {
|
||||
return ((string)(this["DbfPathname"]));
|
||||
}
|
||||
set {
|
||||
this["DbfPathname"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
|
||||
public global::System.Windows.Forms.CheckState LoadWordDoc {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["LoadWordDoc"]));
|
||||
}
|
||||
set {
|
||||
this["LoadWordDoc"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Unchecked")]
|
||||
public global::System.Windows.Forms.CheckState LoadRTFDoc {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["LoadRTFDoc"]));
|
||||
}
|
||||
set {
|
||||
this["LoadRTFDoc"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
|
||||
public global::System.Windows.Forms.CheckState PurgeData {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["PurgeData"]));
|
||||
}
|
||||
set {
|
||||
this["PurgeData"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string VePromsFilename {
|
||||
get {
|
||||
return ((string)(this["VePromsFilename"]));
|
||||
}
|
||||
set {
|
||||
this["VePromsFilename"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string LogFileLoc {
|
||||
get {
|
||||
return ((string)(this["LogFileLoc"]));
|
||||
}
|
||||
set {
|
||||
this["LogFileLoc"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string BackupFileName {
|
||||
get {
|
||||
return ((string)(this["BackupFileName"]));
|
||||
}
|
||||
set {
|
||||
this["BackupFileName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string BackupFolder {
|
||||
get {
|
||||
return ((string)(this["BackupFolder"]));
|
||||
}
|
||||
set {
|
||||
this["BackupFolder"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.\\SQLEXPRESS;Initial Catalog={DBName};Integrated Security=True")]
|
||||
public string ConnectionString {
|
||||
get {
|
||||
return ((string)(this["ConnectionString"]));
|
||||
}
|
||||
set {
|
||||
this["ConnectionString"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("VEPROMS")]
|
||||
public string DBName {
|
||||
get {
|
||||
return ((string)(this["DBName"]));
|
||||
}
|
||||
set {
|
||||
this["DBName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DBPath {
|
||||
get {
|
||||
return ((string)(this["DBPath"]));
|
||||
}
|
||||
set {
|
||||
this["DBPath"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string PDFFolder {
|
||||
get {
|
||||
return ((string)(this["PDFFolder"]));
|
||||
}
|
||||
set {
|
||||
this["PDFFolder"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Unchecked")]
|
||||
public global::System.Windows.Forms.CheckState CheckRTF {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["CheckRTF"]));
|
||||
}
|
||||
set {
|
||||
this["CheckRTF"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int Skip {
|
||||
get {
|
||||
return ((int)(this["Skip"]));
|
||||
}
|
||||
set {
|
||||
this["Skip"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public int ConvertTo {
|
||||
get {
|
||||
return ((int)(this["ConvertTo"]));
|
||||
}
|
||||
set {
|
||||
this["ConvertTo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
|
||||
public global::System.Windows.Forms.CheckState RedPDFs {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["RedPDFs"]));
|
||||
}
|
||||
set {
|
||||
this["RedPDFs"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
|
||||
public global::System.Windows.Forms.CheckState OnlyThisSet {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.CheckState)(this["OnlyThisSet"]));
|
||||
}
|
||||
set {
|
||||
this["OnlyThisSet"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int ExecutionMode {
|
||||
get {
|
||||
return ((int)(this["ExecutionMode"]));
|
||||
}
|
||||
set {
|
||||
this["ExecutionMode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Phase1")]
|
||||
public string Phase1 {
|
||||
get {
|
||||
return ((string)(this["Phase1"]));
|
||||
}
|
||||
set {
|
||||
this["Phase1"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Phase2")]
|
||||
public string Phase2 {
|
||||
get {
|
||||
return ((string)(this["Phase2"]));
|
||||
}
|
||||
set {
|
||||
this["Phase2"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Phase3")]
|
||||
public string Phase3 {
|
||||
get {
|
||||
return ((string)(this["Phase3"]));
|
||||
}
|
||||
set {
|
||||
this["Phase3"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("c:\\development\\fmtall")]
|
||||
public string FormatFolder {
|
||||
get {
|
||||
return ((string)(this["FormatFolder"]));
|
||||
}
|
||||
set {
|
||||
this["FormatFolder"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("c:\\development\\genmacall")]
|
||||
public string GenMacFolder {
|
||||
get {
|
||||
return ((string)(this["GenMacFolder"]));
|
||||
}
|
||||
set {
|
||||
this["GenMacFolder"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
PROMS/DataLoader/Properties/licenses.licx
Normal file
1
PROMS/DataLoader/Properties/licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.6.20101.528, Culture=neutral, PublicKeyToken=79882d576c6336da
|
290
PROMS/DataLoader/ROFixer.cs.bak
Normal file
290
PROMS/DataLoader/ROFixer.cs.bak
Normal file
@@ -0,0 +1,290 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public delegate void ROFixerEvent(object sender, ROFixerEventArgs args);
|
||||
public class ROFixerEventArgs
|
||||
{
|
||||
private string _MyStatus;
|
||||
|
||||
public string MyStatus
|
||||
{
|
||||
get { return _MyStatus; }
|
||||
set { _MyStatus = value; }
|
||||
}
|
||||
public ROFixerEventArgs(string myStatus)
|
||||
{
|
||||
_MyStatus = myStatus;
|
||||
}
|
||||
}
|
||||
class ROFixer
|
||||
{
|
||||
public static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public event ROFixerEvent StatusChanged;
|
||||
private void OnStatusChanged(object sender, ROFixerEventArgs args)
|
||||
{
|
||||
if (StatusChanged != null)
|
||||
StatusChanged(sender, args);
|
||||
}
|
||||
private string _Status;
|
||||
|
||||
public string Status
|
||||
{
|
||||
get { return _Status; }
|
||||
set
|
||||
{
|
||||
_Status = value;
|
||||
OnStatusChanged(this, new ROFixerEventArgs(_Status));
|
||||
}
|
||||
}
|
||||
private int _ErrorCount = 0;
|
||||
|
||||
public int ErrorCount
|
||||
{
|
||||
get { return _ErrorCount; }
|
||||
set { _ErrorCount = value; }
|
||||
}
|
||||
private string _LogPath;
|
||||
private frmLoader frmMain;
|
||||
public ROFixer(string logpath, frmLoader myfrmMain)
|
||||
{
|
||||
_LogPath = logpath;
|
||||
frmMain = myfrmMain;
|
||||
}
|
||||
public TimeSpan Process()
|
||||
{
|
||||
DateTime tstart = DateTime.Now;
|
||||
ProcessROs();
|
||||
return DateTime.Now - tstart;
|
||||
}
|
||||
public TimeSpan Process(DocVersionInfo dvi)
|
||||
{
|
||||
DateTime tstart = DateTime.Now;
|
||||
ProcessROs(dvi);
|
||||
return DateTime.Now - tstart;
|
||||
}
|
||||
public TimeSpan Process(ProcedureInfo pi)
|
||||
{
|
||||
DateTime tstart = DateTime.Now;
|
||||
ProcessROs(pi);
|
||||
return DateTime.Now - tstart;
|
||||
}
|
||||
private void ProcessROs()
|
||||
{
|
||||
Status = "Getting List...";
|
||||
RoUsageInfoList myRoUsages = RoUsageInfoList.Get();
|
||||
DoProcessROs(myRoUsages);
|
||||
}
|
||||
//private void ProcessROs(FolderInfo fi)
|
||||
//{
|
||||
// Status = "Getting List...";
|
||||
// RoUsageInfoList myRoUsages = RoUsageInfoList.GetByFolder(fi);
|
||||
// DoProcessROs(myRoUsages);
|
||||
//}
|
||||
private void ProcessROs(DocVersionInfo dvi)
|
||||
{
|
||||
Status = "Getting List...";
|
||||
RoUsageInfoList myRoUsages = RoUsageInfoList.GetByDocVersion(dvi);
|
||||
DoProcessROs(myRoUsages);
|
||||
}
|
||||
private void ProcessROs(ProcedureInfo pi)
|
||||
{
|
||||
Status = "Getting List...";
|
||||
RoUsageInfoList myRoUsages = RoUsageInfoList.GetByProcedure(pi);
|
||||
DoProcessROs(myRoUsages);
|
||||
}
|
||||
private AnnotationType _VolianCommentType = null; // Using this to flag ro value issues with byron to braidwood
|
||||
public AnnotationType VolianCommentType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_VolianCommentType == null)
|
||||
_VolianCommentType = AnnotationType.GetByName("Volian Comment");
|
||||
if (_VolianCommentType == null)
|
||||
_VolianCommentType = AnnotationType.MakeAnnotationType("Volian Comment",null);
|
||||
return _VolianCommentType;
|
||||
}
|
||||
}
|
||||
private void DoProcessROs(RoUsageInfoList myRoUsages)
|
||||
{
|
||||
int changeCount = 0;
|
||||
// get list of content records
|
||||
List<int> myContentList = new List<int>();
|
||||
Dictionary<int, ROFSTLookup> roFstLookups = new Dictionary<int,ROFSTLookup>();
|
||||
Dictionary<int, ROFSTLookup> oldRoFstLookups = null;
|
||||
ROFstInfo oldRoFst = null;
|
||||
if (frmMain.MySettings.SelectedROFst > 0)
|
||||
{
|
||||
oldRoFst = ROFstInfo.Get(frmMain.MySettings.SelectedROFst);
|
||||
oldRoFstLookups = new Dictionary<int, ROFSTLookup>();
|
||||
}
|
||||
foreach (RoUsageInfo rou in myRoUsages)
|
||||
{
|
||||
if (!myContentList.Contains(rou.ContentID))
|
||||
{
|
||||
myContentList.Add(rou.ContentID);
|
||||
}
|
||||
}
|
||||
int i = 0;
|
||||
foreach (int cid in myContentList)
|
||||
{
|
||||
Status = string.Format("Processing {0} of {1} steps", ++i, myContentList.Count);
|
||||
ContentInfo myContentInfo = ContentInfo.Get(cid);
|
||||
DocVersionInfo dvi = myContentInfo.ContentItems[0].MyProcedure.MyDocVersion;
|
||||
int versionId = dvi.VersionID;
|
||||
ROFstInfo myRoFst = dvi.DocVersionAssociations[0].MyROFst;
|
||||
if (!roFstLookups.ContainsKey(versionId))
|
||||
{
|
||||
roFstLookups.Add(versionId, myRoFst.GetROFSTLookup(dvi));
|
||||
}
|
||||
ROFSTLookup myLookup = roFstLookups[versionId];
|
||||
if (oldRoFstLookups != null && !oldRoFstLookups.ContainsKey(versionId))
|
||||
{
|
||||
oldRoFstLookups.Add(versionId, oldRoFst.GetROFSTLookup(dvi));
|
||||
}
|
||||
ROFSTLookup oldLookup = null;
|
||||
if(oldRoFstLookups != null)
|
||||
oldLookup = oldRoFstLookups[versionId];
|
||||
using (Content ctmp = myContentInfo.Get())
|
||||
{
|
||||
ItemInfo ii = myContentInfo.ContentItems[0];
|
||||
foreach (RoUsageInfo ru in myContentInfo.ContentRoUsages)
|
||||
{
|
||||
string sameMsg = string.Empty;
|
||||
bool theSame = false;
|
||||
//if (oldLookup != null)
|
||||
// theSame = CheckIfTheSame(ii, ru.ROID, myLookup, oldLookup, dvi, ref sameMsg);
|
||||
ROFSTLookup.rochild rocc = myLookup.GetRoChild12(ru.ROID);
|
||||
if (rocc.value == null)
|
||||
rocc = myLookup.GetRoChild(ru.ROID);
|
||||
int myType = rocc.type;
|
||||
string myValue = myLookup.GetTranslatedRoValue(ru.ROID, ii.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
|
||||
myValue = myValue.Replace(@"\up2 \u8209?", @"\up2\u8209?");// Remove space between superscript command and non-breaking hyphen
|
||||
string fileNameOnly = null;
|
||||
if (myType == 8 && myValue.Contains("\n"))
|
||||
{
|
||||
fileNameOnly = myValue.Split("\n".ToCharArray())[0];
|
||||
myValue = myValue.Replace("\n", "");// Remove newlines in Figure data
|
||||
}
|
||||
string textB4 = ctmp.Text;
|
||||
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
|
||||
string oldval;
|
||||
switch (frmMain.MySettings.WhatROsToConvert)
|
||||
{
|
||||
case ROUpdateMode.None:
|
||||
oldval = ctmp.FixContentText(ru, myValue, myType, myRoFst, fileNameOnly);
|
||||
if(myValue == "?" && frmMain.MySettings.AnnotateWhenShowingMissingRO)
|
||||
Annotation.MakeAnnotation(ctmp.ContentItems[0].MyItem, VolianCommentType, "", string.Format("RO value ({0}) missing", ItemInfo.ConvertToDisplayText(oldval)), null);
|
||||
else if (ctmp.Text != textB4 && frmMain.MySettings.AnnotateWhenShowingDifferentRO)
|
||||
Annotation.MakeAnnotation(ctmp.ContentItems[0].MyItem, VolianCommentType, "", string.Format("Old RO value ({0}) different than new RO value({1})", ItemInfo.ConvertToDisplayText(oldval), ItemInfo.ConvertToDisplayText(myValue)), null);
|
||||
break;
|
||||
case ROUpdateMode.All:
|
||||
oldval = ctmp.ConvertROToText(ru, myValue, myType, myRoFst);
|
||||
if (frmMain.MySettings.AnnotateWhenConvertingToText)
|
||||
Annotation.MakeAnnotation(ctmp.ContentItems[0].MyItem, VolianCommentType, "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldval)), null);
|
||||
break;
|
||||
default:
|
||||
if (myValue == "?")
|
||||
{
|
||||
oldval = ctmp.ConvertROToText(ru, myValue, myType, myRoFst);
|
||||
if (frmMain.MySettings.AnnotateWhenConvertingToText)
|
||||
Annotation.MakeAnnotation(ctmp.ContentItems[0].MyItem, VolianCommentType, "", string.Format("RO value ({0}) converted to text" + sameMsg, ItemInfo.ConvertToDisplayText(oldval)), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
oldval = ctmp.FixContentText(ru, myValue, myType, myRoFst, fileNameOnly);
|
||||
if (ctmp.Text != textB4 && frmMain.MySettings.AnnotateWhenShowingDifferentRO)
|
||||
Annotation.MakeAnnotation(ctmp.ContentItems[0].MyItem, VolianCommentType, "", string.Format("Old RO value ({0}) different than new RO value({1})" + sameMsg, ItemInfo.ConvertToDisplayText(oldval), ItemInfo.ConvertToDisplayText(myValue)), null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
myRoFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
|
||||
if (ctmp.Text != textB4)
|
||||
{
|
||||
changeCount++;
|
||||
//Console.WriteLine("'{0}', '{1}', '{2}', '{3}'", replace(oldval, @"\u8209?", "-"), replace(myValue, @"\u8209?", "-"), ru.ROID, rocc.appid);
|
||||
frmMain.AddInfo("'{0}','{1}','{2}','{3}','R{4}','{5}','{6}'", ii.MyDocVersion.MyFolder.Name, ii.ShortPath,
|
||||
(oldval ?? "").Replace(@"\u8209?", "-").Replace("'", "''"), myValue.Replace(@"\u8209?", "-").Replace("'", "''"), ru.ROID, myLookup.GetAccPageID(ru.ROID), sameMsg);
|
||||
}
|
||||
else if (sameMsg != string.Empty && sameMsg != ", Exact Match")
|
||||
{
|
||||
frmMain.AddInfo("'{0}','{1}','{2}','{3}','R{4}','{5}','{6}'", ii.MyDocVersion.MyFolder.Name, ii.ShortPath,
|
||||
(oldval ?? "").Replace(@"\u8209?", "-").Replace("'", "''"), myValue.Replace(@"\u8209?", "-").Replace("'", "''"), ru.ROID, myLookup.GetAccPageID(ru.ROID), sameMsg);
|
||||
}
|
||||
}
|
||||
if (ctmp.IsDirty)
|
||||
{
|
||||
//ctmp.DTS = DateTime.Now;
|
||||
ctmp.Save();
|
||||
ContentInfo.Refresh(ctmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
frmMain.AddInfo("{0} RO Values Updated", changeCount);
|
||||
MessageBox.Show(String.Format("{0} RO Values Updated", changeCount), "RO Value Update Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private bool CheckIfTheSame(ItemInfo ii, string roid, ROFSTLookup myLookup, ROFSTLookup oldLookup, DocVersionInfo dvi, ref string sameMsg)
|
||||
{
|
||||
/*
|
||||
ROFSTLookup.rochild rocc = myLookup.GetRoChild12(ru.ROID);
|
||||
if (rocc.value == null)
|
||||
rocc = myLookup.GetRoChild(ru.ROID);
|
||||
int myType = rocc.type;
|
||||
*/
|
||||
ROFSTLookup.rochild roc = myLookup.GetRoChild12(roid);
|
||||
if (roc.value == null) roc = myLookup.GetRoChild(roid);
|
||||
ROFSTLookup.rochild oroc = oldLookup.GetRoChild12(roid);
|
||||
if (oroc.value == null) oroc = oldLookup.GetRoChild(roid);
|
||||
string myValue = myLookup.GetTranslatedRoValue(roid, ii.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
|
||||
myValue = myValue.Replace(@"\up2 \u8209?", @"\up2\u8209?");// Remove space between superscript command and non-breaking hyphen
|
||||
string oldValue = oldLookup.GetTranslatedRoValue(roid, ii.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
|
||||
oldValue = oldValue.Replace(@"\up2 \u8209?", @"\up2\u8209?");// Remove space between superscript command and non-breaking hyphen
|
||||
string myAccPageID = myLookup.GetAccPageID(roid);
|
||||
string oldAccPageID = oldLookup.GetAccPageID(roid);
|
||||
if (myValue == oldValue && roc.type == oroc.type && ((myAccPageID ?? "null") == (oldAccPageID ?? "null")))
|
||||
{
|
||||
sameMsg = ", Exact Match";
|
||||
return true;
|
||||
}
|
||||
if (myValue != oldValue && roc.type == oroc.type && ((myAccPageID ?? "null") == (oldAccPageID ?? "null")))
|
||||
{
|
||||
sameMsg = ", Different Value, Same RO";
|
||||
return false;
|
||||
}
|
||||
if ((myAccPageID ?? "null") != (oldAccPageID ?? "null"))
|
||||
{
|
||||
ROFSTLookup.rochild? myroc = myLookup.GetROChildByAccPageID(oldAccPageID, dvi.DocVersionConfig.RODefaults_setpointprefix), dvi.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
if (myroc != null)
|
||||
{
|
||||
string myValueNew = myLookup.GetTranslatedRoValue(((ROFSTLookup.rochild)myroc).roid, ii.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
|
||||
if(myValueNew == oldValue)
|
||||
sameMsg = ", Same Value, Different RO";
|
||||
else
|
||||
sameMsg = ", Different Value, Different RO";
|
||||
}
|
||||
else
|
||||
sameMsg = ", Missing RO";
|
||||
return false;
|
||||
}
|
||||
sameMsg = ", Unknown";
|
||||
|
||||
//if (myLookup.GetAccPageID(roid) == oldLookup.GetAccPageID(roid))
|
||||
//{
|
||||
// sameMsg = string.Format("ROID: {0}, AccPageID: {1}, OldAccPageID: {2}", roid, myLookup.GetAccPageID(roid), oldLookup.GetAccPageID(roid));
|
||||
// return false;
|
||||
//}
|
||||
//sameMsg = "Values and AccPageIDs are different for ROID: " + roid;
|
||||
return false;
|
||||
}
|
||||
|
||||
private List<string> myRoFst_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)
|
||||
{
|
||||
return Volian.Controls.Library.VlnFlexGrid.ROTableUpdate(sender,args);
|
||||
}
|
||||
}
|
||||
}
|
543
PROMS/DataLoader/Sections.cs.bak
Normal file
543
PROMS/DataLoader/Sections.cs.bak
Normal file
@@ -0,0 +1,543 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
private Dictionary<string, int> dicOldToNew;
|
||||
private Item AddSection(Item procitem, string Number, string Title, string SecType, DateTime Dts, string Userid, ConfigInfo ci, string stpseq, string fmt, int libdocid, string pth, Item FromItem, DocVersion docver)
|
||||
{
|
||||
frmMain.UpdateLabels(0, 1, 0);
|
||||
try
|
||||
{
|
||||
FormatInfo format = null;
|
||||
|
||||
// Tie the section to format used, this will add the format xml if it doesn't exist in
|
||||
// the database yet. Note that if there is no format at this level then none should
|
||||
// be set so that the inheritance works correctly.
|
||||
if (fmt != null && fmt != "") format = GetFormat(fmt);
|
||||
|
||||
// Find the docstyle based on the section type (step[1]) & the 'type' from the dbf
|
||||
// record sectype[0])
|
||||
string dstyleindx = ((stpseq == null || stpseq == "") ? " " : stpseq.Substring(1, 1)) + ((SecType==null||SecType == "") ? " " : SecType.Substring(0, 1));
|
||||
int docstyleindx = GetDocStyleIndx(dstyleindx, format, procitem, docver);
|
||||
|
||||
// tack on the column mode - add to config xml for node.
|
||||
if (stpseq != null && stpseq.Substring(1, 1) == "0" && stpseq.Substring(5, 1) != " ")
|
||||
{
|
||||
if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Section", "ColumnMode", stpseq.Substring(5, 1));
|
||||
}
|
||||
|
||||
// find rtf file (or use the library document temp file) & read it into the field
|
||||
// acccontent
|
||||
int Documentid=0;
|
||||
bool needEntry = false;
|
||||
if (libdocid != 0 || stpseq.Substring(1, 1) != "0")
|
||||
{
|
||||
needEntry = true;
|
||||
string fname = null;
|
||||
if (libdocid != 0)
|
||||
{
|
||||
Documentid = libdocid;
|
||||
}
|
||||
else
|
||||
{
|
||||
int num = Convert.ToInt32(stpseq[0]) - 64;
|
||||
string thenum = num.ToString("d2");
|
||||
fname = string.Format("{0}\\rtffiles\\{1}.A{2}", pth, ProcFileName, thenum);
|
||||
Application.DoEvents();
|
||||
SaveSectionDocument(fname, stpseq, SecType, ref Documentid);
|
||||
if (Documentid == 0)
|
||||
{
|
||||
if (MissingDocument==null) MissingDocument = Document.MakeDocument("MISSING FILE IN CONVERSION", null, null, null);
|
||||
Documentid = MissingDocument.DocID;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Userid == null || Userid == "") Userid = "Migration";
|
||||
|
||||
// test for performance
|
||||
Content cont;
|
||||
using(Format fmt2 = format == null ? null : format.Get())
|
||||
cont = Content.New(Number, Title, 10000+docstyleindx, fmt2, ci==null?null:ci.ToString(), Dts, Userid);
|
||||
Entry entry = cont.MyEntry;
|
||||
if (needEntry)
|
||||
{
|
||||
entry.MyDocument = Document.Get(Documentid);
|
||||
entry.DTS = Dts;
|
||||
entry.UserID = Userid;
|
||||
//entry = Entry.MakeEntry(cont.ContentID, Document.Get(Documentid), Dts, Userid);
|
||||
}
|
||||
cont.MyZContent.OldStepSequence = ProcNumber + "|" + stpseq;
|
||||
Item itm = null;
|
||||
// the stpseq for section records may include a space & some other data. This
|
||||
// was not part of what is stored in the transition records, so just look at
|
||||
// the sequence before the space for section records. Then use the first character
|
||||
// with a '0'. This is what's stored in the transition record, for example, if the
|
||||
// section was BI, the transition record would have B0 (the reasoning is that
|
||||
// for steps, this is what could be stored if there were enough steps.
|
||||
int trindxsp = stpseq.IndexOf(' ');
|
||||
string trstpseq = trindxsp < 0 ? stpseq : stpseq.Substring(0, 1)+ "0";
|
||||
if (dicTrans_ItemIds.ContainsKey(ProcNumber + "|" + trstpseq))
|
||||
{
|
||||
itm = dicTrans_ItemIds[ProcNumber + "|" + trstpseq];
|
||||
itm.MyContent = cont;
|
||||
itm.MyPrevious = FromItem;
|
||||
itm.DTS = Dts;
|
||||
itm.UserID = Userid;
|
||||
if (!itm.IsSavable) ErrorRpt.ErrorReport(itm);
|
||||
itm.Save();
|
||||
dicTrans_ItemIds.Remove(ProcNumber + "|" + trstpseq);
|
||||
dicTrans_MigrationErrors.Remove(ProcNumber + "|" + trstpseq);
|
||||
}
|
||||
else
|
||||
itm = Item.MakeItem(FromItem, cont, Dts, Userid);
|
||||
dicTrans_ItemDone[ProcNumber+"|"+trstpseq] = itm;
|
||||
dicOldStepSequence[itm] = stpseq;
|
||||
return itm;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("Save Section");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private int LookupOldToNew(string lkup)
|
||||
{
|
||||
if (dicOldToNew == null)
|
||||
{
|
||||
dicOldToNew = new Dictionary<string, int>();
|
||||
//dicOldToNew.Add("", 1);
|
||||
dicOldToNew.Add("0", 1);
|
||||
dicOldToNew.Add("0 ", 1);
|
||||
dicOldToNew.Add("00", 1);
|
||||
dicOldToNew.Add("01", 2);
|
||||
dicOldToNew.Add("02", 4);
|
||||
dicOldToNew.Add("03", 8);
|
||||
dicOldToNew.Add("04", 16);
|
||||
dicOldToNew.Add("I", 32);
|
||||
dicOldToNew.Add("I ", 32);
|
||||
dicOldToNew.Add("I0", 32);
|
||||
dicOldToNew.Add("I1", 64);
|
||||
dicOldToNew.Add("I2", 128);
|
||||
dicOldToNew.Add("I3", 256);
|
||||
dicOldToNew.Add("I4", 512);
|
||||
dicOldToNew.Add("A", 1024);
|
||||
dicOldToNew.Add("A ", 1024);
|
||||
dicOldToNew.Add("A0", 1024);
|
||||
dicOldToNew.Add("A1", 2048);
|
||||
dicOldToNew.Add("A2", 4096);
|
||||
dicOldToNew.Add("A3", 8192);
|
||||
dicOldToNew.Add("A4", 16384);
|
||||
dicOldToNew.Add("F", 32768);
|
||||
dicOldToNew.Add("F ", 32768);
|
||||
dicOldToNew.Add("F0", 32768);
|
||||
dicOldToNew.Add("F1", 65536);
|
||||
dicOldToNew.Add("F2", 131072);
|
||||
dicOldToNew.Add("F3", 262144);
|
||||
dicOldToNew.Add("F4", 524288);
|
||||
dicOldToNew.Add("05", 1048576);
|
||||
dicOldToNew.Add("06", 2097152);
|
||||
dicOldToNew.Add("07", 4194304);
|
||||
dicOldToNew.Add("08", 8388608);
|
||||
dicOldToNew.Add("09", 16777216);
|
||||
dicOldToNew.Add("0:", 33554432);
|
||||
dicOldToNew.Add("0;", 67108864);
|
||||
dicOldToNew.Add("0<", 134217728);
|
||||
dicOldToNew.Add("0=", 268435456);
|
||||
dicOldToNew.Add("0>", 536870912);
|
||||
}
|
||||
int retval = -1;
|
||||
try
|
||||
{
|
||||
retval = dicOldToNew[lkup];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(string.Format("Error in oldtonew {0}", lkup));
|
||||
Console.WriteLine(string.Format("Error = {0}", ex.Message));
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
private int GetDocStyleIndx(string dstyleindx, FormatInfo format, Item procitem, DocVersion docver)
|
||||
{
|
||||
// get the format, if format is set, use it, otherwise walk
|
||||
if (format == null)
|
||||
{
|
||||
format = GetFormat(procitem, docver);
|
||||
}
|
||||
int docstyle = LookupOldToNew(dstyleindx);
|
||||
foreach (DocStyle ds in format.PlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if ((ds.OldToNew & docstyle)>0) return (int)ds.Index;
|
||||
}
|
||||
Console.WriteLine("Error getting docstyle index");
|
||||
return 0;
|
||||
}
|
||||
private FormatInfo GetFormat(Item procitem, DocVersion docver)
|
||||
{
|
||||
return procitem.MyItemInfo.ActiveFormat;
|
||||
//while (procitem.MyItemInfo.a .MyContent.MyFormat == null)
|
||||
//{
|
||||
// // find the first sibling
|
||||
// while (procitem.PreviousID != null)
|
||||
// procitem = procitem.MyPrevious;
|
||||
// if (procitem.ItemPartCount == 0) return docver.MyDocVersionInfo.ActiveFormat;
|
||||
// // find the parent node
|
||||
// procitem = procitem.ItemParts[0].MyContent.ContentItems[0].MyItem;
|
||||
//}
|
||||
//return procitem.MyContent.MyFormat;
|
||||
}
|
||||
//private FormatInfo GetFormat(DocVersion docver)
|
||||
//{
|
||||
// if (docver.MyDocVersionInfo.MyFormat != null) return docver.MyDocVersionInfo.MyFormat;
|
||||
// return GetFormat(docver.MyDocVersionInfo.MyFolder);
|
||||
//}
|
||||
//private FormatInfo GetFormat(FolderInfo folder)
|
||||
//{
|
||||
// if (folder.MyFormat != null) return folder.MyFolderInfo.MyFormat;
|
||||
// return GetFormat(folder.MyParent);
|
||||
//}
|
||||
private string SectTitle(OleDbConnection cn, DataRowView dr, bool UseMultiLineSectionTitle, bool ConvertCaret)
|
||||
{
|
||||
string tbuff = null;
|
||||
string menustr = null;
|
||||
|
||||
if (UseMultiLineSectionTitle)
|
||||
{
|
||||
bool titleInMemo = false;
|
||||
// for accessory pages...
|
||||
if (dr["Step"].ToString().Substring(1, 1) != "0")
|
||||
{
|
||||
// The long section title is stored on a record with the "~" character.
|
||||
// This was done since originally the actual accessory page data was stored in the memo
|
||||
// field, so the long title could not be stored there, another record had to be used.
|
||||
OleDbDataAdapter da = new OleDbDataAdapter("select * from " + ProcFileName + " where [Step] like '" + dr["Step"].ToString().Substring(0, 1) + "~';", cn);
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
da.Fill(ds);
|
||||
if (ds.Tables[0].Rows.Count == 1)
|
||||
{
|
||||
DataRow row = ds.Tables[0].Rows[0];
|
||||
tbuff = TextConvert.ConvertText(row["Textm"].ToString(),ConvertCaret);
|
||||
if (tbuff != null && tbuff != "") titleInMemo = true;
|
||||
}
|
||||
else // no long section title existed for this accessory page
|
||||
tbuff = TextConvert.ConvertText(dr["Text"].ToString().PadRight(130, ' ').Substring(0, 75).TrimEnd(), ConvertCaret);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Error getting long section title {0}", ex.Message);
|
||||
}
|
||||
da.Dispose();
|
||||
}
|
||||
// For step sections, the long section title is stored on the section record
|
||||
// (see above comment for accessory pages to see the difference)
|
||||
else
|
||||
{
|
||||
tbuff = TextConvert.ConvertText(dr["TextM"].ToString().Trim(), ConvertCaret);
|
||||
}
|
||||
|
||||
//// TESTS were run & it looked like that whitespace was removed before saving,
|
||||
//// so, put up a message box if find out otherwise....
|
||||
//int nl = tbuff.IndexOf("\n");
|
||||
//if (nl > -1)
|
||||
// MessageBox.Show("multiline text for section title, fix this!!");
|
||||
|
||||
//// remove newlines & any other escape/whitespace chars.
|
||||
int nl = tbuff.IndexOf("\n");
|
||||
if (nl > -1 || titleInMemo)
|
||||
{
|
||||
|
||||
string tmpstr = tbuff.Replace("\r", "");
|
||||
tmpstr = tmpstr.Replace("\t", "");
|
||||
tmpstr = tmpstr.Replace("\n", " ");
|
||||
// get rid of multiple spaces
|
||||
while (tmpstr.IndexOf(" ") > -1) tmpstr = tmpstr.Replace(" ", " ");
|
||||
tbuff = tmpstr;
|
||||
if (tbuff.Substring(tbuff.Length - 1, 1) == " ") tbuff = tbuff.Substring(0, tbuff.Length - 1);
|
||||
menustr = tbuff;
|
||||
}
|
||||
else
|
||||
{
|
||||
menustr = TextConvert.ConvertText(dr["Text"].ToString().PadRight(80, ' ').Substring(0, 75).TrimEnd(), ConvertCaret);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // format does not include long section title
|
||||
menustr = TextConvert.ConvertText(dr["Text"].ToString().PadRight(80, ' ').Substring(0, 75).TrimEnd(), ConvertCaret);
|
||||
}
|
||||
return menustr;
|
||||
}
|
||||
private Item MigrateSection(Item procitem, string procnum, OleDbConnection cn, DataRowView dr, DataTable dt, Item FromItem, bool isSubSection, string pth, DocVersion docver)
|
||||
{
|
||||
Int32 thesectid = 0;
|
||||
bool isautogen = false;
|
||||
string stype = dr["type"].ToString();
|
||||
string s = dr["text"].ToString().PadRight(130, ' ');
|
||||
string num = s.Substring(85, 20).TrimEnd();
|
||||
string fmt = s.Substring(75, 10).TrimEnd();
|
||||
if (fmt == "") fmt = null;
|
||||
bool ismulti = false;
|
||||
bool conv_caret = true;
|
||||
|
||||
// sectFormat is a local that represents the format to be used by this section.
|
||||
// Note that if the format is set for this section, check it against what the inherited
|
||||
// value would be (for example, what the format is for the set), if they are the same
|
||||
// clear the format at the section level.
|
||||
FormatInfo sectFormat = null;
|
||||
FormatInfo docverFormat = docver.MyDocVersionInfo.ActiveFormat;
|
||||
if (fmt != null&& fmt !="") // Is there a long section title (from format flag)
|
||||
sectFormat = GetFormat(fmt);
|
||||
else // either from this format, or the plant.
|
||||
sectFormat = docverFormat;
|
||||
if (sectFormat != null)
|
||||
{
|
||||
ismulti = sectFormat.PlantFormat.FormatData.SectData.StepSectionData.UseMultiLineSectionTitle;
|
||||
conv_caret = sectFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
|
||||
}
|
||||
if (fmt != null && fmt != "") if (fmt == docverFormat.Name) fmt = null;
|
||||
string title = SectTitle(cn, dr, ismulti, conv_caret);
|
||||
string init = dr["initials"].ToString().Trim();
|
||||
string sequence = dr["CSequence"].ToString().PadRight(10);
|
||||
string step = dr["CStep"].ToString();
|
||||
int libDocid = 0;
|
||||
|
||||
DateTime dts = GetDTS(dr["Date"].ToString(), dr["Time"].ToString());
|
||||
|
||||
ConfigInfo ci = new ConfigInfo(null);
|
||||
ci.AddItem("Section", "OldType", stype);
|
||||
|
||||
|
||||
// for steps sections...
|
||||
// Step Section Header Format:
|
||||
// A0 1X2S51 &Y
|
||||
// ^^^^^^^^^^^^
|
||||
// |||||||||||||
|
||||
// ||||||||||||`- 'Y','N', or blank signals to print section header - lib/section/addsec.c
|
||||
// |||||||||||`-- (bits) Auto Indent, Editable Data, Checkoff Header Type - lib/section/addsec.c
|
||||
// ||||||||||`--- blank
|
||||
// ||||||||`----- Link With Enhanced Document ' '-Default(not determined) 0-NO 1-YES
|
||||
// |||||||`------ MetaSection - number of subsections is given
|
||||
// ||||||`------- S-Separate(PageBreak); T-Continuous; ' '-Default
|
||||
// |||||`-------- Column mode (1,2,3,' '-default)
|
||||
// ||||`--------- X -only proc section; x -orig. proc; ' ' -other
|
||||
// |||`---------- Position within the procedure
|
||||
// ||`----------- ALWAYS leave blank
|
||||
// |`------------ Step Section Header marker
|
||||
// `------------- Internal section number (starts at A)
|
||||
|
||||
if (step.Substring(1, 1) == "0")
|
||||
{
|
||||
// if this section has the original edit section flag (sequence[2]) save the id.
|
||||
|
||||
// set pagination, continuous, separate. If blank, don't create attribute - uses format default.
|
||||
if (sequence.Substring(4, 1) == "T")
|
||||
{
|
||||
ci.AddItem("Section", "Pagination", "C");
|
||||
}
|
||||
else if (sequence.Substring(4, 1) == "S")
|
||||
{
|
||||
ci.AddItem("Section", "Pagination", "S");
|
||||
}
|
||||
|
||||
// Step: linked to enhanced (!exist = N)
|
||||
if (sequence.Substring(7, 1) == "1")
|
||||
{
|
||||
ci.AddItem("Step", "LnkEnh", "Y");
|
||||
}
|
||||
char cbittst = sequence.PadRight(10)[8];
|
||||
if (cbittst == ' ')
|
||||
cbittst = '\0';
|
||||
else
|
||||
{
|
||||
// determine if TOC element (!exist = N)
|
||||
if ((cbittst & TOC) > 1)
|
||||
{
|
||||
ci.AddItem("Section", "TOC", "Y");
|
||||
}
|
||||
// determine if autogenerated section (!exist = N)
|
||||
if ((cbittst & AUTOGEN) > 1)
|
||||
{
|
||||
isautogen = true;
|
||||
ci.AddItem("Section", "AutoGen", "Y");
|
||||
}
|
||||
}
|
||||
// Here are subsection flags, i.e. the following are only set if this
|
||||
// is a subsection.
|
||||
bool didsub = false;
|
||||
if (isSubSection)
|
||||
{
|
||||
// Subsection: editable (!exist = Y)
|
||||
if ((cbittst & EDDATA) > 0)
|
||||
{
|
||||
ci.AddItem("SubSection", "Edit", "N");
|
||||
}
|
||||
|
||||
// Subsection: print section headers (!exist = Y)
|
||||
if ((cbittst & PH) > 0)
|
||||
{
|
||||
didsub = true;
|
||||
ci.AddItem("SubSection", "PH", "N");
|
||||
}
|
||||
|
||||
// Subsection: autoindent (!exist = Y)
|
||||
if ((cbittst & AUTOIND) > 0)
|
||||
{
|
||||
ci.AddItem("SubSection", "AutoIndent", "N");
|
||||
}
|
||||
}
|
||||
if (!didsub && sequence.Substring(4, 1) == "N")
|
||||
{
|
||||
ci.AddItem("SubSection", "PH", "N");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Accessory Section Format:
|
||||
// AI 1 2
|
||||
// ^^ ^ ^
|
||||
// || | |
|
||||
// || | `- # of pages (ASCII value minus 48)
|
||||
// || `--- Position within the procedure
|
||||
// |`----- Acc. page type (A,I, or F)
|
||||
// `------ Internal section number (starts at A)
|
||||
ci.AddItem("Section", "NumPages", sequence.Substring(3, 1));
|
||||
|
||||
// see if it's a libdoc too
|
||||
string thekey = procnum.PadRight(20) + step.Substring(0, 1).PadRight(10);
|
||||
if (dicLibDocRef.ContainsKey(thekey))
|
||||
{
|
||||
// if it is a library document, see if the section record has already been
|
||||
// saved. If it has, just use this section id, otherwise, create the
|
||||
// section record with info from the library document file.
|
||||
libDocid = dicLibDocRef[thekey];
|
||||
}
|
||||
}
|
||||
Item secitem = AddSection(procitem, num, title, stype, dts, init, ci, step + sequence, fmt, libDocid, pth, FromItem, docver);
|
||||
thesectid = secitem.ItemID;
|
||||
|
||||
// if the editsectid hasn't been set yet, set it to this section id, i.e. the first
|
||||
// one processed. Then if this section has the original edit section flag (sequence[2])
|
||||
// save the id. The first step is necessary in case there is no original edit section
|
||||
// flag set, so that the first section is the default one to get opened in edit.
|
||||
if (EditSectId==0)EditSectId = thesectid;
|
||||
if (libDocid<1 && step[1] == '0' && (sequence[2] == 'x' || sequence[2] == 'X'))
|
||||
EditSectId = thesectid;
|
||||
// ContentType (2 in the following call) are:
|
||||
// 0 = structure,
|
||||
// 1 = procedure,
|
||||
// 2 = section,
|
||||
// 3 = step
|
||||
// 4 = branch
|
||||
|
||||
// fromtype values are (see steps.cs too)
|
||||
// 1 = procedure,
|
||||
// 2 = section,
|
||||
// 3 = caution
|
||||
// 4 = note
|
||||
// 5 = RNO
|
||||
// 6 = step
|
||||
// 7 = table
|
||||
|
||||
if (!isautogen)
|
||||
{
|
||||
// Process the Data Table - First look for High Level Steps
|
||||
string sQry = string.Format("Step like '[{0}]%' and Sequence='S'", dr["Step"].ToString().Substring(0, 1));
|
||||
DataView dv = new DataView(dt, sQry, "StepNo", DataViewRowState.CurrentRows);
|
||||
Item FrItem = null;
|
||||
frmMain.pbStepMaximum = dt.Rows.Count;
|
||||
frmMain.pbStepValue = 0;
|
||||
foreach (DataRowView drv in dv)
|
||||
{
|
||||
FrItem = MigrateStep(cn, dt, drv, FrItem, conv_caret, pth, docver);
|
||||
if (secitem.MyContent.ContentParts.Count == 0)
|
||||
{
|
||||
// type 6 is step
|
||||
secitem.MyContent.ContentParts.Add(6, FrItem);
|
||||
if (!secitem.MyContent.IsSavable) ErrorRpt.ErrorReport(secitem.MyContent);
|
||||
secitem.MyContent.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
return secitem;
|
||||
}
|
||||
private void LoadSection(DataSet ds, OleDbDataAdapter da, string FileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
da.Fill(ds, "Sections");
|
||||
DataTable dt = ds.Tables["Sections"];
|
||||
dt.CaseSensitive = true;
|
||||
dt.Columns.Add("CStep", System.Type.GetType("System.String"));
|
||||
dt.Columns.Add("CSequence", System.Type.GetType("System.String"));
|
||||
// set the cstep & csequence - couldn't do it in the add because it needed a sql function
|
||||
foreach (DataRow drw in ds.Tables["Sections"].Rows)
|
||||
{
|
||||
drw["CStep"] = TextConvert.ConvertSeq(drw["Step"].ToString());
|
||||
drw["CSequence"] = TextConvert.ConvertSeq(drw["Sequence"].ToString());
|
||||
}
|
||||
dt.Columns.Add("StepNo", System.Type.GetType("System.Int32"), "Convert(Convert(Substring(CStep,2,1),'System.Char'),'System.Int32')-48");
|
||||
dt.Columns.Add("Level", System.Type.GetType("System.Int32"), "Len(CSequence)");
|
||||
dt.Columns.Add("SubStepNo", System.Type.GetType("System.Int32"), "Convert(Convert(Substring(CSequence,Len(CSequence),1),'System.Char'),'System.Int32')-48");
|
||||
dt.Columns.Add("locb", System.Type.GetType("System.Int32"), "Convert(Convert(Substring(CSequence,2,1),'System.Char'),'System.Int32')-48");
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
FileInfo fi;
|
||||
switch (ex.Message)
|
||||
{
|
||||
case "Index file not found.":// then delete inf file
|
||||
fi = new FileInfo(frmMain.tbSourceText + "\\" + FileName + ".inf");
|
||||
fi.Delete();
|
||||
LoadSection(ds, da, FileName);// Try Again
|
||||
break;
|
||||
case "External table is not in the expected format.": // then pad dbt file with 128 zeros.
|
||||
fi = new FileInfo(frmMain.tbSourceText + "\\" + FileName + ".dbt");
|
||||
FileStream fs = fi.OpenWrite();
|
||||
fs.Position = fs.Length;
|
||||
byte[] buf = new byte[128];
|
||||
for (int i = 0; i < 128; i++) buf[i] = 0;
|
||||
fs.Write(buf, 0, 128);
|
||||
fs.Close();
|
||||
LoadSection(ds, da, FileName);// Try Again
|
||||
break;
|
||||
default: // Unrecognized error
|
||||
Console.WriteLine("Unrecognized error: error = {0}", ex.Message);
|
||||
log.ErrorFormat("File - {0}.DBF\r\n\r\n{1}\r\n\r\n{2}", FileName, ex.Message, ex.InnerException);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
422
PROMS/DataLoader/Steps.cs.bak
Normal file
422
PROMS/DataLoader/Steps.cs.bak
Normal file
@@ -0,0 +1,422 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
private Item AddStep(OleDbConnection cn, string StepType, string Textm, string Recid, string stpseq, string structtype, Item FromItem, DateTime dts, string userid, bool conv_caret, string pth, DocVersion docver)
|
||||
{
|
||||
string whereami = "1";
|
||||
Content content = null;
|
||||
Item item = null;
|
||||
|
||||
frmMain.UpdateLabels(0, 0, 1);
|
||||
ConfigInfo ci = new ConfigInfo(null);
|
||||
string stptext = null;
|
||||
if (userid == null || userid == "") userid = "Migration";
|
||||
int tok = -1;
|
||||
//char[] chrarr = { '\x1', '\x2', '\x3', '\x5' };
|
||||
char[] chrarr = { '\x1', '\x2', '\x3' };
|
||||
try
|
||||
{
|
||||
// the textm field has step text, but also may have other text stored
|
||||
// with it with a 'token' as a separator (see below).
|
||||
tok = Textm.IndexOfAny(chrarr);
|
||||
|
||||
// This will find a continuous action flag without finding a hanging indent
|
||||
if (tok == 0 && Textm[Textm.Length - 1] == '\x5')
|
||||
tok = Textm.Length - 1;
|
||||
|
||||
if (tok < 0)
|
||||
stptext = TextConvert.ConvertText(Textm, conv_caret);
|
||||
else
|
||||
stptext = TextConvert.ConvertText(Textm.Substring(0, tok), conv_caret);
|
||||
|
||||
string seqcvt = TextConvert.ConvertSeq(stpseq);
|
||||
|
||||
// Figure marker - it should NEVER get here!!!
|
||||
int tokfig = Textm.IndexOf('\xE8');
|
||||
if (tokfig > -1)
|
||||
{
|
||||
log.Error("Found a old style figure!");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
}
|
||||
string newstptyp = null;
|
||||
bool ManualPagebreak = false;
|
||||
char cbittst = StepType.PadRight(2)[0];
|
||||
if (cbittst != ' ' && (cbittst & 0x80) > 1)
|
||||
{
|
||||
ManualPagebreak = true;
|
||||
//if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Step", "ManualPagebreak", "True");
|
||||
newstptyp = StepType.Substring(1, 1);
|
||||
}
|
||||
if (InES32 && stpseq == "A3S11")
|
||||
Console.WriteLine("here");
|
||||
whereami = "2";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
// Need the content record for the RO & transitions.
|
||||
//content = Content.MakeContent(null, stptext, 20000 + int.Parse(newstptyp!=null?newstptyp:StepType),null, ManualPagebreak?ci.ToString():null, dts, userid);
|
||||
// 20000 flags step type item & 1 adjusts for 'base' in format files.
|
||||
int contenttype = (structtype == "R") ? 20040 : 20001 + int.Parse(newstptyp != null ? newstptyp : StepType);
|
||||
whereami = "2.1";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
content = Content.New(null, stptext, contenttype, null, ManualPagebreak ? ci.ToString() : null, dts, userid);
|
||||
whereami = "2.1.1";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
content.MyZContent.OldStepSequence = ProcNumber + "|" + stpseq;
|
||||
whereami = "2.1.2";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
// Before we save it, handle RO & Transitions tokens.
|
||||
int tokrt = Textm.IndexOf('\x15');
|
||||
bool txtdirty = false;
|
||||
if (tokrt > -1)
|
||||
{
|
||||
txtdirty = true;
|
||||
whereami = "2.2";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret);
|
||||
whereami = "2.3";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}, stepseq = {1}", whereami, stpseq);
|
||||
stptext = stptext.TrimEnd(" ".ToCharArray());
|
||||
}
|
||||
whereami = "3";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
// 16-bit code has the following two defines.
|
||||
// #define TransitionMarker 0xC2
|
||||
// #define ReferenceMarker 0xCB
|
||||
// these two characters get converted (to unicode) from ado.net
|
||||
// use the unicode chars.
|
||||
char[] chrrotrn = { '\x252C', '\x2566' };
|
||||
tokrt = Textm.IndexOfAny(chrrotrn);
|
||||
_TransitionMigrationErrors = new List<string>();
|
||||
if (tokrt > -1)
|
||||
{
|
||||
txtdirty = true;
|
||||
stptext = MigrateTrans(cn, stptext, seqcvt, content, pth);
|
||||
stptext = stptext.TrimEnd(" ".ToCharArray());
|
||||
}
|
||||
if (txtdirty)
|
||||
{
|
||||
content.Text = stptext;
|
||||
//content.Save();
|
||||
}
|
||||
whereami = "4";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
if (!content.IsSavable) ErrorRpt.ErrorReport(content);
|
||||
List<string> migrationerrors = null;
|
||||
if (_ContentMigrationErrors.ContainsKey(content.ContentID))
|
||||
migrationerrors = _ContentMigrationErrors[content.ContentID];
|
||||
content.Save();
|
||||
whereami = "5";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
// check if already created thru new during transition migration...
|
||||
if (dicTrans_ItemIds.ContainsKey(ProcNumber + "|" + seqcvt))
|
||||
{
|
||||
item = dicTrans_ItemIds[ProcNumber + "|" + seqcvt];
|
||||
item.MyPrevious = FromItem;
|
||||
item.MyContent = content;
|
||||
item.DTS = dts;
|
||||
item.UserID = userid;
|
||||
if (!item.IsSavable) ErrorRpt.ErrorReport(item);
|
||||
item.Save();
|
||||
dicTrans_ItemIds.Remove(ProcNumber + "|" + seqcvt);
|
||||
dicTrans_MigrationErrors.Remove(ProcNumber + "|" + seqcvt);
|
||||
}
|
||||
else
|
||||
item = Item.MakeItem(FromItem, content, content.DTS, content.UserID);
|
||||
if (migrationerrors != null)
|
||||
{
|
||||
foreach (string str in migrationerrors)
|
||||
{
|
||||
ItemAnnotation ia = item.ItemAnnotations.Add(MigrationErrorType);
|
||||
ia.SearchText = str;
|
||||
}
|
||||
if (!item.IsSavable) ErrorRpt.ErrorReport(item);
|
||||
item.Save();
|
||||
}
|
||||
if (_TransitionMigrationErrors.Count > 0)
|
||||
{
|
||||
foreach (string str in _TransitionMigrationErrors)
|
||||
{
|
||||
if (!dicTrans_MigrationErrors.ContainsKey(str))
|
||||
dicTrans_MigrationErrors.Add(str, new List<Item>());
|
||||
dicTrans_MigrationErrors[str].Add(item);
|
||||
}
|
||||
}
|
||||
dicTrans_ItemDone[ProcNumber + "|" + seqcvt] = item;
|
||||
dicOldStepSequence[content] = seqcvt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
|
||||
log.Error("Save Step");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
item = null;
|
||||
}
|
||||
|
||||
// now add on any support pieces of text associated with the step.
|
||||
// These include:
|
||||
// '\1' comment
|
||||
// '\2' multiple change ids and/or change message
|
||||
// '\3' linked sequence
|
||||
// '\3\3'override tab
|
||||
// '\5' continuous action summary flag (only if last char in string)
|
||||
// This assumes that these tokens are stored in reverse order that
|
||||
// they are processed.
|
||||
|
||||
|
||||
bool recdirty = false;
|
||||
try
|
||||
{
|
||||
whereami = "6";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
if (tok >= 0 && tok != Textm.Length)
|
||||
{
|
||||
string tkstring = Textm.Substring(tok);
|
||||
int nxttok = 0;
|
||||
|
||||
if (tkstring[tkstring.Length - 1] == '\x5') // Continuous Action Summary
|
||||
{
|
||||
recdirty = true;
|
||||
//if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Step", "ContActSum", "True");
|
||||
tkstring = tkstring.Substring(0, tkstring.Length - 1); // strip off Continuous Action Token
|
||||
}
|
||||
|
||||
if ((nxttok = tkstring.IndexOf("\x3\x3")) > -1) // Enhanced Override Tab
|
||||
{
|
||||
Console.WriteLine("Override Tab: {0}", tkstring.Substring(nxttok + 1));
|
||||
ci.AddItem("Step", "OverrideTab", tkstring.Substring(nxttok + 2));
|
||||
recdirty = true;
|
||||
//recdirty |= AddContentDetail(content, STP_OVR_TAB, tkstring.Substring(nxttok + 2));
|
||||
tkstring = tkstring.Substring(0, nxttok);
|
||||
}
|
||||
|
||||
if ((nxttok = tkstring.IndexOf("\x3")) > -1) //Linked Sequence
|
||||
{
|
||||
Console.WriteLine("Linked Seq: {0}", tkstring.Substring(nxttok + 1));
|
||||
ci.AddItem("Step", "LinkedSeq", TextConvert.ConvertSeq(tkstring.Substring(nxttok + 1)));
|
||||
recdirty = true;
|
||||
//recdirty |= AddContentDetail(content, STP_LNK_SEQ, TextConvert.ConvertSeq(tkstring.Substring(nxttok + 1)));
|
||||
tkstring = tkstring.Substring(0, nxttok);
|
||||
}
|
||||
|
||||
if ((nxttok = tkstring.IndexOf("\x2")) > -1) // Multiple Change Ids
|
||||
{
|
||||
//Console.WriteLine("Multiple Change ID: {0}", tkstring.Substring(nxttok + 1));
|
||||
ci.AddItem("Step", "MultipleChangeID", tkstring.Substring(nxttok + 1));
|
||||
recdirty = true;
|
||||
//recdirty |= AddContentDetail(content, STP_MULT_CHGID, tkstring.Substring(nxttok + 1));
|
||||
tkstring = tkstring.Substring(0, nxttok);
|
||||
}
|
||||
|
||||
if ((nxttok = tkstring.IndexOf("\x1")) > -1) // Comment
|
||||
{
|
||||
// add the comment to annotation table. Set type to comment.
|
||||
Console.WriteLine("Comment text: {0}", tkstring.Substring(nxttok + 1));
|
||||
Annotation annot = Annotation.MakeAnnotation(item, CommentType, null, tkstring.Substring(nxttok + 1), null, dts, userid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// also see if a check-off needs added.
|
||||
if (Recid[0] != '0')
|
||||
{
|
||||
recdirty = true;
|
||||
string chkindx = Recid[0].ToString();
|
||||
//if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Step", "CheckOffIndex", chkindx);
|
||||
}
|
||||
|
||||
// here's where it knows if it's a linked step (or in processstep)
|
||||
if (Recid[1] != '0')
|
||||
{
|
||||
// do linked step stuff.
|
||||
}
|
||||
|
||||
// if checkoffs or the continuous action summary flag, save the xml.
|
||||
if (recdirty)
|
||||
{
|
||||
if (ci.ItemCount != 0) content.Config = ci.ToString();
|
||||
if (!content.IsSavable) ErrorRpt.ErrorReport(content);
|
||||
whereami = "7";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
content.Save();
|
||||
whereami = "8";
|
||||
if (InES32) Console.WriteLine("Addstep whereami {0}", whereami);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Subtexts: {0} {1}", ex.GetType().Name, ex.Message);
|
||||
log.Error("Save Step part 2");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
//private static bool AddContentDetail(Content content, int type, string strn)
|
||||
//{
|
||||
// if (strn != null && strn.Trim() != "" )
|
||||
// {
|
||||
// content.ContentDetails.Add(type, strn);
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
|
||||
private string GetParent(string s)
|
||||
{
|
||||
string retval = "S";
|
||||
if (s.Length > 1)
|
||||
{
|
||||
int l = s.Length;
|
||||
if ("!*".IndexOf(s[l - 2]) > -1)
|
||||
{
|
||||
if (l > 2) retval = s.Substring(0, l - 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = s.Substring(0, l - 1);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
private string GetStructType(string s)
|
||||
{
|
||||
string retval = "S";
|
||||
if (s.Length > 1)
|
||||
{
|
||||
int l = s.Length;
|
||||
if ("!*".IndexOf(s[l - 2]) > -1)
|
||||
{
|
||||
if (s[l - 2] == '!') retval = "C";
|
||||
else retval = "N";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s[l - 1] == '$') retval = "R";
|
||||
if (s[l - 1] == '#') retval = "T";
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
public bool InES32 = false;
|
||||
private Item MigrateStep(OleDbConnection cn, DataTable dt, DataRowView drv, Item FromItem, bool conv_caret, string pth, DocVersion docver)
|
||||
{
|
||||
//string whereami = "1";
|
||||
try
|
||||
{
|
||||
string sType = GetStructType(drv["CSequence"].ToString());
|
||||
//whereami = "2";
|
||||
//if (InES32) Console.WriteLine("MigrateStep whereami {0}", whereami);
|
||||
Item item = AddStep(cn, drv["Type"].ToString()
|
||||
, (drv["textm"] == DBNull.Value ? drv["Text"].ToString() : drv["Textm"].ToString())
|
||||
, drv["Recid"].ToString(), drv["CStep"].ToString() + drv["CSequence"].ToString(), "S", FromItem // was str
|
||||
, GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString(), conv_caret, pth, docver);
|
||||
//whereami = "3";
|
||||
//if (InES32) Console.WriteLine("MigrateStep whereami {0}", whereami);
|
||||
//Content cont = Content.MakeContent(null,(drv["textm"] == DBNull.Value ? drv["Text"].ToString() : drv["Textm"].ToString()),drv["Type"]+20000,null,null,
|
||||
// GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString());
|
||||
//Item item = Item.MakeItem(FromItem, cont, cont.DTS, cont.UserID);
|
||||
//Structure str = AddStructure(FromType, FromID, 3, tmpid, drv["CStep"].ToString() + drv["CSequence"].ToString(),
|
||||
// GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString());
|
||||
//Step stp = AddStep(cn, drv["Type"].ToString()
|
||||
// , (drv["textm"] == DBNull.Value ? drv["Text"].ToString() : drv["Textm"].ToString())
|
||||
// , drv["Recid"].ToString(), drv["CStep"].ToString() + drv["CSequence"].ToString(), "S", str
|
||||
// , GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString());
|
||||
Dictionary<string, Item> dicStep = new Dictionary<string, Item>();
|
||||
dicStep[drv["CSequence"].ToString()] = item;
|
||||
Dictionary<string, Dictionary<string, Item>> dicStruct = new Dictionary<string, Dictionary<string, Item>>();
|
||||
Dictionary<string, Item> dicBase = new Dictionary<string, Item>();
|
||||
dicStruct[drv["CSequence"].ToString()] = dicBase;
|
||||
dicBase[""] = item;
|
||||
// Logic to add Sub-steps
|
||||
string sQry = "CStep = '" + drv["CStep"].ToString() + "' and CSequence <> 'S'";
|
||||
// sort order - for sections use currentrows.
|
||||
//whereami = "4";
|
||||
//if (InES32) Console.WriteLine("MigrateStep whereami {0}", whereami);
|
||||
DataView dv = new DataView(dt, sQry, "StepNo,Level,SubStepNo", DataViewRowState.CurrentRows);
|
||||
//dataGrid1.DataSource=dv;
|
||||
//Loop through DataView and add Steps one at a time
|
||||
//Console.WriteLine("={0}",drv["Step"]);
|
||||
int FrType = 0; // type of relationship (not type of step)
|
||||
Item FrItem = item;
|
||||
foreach (DataRowView drvs in dv)
|
||||
{
|
||||
//Console.WriteLine(">{0}",drvs["CStep"]);
|
||||
|
||||
string sParent = GetParent(drvs["CSequence"].ToString());
|
||||
if (dicStep.ContainsKey(sParent))
|
||||
{
|
||||
Item itemp = dicStep[sParent];
|
||||
sType = GetStructType(drvs["CSequence"].ToString());
|
||||
Dictionary<string,Item> dicStr = dicStruct[sParent];
|
||||
// check if a step type of 'sType' exists to see if child/sibling
|
||||
//Content contc = Content.MakeContent(null,(drvs["textm"] == DBNull.Value ? drvs["Text"].ToString() : drvs["Textm"].ToString()),drvs["Type"]+20000,null,null,
|
||||
// GetDTS(drvs["Date"].ToString(), drvs["Time"].ToString()), drvs["Initials"].ToString()));
|
||||
Item itemc = null;
|
||||
if (dicStr.ContainsKey(sType)) // next sibling
|
||||
{
|
||||
FrItem = dicStr[sType];
|
||||
FrType = 0;
|
||||
}
|
||||
else // child of a node
|
||||
{
|
||||
FrItem = null;
|
||||
FrType = (3 + ("CNRST".IndexOf(sType)));
|
||||
}
|
||||
//whereami = "5";
|
||||
itemc = AddStep(cn, drvs["Type"].ToString()
|
||||
, (drvs["textm"] == DBNull.Value ? drvs["Text"].ToString() : drvs["Textm"].ToString())
|
||||
, drv["Recid"].ToString(), drvs["CStep"].ToString() + drvs["CSequence"].ToString()
|
||||
, GetStructType(drvs["sequence"].ToString()), FrItem
|
||||
, GetDTS(drvs["Date"].ToString(), drvs["Time"].ToString()), drvs["Initials"].ToString(), conv_caret, pth, docver);
|
||||
|
||||
if (FrType > 0 )
|
||||
{
|
||||
itemp.MyContent.ContentParts.Add(FrType, itemc);
|
||||
if (!itemp.MyContent.IsSavable) ErrorRpt.ErrorReport(itemp.MyContent);
|
||||
itemp.MyContent.Save();
|
||||
}
|
||||
//whereami = "6";
|
||||
dicStr[sType] = itemc;
|
||||
dicStruct[drvs["CSequence"].ToString()] = new Dictionary<string, Item>();
|
||||
dicStep[drvs["CSequence"].ToString()] = itemc;
|
||||
}
|
||||
else
|
||||
{
|
||||
log.ErrorFormat("Parent {0} Could not be found for {1}", sParent, drvs["sequence"].ToString());
|
||||
}
|
||||
}
|
||||
//if (InES32) Console.WriteLine("MigrateStep end");
|
||||
return item;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
|
||||
log.Error("PROCESS STEP");
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
269
PROMS/DataLoader/TransitionFixer.cs.bak
Normal file
269
PROMS/DataLoader/TransitionFixer.cs.bak
Normal file
@@ -0,0 +1,269 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Volian.Controls.Library;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using System.Text.RegularExpressions;
|
||||
using Volian.Base.Library;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public delegate void TransitionFixerEvent(object sender, TransitionFixerEventArgs args);
|
||||
public class TransitionFixerEventArgs
|
||||
{
|
||||
private string _MyStatus;
|
||||
|
||||
public string MyStatus
|
||||
{
|
||||
get { return _MyStatus; }
|
||||
set { _MyStatus = value; }
|
||||
}
|
||||
public TransitionFixerEventArgs(string myStatus)
|
||||
{
|
||||
_MyStatus = myStatus;
|
||||
}
|
||||
}
|
||||
class TransitionFixer
|
||||
{
|
||||
public event TransitionFixerEvent StatusChanged;
|
||||
private void OnStatusChanged(object sender, TransitionFixerEventArgs args)
|
||||
{
|
||||
if (StatusChanged != null)
|
||||
StatusChanged(sender, args);
|
||||
}
|
||||
private string _Status;
|
||||
|
||||
public string Status
|
||||
{
|
||||
get { return _Status; }
|
||||
set
|
||||
{
|
||||
_Status = value;
|
||||
OnStatusChanged(this, new TransitionFixerEventArgs(_Status));
|
||||
}
|
||||
}
|
||||
private int _ErrorCount = 0;
|
||||
|
||||
public int ErrorCount
|
||||
{
|
||||
get { return _ErrorCount; }
|
||||
set { _ErrorCount = value; }
|
||||
}
|
||||
|
||||
private StepRTB _MyStepRTB;
|
||||
|
||||
public StepRTB MyStepRTB
|
||||
{
|
||||
get { return _MyStepRTB; }
|
||||
}
|
||||
private string _LogPath;
|
||||
public TransitionFixer(StepRTB myStepRTB,string logpath)
|
||||
{
|
||||
_MyStepRTB = myStepRTB;
|
||||
_LogPath = logpath;
|
||||
}
|
||||
public TimeSpan Process(bool checkRTF)
|
||||
{
|
||||
DateTime tstart = DateTime.Now;
|
||||
ProcessTransitions(checkRTF);
|
||||
return DateTime.Now - tstart;
|
||||
}
|
||||
private void ProcessTransitions(bool checkRTF)
|
||||
{
|
||||
Status = "Getting List...";
|
||||
// Loop through all Items and check before and after text
|
||||
ItemInfoList myListFrom = ItemInfoList.GetListTranFrom();
|
||||
ItemInfoList myListTo = ItemInfoList.GetListTranTo();
|
||||
ConversionRTBProblems myProblems = new ConversionRTBProblems();
|
||||
int i = 0;
|
||||
foreach (ItemInfo item in myListFrom)
|
||||
{
|
||||
if (item.MyContent.ContentID == 311)
|
||||
Console.WriteLine();
|
||||
Status = string.Format("Processing {0} of {1} steps", ++i, myListFrom.Count);
|
||||
//MyStepRTB.ViewRTB = false;
|
||||
string originalText = item.MyContent.Text;
|
||||
string updatedText = item.MyContent.Text;
|
||||
if (item.MyContent.MyGrid != null)
|
||||
{
|
||||
originalText = item.MyContent.MyGrid.Data;
|
||||
updatedText = (item.MyContent.MyGrid.Data.Replace("<START]", "<START]")).Replace("[END>", "[END>");
|
||||
}
|
||||
// Exclude items that are not connected (Dummy steps for invalid transition destinations)
|
||||
if (item.ItemDocVersionCount != 0 || item.MyPrevious != null || item.MyParent != null)
|
||||
{
|
||||
if (item.MyContent.ContentTransitionCount > 0)
|
||||
{
|
||||
//updatedText = Volian.Controls.Library.DisplayText.StaticRemoveRtfStyles(updatedText, item);
|
||||
foreach (TransitionInfo tran in item.MyContent.ContentTransitions)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (item.MyContent.MyGrid != null)
|
||||
updatedText = FixTableTransitionText(updatedText, tran, item.MyContent.Get());
|
||||
else
|
||||
updatedText = FixTransitionText(updatedText, tran);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
|
||||
}
|
||||
// Added for transitions to un-numbered steps
|
||||
if (tran.NewTransToUnNumberedItem) item.NewTransToUnNumberedItem = true;
|
||||
}
|
||||
}
|
||||
if (updatedText.EndsWith(" ")) updatedText = updatedText.Substring(0, updatedText.Length - 1);
|
||||
if (item.MyContent.MyGrid != null)
|
||||
{
|
||||
using (Item itm = item.Get())
|
||||
{
|
||||
updatedText = (updatedText.Replace("<START]", "<START]")).Replace("[END>", "[END>");
|
||||
string sstring = AdjustSizeAndGetSearchString(updatedText, itm);
|
||||
itm.MyContent.Text = sstring;
|
||||
if (item.NewTransToUnNumberedItem)
|
||||
{
|
||||
ItemAnnotation ia = itm.ItemAnnotations.Add(VerificationRequiredType);
|
||||
ia.SearchText = "Transition to un-numbered step";
|
||||
ia.UserID = "Migration";
|
||||
}
|
||||
itm.Save();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.NewTransToUnNumberedItem)
|
||||
{
|
||||
using (Item itm = item.Get())
|
||||
{
|
||||
ItemAnnotation ia = itm.ItemAnnotations.Add(VerificationRequiredType);
|
||||
ia.SearchText = "Transition to un-numbered step";
|
||||
ia.UserID = "Migration";
|
||||
itm.Save();
|
||||
}
|
||||
}
|
||||
using (Content c = item.MyContent.Get())
|
||||
{
|
||||
c.Text = updatedText;
|
||||
c.Save();
|
||||
}
|
||||
}
|
||||
// Added for transitions to un-numbered steps
|
||||
if (checkRTF)
|
||||
{
|
||||
MyStepRTB.MyItemInfo = item;
|
||||
// Force Save - This will put change bars on everything
|
||||
if (MyStepRTB.Text.Contains("(Resolved Transition Text)") != false) MyStepRTB.OrigDisplayText.Save(MyStepRTB);
|
||||
string afterText = item.MyContent.Text;
|
||||
// aftertext is 'newrtf'
|
||||
if (afterText != updatedText)
|
||||
myProblems.RTBProblems.Add(item.ItemID, item.MyContent.ContentID, originalText, updatedText, MyStepRTB.Rtf, afterText, item.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (checkRTF)
|
||||
{
|
||||
Status = "Saving problems";
|
||||
string logFile = _LogPath + @"\RTBProblems.xml";
|
||||
ErrorCount = myProblems.RTBProblems.Count;
|
||||
myProblems.Save(logFile);
|
||||
if (ErrorCount > 0)
|
||||
{
|
||||
System.Windows.Forms.DialogResult answer = System.Windows.Forms.MessageBox.Show(
|
||||
string.Format("{0} Differences found in Transition Text\r\nResults in {1}\r\n\r\nOpen Log File?",
|
||||
ErrorCount, logFile), "Transitions Different", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
|
||||
if(answer == System.Windows.Forms.DialogResult.Yes)
|
||||
System.Diagnostics.Process.Start(logFile);
|
||||
}
|
||||
}
|
||||
Status = "Done comparing";
|
||||
}
|
||||
// Added for transitions to un-numbered steps
|
||||
private AnnotationType _VerificationRequiredType; // Using this to flag table to grid conversions
|
||||
public AnnotationType VerificationRequiredType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_VerificationRequiredType == null)
|
||||
_VerificationRequiredType = AnnotationType.GetByName("Verification Required");
|
||||
return _VerificationRequiredType;
|
||||
}
|
||||
}
|
||||
public string FixTransitionText(string Text, TransitionInfo tran)
|
||||
{
|
||||
if (tran.MyItemToID.ToString().Contains("diamond"))
|
||||
Console.WriteLine();
|
||||
string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1}( [0-9]*){2}\[END>", tran.TranType, tran.TransitionID, "{1,2}");
|
||||
string transText = tran.ResolvePathTo();
|
||||
//Console.WriteLine(">>>>> FixTransitionText");
|
||||
//Console.WriteLine("Text = {0}", Text);
|
||||
//Console.WriteLine("lookFor = {0}", lookFor);
|
||||
//Console.WriteLine("TransText = {0}", transText);
|
||||
Match m = Regex.Match(Text, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[1];
|
||||
if (g.ToString() != transText)
|
||||
Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
else
|
||||
Console.WriteLine("Transition not Found");
|
||||
return Text;
|
||||
}
|
||||
public string FixTableTransitionText(string Text, TransitionInfo tran, Content content)
|
||||
{
|
||||
string lookFor = string.Format(@"<START\]\\cf1\\v0 ([^#]*?)\\cf0\\v #Link:Transition[^:]*?:{0} {1}( [0-9]*){2}\[END>", tran.TranType, tran.TransitionID, "{1,2}");
|
||||
string transText = tran.ResolvePathTo();
|
||||
//Console.WriteLine(">>>>> FixTransitionText");
|
||||
//Console.WriteLine("Text = {0}", Text);
|
||||
//Console.WriteLine("lookFor = {0}", lookFor);
|
||||
//Console.WriteLine("TransText = {0}", transText);
|
||||
Match m = Regex.Match(Text, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[1];
|
||||
if (g.ToString() != transText)
|
||||
Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
else
|
||||
Console.WriteLine("Transition not Found");
|
||||
|
||||
//VlnFlexGrid grd = new VlnFlexGrid(1, 1);
|
||||
//XmlDocument xd = new XmlDocument();
|
||||
//xd.LoadXml(Text);
|
||||
//grd.ReadXml(xd);
|
||||
//grd.FixTableCellsHeightWidth(); // resize the column width/height
|
||||
//using (StringWriter sw = new StringWriter())
|
||||
//{
|
||||
// grd.WriteXml(sw);
|
||||
// //Console.WriteLine(sw.GetStringBuilder().ToString());
|
||||
// content.MyGrid.Data = sw.GetStringBuilder().ToString();
|
||||
// sw.Close();
|
||||
//}
|
||||
return Text;
|
||||
}
|
||||
private string AdjustSizeAndGetSearchString(string strXML, Item itm)
|
||||
{
|
||||
string rstring = "";
|
||||
VlnFlexGrid grd = new VlnFlexGrid(1, 1);
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.LoadXml(strXML);
|
||||
grd.ReadXml(xd);
|
||||
//using (StringReader sr = new StringReader(strXML))
|
||||
//{
|
||||
// grd.ReadXml(sr);
|
||||
// sr.Close();
|
||||
//}
|
||||
grd.FixTableCellsHeightWidth(); // resize the column width/height
|
||||
rstring = grd.GetSearchableText();
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
grd.WriteXml(sw);
|
||||
itm.MyContent.MyGrid.Data = sw.GetStringBuilder().ToString();
|
||||
sw.Close();
|
||||
}
|
||||
return rstring;
|
||||
}
|
||||
}
|
||||
}
|
2699
PROMS/DataLoader/dlgExportImport.cs.bak
Normal file
2699
PROMS/DataLoader/dlgExportImport.cs.bak
Normal file
File diff suppressed because it is too large
Load Diff
545
PROMS/DataLoader/frmLoader.Designer.cs.bak
Normal file
545
PROMS/DataLoader/frmLoader.Designer.cs.bak
Normal file
@@ -0,0 +1,545 @@
|
||||
namespace DataLoader
|
||||
{
|
||||
partial class frmLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
Volian.MSWord.WordDoc.CloseApp();
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.sc = new System.Windows.Forms.SplitContainer();
|
||||
this.lblCurSetFolder = new System.Windows.Forms.Label();
|
||||
this.lblProcessing = new System.Windows.Forms.Label();
|
||||
this.lblTime = new System.Windows.Forms.Label();
|
||||
this.pbStep = new System.Windows.Forms.ProgressBar();
|
||||
this.pbSect = new System.Windows.Forms.ProgressBar();
|
||||
this.pbProc = new System.Windows.Forms.ProgressBar();
|
||||
this.lblStep = new System.Windows.Forms.Label();
|
||||
this.lblSection = new System.Windows.Forms.Label();
|
||||
this.lblProc = new System.Windows.Forms.Label();
|
||||
this.tv = new System.Windows.Forms.TreeView();
|
||||
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.tsslError = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.processToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.completeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.formatOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.convertDBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fixTransitionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertToChangeManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertToApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.load16BitApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fixesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.oldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertSecurityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.convertTopFoldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadTreeFromCSLAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadVETreeFromCSLAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.groupSecurityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.countTokensToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fixAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.approvalDatabasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.updateFormatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fixROValuesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sc.Panel1.SuspendLayout();
|
||||
this.sc.Panel2.SuspendLayout();
|
||||
this.sc.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sc
|
||||
//
|
||||
this.sc.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.sc.Location = new System.Drawing.Point(0, 24);
|
||||
this.sc.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.sc.Name = "sc";
|
||||
this.sc.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// sc.Panel1
|
||||
//
|
||||
this.sc.Panel1.Controls.Add(this.lblCurSetFolder);
|
||||
this.sc.Panel1.Controls.Add(this.lblProcessing);
|
||||
this.sc.Panel1.Controls.Add(this.lblTime);
|
||||
this.sc.Panel1.Controls.Add(this.pbStep);
|
||||
this.sc.Panel1.Controls.Add(this.pbSect);
|
||||
this.sc.Panel1.Controls.Add(this.pbProc);
|
||||
this.sc.Panel1.Controls.Add(this.lblStep);
|
||||
this.sc.Panel1.Controls.Add(this.lblSection);
|
||||
this.sc.Panel1.Controls.Add(this.lblProc);
|
||||
//
|
||||
// sc.Panel2
|
||||
//
|
||||
this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.sc.Panel2.Controls.Add(this.tv);
|
||||
this.sc.Size = new System.Drawing.Size(664, 370);
|
||||
this.sc.SplitterDistance = 134;
|
||||
this.sc.SplitterWidth = 3;
|
||||
this.sc.TabIndex = 46;
|
||||
//
|
||||
// lblCurSetFolder
|
||||
//
|
||||
this.lblCurSetFolder.AutoSize = true;
|
||||
this.lblCurSetFolder.ForeColor = System.Drawing.Color.Blue;
|
||||
this.lblCurSetFolder.Location = new System.Drawing.Point(177, 97);
|
||||
this.lblCurSetFolder.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblCurSetFolder.Name = "lblCurSetFolder";
|
||||
this.lblCurSetFolder.Size = new System.Drawing.Size(16, 13);
|
||||
this.lblCurSetFolder.TabIndex = 75;
|
||||
this.lblCurSetFolder.Text = "...";
|
||||
this.lblCurSetFolder.Visible = false;
|
||||
//
|
||||
// lblProcessing
|
||||
//
|
||||
this.lblProcessing.AutoSize = true;
|
||||
this.lblProcessing.Location = new System.Drawing.Point(7, 97);
|
||||
this.lblProcessing.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblProcessing.Name = "lblProcessing";
|
||||
this.lblProcessing.Size = new System.Drawing.Size(165, 13);
|
||||
this.lblProcessing.TabIndex = 74;
|
||||
this.lblProcessing.Text = "Processing Procedure Set Folder:";
|
||||
this.lblProcessing.Visible = false;
|
||||
//
|
||||
// lblTime
|
||||
//
|
||||
this.lblTime.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.lblTime.Location = new System.Drawing.Point(7, 67);
|
||||
this.lblTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblTime.Name = "lblTime";
|
||||
this.lblTime.Size = new System.Drawing.Size(106, 16);
|
||||
this.lblTime.TabIndex = 58;
|
||||
//
|
||||
// pbStep
|
||||
//
|
||||
this.pbStep.Location = new System.Drawing.Point(115, 41);
|
||||
this.pbStep.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pbStep.Name = "pbStep";
|
||||
this.pbStep.Size = new System.Drawing.Size(375, 12);
|
||||
this.pbStep.TabIndex = 57;
|
||||
//
|
||||
// pbSect
|
||||
//
|
||||
this.pbSect.Location = new System.Drawing.Point(115, 24);
|
||||
this.pbSect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pbSect.Name = "pbSect";
|
||||
this.pbSect.Size = new System.Drawing.Size(375, 12);
|
||||
this.pbSect.TabIndex = 56;
|
||||
//
|
||||
// pbProc
|
||||
//
|
||||
this.pbProc.Location = new System.Drawing.Point(115, 9);
|
||||
this.pbProc.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pbProc.Name = "pbProc";
|
||||
this.pbProc.Size = new System.Drawing.Size(375, 12);
|
||||
this.pbProc.TabIndex = 55;
|
||||
//
|
||||
// lblStep
|
||||
//
|
||||
this.lblStep.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.lblStep.Location = new System.Drawing.Point(7, 47);
|
||||
this.lblStep.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblStep.Name = "lblStep";
|
||||
this.lblStep.Size = new System.Drawing.Size(106, 16);
|
||||
this.lblStep.TabIndex = 49;
|
||||
//
|
||||
// lblSection
|
||||
//
|
||||
this.lblSection.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.lblSection.Location = new System.Drawing.Point(7, 28);
|
||||
this.lblSection.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblSection.Name = "lblSection";
|
||||
this.lblSection.Size = new System.Drawing.Size(106, 15);
|
||||
this.lblSection.TabIndex = 48;
|
||||
//
|
||||
// lblProc
|
||||
//
|
||||
this.lblProc.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.lblProc.Location = new System.Drawing.Point(7, 9);
|
||||
this.lblProc.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblProc.Name = "lblProc";
|
||||
this.lblProc.Size = new System.Drawing.Size(106, 15);
|
||||
this.lblProc.TabIndex = 47;
|
||||
//
|
||||
// tv
|
||||
//
|
||||
this.tv.CheckBoxes = true;
|
||||
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tv.Location = new System.Drawing.Point(0, 0);
|
||||
this.tv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tv.Name = "tv";
|
||||
this.tv.Size = new System.Drawing.Size(664, 233);
|
||||
this.tv.TabIndex = 24;
|
||||
this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand);
|
||||
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1,
|
||||
this.tsslError});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 349);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(664, 45);
|
||||
this.statusStrip1.TabIndex = 47;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.AutoSize = false;
|
||||
this.toolStripStatusLabel1.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(500, 40);
|
||||
this.toolStripStatusLabel1.Text = "Status Information";
|
||||
this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
//
|
||||
// tsslError
|
||||
//
|
||||
this.tsslError.AutoSize = false;
|
||||
this.tsslError.Name = "tsslError";
|
||||
this.tsslError.Size = new System.Drawing.Size(150, 40);
|
||||
this.tsslError.Text = "No Errors";
|
||||
this.tsslError.TextAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.processToolStripMenuItem,
|
||||
this.settingsToolStripMenuItem,
|
||||
this.oldToolStripMenuItem,
|
||||
this.fixAllToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(664, 24);
|
||||
this.menuStrip1.TabIndex = 48;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// processToolStripMenuItem
|
||||
//
|
||||
this.processToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.completeToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.formatOnlyToolStripMenuItem,
|
||||
this.toolStripMenuItem2,
|
||||
this.convertDBToolStripMenuItem,
|
||||
this.fixTransitionsToolStripMenuItem,
|
||||
this.convertToChangeManagerToolStripMenuItem,
|
||||
this.convertToApprovalToolStripMenuItem,
|
||||
this.load16BitApprovalToolStripMenuItem,
|
||||
this.fixesToolStripMenuItem,
|
||||
this.fixROValuesToolStripMenuItem});
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem});
|
||||
this.processToolStripMenuItem.Name = "processToolStripMenuItem";
|
||||
this.processToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
|
||||
this.processToolStripMenuItem.Text = "&Process";
|
||||
//
|
||||
// completeToolStripMenuItem
|
||||
//
|
||||
this.completeToolStripMenuItem.Name = "completeToolStripMenuItem";
|
||||
this.completeToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.completeToolStripMenuItem.Text = "Complete";
|
||||
this.completeToolStripMenuItem.Click += new System.EventHandler(this.completeToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(236, 6);
|
||||
//
|
||||
// formatOnlyToolStripMenuItem
|
||||
//
|
||||
this.formatOnlyToolStripMenuItem.Name = "formatOnlyToolStripMenuItem";
|
||||
this.formatOnlyToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.formatOnlyToolStripMenuItem.Text = "Format Only";
|
||||
this.formatOnlyToolStripMenuItem.Click += new System.EventHandler(this.formatOnlyToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(236, 6);
|
||||
//
|
||||
// convertDBToolStripMenuItem
|
||||
//
|
||||
this.convertDBToolStripMenuItem.Name = "convertDBToolStripMenuItem";
|
||||
this.convertDBToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.convertDBToolStripMenuItem.Text = "Convert DB";
|
||||
this.convertDBToolStripMenuItem.Click += new System.EventHandler(this.convertDBToolStripMenuItem_Click);
|
||||
//
|
||||
// fixTransitionsToolStripMenuItem
|
||||
//
|
||||
this.fixTransitionsToolStripMenuItem.Name = "fixTransitionsToolStripMenuItem";
|
||||
this.fixTransitionsToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.fixTransitionsToolStripMenuItem.Text = "Fix Transitions";
|
||||
this.fixTransitionsToolStripMenuItem.Click += new System.EventHandler(this.fixTransitionsToolStripMenuItem_Click);
|
||||
//
|
||||
// convertToChangeManagerToolStripMenuItem
|
||||
//
|
||||
this.convertToChangeManagerToolStripMenuItem.Name = "convertToChangeManagerToolStripMenuItem";
|
||||
this.convertToChangeManagerToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.convertToChangeManagerToolStripMenuItem.Text = "Convert to Change Manager";
|
||||
this.convertToChangeManagerToolStripMenuItem.Click += new System.EventHandler(this.convertToChangeManagerToolStripMenuItem_Click);
|
||||
//
|
||||
// convertToApprovalToolStripMenuItem
|
||||
//
|
||||
this.convertToApprovalToolStripMenuItem.Name = "convertToApprovalToolStripMenuItem";
|
||||
this.convertToApprovalToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.convertToApprovalToolStripMenuItem.Text = "Convert to Approval";
|
||||
this.convertToApprovalToolStripMenuItem.Click += new System.EventHandler(this.convertToApprovalToolStripMenuItem_Click);
|
||||
//
|
||||
// load16BitApprovalToolStripMenuItem
|
||||
//
|
||||
this.load16BitApprovalToolStripMenuItem.Name = "load16BitApprovalToolStripMenuItem";
|
||||
this.load16BitApprovalToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.load16BitApprovalToolStripMenuItem.Text = "Load 16-Bit Approval";
|
||||
this.load16BitApprovalToolStripMenuItem.Click += new System.EventHandler(this.load16BitApprovalToolStripMenuItem_Click);
|
||||
//
|
||||
// fixesToolStripMenuItem
|
||||
//
|
||||
this.fixesToolStripMenuItem.Name = "fixesToolStripMenuItem";
|
||||
this.fixesToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.fixesToolStripMenuItem.Text = "Fixes";
|
||||
this.fixesToolStripMenuItem.Click += new System.EventHandler(this.fixesToolStripMenuItem_Click);
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.settingsToolStripMenuItem.Text = "&Settings";
|
||||
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
|
||||
//
|
||||
// oldToolStripMenuItem
|
||||
//
|
||||
this.oldToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.convertSecurityToolStripMenuItem,
|
||||
this.toolStripMenuItem4,
|
||||
this.convertTopFoldersToolStripMenuItem,
|
||||
this.loadTreeFromCSLAToolStripMenuItem,
|
||||
this.loadVETreeFromCSLAToolStripMenuItem,
|
||||
this.groupSecurityToolStripMenuItem,
|
||||
this.countTokensToolStripMenuItem,
|
||||
this.toolStripMenuItem3,
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem});
|
||||
this.oldToolStripMenuItem.Name = "oldToolStripMenuItem";
|
||||
this.oldToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
|
||||
this.oldToolStripMenuItem.Text = "Old";
|
||||
//
|
||||
// convertSecurityToolStripMenuItem
|
||||
//
|
||||
this.convertSecurityToolStripMenuItem.Name = "convertSecurityToolStripMenuItem";
|
||||
this.convertSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.convertSecurityToolStripMenuItem.Text = "Convert Security";
|
||||
this.convertSecurityToolStripMenuItem.Click += new System.EventHandler(this.convertSecurityToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(221, 6);
|
||||
//
|
||||
// convertTopFoldersToolStripMenuItem
|
||||
//
|
||||
this.convertTopFoldersToolStripMenuItem.Name = "convertTopFoldersToolStripMenuItem";
|
||||
this.convertTopFoldersToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.convertTopFoldersToolStripMenuItem.Text = "Convert Top Folders";
|
||||
this.convertTopFoldersToolStripMenuItem.Click += new System.EventHandler(this.convertTopFoldersToolStripMenuItem_Click);
|
||||
//
|
||||
// loadTreeFromCSLAToolStripMenuItem
|
||||
//
|
||||
this.loadTreeFromCSLAToolStripMenuItem.Name = "loadTreeFromCSLAToolStripMenuItem";
|
||||
this.loadTreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.loadTreeFromCSLAToolStripMenuItem.Text = "Load Tree From CSLA";
|
||||
this.loadTreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadTreeFromCSLAToolStripMenuItem_Click);
|
||||
//
|
||||
// loadVETreeFromCSLAToolStripMenuItem
|
||||
//
|
||||
this.loadVETreeFromCSLAToolStripMenuItem.Name = "loadVETreeFromCSLAToolStripMenuItem";
|
||||
this.loadVETreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.loadVETreeFromCSLAToolStripMenuItem.Text = "Load VETree From CSLA";
|
||||
this.loadVETreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadVETreeFromCSLAToolStripMenuItem_Click);
|
||||
//
|
||||
// groupSecurityToolStripMenuItem
|
||||
//
|
||||
this.groupSecurityToolStripMenuItem.Name = "groupSecurityToolStripMenuItem";
|
||||
this.groupSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.groupSecurityToolStripMenuItem.Text = "Group/Security";
|
||||
this.groupSecurityToolStripMenuItem.Click += new System.EventHandler(this.groupSecurityToolStripMenuItem_Click);
|
||||
//
|
||||
// countTokensToolStripMenuItem
|
||||
//
|
||||
this.countTokensToolStripMenuItem.Name = "countTokensToolStripMenuItem";
|
||||
this.countTokensToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.countTokensToolStripMenuItem.Text = "Count Tokens";
|
||||
this.countTokensToolStripMenuItem.Click += new System.EventHandler(this.countTokensToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(221, 6);
|
||||
//
|
||||
// convertDbfSelectedInTreeToolStripMenuItem
|
||||
//
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem.Name = "convertDbfSelectedInTreeToolStripMenuItem";
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem.Text = "Convert Dbf Selected In Tree";
|
||||
this.convertDbfSelectedInTreeToolStripMenuItem.Click += new System.EventHandler(this.convertDbfSelectedInTreeToolStripMenuItem_Click);
|
||||
//
|
||||
// fixAllToolStripMenuItem
|
||||
//
|
||||
this.fixAllToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.approvalDatabasesToolStripMenuItem,
|
||||
this.updateFormatsToolStripMenuItem});
|
||||
this.fixAllToolStripMenuItem.Name = "fixAllToolStripMenuItem";
|
||||
this.fixAllToolStripMenuItem.Size = new System.Drawing.Size(50, 20);
|
||||
this.fixAllToolStripMenuItem.Text = "Fix All";
|
||||
//
|
||||
// approvalDatabasesToolStripMenuItem
|
||||
//
|
||||
this.approvalDatabasesToolStripMenuItem.Name = "approvalDatabasesToolStripMenuItem";
|
||||
this.approvalDatabasesToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
|
||||
this.approvalDatabasesToolStripMenuItem.Text = "Approval Databases";
|
||||
this.approvalDatabasesToolStripMenuItem.Click += new System.EventHandler(this.approvalDatabasesToolStripMenuItem_Click);
|
||||
//
|
||||
// updateFormatsToolStripMenuItem
|
||||
//
|
||||
this.updateFormatsToolStripMenuItem.Name = "updateFormatsToolStripMenuItem";
|
||||
this.updateFormatsToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
|
||||
this.updateFormatsToolStripMenuItem.Text = "Update Formats";
|
||||
this.updateFormatsToolStripMenuItem.Click += new System.EventHandler(this.updateFormatsToolStripMenuItem_Click);
|
||||
//
|
||||
// fixROValuesToolStripMenuItem
|
||||
//
|
||||
this.fixROValuesToolStripMenuItem.Name = "fixROValuesToolStripMenuItem";
|
||||
this.fixROValuesToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
|
||||
this.fixROValuesToolStripMenuItem.Text = "Fix RO Values";
|
||||
this.fixROValuesToolStripMenuItem.Click += new System.EventHandler(this.fixROValuesToolStripMenuItem_Click);
|
||||
//
|
||||
// createEmptyPROMSDatabaseToolStripMenuItem
|
||||
//
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem.Name = "createEmptyPROMSDatabaseToolStripMenuItem";
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem.Text = "Create Empty PROMS Database";
|
||||
this.createEmptyPROMSDatabaseToolStripMenuItem.Click += new System.EventHandler(this.createEmptyPROMSDatabaseToolStripMenuItem_Click);
|
||||
//
|
||||
// frmLoader
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(664, 394);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.sc);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.Name = "frmLoader";
|
||||
this.Text = "PROMS-2010 Data Loader";
|
||||
this.Load += new System.EventHandler(this.frmLoader_Load);
|
||||
this.sc.Panel1.ResumeLayout(false);
|
||||
this.sc.Panel1.PerformLayout();
|
||||
this.sc.Panel2.ResumeLayout(false);
|
||||
this.sc.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer sc;
|
||||
private System.Windows.Forms.Label lblTime;
|
||||
private System.Windows.Forms.ProgressBar pbStep;
|
||||
private System.Windows.Forms.ProgressBar pbSect;
|
||||
private System.Windows.Forms.ProgressBar pbProc;
|
||||
private System.Windows.Forms.Label lblStep;
|
||||
private System.Windows.Forms.Label lblSection;
|
||||
private System.Windows.Forms.Label lblProc;
|
||||
private System.Windows.Forms.TreeView tv;
|
||||
private System.Windows.Forms.FolderBrowserDialog fbd;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsslError;
|
||||
private System.Windows.Forms.Label lblCurSetFolder;
|
||||
private System.Windows.Forms.Label lblProcessing;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem processToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem completeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem formatOnlyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertDBToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fixTransitionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertToChangeManagerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertToApprovalToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem oldToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertSecurityToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertTopFoldersToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadTreeFromCSLAToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadVETreeFromCSLAToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem groupSecurityToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem countTokensToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertDbfSelectedInTreeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem load16BitApprovalToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fixesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fixAllToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem approvalDatabasesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem updateFormatsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fixROValuesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem createEmptyPROMSDatabaseToolStripMenuItem;
|
||||
}
|
||||
}
|
1190
PROMS/DataLoader/frmLoader.cs.bak
Normal file
1190
PROMS/DataLoader/frmLoader.cs.bak
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,135 @@
|
||||
Computer Name: KATHY-VISTA
|
||||
Data Set: c:\16bit\debug\veaep\aop1.prc
|
||||
Bad OldToNew Document Style 001-006:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc013.A03
|
||||
Error in
|
||||
Bad OldToNew Document Style 002-001:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\PROC009.A03
|
||||
Bad OldToNew Document Style 012-005:Attachment C dStyleIndex = 'A '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 1024
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc022.A06
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A04
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A08
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A07
|
||||
Missing Transition Destination 017-001|K0 - 9464
|
||||
Missing Transition Destination 017-001|J0 - 9463
|
||||
Missing Transition Destination 001-006|A?S3 - 853
|
||||
Missing Transition Destination 017-001|F0 - 9652
|
||||
Missing Transition Destination 017-001|E0 - 9514
|
||||
Missing Transition Destination 017-001|B1S - 9584
|
||||
Missing Transition Destination 017-001|B0 - 9589
|
||||
Missing Transition Destination 016.004|J=S7 - 7979
|
||||
Missing Transition Destination 017-001|I0 - 9244
|
||||
Missing Transition Destination 016-004|AÇS - 7602
|
||||
Data Set: c:\16bit\debug\veaep\du1.prc
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTRLRM1.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTRLRM2.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTLRM12.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTLRM11.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\STMTABLE.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\HV2.GIF
|
||||
Bad OldToNew Document Style E-0:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-0.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ES02.A05
|
||||
Bad OldToNew Document Style ES-0.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ES03.A03
|
||||
Bad OldToNew Document Style ES-0.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style E-1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style E-3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA00.A01
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA00.A04
|
||||
Bad OldToNew Document Style ECA-0.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA11.A03
|
||||
Bad OldToNew Document Style ECA-1.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc022.A03
|
||||
Bad OldToNew Document Style ECA-1.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-2.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA31.A03
|
||||
Bad OldToNew Document Style ECA-3.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-3.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-3.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc004.A07
|
||||
MigrateRos 'F-0.5' 'A2S' 0
|
||||
ArgumentNullException - Value cannot be null.
|
||||
Parameter name: input at System.Text.RegularExpressions.Regex.Replace(String input, String replacement)
|
||||
at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, String replacement)
|
||||
at DataLoader.TextConvert.ConvertDOSSuperAndSubScripts(String instr) in C:\Development\PROMS\DataLoader\TextConvert.cs:line 218
|
||||
at DataLoader.Loader.MigrateRos(OleDbConnection cn, String textm, String seqcvt, Content content, DocVersion docver, Boolean conv_caret) in C:\Development\PROMS\DataLoader\RefObjs.cs:line 81
|
||||
Bad OldToNew Document Style FR-C.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-C.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-C.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-H.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRP1.A03
|
||||
Bad OldToNew Document Style FR-P.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRP2.A03
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRI3.A03
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRI3.A04
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc009.A05
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc012.A02
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc020.A02
|
||||
Missing Transition Destination ECA-1.1|BNS36 - 15533
|
||||
Missing Transition Destination ES-3.1|BIS - 22871
|
||||
Missing Transition Destination F-0.2|D0 - 18727
|
||||
Missing Transition Destination ECA-1.3|AUS33 - 16163
|
||||
Missing Transition Destination ECA-1.3|AUS36 - 16164
|
||||
Missing Transition Destination ECA-3.3|BBS - 22594
|
||||
Missing Transition Destination F-0.5|C0 - 20949
|
||||
Missing Transition Destination ECA-1.1|BFS33 - 15441
|
||||
Missing Transition Destination ES-0.2|B;S2 - 10712
|
||||
Missing Transition Destination ECA-2.1|B9S43 - 16564
|
||||
Missing Transition Destination ES-1.3|A6SB - 12507
|
||||
Missing Transition Destination F-0.6|E0 - 21213
|
||||
Missing Transition Destination ECA-2.1|B9S46 - 16565
|
||||
Missing Transition Destination F-0.6|C0 - 21117
|
||||
Missing Transition Destination FR-C.1|BFS25 - 19037
|
||||
Missing Transition Destination FR-H.1|ABS - 20220
|
||||
Missing Transition Destination E-1|B>S32 - 11248
|
||||
Missing Transition Destination E-1|B>S34 - 11249
|
||||
Missing Transition Destination F-0.3|C0 - 19579
|
||||
Missing Transition Destination FR-C.1|BFS26 - 19048
|
||||
Missing Transition Destination ECA-3.2|B0S - 17180
|
||||
Missing Transition Destination SUP-015|C0 - 20660
|
||||
Missing Transition Destination FR-C.2|B@S36 - 19440
|
||||
Missing Transition Destination FR-C.1|B@S36 - 18954
|
||||
Missing Transition Destination F-0.4|B0 - 12823
|
||||
Missing Transition Destination ECA-1.3|ANS36 - 16076
|
||||
Missing Transition Destination ECA-0.1|A5S - 14908
|
||||
Missing Transition Destination E-3|CES - 13327
|
||||
Missing Transition Destination ECA-1.1|BFS36 - 15442
|
||||
Missing Transition Destination ECA-1.3|ANS33 - 16075
|
||||
Missing Transition Destination ECA-1.1|BNS33 - 15532
|
||||
Missing Transition Destination F-0.1|C0 - 18472
|
||||
Missing Transition Destination FR-C.1|BIS36 - 19111
|
||||
Conversion completion time: 00:10:24.74
|
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DataLoaderGlitches xmlns="http://www.volian.com">
|
||||
<Glitches>
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 PPH" NewText="240x10\up2 3\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 PPH" NewText="240x10\up2 3\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 PPH" NewText="1.42x10\up2 6\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="9.E4 cps" NewText="9x10\up2 4\up0 cps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="Steam Flow - 0.71.E6 pph" NewText="Steam Flow - 0.71x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="470.E3 pph" NewText="470x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="50.E3 pph" NewText="50x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="50.E3 pph" NewText="50x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
</Glitches>
|
||||
</DataLoaderGlitches>
|
@@ -0,0 +1,181 @@
|
||||
Computer Name: KATHY-VISTA
|
||||
Data Set: c:\16bit\debug\veaep\aop1.prc
|
||||
Bad OldToNew Document Style 001-006:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc013.A03
|
||||
Error in
|
||||
Bad OldToNew Document Style 002-001:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\PROC009.A03
|
||||
Bad OldToNew Document Style 012-005:Attachment C dStyleIndex = 'A '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 1024
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc022.A06
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A04
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A08
|
||||
Processing c:\16bit\debug\veaep\aop1.prc\rtffiles\proc031.A07
|
||||
Missing Transition Destination 017-001|K0 - 9495
|
||||
Missing Transition Destination 017-001|J0 - 9494
|
||||
Missing Transition Destination 001-006|A?S3 - 884
|
||||
Missing Transition Destination 017-001|F0 - 9683
|
||||
Missing Transition Destination 017-001|E0 - 9545
|
||||
Missing Transition Destination 017-001|B1S - 9615
|
||||
Missing Transition Destination 017-001|B0 - 9620
|
||||
Missing Transition Destination 016.004|J=S7 - 8010
|
||||
Missing Transition Destination 017-001|I0 - 9275
|
||||
Missing Transition Destination 016-004|AÇS - 7633
|
||||
Data Set: c:\16bit\debug\veaep\appr1.prc
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A02
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A04
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A06
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A09
|
||||
Error in
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc001.A08
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc002.A06
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc003.A04
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc003.A08
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc003.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc003.A06
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc004.A04
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc004.A09
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc004.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc004.A07
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc005.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc000.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc007.A03
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc008.A06
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc008.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc009.A03
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc010.A03
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc011.A05
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc012.A03
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc013.A10
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc014.A02
|
||||
Bad OldToNew Document Style R-8:Table R-8-A dStyleIndex = 'I '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 32
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc023.A02
|
||||
Bad OldToNew Document Style R-8:Table R-8-B dStyleIndex = 'I '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 32
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc023.A04
|
||||
Bad OldToNew Document Style R-8:Table R-8-C dStyleIndex = 'I '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 32
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc023.A06
|
||||
Bad OldToNew Document Style R-8:Table R-8-D dStyleIndex = 'I '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP & AOP Single Column Attachment Pages - BOLD STEPS (AEP01) - Missing OldToNew 32
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc023.A08
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc027.A25
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc027.A26
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc027.A27
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc027.A28
|
||||
Processing c:\16bit\debug\veaep\appr1.prc\rtffiles\proc027.A29
|
||||
Missing Transition Destination R-12|A6S - 14134
|
||||
Data Set: c:\16bit\debug\veaep\du1.prc
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTRLRM1.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTRLRM2.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTLRM12.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\CNTLRM11.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\STMTABLE.GIF
|
||||
Cannot Find Image File c:\16bit\debug\veaep\ro\HV2.GIF
|
||||
Bad OldToNew Document Style E-0:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-0.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ES02.A05
|
||||
Bad OldToNew Document Style ES-0.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ES03.A03
|
||||
Bad OldToNew Document Style ES-0.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style E-1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-1.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style E-3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ES-3.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA00.A01
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA00.A04
|
||||
Bad OldToNew Document Style ECA-0.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA11.A03
|
||||
Bad OldToNew Document Style ECA-1.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc022.A03
|
||||
Bad OldToNew Document Style ECA-1.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-2.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\ECA31.A03
|
||||
Bad OldToNew Document Style ECA-3.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-3.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style ECA-3.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc004.A07
|
||||
MigrateRos 'F-0.5' 'A2S' 0
|
||||
ArgumentNullException - Value cannot be null.
|
||||
Parameter name: input at System.Text.RegularExpressions.Regex.Replace(String input, String replacement)
|
||||
at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, String replacement)
|
||||
at DataLoader.TextConvert.ConvertDOSSuperAndSubScripts(String instr) in C:\Development\PROMS\DataLoader\TextConvert.cs:line 218
|
||||
at DataLoader.Loader.MigrateRos(OleDbConnection cn, String textm, String seqcvt, Content content, DocVersion docver, Boolean conv_caret) in C:\Development\PROMS\DataLoader\RefObjs.cs:line 81
|
||||
Bad OldToNew Document Style FR-C.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-C.2:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-C.3:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Bad OldToNew Document Style FR-H.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRP1.A03
|
||||
Bad OldToNew Document Style FR-P.1:FOLDOUT dStyleIndex = '0 '
|
||||
D.C. Cook EOP and AOP Format - D.C. Cook EOP - Foldout Pages (AEP00) - Missing OldToNew 1
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRP2.A03
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRI3.A03
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\FRI3.A04
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc009.A05
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc012.A02
|
||||
Processing c:\16bit\debug\veaep\du1.prc\rtffiles\proc020.A02
|
||||
Missing Transition Destination ECA-1.1|BNS36 - 20870
|
||||
Missing Transition Destination ES-3.1|BIS - 28208
|
||||
Missing Transition Destination F-0.2|D0 - 24064
|
||||
Missing Transition Destination ECA-1.3|AUS33 - 21500
|
||||
Missing Transition Destination ECA-1.3|AUS36 - 21501
|
||||
Missing Transition Destination ECA-3.3|BBS - 27931
|
||||
Missing Transition Destination F-0.5|C0 - 26286
|
||||
Missing Transition Destination ECA-1.1|BFS33 - 20778
|
||||
Missing Transition Destination ES-0.2|B;S2 - 16049
|
||||
Missing Transition Destination ECA-2.1|B9S43 - 21901
|
||||
Missing Transition Destination ES-1.3|A6SB - 17844
|
||||
Missing Transition Destination F-0.6|E0 - 26550
|
||||
Missing Transition Destination ECA-2.1|B9S46 - 21902
|
||||
Missing Transition Destination F-0.6|C0 - 26454
|
||||
Missing Transition Destination FR-C.1|BFS25 - 24374
|
||||
Missing Transition Destination FR-H.1|ABS - 25557
|
||||
Missing Transition Destination E-1|B>S32 - 16585
|
||||
Missing Transition Destination E-1|B>S34 - 16586
|
||||
Missing Transition Destination F-0.3|C0 - 24916
|
||||
Missing Transition Destination FR-C.1|BFS26 - 24385
|
||||
Missing Transition Destination ECA-3.2|B0S - 22517
|
||||
Missing Transition Destination SUP-015|C0 - 25997
|
||||
Missing Transition Destination FR-C.2|B@S36 - 24777
|
||||
Missing Transition Destination FR-C.1|B@S36 - 24291
|
||||
Missing Transition Destination F-0.4|B0 - 18160
|
||||
Missing Transition Destination ECA-1.3|ANS36 - 21413
|
||||
Missing Transition Destination ECA-0.1|A5S - 20245
|
||||
Missing Transition Destination E-3|CES - 18664
|
||||
Missing Transition Destination ECA-1.1|BFS36 - 20779
|
||||
Missing Transition Destination ECA-1.3|ANS33 - 21412
|
||||
Missing Transition Destination ECA-1.1|BNS33 - 20869
|
||||
Missing Transition Destination F-0.1|C0 - 23809
|
||||
Missing Transition Destination FR-C.1|BIS36 - 24448
|
||||
Conversion completion time: 00:13:35.809
|
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DataLoaderGlitches xmlns="http://www.volian.com">
|
||||
<Glitches>
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 PPH" NewText="240x10\up2 3\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 PPH" NewText="240x10\up2 3\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 PPH" NewText="1.42x10\up2 6\up0 PPH" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="9.E4 cps" NewText="9x10\up2 4\up0 cps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="Steam Flow - 0.71.E6 pph" NewText="Steam Flow - 0.71x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="470.E3 pph" NewText="470x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="6.E-11 amps" NewText="6x10\up2 -11\up0 amps" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="450.E3 pph" NewText="450x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.E-5%" NewText="10\up2 -5\up0 %" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="1.42E6 pph" NewText="1.42x10\up2 6\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="50.E3 pph" NewText="50x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="50.E3 pph" NewText="50x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="240.E3 pph" NewText="240x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
<Glitch Cause="ConvertFortranFormatToScienctificNotation" OriginalText="25.E3 pph" NewText="25x10\up2 3\up0 pph" />
|
||||
</Glitches>
|
||||
</DataLoaderGlitches>
|
BIN
PROMS/DataLoader/logfile/AEP Database & Log Files/VEPROMS.zip
Normal file
BIN
PROMS/DataLoader/logfile/AEP Database & Log Files/VEPROMS.zip
Normal file
Binary file not shown.
2
PROMS/DataLoader/logfile/Backup.bat
Normal file
2
PROMS/DataLoader/logfile/Backup.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS] to disk = 'C:\Development\PROMS\DataLoader\logfile\.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMS.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMS.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMS.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMSRGE_AbbyProc.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMSRGE_AbbyProc.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMSRGE_AbbyProc] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSRGE_AbbyProc.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMSRGE_Rev1SAMG.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMSRGE_Rev1SAMG.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMSRGE_Rev1SAMG] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSRGE_Rev1SAMG.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNADM_AI.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNADM_AI.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMSWCNADM_AI] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNADM_AI.bak'"
|
||||
pause
|
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCNALR_ALRCR] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNALR_ALRCRJune11.bak'"
|
||||
pause
|
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCNALR_ALRCR] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNALR_ALRCRJune12.bak'"
|
||||
pause
|
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCNALR_ALRLOCAL] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNALR_ALRLOCALJune12.bak'"
|
||||
pause
|
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCNCAP_AI] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNCAP_AIJune12.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNFP.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNFP.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMSWCNFP] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNFP.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNSYS_SYS.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMSWCNSYS_SYS.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCNSYS_SYS] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMSWCNSYS_SYS.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMS_RGE_EOPS.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMS_RGE_EOPS.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_Ginna_EOPS] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMS_RGE_EOPS.bak'"
|
||||
pause
|
2
PROMS/DataLoader/logfile/BackupVEPROMS_WCN_EMGS.bat
Normal file
2
PROMS/DataLoader/logfile/BackupVEPROMS_WCN_EMGS.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
sqlcmd -E -S.\sqlexpress -Q "backup database [VEPROMS_WCN_EMGS] to disk = 'C:\Development\PROMS\DataLoader\logfile\VEPROMS_WCN_EMGS.bak'"
|
||||
pause
|
1022
PROMS/DataLoader/logfile/ConversionErrors.txt
Normal file
1022
PROMS/DataLoader/logfile/ConversionErrors.txt
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user