Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
; This file is maintained by HCW. Do not modify this file directly.
[OPTIONS]
HCW=0
COMPRESS=12 Hall Zeck
ERRORLOG=.\MngData.ERR
LCID=0x409 0x0 0x0 ;Anglais - E.U.
REPORT=Yes
CONTENTS=IDH_J_SUMMARY
TITLE=Vss Data Manager
COPYRIGHT=Automatic Vss Data Manager Help @copyright 1997 Ubi Simulations
CITATION=Automatic Vss Data Manager Help @copyright 1997 Ubi Simulations
BUILD=WINDOWS
TMPDIR=..\..\..\..\TEMP
PREFIX=IDH_
BMROOT=Bitmap
HLP=..\MngData5.hlp
[FILES]
.\MngData5.RTF
[BUILDTAGS]
WINDOWS
[MAP]
IDH_J_BUGS=1
IDH_J_CHANGINGLOCALPATH=2
IDH_J_CONFIGFILELIST=3
IDH_J_CONFLICT=4
IDH_J_FAQ=5
IDH_J_INIFILE=6
IDH_J_INTERFACE=7
IDH_J_ITF_COMMANDBUTTONS=8
IDH_J_ITF_INFOS=9
IDH_J_ITF_RESULTWINDOW=10
IDH_J_LOGIN=11
IDH_J_OBTAIN=12
IDH_J_REQUESTS=13
IDH_J_REQUIREMENTS=14
IDH_J_SECTIONFILELIST=15
IDH_J_SECTIONOBTAINING=16
IDH_J_SECTIONTARGETPATH=17
IDH_J_SECTIONVSS=18
IDH_J_SECTIONWINPREF=19
IDH_J_STARTING=20
IDH_J_SUMMARY=21
IDH_J_UPDATE=22
IDH_J_UPDATEOPTIONS=23
IDH_J_VIEWMODIF=24
IDH_J_WAIT=25
IDH_P_BROWSE=26
IDH_P_HELP=27
IDH_P_INOBTAIN=28
IDH_P_INUPDATE=29
IDH_P_LOCALPATH=30
IDH_P_LOOKINOBTAIN=31
IDH_P_LOOKINUPDATE=32
IDH_P_ME=33
IDH_P_MESSAGEERROR=34
IDH_P_MODIF=35
IDH_P_MODIFLIST=36
IDH_P_MORE=37
IDH_P_OBTAIN=38
IDH_P_OBTAININGTIME=39
IDH_P_QUIT=40
IDH_P_REFRESH=41
IDH_P_RESULTVIEW=42
IDH_P_UPDATE=43
IDH_P_VIEWMODIF=44
IDH_P_VSSEXE=45
IDH_P_VSSPATH=46
[WINDOWS]
main="",,28676
(w95sec)="",,20740,(r14745599),(r14745599),f2
[CONFIG]
BrowseButtons()
CreateButton( IDB_SUMMARY, "First Page", JumpID( IDH_J_SUMMARY) )

View File

@@ -0,0 +1,467 @@
{\rtf1\ansi \deff7\deflang1033{\fonttbl{\f0\froman\fcharset0\fprq2 Tms Rmn;}{\f1\froman\fcharset2\fprq2 Symbol;}{\f2\fswiss\fcharset0\fprq2 Helv;}{\f3\fmodern\fcharset0\fprq1 Courier;}
{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f6\froman\fcharset0\fprq2 MS Serif;}{\f7\fswiss\fcharset0\fprq2 MS Sans Serif;}{\f8\froman\fcharset0\fprq2 Times;}{\f9\fswiss\fcharset0\fprq2 Helvetica;}
{\f10\fswiss\fcharset0\fprq2 System;}{\f11\fmodern\fcharset0\fprq1 Courier New;}{\f12\froman\fcharset0\fprq2 New York;}{\f13\fswiss\fcharset0\fprq2 Geneva;}{\f14\fmodern\fcharset0\fprq1 LinePrinter;}{\f15\froman\fcharset0\fprq2 CG Times;}
{\f16\fswiss\fcharset0\fprq2 Univers;}{\f17\fswiss\fcharset0\fprq2 Univers Condensed;}{\f18\fswiss\fcharset0\fprq2 Antique Olive;}{\f19\froman\fcharset0\fprq2 Garamond;}{\f20\fswiss\fcharset0\fprq2 CG Omega;}{\f21\fswiss\fcharset0\fprq2 Albertus Medium;}
{\f22\fswiss\fcharset0\fprq2 Albertus Extra Bold;}{\f23\froman\fcharset0\fprq2 Clarendon Condensed;}{\f24\fscript\fcharset0\fprq2 Coronet;}{\f25\fmodern\fcharset0\fprq1 Letter Gothic;}{\f26\fscript\fcharset0\fprq2 Marigold;}
{\f27\fnil\fcharset2\fprq2 Wingdings;}{\f28\fnil\fcharset2\fprq2 Marlett;}{\f29\fmodern\fcharset0\fprq1 Lucida Console;}{\f30\fswiss\fcharset0\fprq2 Lucida Sans Unicode;}{\f31\fswiss\fcharset0\fprq2 Verdana;}{\f32\froman\fcharset2\fprq2 MT Extra;}
{\f33\fswiss\fcharset0\fprq2 Arial Narrow;}{\f34\fswiss\fcharset0\fprq2 Arial Black;}{\f35\fswiss\fcharset0\fprq2 Arial Rounded MT Bold;}{\f36\froman\fcharset0\fprq2 Book Antiqua;}{\f37\froman\fcharset0\fprq2 Bookman Old Style;}
{\f38\fswiss\fcharset0\fprq2 Century Gothic;}{\f39\froman\fcharset0\fprq2 Century Schoolbook;}{\f40\fswiss\fcharset0\fprq2 Haettenschweiler;}{\f41\fdecor\fcharset0\fprq2 Algerian;}{\f42\fdecor\fcharset0\fprq2 Braggadocio;}
{\f43\fswiss\fcharset0\fprq2 Britannic Bold;}{\f44\fscript\fcharset0\fprq2 Brush Script MT;}{\f45\fdecor\fcharset0\fprq2 Colonna MT;}{\f46\fdecor\fcharset0\fprq2 Desdemona;}{\f47\froman\fcharset0\fprq2 Footlight MT Light;}
{\f48\fswiss\fcharset0\fprq2 Impact;}{\f49\fdecor\fcharset0\fprq2 Kino MT;}{\f50\froman\fcharset0\fprq2 Wide Latin;}{\f51\fscript\fcharset0\fprq2 Matura MT Script Capitals;}{\f52\fdecor\fcharset0\fprq2 Playbill;}{\f53\fmodern\fcharset2\fprq1 MS LineDraw;}
{\f54\fscript\fcharset0\fprq2 Comic Sans MS;}{\f55\fswiss\fcharset0\fprq2 Tahoma;}{\f56\fswiss\fcharset0\fprq2 Abadi MT Condensed;}{\f57\froman\fcharset2\fprq2 Wingdings 2;}{\f58\froman\fcharset2\fprq2 Wingdings 3;}{\f59\froman\fcharset255\fprq2 Roman;}
{\f60\fscript\fcharset255\fprq2 Script;}{\f61\fmodern\fcharset255\fprq2 Modern;}{\f62\fswiss\fcharset0\fprq1 MS Dialog;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;
\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
{\stylesheet{\li115\ri130\sa48\widctlpar \f7\fs20 \snext0 Normal;}{\s1\li115\ri130\sb80\sa120\widctlpar \b\f7\fs20\kerning28 \sbasedon0\snext0 heading 1;}{\s2\li360\ri360\sb120\sa48\widctlpar \b\f7 \sbasedon0\snext0 heading 2;}{
\s3\li115\ri130\sb240\sa60\keepn\widctlpar \b\f7 \sbasedon0\snext0 heading 3;}{\s4\li360\ri130\sa48\widctlpar \f7 \sbasedon0\snext0 heading 4;}{\s5\li115\ri130\sb240\sa60\widctlpar \f7\fs22 \sbasedon0\snext0 heading 5;}{
\s6\li115\ri130\sb240\sa60\widctlpar \i\f7\fs22 \sbasedon0\snext0 heading 6;}{\s7\li115\ri130\sb240\sa60\widctlpar \f7\fs20 \sbasedon0\snext0 heading 7;}{\s8\li115\ri130\sb240\sa60\widctlpar \i\f7\fs20 \sbasedon0\snext0 heading 8;}{
\s9\li115\ri130\sb240\sa60\widctlpar \i\f7\fs18 \sbasedon0\snext0 heading 9;}{\*\cs10 \additive Default Paragraph Font;}{\s15\li115\ri130\sa48\widctlpar \f7\fs20 \sbasedon0\snext15 footnote text;}{\*\cs16 \additive\super \sbasedon10 footnote reference;}{
\s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \snext0 Titre Jump topic;}{\s18\li302\ri130\sa48\widctlpar \f7\fs20 \sbasedon0\snext18 Topic Text Indent;}{\s19\li720\ri130\sa48\widctlpar \f7\fs20 \sbasedon0\snext19 Normal Indent;}{
\s20\li115\ri130\sb80\sa120\widctlpar \b\f7\fs20\kerning28 \sbasedon1\snext0 Tip/Note Heading;}{\s21\li302\ri130\sa48\widctlpar \f7\fs20 \sbasedon0\snext21 Tip/Note Text;}{\s22\fi-187\li302\ri130\sa48\widctlpar\tx302{\*\pn \pnlvl11
\pnf27\pnfs10\pnstart1\pnindent187\pnhang{\pntxtb n}}\f7\fs20 \sbasedon21\snext22 Tip/Note Text Bulleted;}{\s23\fi-187\li302\ri130\sa48\widctlpar\tx302{\*\pn \pnlvl11\pnf27\pnfs10\pnstart1\pnindent187\pnhang{\pntxtb n}}\f7\fs20 \sbasedon0\snext23
Topic Text Bulleted;}{\s24\fi-187\li302\ri130\sa48\widctlpar\tx302{\*\pn \pnlvl10\pndec\pnb0\pni0\pnf5\pnfs16\pnstart1\pnindent187\pnhang}\f7\fs20 \sbasedon0\snext24 Topic Text Numbered;}}{\info{\title Help Project generated with RoboHELP\'ae 95.}
{\author Lhullier vincent}{\operator Lhullier vincent}{\creatim\yr1997\mo4\dy3\hr18\min34}{\revtim\yr1997\mo7\dy23\hr15\min39}{\version30}{\edmins222}{\nofpages40}{\nofwords3530}{\nofchars20123}{\*\company PARTICULIER}{\vern57443}}
\margl1417\margr1417\margt1417\margb1417 \widowctrl\ftnbj\aenddoc\hyphhotz425\noextrasprl\prcolbl\cvmme\sprsspbf\brkfrm\swpbdr\hyphcaps0\fracwidth \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang
{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}
{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9
\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 {\cs16\super {\*\bkmkstart ROBOHELP}#{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SUMMARY}} {
\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super $} Vss Data Manager}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Manager; Data; Vss}} {\cs16\super +{\footnote
\pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0010}} Vss Data Manager
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 This Help file describe how to use the MngData utility which provide simple interface to obtain / update data from a vss data base.
\par
\par \{bmc Ico_open.bmp\} {\uldb Requirements}{\v IDH_J_REQUIREMENTS}\line \{bmc Ico_open.bmp\} {\uldb Ini File}{\v IDH_J_INIFILE}\line
\par \{bmc Ico_open.bmp\} {\uldb Starting with Vss Data Manager}{\v IDH_J_STARTING}\line \{bmc Ico_How2.bmp\} {\uldb How to obtain data}{\v IDH_J_OBTAIN}\line \{bmc Ico_How2.bmp\} {\uldb How to update data}{\v IDH_J_UPDATE}\line \line \{bmc Ico_open.bmp\} {
\uldb Interface}{\v IDH_J_INTERFACE}\line \line \{bmc Ico_Mark.BMP\} {\uldb Frequently Asked Questions}{\v IDH_J_FAQ}\line \{bmc Ico_Mark.BMP\} {\uldb Questions and Request}{\v {\*\bkmkstart IMAGE}{\*\bkmkend IMAGE}IDH_J_REQUESTS}
\par \{bmc Ico_Bugs.BMP\} {\uldb Reported bugs}{\v IDH_J_BUGS}\line {\*\bkmkend ROBOHELP}\line
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Logo_1.bmp\}
\par
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_REQUIREMENTS}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar
\f7\fs20 {\cs16\super $} Requirements}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Requirements\~; Vss\~; Network}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super +} PAGE_0020}} Requirements
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 First thing you must be connected to the network.
\par
\par {\b Time server}
\par For updating data it is {\b very important} that time
on all computer is the same. To be sure of that each time you obtain or update data the program synchronize your computer time with time given by a time server. The time server is a little program that run on only a computer and that respond to request do
ne by the Data Manager. If error with time server appears contact administrator.
\par
\par {\b Local path}
\par In order to obtain data you must define a target local path were obtained data should be written. It\rquote s just a directory in your computer hard disk. It\rquote s name appear in interface window and could be changed.
\par
\par {\b Vss database
\par }You must have access to the VSS database that contains all data you need. So VSS (version 5) must be installed in your personal computer and must have been run at least one time.
\par Data files are stored in a VSS project, this project is the same for everyone using the same database. Before the utility\rquote
s main window appears a login window appear, the database ini file is displayed and you can browse to a different Vss database.
\par You must have right to log to database. Ask your administrator to create to you a login with your name.
\par By default, when you obtain data all files located in this project and recursively in all sub projects are copied in your hard disk, in the local path you\rquote ve defined.
\par {\b
\par }\pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_INIFILE}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Ini File}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Requirements\~; Data\~; Initialization}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +}
PAGE_0030}} Ini File
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 All initialization data are saved in a file\~located in same directory than the program and which name is {\b MngData.ini}
. If you open this file you can read in it VSS parameters and other user defined data. If this file is deleted first you loose all your own configuration and most important, you loose system configuration.
\par
\par The Ini File can contain these section
\par {\uldb [Target Path]}{\v IDH_J_SECTIONTARGETPATH} (optional)
\par {\uldb [Vss]}{\v IDH_J_SECTIONVSS}
\par {\uldb [FileList-Config##]}{\v IDH_J_SECTIONFILELIST} (optional / ## is a number)
\par {\uldb [Obtaining]}{\v IDH_J_SECTIONOBTAINING} (optional)
\par {\uldb [WinPref]}{\v IDH_J_SECTIONWINPREF}(optional)
\par
\par {\cf2 To help you understanding the content of this file here is a commented sample. All Ini file line are in blue color if they are optional or in red color if the line must appear in ini file.
\par }Because there is only one parameter that can\rquote t be edited by the Vss Data Manager here is a sample of a minimal MngData.ini file
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b\cf6 [Vss]\line DataRoot = $\\GameData
\par }\pard \li115\ri130\sa48\widctlpar
\par {\cs16\cf2\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SECTIONTARGETPATH}}{\cf2 }The {\b [TargetPath]} section contains information about folder where obtained data will be written. If this section doesn
\rquote t exist, file will be copied in your system temp directory.
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cf2 [TargetPath]\line DirName=X:\\CPA\\EXE\\MAIN\\GAMEDATA
\par }\pard \li115\ri130\sa48\widctlpar {\cf2
\par }{\cs16\b\cf2\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SECTIONVSS} }The {\b [Vss]} section contains information about VSS.
\par The \ldblquote DataRoot\rdblquote entry is the most important because it\rquote s the only parameter you can\rquote t edit. This gives the VSS project that correspond to your local directory.
\par {\i For example if \line TargetPath is X:\\CPA\\EXE\\MAIN\\GAMEDATA \line and Vss DataRoot is $\\GameData \line when obtaining \line $\\GameData\\}{\b\i Options\\Camera.ipt}{\i vss file will be obtain in
\par X:\\CPA\\EXE\\MAIN\\GAMEDATA\\}{\b\i Options\\Camera.ipt}{\i
\par }Others entries indicates the last opened database and last user name.
\par Last parameter which name is FileList indicate your current obtaining file list configuration. It\rquote s automatically manage by the program.
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b\cf6 [Vss]\line DataRoot=$\\GameData\line }{\cf2 DataBase=\\\\Serveur\\VSS5\\srcsafe.ini \line UserName=guest\line FileList=FileList-Config00
\par }\pard \li115\ri130\sa48\widctlpar
\par {\cs16\cf2\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SECTIONFILELIST}}{\cf2 }The {\b [FileList-Config##]} section
\par .Here is an example of an obtaining file list configuration. For each configuration there\rquote s a name, the number of files or projects to obtain and description of each file / project to obtain. If name is not prefixed, it\rquote
s a project, if name is prefixed by {\b -R }it\rquote s also a project but content is obtain recursively. Finnaly if prefixe is {\b -F }the name indicate a file that is simply obtain.
\par There can be as many section [FileList-Config##] as you define File list configuration with Vss Data Manager. These section are automatically written.
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cf2 [FileList-Config00]\line Name=MyConfig\line Number=3\line File0000=-R $\\GameData\\World\\Levels\\_Common\\Families\line File0001= $\\GameData\\World\\Levels\\Cavedoc\line File0002= -F $\\
GameData\\Options\\Camera.ipt
\par }\pard \li115\ri130\sa48\widctlpar {\cf2
\par }{\cs16\cf2\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SECTIONOBTAINING}}{\cf2 }The {\b [obtaining]}
section contains date and time of your last obtaining. This section appear after your first obtaining. It contains also all files you have obtained.
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cf2 [Obtaining]\line Date= 21/07/1997 14:53\line Number=1\line File0000=-R $\\GameData
\par }\pard \li115\ri130\sa48\widctlpar {\cf2
\par }{\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_SECTIONWINPREF}} The {\b [WinPref]}
section contains saving of window position and size and some options. All this section is optional and created or rewrite each time you quit the program to save the new configuration. Here is a sample of this section
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cf2 [WinPref]\line Main=( 499, 175, 919, 712)\line File=( 489, 247, 899, 691)\line Modif=( 384, 396, 679, 521)\line Conflict=( 537, 50,1218, 450)\line ObtainAfterUpdate=1\line
ConfirmObtainAfterUpdate=1\line ForceUpdate=1\line ConfirmForceUpdate=1}
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_STARTING}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Starting}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Start, Install, Login}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0050}}
Starting with Vss Data Manager
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 {\b Installing Vss Data Manager
\par }At first create a directory to put this utilities (it\rquote s not necessary, MngData5 could be copied anywhere you want.
\par Copy the 4 following files in the directory you\rquote ve created or anywhere you want
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 \tab MngData5.Exe\line \tab MngData.ini\line \tab MngDtBug.msg\line \tab MngData5.hlp
\par \pard \li115\ri130\sa48\widctlpar You can create links to MngData5.exe file to access easily the program.
\par Now you must just change the .ini File to be in order with your database. As explain in topic about {\uldb Ini File}{\v IDH_J_INIFILE} there is only one thing you must write in this .ini file\~:
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b\cf6 [Vss]\line DataRoot = <Your data root project>
\par }\pard \li115\ri130\sa48\widctlpar Ask your administrator to know what you must write in place of <your data root project>.
\par
\par {\b Executing Vss Data Manager
\par }With explorer go to directory were MngData5 has been installed and double click on MngData5.exe file or use any link you should have created.
\par A {\uldb login}{\v IDH_J_LOGIN} box appear (select base, enter username and password)
\par A {\uldb Wait}{\v IDH_J_WAIT} box appear (wait)
\par \pard \qj\li115\ri130\sa48\widctlpar The {\uldb main window}{\v IDH_J_INTERFACE} appear
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_LOGIN}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Login}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Login, Wait Dialog Box}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0060}}
Login to Database
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 When running the MngData5 utility first thing to do is to log to Vss Database. To do this administrator must have created an account for you. Ask him if this is not the case or if you don\rquote
t know username and password of your account.
\par
\par To log to the Vss Database use the first window that appears as following
\par {\i
\par }\pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_Log.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par In the picture user name and Vss base name are already set. First time you run program the boxes are empty, type your user name in first white box, password in the second one and database name in the third one. To set database name you can use \{
bmc Bt_VssBa.bmp\} button which offer to browse for the scrsafe.ini file that correspond to the right Vss database.
\par Next time you run program there\rquote s only the password box that will be empty.
\par When information are set click OK to log to Vss Database and go forward.
\par
\par {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_WAIT}}
When login is ok, program must initialize some data from Vss database. This operation can take some times if server is used by several people. During all time of this initialization the following window is deiplayed
\par
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_Wait.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par the line under the picture indicate which vss project is being analyzed.
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_OBTAIN}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Obtain\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Obtain\~; Data}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0100}}
How to obtain data
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 Here is the procedure to obtain data
\par
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Running obtaining}
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Bt_One.bmp\} Check local path (where data files will be copied)
\par \pard \li115\ri130\sa48\widctlpar \tab It is displayed in {\uldb main window}{\v IDH_J_INTERFACE}
\par \pard \li115\ri130\sa48\widctlpar \tab You can change it by using \{bmc Bt_Brows.bmp\} button in main window
\par \pard \fi605\li115\ri130\sa48\widctlpar and using {\uldb Local path dialog}{\v IDH_J_CHANGINGLOCALPATH}
\par \pard \li115\ri130\sa48\widctlpar \{bmc Bt_Two.bmp\} Define Vss projects and files you want to obtain
\par \tab By default all files and project will be obtained
\par \pard \li115\ri130\sa48\widctlpar \tab To set list use \{bmc Bt_More.bmp\} button in {\uldb main window}{\v IDH_J_INTERFACE}
\par \tab and {\uldb File list configuration dialog box}{\v IDH_J_CONFIGFILELIST}
\par \pard \li115\ri130\sa48\widctlpar \{bmc Bt_Three.bmp\} Click on button \{bmc Bt_Obtai.bmp\}
\par
\par \pard \li115\ri130\sa48\widctlpar The obtaining procedure is launch, look the result window and progress bar to see if there\rquote s a problem. Data obtaining could be a long procedure if there\rquote s many data files to obtain.
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Obtaining algorithm summary}
\par \pard \li115\ri130\sa48\widctlpar \{bml Bt_Arrow.bmp\} watch if someone is updating (stop if so)
\par \pard \li115\ri130\sa48\widctlpar \{bml Bt_Arrow.bmp\} watch if there still modification in file (if so notify user that obtaining will delete these modification)
\par \pard \li115\ri130\sa48\widctlpar \{bml Bt_Arrow.bmp\} synchronize time with time server
\par \{bml Bt_Arrow.bmp\} notify that someone is obtaining
\par \{bml Bt_Arrow.bmp\} obtain all wanted data
\par \{bml Bt_Arrow.bmp\} notify that obtaining is terminate
\par \{bml Bt_Arrow.bmp\} delete modification file
\par \{bml Bt_Arrow.bmp\} set obtaining time and files in MngData.ini file
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Obtaining problem
\par }\pard \li115\ri130\sa48\widctlpar Obtaining could be stopped if
\par \pard \li115\ri130\sa48\widctlpar \{bml Bt_Empty.bmp\} time server doesn\rquote t respond. (see administrator)
\par \{bml Bt_Empty.bmp\} someone is updating (wait the end of updating)
\par \{bml Bt_Empty.bmp\} you don\rquote t want to delete modification that are still in modification file
\par \{bml Bt_Empty.bmp\} vss database could not be reached (see administrator)
\par \pard \li115\ri130\sa48\widctlpar Obtaining could be a very long operation so when you work on a little part of data obtain only the project you are working on. It is better to obtain data when no one else obtain data, because obtaining time w
hen two person obtain at same time is increase by 5 or more.
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_UPDATE}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Update\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Update\~; Data}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0200}}
How to update data
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20
\par Here is the procedure to update data
\par
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b What is needed
\par }\pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar you must have {\uldb obtain}{\v IDH_J_OBTAIN} data at least one time
\par \pard \li115\ri130\sa48\widctlpar you must have modified some data file with 3DOS editors
\par \pard \li115\ri130\sa48\widctlpar Obtaining time and number of modification appear in {\uldb window interface}{\v IDH_J_INTERFACE}.
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Running updating
\par }\pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar Use \{bmc Bt_Updat.bmp\} button to access Update menu \line \{bmc Mnu_Upda.bmp\} which allow you \line to set some update {\uldb options}{\v IDH_J_UPDATEOPTIONS} by using {\uldb \{bmc Mnu_UpOp.bmp\}}{\v
IDH_J_UPDATEOPTIONS} menu entry \line or to launch update operation by using \{bmc Mnu_UpUp.bmp\} menu entry
\par \pard \li115\ri130\sa48\widctlpar
\par Updating result appear in result window and progress bar indicates you process progression.
\par {\ul It is recommended to re-obtain data after an updating operation
\par }
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Updating algorithm summary
\par }\pard \li115\ri130\sa48\widctlpar
\par \{bml Bt_Arrow.bmp\} watch if someone is updating or obtaining ( stop if so )
\par \{bml Bt_Arrow.bmp\} synchronize time with time server
\par \{bml Bt_Arrow.bmp\} notify that someone is updating
\par \{bml Bt_Arrow.bmp\} update all modified section
\par \{bml Bt_Arrow.bmp\} notify that updating is terminate
\par \{bml Bt_Arrow.bmp\} rewrite modification file with modification that generate conflict or error
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\b Updating problem
\par }\pard \li115\ri130\sa48\widctlpar
\par Updating could be stop if
\par \pard \li115\ri130\sa48\widctlpar \{bml Bt_Empty.bmp\} time server doesn\rquote t respond (see administrator)
\par \{bml Bt_Empty.bmp\} someone is updating or obtaining (wait the end of all operation)
\par \pard \li115\ri130\sa48\widctlpar {\ul Some modification could not be done
\par }\pard \li115\ri130\sa48\widctlpar this can append when another designer update a section after your last obtaining. This is a case of {\uldb conflict}{\v IDH_J_CONFLICT} because you two have modified section in same time and program can\rquote
t generally not merge modification. To avoid these delete modification by re-obtaining data, do your modification again under 3DOS editor and update data. There\rquote s no simple solution to conflict problem.
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cs16\b\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_UPDATEOPTIONS}}{\b Update option
\par }\pard \li115\ri130\sa48\widctlpar
\par The following window allow you to set some update options
\par \pard \qc\li115\ri130\sa48\widctlpar
\par \{bmc Dlg_UpOp.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar First group of options allow you (if checked) to force updating (with or without confirmation) if a {\uldb conflict}{\v IDH_J_CONFLICT} between two files or sections happens.
\par \pard \li115\ri130\sa48\widctlpar Second group of options allow you to obtain automatically after an updating operation.
\par
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cs16\b\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_CONFLICT}}{\b Update conflict
\par }\pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar A conflict appear when you are updating data that was still updated by someone else since last time you have obtained. By default all conflict
are considered as error. But you can change options (see behind) to force updating in case of conflict. If you have set this option with the confirmation set, each time a conflict happens the following dialog box appears
\par
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_conf.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par You also can see the two version of the section and the name of the guy that makes the last modification.
\par You must then choose\~:
\par \{bmc Bt_Arrow.bmp\} if you want to keep vss file, use \{bmc Bt_Keep.bmp\} button
\par \pard \li115\ri130\sa48\widctlpar \{bmc Bt_Arrow.bmp\} if you want to erase last modification on vss database with you own modification. Use \{bmc Bt_OverW.bmp\}
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_INTERFACE}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20
{\cs16\super $} Interface\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Interface\~; Dialog}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0300}}
Interface
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 Here is a description of utility interface. These interface display the program parameters and some buttons to change parameters or run operation.
\par \pard \li115\ri130\sa48\widctlpar
\par Here is a general survey of interface window, show below for a description of each part.
\par
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_Intf.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par This interface is decomposed in three part,
\par \pard \li115\ri130\sa48\widctlpar the first one is composed by text box with {\uldb informations and parameters}{\v IDH_J_ITF_INFOS}
\par the second one is the {\uldb result window}{\v IDH_J_ITF_RESULTWINDOW} (the black window)
\par the third is the {\uldb command buttons}{\v IDH_J_ITF_COMMANDBUTTONS}.
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cs16\b\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_ITF_INFOS}}{\b Informations and parameters
\par }\pard \li115\ri130\sa48\widctlpar
\par \{bmc Itf_LaOb.bmp\}
\par this line indicate the date and time you\rquote ve obtained data for the last time.
\par
\par \{bmc Itf_LoPa.bmp\}
\par \pard \li115\ri130\sa48\widctlpar This line display local path. This is the directory that correspond to the Vss path. When obtaining all files or sub project found in Vss path will be obtained in the define local path. You can change it by using the \{
bmc Bt_Brows.bmp\} button and the {\uldb local path dialog box}{\v IDH_J_CHANGINGLOCALPATH}
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Itf_VssP.bmp\}
\par \pard \li115\ri130\sa48\widctlpar You\rquote ll find in this line two information, first one is the Vss project used as root project for data. This information can\rquote t be edited, you must define it when installing the utilities. See description of {
\uldb ini file}{\v IDH_J_INIFILE} or {\uldb Starting with Vss Data Manager}{\v IDH_J_STARTING} topic for more information.
\par The second information between bracket is the current {\uldb file list configuration}{\v IDH_J_CONFIGFILELIST} name use \{bmc Bt_More.bmp\} button to change or create new configuration.
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Itf_InUp.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
This line display name of vss file used as a semaphore to indicate that someone update, i.e. when this file is checked out that means that someone is being updating and nobody else can obtain or update while this updating isn\rquote
t finished. This file cannot be changed You can look if someone is being updating by using \{bmc Bt_Look.bmp\} button
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Itf_InOb.bmp\}
\par \pard \li115\ri130\sa48\widctlpar This line display name of vss file used as a semaphore to indicate that someone obtain, i.e. when this file is checked out that means that someone is being obtaining data and nobody else update while this obtaining isn
\rquote t finished. This file cannot be changed. You can look if someone is being obtaining by using \{bmc Bt_Look.bmp\} button
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Itf_Modi.bmp\}
\par \pard \li115\ri130\sa48\widctlpar This two lines indicate the file that contains modification you\rquote ve done since last obtaining with the 3DOS editors\~; and number of modifications. You can delete all modifications by using the \{bmc Bt_Clear.bmp\}
button and you can display {\uldb modification list}{\v\ul IDH_J_VIEWMODIF} by using \{bmc Bt_View.bmp\} button
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cs16\b\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_ITF_RESULTWINDOW}}{\b Result window
\par }\pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar
This window (with black background) display result of any updating or obtaining operation. Each line indicate a step in operation. The blue lines indicate what is being done, green line indicate a good result for an operation and red lines indicate e
rrors.
\par \pard \li115\ri130\sa48\widctlpar
\par
\par \pard \li115\ri130\sa48\widctlpar\box\brdrs\brdrw15\brsp20 {\cs16\b\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_ITF_COMMANDBUTTONS}}{\b Command buttons
\par }\pard \li115\ri130\sa48\widctlpar
\par \{bmc Bt_Refre.bmp\}
\par \pard \li115\ri130\sa48\widctlpar Use this button to refresh information dumping. You can use it for example if you have edited some data without closing MngData5 utility.
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc BT_Obtai.bmp\}
\par \pard \li115\ri130\sa48\widctlpar Use this button to launch an obtaining operation. See {\uldb How to obtain data}{\v IDH_J_OBTAIN} topic
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc BT_Updat.bmp\}
\par \pard \li115\ri130\sa48\widctlpar Use this button to display the Update menu that allow you to set some update options or to launch an updating operation. See {\uldb How To Update data}{\v IDH_J_UPDATE} topic
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc Bt_Quit.bmp\}
\par To quit Vss data manager.
\par
\par \{bmc Bt_Help.bmp\}
\par To access about dialog box or this help file
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_CHANGINGLOCALPATH}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar
\f7\fs20 {\cs16\super $} Changing local path\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Local path\~; Interface}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super +} PAGE_0350}} Changing local path
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20
Use the following dialog box to choose directory where data will be obtained. The directory you choose is the root directory of all data, that means that all data files are in this directory or in sub directory of this directory. It correspond to the Vss
dataproject. For example if vss data project is $\\acp\\Game\\Gamedata and local path is c:\\ed\\Data the file $\\acp\\game\\gamedata\\anims\\ed\\marche.a3d will be obtained and correspond to the file c:\\ed\\data\\anims\\ed\\marche.a3d
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_LDir.bmp\}
\par
\par \pard \li115\ri130\sa48\widctlpar
To change local data path choose the directory you want to be your local path and click ok. You cannot create directory with this dialog box, so use explorer or what you want to do that. Click cancel button if you want to avoid this operation.
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_CONFIGFILELIST}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar
\f7\fs20 {\cs16\super $} Choosing obtaining project list\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Obtaining\~; Interface\~; Project list}} {\cs16\super +{\footnote \pard\plain
\s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0360}} Choosing obtained files list
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 When you run obtaining operation you obtain recursively all data files that are in the Vss project. This is the default behavior. With the fo
llowing interface you can specify what sub project you want to obtain for example if you work on level 2 it gains time to obtain only general data file and level 2 file and to avoid all the other level data files.
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_VssF.bmp\}
\par
\par \pard \li115\ri130\sa48\widctlpar {\b Step to create a new file list configuration
\par
\par }Choose all files / project you want to obtain
\par Choose a name for your configuration
\par Click on \{bmc Bt_Ok.bmp\} button
\par
\par {\b Step to modify a file list configuration}
\par \pard \li115\ri130\sa48\widctlpar
\par Change file you want to obtain
\par Click on \{bmc Bt_Ok.bmp\} button
\par
\par {\b Choosing files/projects to obtain
\par }
\par \pard \li115\ri130\sa48\widctlpar
The tree display all files and projects that are on Vss database. You know if a project or file is obtained according to the color of the icon that prefix the file or project name. The legend panel summarize the signification of icons.
\par \pard \li115\ri130\sa48\widctlpar A project could be prefixed by the following icon
\par \{bml Ico_PrNO.bmp\} the project will not be obtained
\par \pard \li115\ri130\sa48\widctlpar \{bml Ico_PrOb.bmp\} the project will be obtained (all files of the project are obtained but not the sub projects)
\par \{bml Ico_PrOR.bmp\} the project will be obtain recursively ( all files and recursively all sub projects are obtained)
\par \{bml Ico_PrOC.bmp\} the project will be obtain because it\rquote s a sub project of a project that will be obtained recursively
\par \pard \li115\ri130\sa48\widctlpar A file could be prefixed by the following icon
\par \{bml Ico_FiNO.bmp\} the file will not be obtained
\par \{bml Ico_FiOb.bmp\} the file will be obtained
\par \{bml Ico_FiOP.bmp\} the file will be obtaind because it owns a project that will be obtained
\par \{bml Ico_FIOC.bmp\} the file will be obtained because it owns a project that will be obtained recursively
\par
\par There is several manner to change obtain state of a file/project.
\par \pard \li115\ri130\sa48\widctlpar \{bmr Bt_ObSta.bmp\}-1- You can select it and use the two bottom left buttons. The text display on these two buttons change following the state of selected item in tree. {\i
In the example, the selected item is a project that is not obtain, so you can choose to obtain or to recursively obtain it.
\par }\pard \li115\ri130\sa48\widctlpar -2- Right clicking on a project or file in the tree makes appear a contextual menu that allow you to change state of the clicked project or file.
\par -3- You can also use the small button that are on legend panel to change state of currently selected project or file.{\i
\par }\pard \li115\ri130\sa48\widctlpar
\par There is also two buttons that change all tree obtain state.
\par \{bmc Bt_ObAll.bmp\} set all file to be obtained
\par \{bmc Bt_ObNot.bmp\} Just clear the tree by setting all project and file to not obtain state.
\par
\par {\b Choose a name for your configuration
\par
\par }For this use the \{bmc Bt_Confi.bmp\} button that makes appear the following dialog box
\par \pard \qc\li115\ri130\sa48\widctlpar \{bmc Dlg_fcfg.bmp\}
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar You create a new configuration by editing a new configuration name in edit box and clicking the \{bmc Bt_Ok.bmp\} button.
\par \pard \li115\ri130\sa48\widctlpar
\par \pard \li115\ri130\sa48\widctlpar You can also choose an existing configuration. Doing this will reinitialize vss tree with obtained file define in chosen configuration.
\par \pard\plain \s17\sa240\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_VIEWMODIF}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20
{\cs16\super $} View modificationlist\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Interface\~; Modification}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super +} PAGE_0370}} Viewing modification list
\par \pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 This dialog box list all section that have been modified since your last obtaining. Each line in the list box represent one of these modified section. Each line is made like this
\par \pard \li115\ri130\sa48\widctlpar \tab <filename>[^<sectionid>[:<sectionname>]] (modification type)
\par
\par were modification type can be
\par {\b (modified)}\tab the file/section is both in vss data and local data
\par {\b (added)}\tab the file/section is only in your local data
\par {\b (deleted)}\tab the file/section is was deleted from your local data
\par \pard \qc\li115\ri130\sa48\widctlpar
\par \{bmc Dlg_ModL.bmp\}
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_FAQ}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Frequently asked questions\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} FAQ\~; Questions}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +}
PAGE_0500}} Frequently Asked Questions
\par \pard\plain \li113\ri130\sa120\keepn\widctlpar \f7\fs20 see also {\uldb Questions And Requests}{\v IDH_J_REQUESTS}, {\uldb Reported Bugs}{\v IDH_J_BUGS}
\par \pard \li115\ri130\sa48\widctlpar You could find here the Frequently Asked Questions about Automatic Vss Data Manager.
\par \pard \li115\ri130\sa48\widctlpar If you have question {\ul contact me}{\v IDH_P_ME}
\par \pard \li115\ri130\sa48\widctlpar
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_REQUESTS}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Questions and requests\tab }} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Questions\~; Request}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +}
PAGE_510}} Questions And Request
\par \pard\plain \li113\ri130\sa120\keepn\widctlpar \f7\fs20 see also {\uldb Frequently Asked Questions}{\v IDH_J_FAQ}, , {\uldb Reported Bugs}{\v IDH_J_BUGS}
\par \pard \li115\ri130\sa48\widctlpar You could find here last Questions and request.
\par \pard \li115\ri130\sa48\widctlpar If you have question or request {\ul contact me}{\v IDH_P_ME}
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs28\lang1024 \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_J_BUGS}} {\cs16\super ${\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {
\cs16\super $} Reported bugs}} {\cs16\super K{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super K} Bugs\~; Questions}} {\cs16\super +{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super +} PAGE_0520}}
Reported bugs
\par \pard\plain \li113\ri130\sa120\keepn\widctlpar \f7\fs20 see also {\uldb Frequently Asked Questions}{\v IDH_J_FAQ}, {\uldb Questions And Requests}{\v IDH_J_REQUESTS}
\par \pard \li115\ri130\sa48\widctlpar If you find a or several bugs {\ul contact me}{\v IDH_P_ME}
\par \pard \li115\ri130\sa48\widctlpar
\par \{bmc ico_abug.bmp\} {\b Can\rquote t update because an edit window appear
\par }\pard \li115\ri130\sa48\widctlpar This happens when you\rquote ve change editor for displaying file in VSS interface. You must delete this option in VSS interface. To do that open VSS, choose {\b tools} menu and then options {\b sub menu}. In {\b General
} section delete the editor name written {\i in editor for displaying file
\par }\pard \li115\ri130\sa48\widctlpar {\i
\par }\{bmc ico_abug.bmp\} {\b Under Windows95 Help button raised an error}
\par \pard \li115\ri130\sa48\widctlpar It\rquote
s another Windows95 mystery. The first time you click on help button an error appear before popup menu is displayed. Close error window, select Help in popup menu another error appear, close again error window, this time program is automatically stoppe
d. Re-launch it and try Help button, it works ...\~!\~!\~!\~?\~?\~?
\par \pard \li115\ri130\sa48\widctlpar \page {\b POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP - POPUP
\par }\page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_LOCALPATH}} {\ul Local path
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name of data root directory.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_BROWSE}} {\ul Browse button
\par }\pard \li115\ri130\sa48\widctlpar Click this button to change local root data directory{\ul
\par }\pard \li115\ri130\sa48\widctlpar See also {\uldb changing local directory}{\v IDH_J_CHANGINGLOCALPATH}, {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_VSSPATH}} {\ul Vss data project
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name of vss project that contains all data files.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_MORE}} {\ul More button
\par }\pard \li115\ri130\sa48\widctlpar Clicking this button allow you to define a list of project you want to obtain. Doing that allow you to obtain only data you work on.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb Choosing obtaining project}{\v IDH_J_CONFIGFILELIST}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_VSSEXE}} {\ul Vss program
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name program used to acess database
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_INUPDATE}} {\ul InUpdate semaphore file
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name of file used as a semaphore file for updating state.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_LOOKINUPDATE}} {\ul Look Update button
\par }\pard \li115\ri130\sa48\widctlpar Click this button to see if someone is being updating data.
\par \pard \li115\ri130\sa48\widctlpar \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_INOBTAIN}} {\ul InObtain semaphore file
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name of file used as a semaphore file for obtaining state.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb requirements}{\v IDH_J_REQUIREMENTS}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_LOOKINOBTAIN}} {\ul Look Obtain button
\par }\pard \li115\ri130\sa48\widctlpar Click this button to see list of users that are being obtaining data.
\par \pard \li115\ri130\sa48\widctlpar \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_MODIFLIST}} {\ul Modification file name
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the name of file that contains list of modification.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_MODIF}} {\ul Modification number
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the number of modification found in modification file. You can update only when there\rquote s at least one modification
\par \pard \li115\ri130\sa48\widctlpar \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_VIEWMODIF}} {\ul View modification button
\par }\pard \li115\ri130\sa48\widctlpar Click this button to view modification list
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb Viewing list of modification}{\v IDH_J_VIEWMODIF}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_OBTAININGTIME}} {\ul Last obtaining time
\par }\pard \li115\ri130\sa48\widctlpar In this box is displayed the date and time of your last obtaining. If no obtaining has been done the word {\b none }appear in place of date/time
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb How to obtain data}{\v IDH_J_OBTAIN}, {\uldb ini file}{\v IDH_J_INIFILE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_RESULTVIEW}} {\ul Result window
\par }\pard \li115\ri130\sa48\widctlpar This window display some information about obtaining or updating operation. After each operation look at this window content to be sure that\rquote s no error happens.
\par \pard \li115\ri130\sa48\widctlpar See also {\uldb How to obtain data}{\v IDH_J_OBTAIN}, {\uldb How to update data}{\v IDH_J_UPDATE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_REFRESH}} {\ul Refresh button
\par }Click this button to refresh information. If something isn\rquote t good in data you can make change in {\uldb ini file}{\v IDH_J_INIFILE} and then use this button to refresh display.
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_OBTAIN}} {\ul Obtain button
\par }Click this button to {\uldb obtain data}{\v IDH_J_OBTAIN}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_UPDATE}} U{\ul pdate button
\par }Click this button to {\uldb update data}{\v IDH_J_UPDATE}
\par \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_QUIT}} {\ul Quit button
\par }\pard \li115\ri130\sa48\widctlpar To quit program{\ul
\par }\pard \li115\ri130\sa48\widctlpar \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_HELP}} {\ul Help button
\par }\pard \li115\ri130\sa48\widctlpar Use this button to access this help file or to display about box
\par \pard \li115\ri130\sa48\widctlpar \page {\cs16\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_ME}} \{bmc vlhullier.bmp\}
\par \pard \li115\ri130\sa48\widctlpar Vincent Lhullier
\par \pard \li115\ri130\sa48\widctlpar \{bmc Ico_Lett.bmp\}\tab {\uldb\cf11 vlhullier@annecy.ubisoft.fr}{\v !ExecFile(MngDtBug.msg, \~, SW_SHOW, IDH_P_MESSAGEERROR )}
\par \pard \li115\ri130\sa48\widctlpar \{bmc Ico_Tel.bmp\}\tab 04.50.52.98.84
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\fs20\kerning28 \page {\cs16\fs24\super #{\footnote \pard\plain \s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super #} IDH_P_MESSAGEERROR}}{\fs24 }{\cs16\fs24\super ${\footnote \pard\plain
\s15\li115\ri130\sa48\widctlpar \f7\fs20 {\cs16\super $} Mail Erreur}}{\fs24 Mail Erreur
\par }\pard\plain \li115\ri130\sa48\widctlpar \f7\fs20 The file \lquote MngDtBug.msg\rquote not found
\par in help file directory
\par }

View File

@@ -0,0 +1,48 @@
/*
*=======================================================================================
* Name :constant.h
*
* Author : VL Date :16/07/97
*
* Description :constant for vss data manager
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
#ifndef __CONSTANT_H__
#define __CONSTANT_H__
/*
* constant for main window min size
*/
#define C_iMainMinWidth 300
#define C_iMainMinHeight 300
/*
* constant for vss tree window min size
*/
#define C_iFileMinWidth 410
#define C_iFileMinHeight 340
/*
* constant for modif window min size
*/
#define C_iModifMinWidth 200
#define C_iModifMinHeight 100
/*
* constant for modif window min size
*/
#define C_iConflictMinWidth 300
#define C_iConflictMinHeight 400
/*
* constant for modif window min size
*/
#define C_iUpdateWithConfigMinWidth 300
#define C_iUpdateWithConfigMinHeight 200
#endif /*__CONSTANT_H__*/

View File

@@ -0,0 +1,54 @@
/*
=======================================================================================
Name : DLGAbout.h
Author : Vincent Lhullier Date :17/07/97
Description : Header file for about dialog box class for MngData5
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
#ifndef __DLGABOUT_H__
#define __DLGABOUT_H__
/*
=======================================================================================
CAboutDlg dialog class
=======================================================================================
*/
class CAboutDlg : public CDialog
{
//data members
private:
UINT m_uiTimer;
char m_cNbBitmaps;
char m_cCurBitmap;
CBitmap m_a_oBitmap[11];
// Construction
public:
CAboutDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAboutDlg)
virtual BOOL OnInitDialog();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif /*__DLGABOUT_H__*/

View File

@@ -0,0 +1,222 @@
/*
*=======================================================================================
* Name :dlgconfl.h
*
* Author :vincent lhullier Date :21/07/97
*
* Description :implementation of dialog box to show section differences
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_DLGCONFL_H__6184144B_0199_11D1_8EF9_00609736731A__INCLUDED_)
#define AFX_DLGCONFL_H__6184144B_0199_11D1_8EF9_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "resource.h"
#include "MajData.h"
#include "SCR.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
=======================================================================================
PART of code to decompose a file/section into a tree of section
=======================================================================================
=======================================================================================
*/
/*
=======================================================================================
Constant
=======================================================================================
*/
#define SCRT_C_cNew 0
#define SCRT_C_cDiff 1
#define SCRT_C_cSame 2
#define SCRT_C_cNewVss 3
#define SCRT_C_cNewLocal 4
#define SCRT_C_cComment 5
#define SCRT_C_cSection 0
#define SCRT_C_cEntry 1
/*
=======================================================================================
Structures
=======================================================================================
*/
typedef struct SCRT_tdstEntry_
{
char cType;
char *szName;
unsigned short uwNameLength;
char cCompState;
long lCompWith;
HTREEITEM hItem;
} SCRT_tdstEntry;
typedef struct SCRT_tdstSection_
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/* same entry than SCR_tdstSection entry */
char cType;
char *szName;
unsigned short uwNameLength;
char cCompState;
long lCompWith;
HTREEITEM hItem;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char *szEndSection;
BOOL bNameIsAllocate;
long lNumberOfElements;
SCRT_tdstEntry **d_p_stElement;
//long lNumberOfEntries;
//SCRT_tdstSectionEntry *d_stEntry;
//long lNumberOfSubSections;
//struct SCRT_tdstSectionTree_ *d_stSubSection;
} SCRT_tdstSection;
/*
=======================================================================================
Functions
=======================================================================================
*/
void SCRT_fn_vClean( SCRT_tdstSection *_p_stSection );
void SCRT_fn_vFree ( SCRT_tdstSection *_p_stSection );
void SCRT_fn_vBuildSectionTree( SCRT_tdstSection *_p_stSection, SCR_tdst_File_Description *_p_stContent, char *_szName, unsigned short _uwNameLength, BOOL bFile );
void SCRT_fn_vInitAndBuildSectionTree( SCRT_tdstSection *_p_stSection, char *_szSectionContent, char *_szFileName );
BOOL SCRT_fn_bCompareSectionTree( SCRT_tdstSection *_p_stSection1, SCRT_tdstSection *_p_stSection2 );
/*
=======================================================================================
=======================================================================================
CConflictDlg dialog
=======================================================================================
=======================================================================================
*/
#define C_cDisplayText 0
#define C_cDisplayTree 1
class CConflictDlg : public CDialog
{
public:
/*==> section name and user name (name of user that makes the update that generate the conflict )*/
char *m_szSectionName;
char *m_szUserName;
/*==> variable to manage Vss section */
char *m_szVssSection;
CRichEditCtrl m_oVssRichEdit;
SCRT_tdstSection m_stVssTree;
CTreeCtrl *m_p_oVssTree;
/*==> variable to manage Local section */
CRichEditCtrl m_oLocalRichEdit;
char *m_szLocalSection;
SCRT_tdstSection m_stLocalTree;
CTreeCtrl *m_p_oLocalTree;
/*==> variable to manage merged section (not yet used ) */
SCRT_tdstSection m_szMergeSection;
CTreeCtrl *m_p_oMergeTree;
/*==> char format structure (for CRichEditCtrl display ) */
CHARFORMAT m_stCharFormat;
/*==> Section display mode (tree or edit) */
char m_cDisplayMode;
/*==> use to know if some message on tree or Rich Edit are generated by code */
BOOL m_bLocalOp;
/*==> image list and array of icons for Tree Control */
CImageList m_oImageList;
HICON m_a_hIcon[7];
/*==> Id of some dialog control for resizing operation */
char m_cNbBottomButtons;
UINT m_a_uiBottomButton[ 3 ];
// Construction
public:
CConflictDlg(CWnd* pParent = NULL); // standard constructor
~CConflictDlg();
/*==> to change display mode of section : tree or text */
void m_fn_vChangeDisplayMode( char _cMode );
/*==> access function to set section and user names and contents */
void m_fn_vSetSectionName( char *_szSectionName ) { m_szSectionName = _szSectionName; }
void m_fn_vSetUserName( char *_szUserName ) { m_szUserName = _szUserName; }
void m_fn_vSetVssSection( char *_szVssSection ) { m_szVssSection = _szVssSection; }
void m_fn_vSetLocalSection( char *_szLocalSection ) { m_szLocalSection = _szLocalSection; }
/*==> fill a tree control with a section */
void m_fn_vFillTree( CTreeCtrl *_p_oTree, SCRT_tdstSection *_p_stSection, HTREEITEM _hParent, int _iImage, BOOL _bVss );
/*==> low level functions to add text in a RichEdit control */
long m_fn_RE_lAddText( CRichEditCtrl *_p_oRE, char *_szText, char *_szEndText, char _cType );
void m_fn_RE_vRecaleLine( CRichEditCtrl *_p_oRE1, CRichEditCtrl *_p_oRE2 );
/*==> Low level functions to print section part in a Rich Edit control */
char *m_fn_RE_vPrintSectionBeginning( CRichEditCtrl *_p_oRE, SCRT_tdstSection *_p_stSection, char *_szFrom, BOOL _bVss );
char *m_fn_RE_vPrintEntry( CRichEditCtrl *_p_oRE, SCRT_tdstEntry *_p_stEntry, char *_szFrom, BOOL _bVss );
char *m_fn_RE_vPrintSectionEnd( CRichEditCtrl *_p_oRE, SCRT_tdstSection *_p_stSection, char *_szFrom, BOOL _bVss );
/*==> High level function to print an entire section or two parrallel section in one or two rich edit control */
char *m_fn_RE_vPrintSection( CRichEditCtrl *_p_oRE, SCRT_tdstSection *_p_stSection, char *_szFrom, BOOL _bVss );
void m_fn_RE_vPrintTwoSection(SCRT_tdstSection *_p_stVssSection,char **_p_szVssFrom, SCRT_tdstSection *_p_stLclSection,char **_p_szLclFrom );
void m_fn_RE_vFill( void );
// Dialog Data
//{{AFX_DATA(CConflictDlg)
enum { IDD = IDD_DIALOG_CONFLICT };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConflictDlg)
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CConflictDlg)
virtual BOOL OnInitDialog();
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnSelchangedTreeLocal(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemexpandedTreeLocal(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangedTreeVss(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemexpandedTreeVss(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnVscrollRicheditLocal();
afx_msg void OnVscrollRicheditVss();
afx_msg void OnButtonTreetext();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif // !defined(AFX_DLGCONFL_H__6184144B_0199_11D1_8EF9_00609736731A__INCLUDED_)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,115 @@
/*
=======================================================================================
Name : DlgFile.h
Author : vincent lhullier Date :27/07/97
Description : header file for dialog box to choose list of obtained file
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __FILEDLG_H__
#define __FILEDLG_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "MajData.h"
#include "resource.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CDialogFileList dialog
=======================================================================================
*/
class CDialogFileList : public CDialog
{
//private data members
private:
CTreeCtrl *m_p_oTree;
tdstProject *m_p_stProjectTree;
tdstFileListConfig *m_p_stConfig;
char *m_szRootProject;
char m_cConfigType;
CImageList m_oImageList;
CImageList m_oLegendImageList;
HICON m_a_hIcon[7];
HICON m_hIconKey;
char m_cConfig;
int m_iOldCx;
int m_iOldCy;
BOOL m_bLegend;
BOOL m_bExpand;
// Construction
public:
CDialogFileList(CWnd* pParent = NULL); // standard constructor
~CDialogFileList();
//void m_fn_vSetRootProject (tdstProject *_p_stRootProj) { m_p_oProjectTree = _p_stRootProj; }
//void m_fn_vSetFileListConfig( tdstFileListConfig *_p_stConfig ) { m_p_ostConfig = _p_stConfig;}
void m_fn_vSetConfigType( char _cConfigType );
// Dialog Data
//{{AFX_DATA(CDialogFileList)
enum { IDD = IDD_DIALOG_FILELIST };
//}}AFX_DATA
// specific functions
private:
void m_fn_vAddProjectContentInTree ( tdstProject *_p_stProj, BOOL _bGetCauseRecurse );
void m_fn_vChangeProjectImage ( tdstProject *_p_stProj, BOOL _bGetCauseRecurse );
void m_fn_vChangeProjectFilesImage ( tdstProject *_p_stProj );
int m_fn_iGetProjectImage ( tdstProject *_p_stProj );
void m_fn_vSetButton ( HTREEITEM hItem );
void m_fn_vChooseConfig ( void );
void m_fn_vExportConfig ( void );
void m_fn_vImportConfig ( void );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDialogFileList)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDialogFileList)
virtual BOOL OnInitDialog();
afx_msg void OnSelchangedTreeVss(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnCheckObtain();
afx_msg void OnCheckRecurse();
virtual void OnOK();
afx_msg void OnButtonObtainall();
afx_msg void OnButtonObtainnothing();
afx_msg void OnButtonHelp();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
afx_msg void OnDestroy();
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMIS);
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnButtonLegend0();
afx_msg void OnButtonLegend1();
afx_msg void OnButtonLegend2();
afx_msg void OnButtonLegend3();
afx_msg void OnButtonLegend4();
afx_msg void OnButtonLegend5();
afx_msg void OnButtonLegend6();
afx_msg void OnButtonLegend7();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnSelchangeTabLegend(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnCheckConfig();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif /*__FILEDLG_H__*/

View File

@@ -0,0 +1,83 @@
/*
=======================================================================================
Name : logindlg.h
Author : vincent lhullier Date :27/07/97
Description : header file for CloginDialog : Dialog box to log to Vss database
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_LOGINDLG_H__1F212DAD_B7E5_11D0_8E7B_00609736731A__INCLUDED_)
#define AFX_LOGINDLG_H__1F212DAD_B7E5_11D0_8E7B_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "resource.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CLoginDialog dialog
=======================================================================================
*/
class CLoginDialog : public CDialog
{
//private data
private:
BOOL m_bInit;
char m_szUserName[100];
char m_szPassword[100];
char m_szDatabase[MAX_PATH];
// Construction
public:
CLoginDialog(CWnd* pParent = NULL); // standard constructor
void m_fn_vSetUserName( char *_szName );
void m_fn_vSetDatabase( char *_szDatabase );
char *m_fnp_szGetUserName( void ) { return m_szUserName; }
char *m_fnp_szGetPassword( void ) { return m_szPassword; }
char *m_fnp_szGetDatabase( void ) { return m_szDatabase; }
// Dialog Data
//{{AFX_DATA(CLoginDialog)
enum { IDD = IDD_DIALOG_LOGIN };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CLoginDialog)
virtual BOOL OnInitDialog();
virtual void OnOK();
afx_msg void OnButtonBrowse();
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif // !defined(AFX_LOGINDLG_H__1F212DAD_B7E5_11D0_8E7B_00609736731A__INCLUDED_)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,163 @@
/*
*******************************************************************************
* MajDataDlg.h : header file
*******************************************************************************
*/
#include "resource.h"
#include "DlgFile.h"
#include "ProgBar.h"
/*
*******************************************************************************
* CONSTANTS
*******************************************************************************
*/
/*
* for cheat code flag
*/
#define C_lCheatPause 0x0001
#define C_lCheatUpdate 0x0002
/*
* for line in RichEdit result window
*/
#define C_Result_cInfoLine 0
#define C_Result_cOkLine 1
#define C_Result_cErrorLine 2
/*
* timer event ID
*/
#define C_uiBaseStatusTimer 1
/*
*******************************************************************************
* CMngDataDlg class
*******************************************************************************
*/
class CMngDataDlg : public CDialog
{
public:
CMngDataDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMngDataDlg)
enum { IDD = IDD_MNGDATA_DIALOG };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMngDataDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
private:
/* ==> cheat code */
char m_szCheat[6];
long m_lCheatFlag;
/* ==> char buffer for different message */
char m_szMessage[1024];
/* ==> result window */
CRichEditCtrl m_oRichEdit;
CHARFORMAT m_stCharFormat;
/* ==> progress bar */
CMyProgressBar m_oProgress;
/* ==> working status */
BOOL m_bWorkInProgress;
BOOL m_bRequestToStop;
BOOL m_bBatchObtain;
/* window controls for resizing */
UINT m_a_uiEditControl[10];
int m_a_iSizeLeft[10];
char m_cNbEditBox;
UINT m_a_uiRightAlignedButton[6];
char m_cNbRightButtons;
UINT m_a_uiBottomButton[5];
char m_cNbBottomButtons;
int m_iHeightLeft;
/* ==> dialog to display vss tree */
CDialogFileList m_oFileDlg;
/* ==> main dialog status */
BOOL m_bInitOK;
BOOL m_bQuitFromSysCommand;
/* ==> timer for base status */
BOOL m_bBaseStatusTimerOn;
UINT m_uiBaseStatusTimer;
/* ==> data for update */
BOOL m_bLocalExist;
char m_cVssStatus;
private:
void m_fn_vEnableButton( BOOL bEnable );
void m_fn_vDisplayProgramData( void );
void m_fn_vPause( void );
void m_fn_vWriteResultToLogFile( char *szString );
void m_fn_vFatalError( char *_szMessage );
void m_fn_Result_vAddLine( char *szLine, char cLineType );
void m_fn_Result_vResetContent();
void m_fn_vInitProgessBar( int _iStart, int _iEnd );
void m_fn_vDisplayBaseStatus( void );
void m_fn_vSetTimerForBaseStatus( void );
void m_fn_vKillTimerForBaseStatus( void );
char m_fn_cDoModifFileDelete( tdstModif *_p_stModif );
char m_fn_cDoModifFileModif( tdstModif *_p_stModif, BOOL _bForFile );
char m_fn_cDoModifFileAdd( tdstModif *_p_stModif );
BOOL m_fn_bUpdate( void );
BOOL m_fn_bOnCommandUpdate();
BOOL m_fn_bUpdateWithConfig( long _lNumberOfFiles, char **d_szFile );
BOOL m_fn_bOnCommandUpdateWithConfig( void );
void m_fn_vGetObtainingTimeString( char *szString );
void m_fn_vOnCommandObtain();
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMngDataDlg)
virtual BOOL OnInitDialog();
afx_msg void OnDestroy();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnCheckObtainMenu();
afx_msg void OnButtonViewmodif();
afx_msg void OnButtonBrowse();
afx_msg void OnButtonRefresh();
afx_msg void OnButtonLookobtain();
afx_msg void OnButtonLookupdate();
afx_msg void OnButtonVssfiles();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnCheckHelp();
afx_msg void OnButtonClearmodif();
afx_msg void OnCheckUpdate();
afx_msg void OnButtonStop();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
virtual void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnButtonChangemodif();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

View File

@@ -0,0 +1,99 @@
/*
=======================================================================================
Name :dlgmodif.h
Author :vincent lhullier Date :24/07/97
Description : header file for dialog box that will contain all modification list
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __DLGMODIF_H__
#define __DLGMODIF_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "resource.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CModifListDialog dialog
=======================================================================================
*/
class CModifListDialog : public CDialog
{
// Construction
public:
CModifListDialog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CModifListDialog)
enum { IDD = IDD_DIALOG_LISTMODIF };
//}}AFX_DATA
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CModifListDialog)
virtual BOOL OnInitDialog();
afx_msg void OnButtonHelp();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
afx_msg void OnDestroy();
afx_msg void OnCheckAll();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void m_fn_vFillModifList( BOOL _bAll );
};
/*
=======================================================================================
CModifListErrorDlg dialog
=======================================================================================
*/
class CModifListErrorDlg : public CDialog
{
//data member
private:
long m_lNumberOfErrors;
char **m_pp_szError;
// Construction
public:
CModifListErrorDlg(long _lNbErrors, char **_d_szError, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CModifListErrorDlg)
enum { IDD = IDD_DIALOG_MODIFLISTERROR };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CModifListErrorDlg)
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CModifListErrorDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing(UINT nSide, LPRECT lpRect);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif //__DLGMODIF_H__

View File

@@ -0,0 +1,63 @@
/*
*******************************************************************************
* NwCfgDlg.h : header file
*******************************************************************************
*/
#ifndef __NWCFGDLG_H__
#define __NWCFGDLG_H__
#include "resource.h"
/*
*******************************************************************************
* CNewConfigDialog class
*******************************************************************************
*/
class CNewConfigDialog : public CDialog
{
// data members
private:
char m_cConfigType;
int m_iCurSel;
char m_cConfig;
char m_szConfigName[40];
CListBox *m_p_oListConfig;
// Construction
public:
CNewConfigDialog(char _cConfigType, CWnd* pParent = NULL); // standard constructor
char *m_fn_szGetConfigName( void ) {return m_szConfigName; }
int m_fn_cGetConfigIndex( void ) {return m_cConfig; }
// Dialog Data
//{{AFX_DATA(CNewConfigDialog)
enum { IDD = IDD_DIALOG_NEWCONFIG };
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDialogFileList)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CNewConfigDialog)
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void OnSelchangeListConfig();
afx_msg void OnButtonHelp();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnButtonDelete();
afx_msg void OnButtonRename();
afx_msg void OnKillfocusEditName();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__NWCFGDLG_H__

View File

@@ -0,0 +1,88 @@
/*
=======================================================================================
Name : DlgObtai.h
Author : vincent lhullier Date :29/08/97
Description : header file for obtain dialog box class
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_DLGOBTAI_H__35C8479B_1F76_11D1_8F1B_00609736731A__INCLUDED_)
#define AFX_DLGOBTAI_H__35C8479B_1F76_11D1_8F1B_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CBatchObtainDlg dialog
=======================================================================================
*/
class CBatchObtainDlg : public CDialog
{
private:
UINT m_uiTimer;
char m_cHours;
char m_cMinutes;
char m_cSeconds;
long m_lSeconds;
BOOL m_bUseTimer;
BOOL m_bTry;
BOOL m_bObtain;
time_t m_xNextTry;
long m_lTryCount;
CBitmap m_a_oDigit[10];
CBitmap m_oSeparator;
// Construction
public:
CBatchObtainDlg(CWnd* pParent = NULL); // standard constructor
CBatchObtainDlg::~CBatchObtainDlg();
BOOL fn_bDoObtain( void ) { return m_bObtain; }
void fn_vComputeElapseTime();
// Dialog Data
//{{AFX_DATA(CBatchObtainDlg)
enum { IDD = IDD_DIALOG_BATCHOBTAIN };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBatchObtainDlg)
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CBatchObtainDlg)
virtual BOOL OnInitDialog();
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnCheckWait();
afx_msg void OnKillfocusEditSeconds();
afx_msg void OnDeltaposSpinTime(NMHDR* pNMHDR, LRESULT* pResult);
virtual void OnCancel();
afx_msg void OnCheckUsetimer();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDeltaposSpinSeconds(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGOBTAI_H__35C8479B_1F76_11D1_8F1B_00609736731A__INCLUDED_)

View File

@@ -0,0 +1,202 @@
/*
=======================================================================================
Name :DlgUpdOp.h
Author : Vincent Lhullier Date :17/07/97
Description : header file for dialog box for update options and update history
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_DLGUPDOP_H__9FDB1F23_FE79_11D0_8EF7_00609736731A__INCLUDED_)
#define AFX_DLGUPDOP_H__9FDB1F23_FE79_11D0_8EF7_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "DlgFile.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CONSTANT
=======================================================================================
*/
#define C_CHOICE_cYes 0
#define C_CHOICE_cYesAll 1
#define C_CHOICE_cNo 2
#define C_CHOICE_cNoAll 3
/*
=======================================================================================
CUpdateOptionsDlg dialog
=======================================================================================
*/
class CUpdateOptionsDlg : public CDialog
{
// Construction
public:
CUpdateOptionsDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CUpdateOptionsDlg)
enum { IDD = IDD_DIALOG_UPDATEOPTIONS };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CUpdateOptionsDlg)
virtual BOOL OnInitDialog();
virtual void OnOK();
afx_msg void OnCheckObtainafterupdate();
afx_msg void OnCheckForceupdate();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*
=======================================================================================
CUpdateHistoryDlg dialog
=======================================================================================
*/
class CUpdateHistoryDlg : public CDialog
{
// Construction
public:
CUpdateHistoryDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CUpdateHistoryDlg)
enum { IDD = IDD_DIALOG_UPDATEHISTORY };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CUpdateHistoryDlg)
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*
=======================================================================================
CUpdateOptionsDlg dialog
=======================================================================================
*/
class CUpdateFileListDlg : public CDialog
{
// data members
private:
CDialogFileList *m_p_oFileDlg;
tdstFileListConfig *m_p_stConfig;
// Construction
public:
CUpdateFileListDlg(CWnd* pParent = NULL); // standard constructor
void m_fn_vSetFileDialog( CDialogFileList *_p_oFileDlg ) { m_p_oFileDlg = _p_oFileDlg; }
void m_fn_vRefreshFileList( void );
// Dialog Data
//{{AFX_DATA(CUpdateFileListDlg)
enum { IDD = IDD_DIALOG_UPDATEFILELIST };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CUpdateFileListDlg)
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CUpdateFileListDlg)
virtual BOOL OnInitDialog();
afx_msg void OnButtonNewconfig();
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing(UINT nSide, LPRECT lpRect);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*
=======================================================================================
CYesNoAllDlg dialog
=======================================================================================
*/
class CYesNoAllDlg : public CDialog
{
// Construction
public:
CString cstrMessage;
CString cstrTitle;
char cChoice;
CSize m_oDialogSize;
CFont m_oFont;
PLOGFONT m_p_stFont;
CYesNoAllDlg(CWnd* pParent = NULL); // standard constructor
~CYesNoAllDlg();
void fn_vSetTitle( char *_szTitle );
void fn_vSetMessage( char *_szMessage );
char fn_cGetChoice( void ) {return cChoice; }
void fn_vComputeDialogSize( void );
// Dialog Data
//{{AFX_DATA(CYesNoAllDlg)
enum { IDD = IDD_DIALOG_YESALLNOALL };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CYesNoAllDlg)
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CYesNoAllDlg)
afx_msg void OnButtonNoall();
afx_msg void OnButtonYesall();
virtual void OnCancel();
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGUPDOP_H__9FDB1F23_FE79_11D0_8EF7_00609736731A__INCLUDED_)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,81 @@
/*
=======================================================================================
Name :error.h
Author :Vincent Lhullier Date :27/04/97
Description :error manager
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
#ifndef __ERROR_H__
#define __ERROR_H__
/*
=======================================================================================
Enumeration of error type
=======================================================================================
*/
typedef enum Error_tdeValue_
{
/* server */
Error_eCantAccessServer,
Error_eCantAccessTimeServer,
/* error for local directory */
Error_eCantCreateLocalPath,
/* vss errors */
Error_eCantAccessExistantItem,
Error_eFileAlreadyCheckOut,
Error_eCantDeleteFile,
Error_eSomeoneObtain,
Error_eSomeoneUpdate,
Error_eVssFileNotFound,
Error_eAccessDenied,
Error_eCantCreateVssProject,
/* time error */
Error_eVssFileNewer,
Error_eVssSectionNewer,
/* existence of file */
Error_eLocalFileNotFound,
Error_eSectionNotFound,
/* validity of filename or section */
Error_eInvalidFileName,
Error_eInvalidSectionName,
/* modification error */
Error_eCantUpdateModification,
Error_eVssSectionAlreadyCreated,
Error_eVssParentSectionInexistent,
} Error_tdeValue;
/*
=======================================================================================
Functions
=======================================================================================
*/
/* Set functions */
void Error_fn_vSet( Error_tdeValue _eError, char *_szErrorString = NULL );
void Error_fn_vSetFmt( Error_tdeValue _eError, char *_szFormat, ... );
/* Get functions */
Error_tdeValue Error_fn_eGet( void );
char *Error_fn_p_szGetMessage( void );
char *Error_fn_p_szGetSystemMessage( void );
/* display functions */
void Error_fn_vDisplay( BOOL _bSystem = FALSE );
#endif //__ERROR_H__

View File

@@ -0,0 +1,84 @@
/*
=======================================================================================
Name : HelpId.h
Author : vincent lhullier Date :27/07/97
Description : topic id of help file
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __MNGDTHLP_H__
#define __MNGDTHLP_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CONSTANTS
=======================================================================================
*/
/*
* Help file name
*/
#define C_szHelpFile "MngData5.Hlp"
/*
* topic IDs
*/
#define IDH_J_BUGS 1
#define IDH_J_CHANGINGLOCALPATH 2
#define IDH_J_CONFIGFILELIST 3
#define IDH_J_CONFLICT 4
#define IDH_J_FAQ 5
#define IDH_J_INIFILE 6
#define IDH_J_INTERFACE 7
#define IDH_J_ITF_COMMANDBUTTONS 8
#define IDH_J_ITF_INFOS 9
#define IDH_J_ITF_RESULTWINDOW 10
#define IDH_J_LOGIN 11
#define IDH_J_OBTAIN 12
#define IDH_J_REQUESTS 13
#define IDH_J_REQUIREMENTS 14
#define IDH_J_SECTIONFILELIST 15
#define IDH_J_SECTIONOBTAINING 16
#define IDH_J_SECTIONTARGETPATH 17
#define IDH_J_SECTIONVSS 18
#define IDH_J_SECTIONWINPREF 19
#define IDH_J_STARTING 20
#define IDH_J_SUMMARY 21
#define IDH_J_UPDATE 22
#define IDH_J_UPDATEOPTIONS 23
#define IDH_J_VIEWMODIF 24
#define IDH_J_WAIT 25
#define IDH_P_BROWSE 26
#define IDH_P_HELP 27
#define IDH_P_INOBTAIN 28
#define IDH_P_INUPDATE 29
#define IDH_P_LOCALPATH 30
#define IDH_P_LOOKINOBTAIN 31
#define IDH_P_LOOKINUPDATE 32
#define IDH_P_ME 33
#define IDH_P_MESSAGEERROR 34
#define IDH_P_MODIF 35
#define IDH_P_MODIFLIST 36
#define IDH_P_MORE 37
#define IDH_P_OBTAIN 38
#define IDH_P_OBTAININGTIME 39
#define IDH_P_QUIT 40
#define IDH_P_REFRESH 41
#define IDH_P_RESULTVIEW 42
#define IDH_P_UPDATE 43
#define IDH_P_VIEWMODIF 44
#define IDH_P_VSSEXE 45
#define IDH_P_VSSPATH 46
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif __MNGDTHLP_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,193 @@
/*
=======================================================================================
Name :IniData.h
Author :Vincent lhullier Date :21/07/97
Description :function for initial value (saving, loading, ... ) Header file
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __INIDATA_H__
#define __INIDATA_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include <afxdisp.h>
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
typedef struct tdstProject_ tdstProject;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Constants
=======================================================================================
*/
/*
* Ini file
*/
#define C_szIniFile "MngData.ini"
/*
* For Update Flags
*/
#define C_UpdateOption_lObtainAfter 0x0001
#define C_UpdateOption_lConfirmObtainAfter 0x0002
#define C_UpdateOption_lForce 0x0004
#define C_UpdateOption_lConfirmForce 0x0008
#define C_UpdateOption_lShowDifferences 0x0010
/*
* type of list
*/
#define C_ConfigType_cObtain 0
#define C_ConfigType_cUpdate 1
/*
=======================================================================================
Structures
=======================================================================================
*/
/*
* structure to store config of file list information
*/
typedef struct tdstFileListConfig_
{
char szKey[20]; // congfing entry in vss entry
char cIndex; // current config index
char szId[20]; // current config id
char szName[40]; // current config name
long lNumberOfFiles; // number of file in current config
char **d_szFile; // list of file name in current config
} tdstFileListConfig;
/*
* structure to store program information
*/
typedef struct tdstIniData_
{
char szTempPath[MAX_PATH]; // temporary path
char szLocalPath[MAX_PATH]; // name of local data path
char szVssPath[MAX_PATH]; // vss data path
char szVssDatabase[MAX_PATH]; // vss data path
char szVssUserName[20]; // User Name
char szInUpdateSem[MAX_PATH]; // name of file used as update semaphore
char szVssInUpdate[MAX_PATH]; // full name of vss file
char szLocalInUpdate[MAX_PATH]; // full name of local file
char szInObtainSem[MAX_PATH]; // name of file used as obtain semaphore
char szVssInObtain[MAX_PATH]; // full name of vss file
char szLocalInObtain[MAX_PATH]; // full name of local file
char szModifFile[MAX_PATH]; // name of file that contains modificationq
COleDateTime *p_oObtainingTime; // last obtaining time but within a OLE date time object
/*
long lNumberOfObtainedFiles; // number of file (projetc) obtained
char **d_szObtainedFile; // description of obtained files
*/
char a_cAvailableConfig[ 100 ]; // array of config available in ini file
tdstFileListConfig stObtainConfig;
tdstFileListConfig stUpdateConfig;
/*
long lNumberOfFilesToObtain; // files to obtained ( without recursive or not project)
char **d_szFileToObtain; // list of file name that will be obtained ( without project )
*/
} tdstIniData;
/*
* structure to store Window preference and options
*/
typedef struct tdstWindowsPref_
{
RECT stMainPos; // main window position and size
RECT stFilePos; // file window position and size
RECT stModifPos; // modif list window position and size
RECT stConflictPos; // conflict window pos and size
RECT stUpdateWithConfigPos; // Update with config window pos abnd size
long lUpdateFlags; // Update options
/*
* batch obtain preferences
*/
long lElapseTime;
char cRelativeDay;
char cHour;
char cMinute;
BOOL bWaitToBeAlone;
BOOL bUseTimer;
}tdstWindowsPref;
/*
*******************************************************************************
* Globals
*******************************************************************************
*/
extern COleDateTime g_oObtainingTime; // obtaining time
extern tdstIniData g_stIniData; // initial data
extern char g_szIniFile[MAX_PATH]; // ini file
extern tdstWindowsPref g_stWinPref; // program options
/*
*******************************************************************************
* Functions
*******************************************************************************
*/
/*
* specific function for file list configuration
*/
void fn_IniD_vFreeFileList ( tdstFileListConfig *_p_stFileList );
void fn_IniD_vWriteFileList ( tdstFileListConfig *_p_stFileList, char *_szIniFile );
void fn_IniD_vDeleteFileList ( char _cConfig, char *_szIniFile );
void fn_IniD_vRenameFileList ( char _cConfig, char *_szNewName, char *_szIniFile );
BOOL fn_IniD_bGetFileList ( tdstFileListConfig *_p_stFileList, char _cConfig, char *_szIniFile );
void fn_IniD_vSetSingleFileList ( tdstFileListConfig *_p_stFileList, char *_szFileName );
char fn_IniD_cGetIndexFromId( char *_szId );
char fn_IniD_cGetNumberOfConfig( void );
char fn_IniD_cGetAvailableConfig( void );
void fn_IniD_vGetConfigName( char _cConfig, char *_szName );
char fn_IniD_cGetConfigType( char _cConfig );
/*
* function to get/set single initial data
*/
void fn_IniD_vSetLocalPath( char *_szPath );
void fn_IniD_vSetVssDatabase( char *_szSourceSafeIni );
void fn_IniD_vSetVssUserName( char *_szUserName );
void fn_IniD_vSetModifListFile( char *_szFileName );
void fn_IniD_vSetUpdateFlag( long _lFlag, BOOL _bValue );
/*
* function for obtaining data information
*/
void fn_IniD_vSaveObtainingDate( void );
void fn_IniD_vSaveObtainingInfo( void );
//void fn_IniD_vFreeObtainedFileList( void );
void fn_IniD_vGetObtainingInfo( void );
/*
* function to free list of file to obtain
*/
//void fn_IniD_vFreeFileListToObtain( void );
/*
* function for windows preference data
*/
void fn_IniD_vGetWindowPreference( void );
void fn_IniD_vWriteWindowPreference( void );
/*
* function for all ini data
*/
void fn_IniD_vGetAllFromIniFile( BOOL _bFirst );
#endif //__INIDATA_H__

View File

@@ -0,0 +1,28 @@
/*
****************************************************************************************
* Name :LogFile.h
*
* Author : Vincent Lhullier Date :09/04/97
*
* Description : header file for function to manage log file for mngdata program
****************************************************************************************
* Modification -> Author : Date :
* Description :
****************************************************************************************
*/
#ifndef __LOGFILE_H__
#define __LOGFILE_H__
/*
****************************************************************************************
* FUNCTION
****************************************************************************************
*/
void LOG_fn_vInitLogFile( void );
void LOG_fn_vDeleteLogFile( void );
long LOG_fn_lWriteInLogFile( char *szBuffer );
#endif //__LOGFILE_H__

View File

@@ -0,0 +1,81 @@
/*
=======================================================================================
Name :MajData.h
Author :vincent lhullier Date :21/07/97
Description :header file to access function for updating data
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __MAJDATA_H__
#define __MAJDATA_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "SCR.h"
#include "ModifLst.h"
#include "IniData.h"
#include "Tree_Fct.h"
#include "Vss5_Fct.h"
#include "TimeFunc.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Structures
=======================================================================================
*/
/*
* structure to store info about one file
*/
typedef struct tdstFileInfo_
{
SCR_tdst_File_Open *p_stFile;
char szFullName[MAX_PATH];
SCR_tdst_Anl_SectionDes *p_stSection;
char *p_cBuffer;
long lSize;
COleDateTime oTime;
char szLastUserName[ 20 ];
} tdstFileInfo;
/*
=======================================================================================
Globals
=======================================================================================
*/
extern char g_szVssFileName[ MAX_PATH ];
extern tdstFileInfo g_stTarget;
extern tdstFileInfo g_stSource;
extern char g_cDeleteSectionModif;
extern char g_cAddModifiedFile;
/*
=======================================================================================
Functions
=======================================================================================
*/
BOOL fn_bSomeoneUpdate( BOOL bCreateFile, BOOL _bMessage );
BOOL fn_bGetUpdateStatus( char *_p_szMsg = NULL);
BOOL fn_bBeginUpdating( void );
BOOL fn_bEndUpdating( void );
BOOL fn_bDoModif( tdstModif *p_stModif );
BOOL fn_bSomeoneObtain( BOOL _bMessage );
BOOL fn_bGetObtainStatus( char *_p_szMsg = NULL );
BOOL fn_bBeginObtaining( void );
BOOL fn_bEndObtaining( void );
BOOL fn_bObtainFile( char *szFileName, BOOL *_bObtain );
char fn_cUpdateFile( char *_szLocalFileName );
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif /*__MAJDATA_H__*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,52 @@
/*
=======================================================================================
Name :MngData5.h
Author : VL Date :10/07/97
Description : main header file for the MNGDATA application
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "resource.h" // main symbols
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CMngDataApp
=======================================================================================
*/
class CMngDataApp : public CWinApp
{
public:
CMngDataApp();
/* ==> specific functions */
BOOL fn_bInitWindowsSocket( void );
void fn_vCloseWindowsSocket( void );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMngDataApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMngDataApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

View File

@@ -0,0 +1,693 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.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
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 171, 54
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "A propos de MngData"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Vss Data Manager V1.3.0",IDC_STATIC,45,7,119,8,
SS_NOPREFIX
LTEXT "Copyright <20> 1997 UBI Simulations",IDC_STATIC,45,18,119,
8
DEFPUSHBUTTON "OK",IDOK,79,33,32,14,WS_GROUP
CONTROL "",IDC_STATIC_ANIM,"Static",SS_BITMAP | WS_GROUP,7,14,25,
25
END
IDD_DIALOG_FILELIST DIALOG DISCARDABLE 0, 0, 256, 193
STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Gotten folders"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,157,159,38,12
PUSHBUTTON "Cancel",IDCANCEL,157,174,38,12
CONTROL "Tree1",IDC_TREE_VSS,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
5,22,190,133
CONTROL "Get",IDC_CHECK_OBTAIN,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,5,159,60,12
CONTROL "Get Recursively",IDC_CHECK_RECURSE,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,5,174,60,12
CTEXT "Not get",IDC_STATIC_LEGENDTEXT0,209,38,37,8
CTEXT "Get",IDC_STATIC_LEGENDTEXT1,209,63,37,8
CTEXT "Get recursively",IDC_STATIC_LEGENDTEXT2,209,88,37,16
CTEXT "Recursively gotten",IDC_STATIC_LEGENDTEXT3,209,121,37,
17
EDITTEXT IDC_EDIT_CONFIGNAME,60,7,135,12,ES_AUTOHSCROLL |
ES_READONLY
DEFPUSHBUTTON "Get all",IDC_BUTTON_OBTAINALL,69,159,45,12
DEFPUSHBUTTON "Clear all",IDC_BUTTON_OBTAINNOTHING,69,174,45,12
PUSHBUTTON "Help",IDC_BUTTON_HELP,205,174,45,12
CONTROL 136,IDC_STATIC_PICTURE,"Static",SS_BITMAP,119,158,33,31
CONTROL "Button1",IDC_BUTTON_LEGEND0,"Button",BS_OWNERDRAW |
WS_TABSTOP,212,25,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND1,"Button",BS_OWNERDRAW |
WS_TABSTOP,212,50,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND2,"Button",BS_OWNERDRAW |
WS_TABSTOP,221,75,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND3,"Button",BS_OWNERDRAW |
WS_TABSTOP,212,108,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND4,"Button",BS_OWNERDRAW |
WS_TABSTOP,231,25,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND5,"Button",BS_OWNERDRAW |
WS_TABSTOP,231,50,12,12
CONTROL "Button1",IDC_BUTTON_LEGEND6,"Button",BS_OWNERDRAW |
WS_TABSTOP,231,108,12,12
CTEXT "File in Got. project ",IDC_STATIC_LEGENDTEXT4,209,154,
38,16
CONTROL "Button1",IDC_BUTTON_LEGEND7,"Button",BS_OWNERDRAW |
WS_TABSTOP,221,141,12,12
CONTROL 191,IDC_STATIC_KEYS,"Static",SS_BITMAP,208,24,39,117
CONTROL "Tab1",IDC_TAB_LEGEND,"SysTabControl32",TCS_FIXEDWIDTH |
TCS_FOCUSNEVER,205,7,45,165
CONTROL "Config",IDC_CHECK_CONFIG,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,5,7,50,12
END
IDD_DIALOG_LISTMODIF DIALOG DISCARDABLE 0, 0, 260, 102
STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "List of modifications"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Close",IDCANCEL,76,81,50,14
LISTBOX IDC_LIST_MODIF,7,7,246,69,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
PUSHBUTTON "Help",IDC_BUTTON_HELP,134,81,50,14
CONTROL "All",IDC_CHECK_ALL,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,7,85,23,10
END
IDD_DIALOG_NEWCONFIG DIALOG DISCARDABLE 0, 0, 127, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "File configuration"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,87,104,35,14
PUSHBUTTON "Cancel",IDCANCEL,87,136,35,14
LTEXT "Name",IDC_STATIC,5,8,20,8
EDITTEXT IDC_EDIT_NAME,29,4,81,14,ES_AUTOHSCROLL
LISTBOX IDC_LIST_CONFIG,5,23,117,77,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Help",IDC_BUTTON_HELP,88,120,34,14
PUSHBUTTON "Delete",IDC_BUTTON_DELETE,5,136,50,14
PUSHBUTTON "Rename",IDC_BUTTON_RENAME,5,120,50,14
END
IDD_MNGDATA_DIALOG DIALOGEX 0, 0, 210, 202
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU |
WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Automatic Vss Data Manager"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LTEXT "Last obtain",IDC_STATIC,45,15,36,8
EDITTEXT IDC_EDIT_OBTAINTIME,85,13,120,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Local Path",IDC_STATIC,45,33,35,8
EDITTEXT IDC_EDIT_LOCALPATH,85,31,90,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "Browse",IDC_BUTTON_BROWSE,175,31,30,12
LTEXT "Vss Path",IDC_STATIC,45,47,29,8
EDITTEXT IDC_EDIT_VSSPATH,85,45,90,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "More...",IDC_BUTTON_VSSFILES,175,45,30,12
LTEXT "InUpdate semaphore",IDC_STATIC,5,67,67,8
EDITTEXT IDC_EDIT_INUPDATE,85,65,90,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "Look",IDC_BUTTON_LOOKUPDATE,175,65,30,12
LTEXT "InObtain semaphore",IDC_STATIC,5,81,64,8
EDITTEXT IDC_EDIT_INOBTAIN,85,79,90,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "Look",IDC_BUTTON_LOOKOBTAIN,175,79,30,12
LTEXT "Modification file",IDC_STATIC,5,99,50,8
EDITTEXT IDC_EDIT_MODIFFILE,85,97,60,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "Change",IDC_BUTTON_CHANGEMODIF,145,97,30,12
PUSHBUTTON "Clear",IDC_BUTTON_CLEARMODIF,175,97,30,12
LTEXT "Modification",IDC_STATIC,5,112,46,8
EDITTEXT IDC_EDIT_MODIFICATION,85,111,90,12,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "View",IDC_BUTTON_VIEWMODIF,175,111,30,12
PUSHBUTTON "Refresh",IDC_BUTTON_REFRESH,5,185,40,12
CONTROL "Obtain",IDC_CHECK_OBTAINMENU,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,45,185,40,12
CONTROL "Update",IDC_CHECK_UPDATE,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,85,185,40,12
PUSHBUTTON "Quit",IDCANCEL,125,185,40,12
CONTROL "Help",IDC_CHECK_HELP,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,165,185,40,12
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",NOT
WS_VISIBLE | WS_BORDER,5,180,200,12
PUSHBUTTON "Stop !",IDC_BUTTON_STOP,155,172,50,14,NOT WS_VISIBLE
CONTROL "",IDC_STATIC_FORRICHEDIT,"Static",SS_BLACKFRAME | NOT
WS_VISIBLE,5,125,195,46
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 164
TOPMARGIN, 7
BOTTOMMARGIN, 47
END
IDD_DIALOG_FILELIST, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 249
TOPMARGIN, 7
BOTTOMMARGIN, 188
END
IDD_DIALOG_LISTMODIF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 253
TOPMARGIN, 7
BOTTOMMARGIN, 95
END
IDD_DIALOG_NEWCONFIG, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 122
TOPMARGIN, 4
BOTTOMMARGIN, 150
END
IDD_MNGDATA_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 205
TOPMARGIN, 5
BOTTOMMARGIN, 197
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG_LOGIN DIALOG DISCARDABLE 0, 0, 150, 122
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Vss Login"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,5,53,50,14
PUSHBUTTON "Cancel",IDCANCEL,95,53,50,14
LTEXT "Database",IDC_STATIC,5,37,32,8
LTEXT "UserName",IDC_STATIC,5,7,34,8
LTEXT "Password",IDC_STATIC,5,22,32,8
EDITTEXT IDC_EDIT_USERNAME,45,5,100,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_PASSWORD,45,20,100,12,ES_PASSWORD |
ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_DATABASE,45,35,82,12,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BUTTON_BROWSE,130,35,13,12
LTEXT "If your user name has more than 15 characters you will not able to login. Ask your administrator a new user name.",
IDC_STATIC,34,78,111,39
ICON IDI_ICON_WARNING,IDC_STATIC,5,81,21,20
END
IDD_DIALOG_WAIT DIALOG DISCARDABLE 0, 0, 227, 377
STYLE DS_MODALFRAME | WS_POPUP
FONT 8, "MS Sans Serif"
BEGIN
CONTROL 200,IDC_STATIC,"Static",SS_BITMAP,7,7,226,246
LTEXT "No more conflict with previously updated section by the same user",
IDC_STATIC,40,275,180,18
LTEXT "Project",IDC_STATIC_PROJECT,7,258,213,15
LTEXT "When an error occurs because a file is check-out the name of user that have checked out the file is displayed",
IDC_STATIC,40,295,180,20
LTEXT "In configuration window you can change status of a file or folder by typing a key (G : get, N : Not get, R : recursive)",
IDC_STATIC,40,317,180,28
LTEXT "You can now delete, rename, import, export configuration.",
IDC_STATIC,40,349,180,20
CONTROL 196,IDC_STATIC,"Static",SS_BITMAP,7,277,25,23
END
IDD_DIALOG_UPDATEOPTIONS DIALOG DISCARDABLE 0, 0, 175, 130
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Update options"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,7,109,50,14
PUSHBUTTON "Cancel",IDCANCEL,118,109,50,14
CONTROL "Obtain automatically after updating",
IDC_CHECK_OBTAINAFTERUPDATE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,15,76,132,10
CONTROL "Ask before obtaining",IDC_CHECK_CONFIRMBEFOREOBTAIN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,86,81,10
CONTROL "Force your modifications to be updated",
IDC_CHECK_FORCEUPDATE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,15,20,143,10
GROUPBOX "In case of conflict",IDC_STATIC,7,7,161,51
CONTROL "Ask before updating your modif",
IDC_CHECK_CONFIRMBEFOREMODIF,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,30,30,113,10
GROUPBOX "After an update",IDC_STATIC,7,63,161,40
CONTROL "Show conflict with differences",
IDC_CHECK_SHOWDIFFERENCES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,30,40,110,10
END
IDD_DIALOG_CONFLICT DIALOG DISCARDABLE 0, 0, 222, 169
STYLE WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Conflict window"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Keep Vss",IDCANCEL,47,148,60,14
CTEXT "Vss section",IDC_STATIC_VSS,7,22,100,18,SS_SUNKEN
CTEXT "Local section",IDC_STATIC_LOCAL,115,22,100,18,SS_SUNKEN
CTEXT "SectionName",IDC_STATIC_SECTION,7,7,208,10,WS_BORDER
CONTROL "Tree1",IDC_TREE_VSS,"SysTreeView32",TVS_SHOWSELALWAYS |
WS_BORDER | WS_TABSTOP,7,51,101,38
CONTROL "Tree2",IDC_TREE_LOCAL,"SysTreeView32",TVS_SHOWSELALWAYS |
WS_BORDER | WS_TABSTOP,115,46,100,38
PUSHBUTTON "Text",IDC_BUTTON_TREETEXT,7,148,50,14
PUSHBUTTON "Take Local",IDOK,111,148,50,14
CONTROL "Tree1",IDC_TREE_MERGE,"SysTreeView32",WS_BORDER |
WS_TABSTOP,7,100,208,35
END
IDD_DIALOG_UPDATEHISTORY DIALOG DISCARDABLE 0, 0, 186, 126
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Update history"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Close",IDCANCEL,64,105,50,14
LISTBOX IDC_LIST_HISTORY,7,7,172,93,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
END
IDD_DIALOG_BATCHOBTAIN DIALOG DISCARDABLE 0, 0, 185, 114
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Batch Obtain"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Try to obtain every",IDC_STATIC_SECONDS,"Static",
SS_LEFTNOWORDWRAP | WS_GROUP,5,10,60,8
EDITTEXT IDC_EDIT_SECONDS,70,8,40,12,ES_AUTOHSCROLL |
ES_WANTRETURN | ES_NUMBER
CONTROL "Spin1",IDC_SPIN_SECONDS,"msctls_updown32",
UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_HORZ,110,8,16,12
LTEXT "Seconds",IDC_STATIC_SECONDS2,130,10,29,8
GROUPBOX " Obtain after",IDC_STATIC_TIMER,5,28,175,42
CONTROL "",IDC_CHECK_USETIMER,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,11,27,10,10
LTEXT "relative day",IDC_STATIC_DAY,15,40,40,8
COMBOBOX IDC_COMBO_DAY,60,38,100,54,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "At",IDC_STATIC_TIME,45,55,10,8
EDITTEXT IDC_EDIT_TIME,60,53,40,12,ES_AUTOHSCROLL | ES_READONLY |
ES_WANTRETURN
CONTROL "Spin2",IDC_SPIN_TIME,"msctls_updown32",UDS_ARROWKEYS |
UDS_HORZ,100,53,16,12
LTEXT "Use shift for hour",IDC_STATIC_TIME2,118,55,54,8
CONTROL "Wait that nobody else work on database",
IDC_CHECK_NOBODYELSE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,5,75,143,10
CONTROL "",IDC_BUTTON_TIME,"Button",BS_OWNERDRAW | NOT
WS_VISIBLE | WS_TABSTOP,50,40,85,30
CONTROL "Wait",IDC_CHECK_WAIT,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,68,95,50,15
PUSHBUTTON "Close",IDCANCEL,130,95,50,14
LTEXT "IDC_STATIC_WAIT",IDC_STATIC_WAIT,5,5,175,30,SS_SUNKEN |
NOT WS_VISIBLE | WS_BORDER
LTEXT "IDC_STATIC_RESULT",IDC_STATIC_RESULT,5,75,175,16,
SS_SUNKEN | NOT WS_VISIBLE | WS_BORDER
END
IDD_DIALOG_UPDATEFILELIST DIALOG DISCARDABLE 0, 0, 214, 126
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Update",IDOK,7,105,50,14
PUSHBUTTON "Cancel",IDCANCEL,157,105,50,14
LTEXT "Current config",IDC_STATIC_CONFIG,7,9,45,8
EDITTEXT IDC_EDIT_CONFIG,57,7,60,12,ES_AUTOHSCROLL | ES_READONLY
PUSHBUTTON "Choose/Create config",IDC_BUTTON_NEWCONFIG,120,7,87,12
LTEXT "current config project / file list",IDC_STATIC_FILELIST,
7,27,94,8
LISTBOX IDC_LIST_FILES,7,40,200,60,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
END
IDD_DIALOG_MODIFLISTERROR DIALOG DISCARDABLE 0, 0, 332, 134
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Error in list of modifications"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,275,113,50,14
LISTBOX IDC_LIST_ERRORS,7,24,318,82,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
WS_TABSTOP
LTEXT "Static",IDC_STATIC_TITLE,7,7,318,10,WS_BORDER
END
IDD_DIALOG_YESALLNOALL DIALOG DISCARDABLE 0, 0, 274, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Static",IDC_STATIC_MESSAGE,7,7,260,53
DEFPUSHBUTTON "Yes",IDOK,36,74,50,14
PUSHBUTTON "Yes All",IDC_BUTTON_YESALL,86,74,50,14
PUSHBUTTON "No",IDCANCEL,136,74,50,14
PUSHBUTTON "No All",IDC_BUTTON_NOALL,186,74,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_LOGIN, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 145
TOPMARGIN, 5
BOTTOMMARGIN, 117
END
IDD_DIALOG_WAIT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 220
TOPMARGIN, 7
BOTTOMMARGIN, 370
END
IDD_DIALOG_UPDATEOPTIONS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 168
TOPMARGIN, 7
BOTTOMMARGIN, 123
END
IDD_DIALOG_CONFLICT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 215
TOPMARGIN, 7
BOTTOMMARGIN, 162
END
IDD_DIALOG_UPDATEHISTORY, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 119
END
IDD_DIALOG_BATCHOBTAIN, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 180
TOPMARGIN, 4
BOTTOMMARGIN, 108
END
IDD_DIALOG_UPDATEFILELIST, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 207
TOPMARGIN, 7
BOTTOMMARGIN, 119
END
IDD_DIALOG_MODIFLISTERROR, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 325
TOPMARGIN, 7
BOTTOMMARGIN, 127
END
IDD_DIALOG_YESALLNOALL, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 267
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#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
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 12, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""..\\Res\\MngData5.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON_NOTOBTAIN ICON DISCARDABLE "..\\res\\noobtain.ico"
IDI_ICON_OBTAIN ICON DISCARDABLE "..\\res\\Obtain.ico"
IDI_ICON_OBTAINCAUSERECURSE ICON DISCARDABLE "..\\res\\ObCauRec.ico"
IDI_ICON_OBTAINRECURSE ICON DISCARDABLE "..\\res\\ObRecurs.ico"
IDR_MAINFRAME ICON DISCARDABLE "..\\res\\ProgIcon.ico"
IDI_ICON_WARNING ICON DISCARDABLE "..\\res\\warning.ico"
IDI_ICON_FILENOTOBTAIN ICON DISCARDABLE "..\\res\\filenoto.ico"
IDI_ICON_FILEOBTAIN ICON DISCARDABLE "..\\res\\fileobta.ico"
IDI_ICON_FILEOBTAINCAUSERECURSE ICON DISCARDABLE "..\\res\\fileobcr.ico"
IDI_ICON_FILEOBTAINCAUSEPROJOBTAINED ICON DISCARDABLE "..\\res\\fileocpo.ico"
IDI_ICON_TREESECTIONSAME ICON DISCARDABLE "..\\res\\treesame.ico"
IDI_ICON_TREESECTIONDIFF ICON DISCARDABLE "..\\res\\TreeDiff.ico"
IDI_ICON_TREESECTIONLOCAL ICON DISCARDABLE "..\\res\\TreeLocl.ico"
IDI_ICON_TREESECTIONVSS ICON DISCARDABLE "..\\res\\TreeVss.ico"
IDI_ICON_TREEENTRYSAME ICON DISCARDABLE "..\\res\\EntrSame.ico"
IDI_ICON_TREEENTRYDIFF ICON DISCARDABLE "..\\res\\EntrDiff.ico"
IDI_ICON_TREEENTRYVSS ICON DISCARDABLE "..\\res\\EntrVss.ico"
IDI_ICON_TREEENTRYLOCAL ICON DISCARDABLE "..\\res\\EntrLocl.ico"
IDI_ICON_KEY ICON DISCARDABLE "..\\res\\iconkey.ico"
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,1,1
PRODUCTVERSION 1,0,1,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "UBI Simulation\0"
VALUE "FileDescription", "Application MFC MNGDATA5\0"
VALUE "FileVersion", "1, 0, 1, 1\0"
VALUE "InternalName", "MNGDATA5\0"
VALUE "LegalCopyright", "Copyright <20> 1997 UBI Soft\0"
VALUE "OriginalFilename", "MNGDATA5.EXE\0"
VALUE "ProductName", "Vss Data Manager\0"
VALUE "ProductVersion", "1, 0, 1, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP_FOND BITMAP DISCARDABLE "..\\res\\ed.bmp"
IDB_BITMAP_FOND2 BITMAP DISCARDABLE "..\\res\\canard2.bmp"
IDB_BITMAP_ABOUT_0 BITMAP DISCARDABLE "..\\res\\about_00.bmp"
IDB_BITMAP_ABOUT_2 BITMAP DISCARDABLE "..\\res\\about_02.bmp"
IDB_BITMAP_ABOUT_1 BITMAP DISCARDABLE "..\\res\\about_01.bmp"
IDB_BITMAP_ABOUT_3 BITMAP DISCARDABLE "..\\res\\about_03.bmp"
IDB_BITMAP_ABOUT_4 BITMAP DISCARDABLE "..\\res\\about_04.bmp"
IDB_BITMAP_ABOUT_5 BITMAP DISCARDABLE "..\\res\\about_05.bmp"
IDB_BITMAP_ABOUT_6 BITMAP DISCARDABLE "..\\res\\about_06.bmp"
IDB_BITMAP_ABOUT_7 BITMAP DISCARDABLE "..\\res\\about_07.bmp"
IDB_BITMAP_ABOUT_8 BITMAP DISCARDABLE "..\\res\\about_08.bmp"
IDB_BITMAP_ABOUT_9 BITMAP DISCARDABLE "..\\res\\about_09.bmp"
IDB_BITMAP_ABOUT_10 BITMAP DISCARDABLE "..\\res\\about_10.bmp"
IDB_BITMAP_NOTOBTAIN BITMAP DISCARDABLE "..\\res\\noobtain.bmp"
IDB_BITMAP_OBTAIN BITMAP DISCARDABLE "..\\res\\obtain.bmp"
IDB_BITMAP_OBTAINCAUSERECURSE BITMAP DISCARDABLE "..\\res\\ObCauRec.bmp"
IDB_BITMAP_OBTAINRECURSE BITMAP DISCARDABLE "..\\res\\obRecurs.bmp"
IDB_BITMAP_LENNON BITMAP DISCARDABLE "..\\res\\lennon.bmp"
IDB_BITMAP_ANIM1 BITMAP DISCARDABLE "..\\res\\anim1.bmp"
IDB_BITMAP_ANIM2 BITMAP DISCARDABLE "..\\res\\anim2.bmp"
IDB_BITMAP_ANIM4 BITMAP DISCARDABLE "..\\res\\anim4.bmp"
IDB_BITMAP_DIGIT8 BITMAP DISCARDABLE "..\\res\\digit8.bmp"
IDB_BITMAP_DIGIT0 BITMAP DISCARDABLE "..\\res\\digit0.bmp"
IDB_BITMAP_DIGIT1 BITMAP DISCARDABLE "..\\res\\digit1.bmp"
IDB_BITMAP_DIGIT2 BITMAP DISCARDABLE "..\\res\\digit2.bmp"
IDB_BITMAP_DIGIT3 BITMAP DISCARDABLE "..\\res\\digit3.bmp"
IDB_BITMAP_DIGIT9 BITMAP DISCARDABLE "..\\res\\digit9.bmp"
IDB_BITMAP_DIGIT4 BITMAP DISCARDABLE "..\\res\\digit4.bmp"
IDB_BITMAP_DIGIT5 BITMAP DISCARDABLE "..\\res\\digit5.bmp"
IDB_BITMAP_DIGIT6 BITMAP DISCARDABLE "..\\res\\digit6.bmp"
IDB_BITMAP_DIGIT7 BITMAP DISCARDABLE "..\\res\\digit7.bmp"
IDB_BITMAP_SEPAR BITMAP DISCARDABLE "..\\res\\separ.bmp"
IDB_BITMAP_KEYLEGEND BITMAP DISCARDABLE "..\\res\\Keys.bmp"
IDB_BITMAP_NEW BITMAP DISCARDABLE "..\\res\\new.bmp"
IDB_BITMAP1_DEATH BITMAP DISCARDABLE "..\\res\\death.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
IDD_DIALOG_BATCHOBTAIN DLGINIT
BEGIN
IDC_COMBO_DAY, 0x403, 6, 0
0x6f54, 0x6164, 0x0079,
IDC_COMBO_DAY, 0x403, 9, 0
0x6f54, 0x6f6d, 0x7272, 0x776f, "\000"
IDC_COMBO_DAY, 0x403, 19, 0
0x6144, 0x2079, 0x6661, 0x6574, 0x2072, 0x6f74, 0x6f6d, 0x7272, 0x776f,
"\000"
0
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&A propos de MngData..."
END
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE 12, 1
#pragma code_page(1252)
#endif
#include "..\Res\MngData5.rc2" // non-Microsoft Visual C++ edited resources
#include "l.fra\afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,129 @@
/*
*=======================================================================================
* Name :ModifLst.h
*
* Author :vincent lhullier Date :24/07/97
*
* Description :functions to manage modification list : header file
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __MODIFLST_H__
#define __MODIFLST_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CONSTANTS
=======================================================================================
*/
/*
* character associated with a type of modification
*/
#define C_ModifChar_cAdd 'A'
#define C_ModifChar_cRebuild 'R'
#define C_ModifChar_cModif 'M'
#define C_ModifChar_cDelete 'D'
/*
* type of modification
*/
#define C_ModifType_cError -1
#define C_ModifType_cDestroy 0
#define C_ModifType_cAdd 1
#define C_ModifType_cRebuild 2
#define C_ModifType_cModif 3
#define C_ModifType_cDelete 4
/*
=======================================================================================
STRUCTURE
=======================================================================================
*/
/*
* to store information about one modification
*/
typedef struct tdstModif_
{
long lLine;
BOOL bConflict;
struct tdstModif_ *p_stFather;
char cPrevType;
char cType;
char *szName;
struct tdstModif_ *p_stNext;
struct tdstModif_ *p_stPrevious;
} tdstModif;
/*
=======================================================================================
External Globals
=======================================================================================
*/
extern tdstModif *g_p_stLastModif;
extern tdstModif *g_p_stFirstModif;
extern long g_lNumberOfModifs;
extern long g_lNumberOfChildModifs;
extern long g_lNumberOfFatherModifs;
extern char *g_a_szModifName[5];
/*
=======================================================================================
Functions
=======================================================================================
*/
/*
* function to decompose modification name
*/
BOOL fn_bGetModifiedFile( tdstModif *_p_stModif, char *_szFileName, char *_szShortFileName );
/* get first child of a modif */
tdstModif *fn_p_stGetChildModif( tdstModif *_p_stFather );
long fn_lNumberOfChildModif( tdstModif *_p_stFather );
/* delete a notification on a section and set active all modif on sub section of this */
//void fn_vDeleteModifAndRestoreSubModif( tdstModif *_p_stModif );
void fn_vRestoreSubModif( tdstModif *_p_stModif );
/* delete a modif from list */
long fn_lDeleteModif( tdstModif *_p_stModif, BOOL _bDeleteChild );
/* delete all modif in list */
void fn_vDeleteAllModifs( void );
/* search for a modification in the same file */
tdstModif *fnp_stGetModifInFile( char *_szFileName, BOOL _bChild, BOOL _bAll );
/* delete all modif that are in a given file */
int fn_iDeleteAllModifForAFile( char *_szFileName );
/* mak all modif that are in a file */
int fn_iMarkAllModifForAFile( char *_szFileName );
/* get first valid modif */
tdstModif *fn_p_stGetFirstNotMarkedModif( void );
/* delete modif file */
BOOL fn_bDeleteModifFile( void );
/* rewrite modif file with all modif that are always in file */
void fn_vWriteModifInFile( BOOL _bDelete );
/* function that read file where Modification list was saved. */
int fn_iReadModificationFile( void );
/* update modification file */
void fn_vUpdateModifFile( void );
/* clean modification list : delete all redondant modifications */
void fn_vCleanModifList( void );
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif /*__MODIFLST_H__*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,111 @@
/*
*=======================================================================================
* Name :progbar.h
*
* Author :Vincent lhullier Date :15/07/97
*
* Description :a beautiful progress bar
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_)
#define AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Strutures
=======================================================================================
*/
typedef struct tdstProgressBarDrawingData_
{
COLORREF xBackColor;
COLORREF xHeadColor;
COLORREF xTailColor;
COLORREF xTextColor;
char szText[40];
UINT uiAnimBitmap;
char cAnimNbFrames;
char cAnimFrameWidth;
} tdstProgressBarDrawingData;
/*
=======================================================================================
CMyProgressBar window
=======================================================================================
*/
class CMyProgressBar : public CProgressCtrl
{
// Construction
public:
CMyProgressBar();
// Attributes
public:
BOOL m_bInit;
int m_iStart;
int m_iEnd;
CDC m_oDC;
CBitmap m_oBitmap;
CDC m_oAnimDC;
CBitmap m_oAnimBitmap;
char m_cNumberOfFrames;
char m_cFrameWidth;
char m_cCurrentFrame;
COLORREF m_xBackgroundColor;
COLORREF m_xForegroundColor;
// Operations
public:
void m_fn_vSetRange( int _iStart, int _iEnd );
void m_fn_vReinit( void );
void m_fn_vInitDC( void );
void m_fn_vInitDrawing( COLORREF _xBackground = 0);
void m_fn_vInitDrawing( int _iRed, int _iGreen, int _iBlue, COLORREF _xBackground = 0);
void m_fn_vInitDrawing( UINT _uiBitmap, COLORREF _xForeground, COLORREF _xBackground = 0);
void m_fn_vInitDrawing( tdstProgressBarDrawingData *_p_stPBDD );
void m_fn_vInitAnim( UINT _uiBitmap, char _cFrame, char _cFrameWidht );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyProgressBar)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyProgressBar();
// Generated message map functions
protected:
//{{AFX_MSG(CMyProgressBar)
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,139 @@
//*****************************************************************************
// ssauterr.h
//
//
// Copyright (c) 1995 by Microsoft Corporation, All Rights Reserved
//*****************************************************************************
#define MAKEHR(iStat) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, (USHORT) (iStat))
#define ESS_CORRUPT MAKEHR(-10600) // File %s may be corrupt
#define ESS_DT_BADDATESTR MAKEHR(-10159) // Invalid date string: "%s"
#define ESS_DT_INVALID MAKEHR(-10161) // Invalid time or date string
#define ESS_NOMORE_HANDLES MAKEHR(-10164) // Too many file handles open.
#define ESS_FILE_ACCESSDENIED MAKEHR(-10165) // Access to file "%s" denied
#define ESS_FILE_BADDRIVE MAKEHR(-10166) // Invalid drive: %s
#define ESS_FILE_BADHANDLE MAKEHR(-10167) // Invalid handle.
#define ESS_FILE_BADNAME MAKEHR(-10168) // Invalid filename: "%s"
#define ESS_FILE_BADPARAM MAKEHR(-10170) // Invalid access code (bad parameter)
#define ESS_FILE_BADPATH MAKEHR(-10171) // Invalid DOS path: %s
#define ESS_FILE_CURRENTDIR MAKEHR(-10172) // Folder %s is in use
#define ESS_FILE_DISKFULL MAKEHR(-10173) // Disk full
#define ESS_FILE_EXISTS MAKEHR(-10175) // File "%s" already exists
#define ESS_FILE_LOCKED MAKEHR(-10176) // File "%s" is locked
#define ESS_FILE_NOTFOUND MAKEHR(-10178) // File "%s" not found
#define ESS_FILE_READ MAKEHR(-10180) // Error reading from file
#define ESS_FILE_SHARE MAKEHR(-10181) // File %s is already open
#define ESS_FILE_TOOMANY MAKEHR(-10182) // Too many file handles open
#define ESS_FILE_VOLNOTSAME MAKEHR(-10183) // Cannot rename to another volume
#define ESS_FILE_WRITE MAKEHR(-10184) // Error writing to file
#define ESS_INI_BADBOOL MAKEHR(-10200) // Initialization variable "%s" must be set to "Yes" or "No"
#define ESS_INI_BADLINE MAKEHR(-10201) // Invalid syntax on line %d of file %s
#define ESS_INI_BADNUMBER MAKEHR(-10202) // Initialization variable ""%s"" set to invalid number
#define ESS_INI_BADPATH MAKEHR(-10203) // Initialization variable ""%s"" set to invalid path
#define ESS_INI_BADVALUE MAKEHR(-10205) // Initialization variable ""%s"" set to invalid value
#define ESS_INI_NOSUCHVAR MAKEHR(-10206) // Cannot find initialization variable "%s"
#define ESS_INI_NUMRANGE MAKEHR(-10207) // Initialization variable "%s" must be between %d and %d
#define ESS_INI_TOO_MANY_ENV MAKEHR(-10208) // Too many SS.INI environment strings
#define ESS_LOCK_TIMEOUT MAKEHR(-10266) // Timeout locking file: %s
#define ESS_MEM_NOMEMORY MAKEHR(-10270) // Out of memory
#define ESS_NO_TWEAK_CHKDOUT MAKEHR(-10625) // You cannot modify the properties of a file that is checked out.
#define ESS_NOMERGE_BIN_NODELTA MAKEHR(-10279) // You cannot perform a merge on a binary file, or a file that stores latest version only.
#define ESS_NOMULTI_BINARY MAKEHR(-10280) // Cannot check out %s. It is binary and is already checked out.
#define ESS_NOMULTI_NODELTA MAKEHR(-10281) // %s stores only the latest version and is already checked out.
#define ESS_OS_NOT_EXE MAKEHR(-10285) // Error executing: %s
#define ESS_SS_ADDPRJASSOCFILE MAKEHR(-10626) // %s is a SourceSafe configuration file and cannot be added.
#define ESS_SS_ADMIN_LOCKOUT MAKEHR(-10456) // The SourceSafe database has been locked by the Administrator.
#define ESS_SS_BADRENAME MAKEHR(-10402) // Unable to rename %s to %s.
#define ESS_SS_CANT_FIND_SSINI MAKEHR(-10403) // Cannot find SS.INI file for user %s
#define ESS_SS_CHECKED_OUT MAKEHR(-10405) // File %s is currently checked out by %s
#define ESS_SS_CHECKED_OUT_YOU MAKEHR(-10406) // You currently have file %s checked out
#define ESS_SS_CHECKOUT_OLD MAKEHR(-10408) // Cannot check out an old version of a file
#define ESS_SS_CHKOUT_USER MAKEHR(-10413) // File %s is currently checked out by %s
#define ESS_SS_CONFLICTS MAKEHR(-10415) // An automatic merge has occurred and there are conflicts.\nEdit %s to resolve them.
#define ESS_SS_DEL_ROOT MAKEHR(-10418) // Cannot delete the root project
#define ESS_SS_DEL_SHARED MAKEHR(-10419) // A deleted link to %s already exists
#define ESS_SS_FILE_NOTFOUND MAKEHR(-10421) // File ""%s"" not found
#define ESS_SS_HISTOPEN MAKEHR(-10404) // A history operation is already in progress
#define ESS_SS_INSUFRIGHTS MAKEHR(-10423) // You do not have access rights to %s
#define ESS_SS_LATERCHKEDOUT MAKEHR(-10426) // A more recent version is checked out
#define ESS_SS_LOCALRW MAKEHR(-10427) // A writable copy of %s already exists
#define ESS_SS_MOVE_CHANGENAME MAKEHR(-10428) // Move does not change the name of a project
#define ESS_SS_MOVE_NOPARENT MAKEHR(-10429) // Project %s does not exist
#define ESS_SS_MOVE_ROOT MAKEHR(-10430) // Cannot move the root project
#define ESS_SS_MUST_USE_VERS MAKEHR(-10431) // Cannot roll back to the most recent version of %s
#define ESS_SS_NOCOMMANCESTOR MAKEHR(-10432) // Files have no common ancestor
#define ESS_SS_NOCONFLICTS2 MAKEHR(-10434) // %s has been merged with no conflicts.
#define ESS_SS_NODOLLAR MAKEHR(-10435) // File %s is invalid. Files may not begin with $.
#define ESS_SS_NOT_CHKEDOUT MAKEHR(-10436) // File %s is not checked out
#define ESS_SS_NOT_SHARED MAKEHR(-10437) // File %s is not shared by any other projects
#define ESS_SS_NOTSEPARATED MAKEHR(-10438) // Files are not branched
#define ESS_SS_OPEN_LOGGIN MAKEHR(-10457) // Unable to open user login file %s.
#define ESS_SS_PATHTOOLONG MAKEHR(-10439) // Path %s too long
#define ESS_SS_RENAME_MOVE MAKEHR(-10442) // Rename does not move an item to another project
#define ESS_SS_RENAME_ROOT MAKEHR(-10443) // Cannot Rename the root project
#define ESS_SS_ROLLBACK_NOTOLD MAKEHR(-10447) // Cannot Rollback to the most recent version of %s
#define ESS_SS_SHARE_ANCESTOR MAKEHR(-10449) // A project cannot be shared under a descendant.
#define ESS_SS_SHARED MAKEHR(-10450) // File %s is already shared by this project
#define ESS_SSPEC_SYNTAX MAKEHR(-10515) // Invalid SourceSafe syntax: "%s"
#define ESS_UM_BAD_CHAR MAKEHR(-10550) // Bad username syntax: "%s"
#define ESS_UM_BAD_PASSWORD MAKEHR(-10551) // Invalid password
#define ESS_UM_BADVERSION MAKEHR(-10552) // Incompatible database version
#define ESS_UM_DEL_ADMIN MAKEHR(-10553) // Cannot delete the Admin user
#define ESS_UM_PERM_DENIED MAKEHR(-10554) // Permission denied
#define ESS_UM_RENAME_ADMIN MAKEHR(-10555) // Can not rename the Admin user
#define ESS_UM_TOO_LONG MAKEHR(-10556) // Username too long
#define ESS_UM_USER_EXISTS MAKEHR(-10557) // User "%s" already exists
#define ESS_UM_USER_NOT_FOUND MAKEHR(-10558) // User "%s" not found
#define ESS_URL_BADPATH MAKEHR(-10192) // The URL for project %s was not set properly.
#define ESS_VS_CHECKED_OUT MAKEHR(-10601) // File %s checked out
#define ESS_VS_CHILD_NOT_FOUND MAKEHR(-10602) // Subproject or file not found
#define ESS_VS_COLLISION MAKEHR(-10603) // Collision accessing database, please try again.
#define ESS_VS_EXCLUSIVE_CHECKED_OUT MAKEHR(-10614) // File %s is exclusively checked out.
#define ESS_VS_ITEMEXISTS MAKEHR(-10604) // An item with the name %s already exists
#define ESS_VS_LONGNAME MAKEHR(-10605) // %s is an invalid %s name
#define ESS_VS_MOVE_CYCLE MAKEHR(-10606) // You can not move a project under itself
#define ESS_VS_NO_DELTA MAKEHR(-10607) // File %s does not retain old versions of itself
#define ESS_VS_NOT_CHECKED_OUT MAKEHR(-10608) // File %s cannot be checked into this project
#define ESS_VS_NOT_FOUND MAKEHR(-10609) // File or project not found
#define ESS_VS_PARENT_NOT_FOUND MAKEHR(-10610) // Parent not found
#define ESS_VS_VERS_NOT_FOUND MAKEHR(-10615) // Version not found
#define ESS_VS_WANT_FILE MAKEHR(-10616) // This command only works on files.
#define ESS_VS_WANT_PRJ MAKEHR(-10617) // This command only works on projects.
#define ESS_URL_BUFOVERFLOW MAKEHR(-10194) // A link in %s was ignored because it was longer than SourceSafe can understand
#define ESS_URL_CANTCHECKHTML MAKEHR(-10193) // An error occurred while trying to check hyperlinks for %s
#define ESS_SS_ADDINFAILED MAKEHR(-10440) // Error loading SourceSafe add-in: %s
#define ESS_CANCEL MAKEHR(-32766)
#define ESS_LOADSTRING_FAILED MAKEHR(-10999) // Error loading resource string
// SourceSafe questions answered affirmatively.
//
// A deleted copy of this %s file already exists in this project.\nDo you want to recover the existing file?
// Folder %s not found, create?
// Have any conflicts in %s been properly resolved?
// File %s is currently checked out by %s.\nProceed anyway?
// File %s was checked out to folder %s.\nProceed in %s?
// File %s is checked out to project %s, and you are in %s.\nProceed anyway?
// File %s is currently checked out by %s. Delete anyway?
// You currently have file %s checked out. Delete anyway?
// An item named %s was already deleted from this project.\nPurge the old item and delete this one now?
// This version of %s already has a label: overwrite?
// The label %s is already used. Remove the old label?
// %s has been merged with no conflicts.\nCheck in now?
// Redo the automatic merge?
// Delete local file: %s?
// %s is already checked out, continue?
// File %s has been destroyed, and cannot be rebuilt.\nContinue anyway?
// Project $%s has been destroyed, and cannot be rebuilt.\nContinue anyway?
// $%s was moved out of this project, and cannot be rebuilt.\nContinue anyway?
// %s has changed. Undo check out and lose changes?
//
// SourceSafe questions answered in the negative.
//
// A deleted file of the same name already exists in this SourceSafe project.\nDo you want to recover the deleted file instead of adding your local %s?
// %s is writable, replace?
// %s is checked out, replace?

View File

@@ -0,0 +1,54 @@
/*
=======================================================================================
Name :SaveMngr.h
Author :Vincent Lhullier Date :11/07/97
Description :manage save of data before modification
Create a copy of GameData tree with all file that would be modified. That will allow
someone to recuperate previous version if save generate some problem in data.
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
#ifndef __SAVEMNGR_H__
#define __SAVEMNGR_H__
/*
=======================================================================================
Directory Functions
=======================================================================================
*/
BOOL SAVE_fn_bDeleteTree( char *szDirName );
/*
=======================================================================================
Error functions
=======================================================================================
*/
void SAVE_fn_vErrorMessage( char *_szMessage );
/*
=======================================================================================
Version functions
=======================================================================================
*/
long SAVE_fn_lGetVersionNumberFromDirExt( char *_szSavedDirectoryName );
void SAVE_fn_vGetVersionDirName( long _lVersion, char *_szVersionDirName, BOOL _bOld );
BOOL SAVE_fn_bDeleteVersion( long _lVersion, BOOL _bOld );
long SAVE_fn_lGetUsedVersion( char *a_cVersion, BOOL _bOld );
/*
=======================================================================================
principal function
=======================================================================================
*/
BOOL SAVE_fn_bDeleteAllVersions( void );
#endif /*__SAVEMNGR_H__*/

View File

@@ -0,0 +1,16 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

View File

@@ -0,0 +1,50 @@
/*
=======================================================================================
Name :TimeFunc.h
Author :vincent lhullier Date :26/07/97
Description :header file for time functions
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __TIMEFUNC_H__
#define __TIMEFUNC_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
extern time_t g_xUpdateTime;
extern char g_szUpdateTimeString[20];
/*
=======================================================================================
Functions to analyse content of a buffer
=======================================================================================
*/
BOOL fn_bReadInt( char *p_cBuf, int iNumDigit, int *p_iResult);
BOOL fn_bReadDate( char *p_cBuf, struct tm *p_stTime);
/*
=======================================================================================
Time functions
=======================================================================================
*/
BOOL fn_bSynchronizeTime( BOOL _bMessage );
void fn_vInitUpdateTime( void );
void fn_vFormatDateTime( time_t xTime, char *szString );
BOOL fn_bRequestTimeServer( BOOL _bMessage );
#endif //__TIMEFUNC_H__

View File

@@ -0,0 +1,112 @@
/*
=======================================================================================
Name : Tree_Fct.h
Author : vincent lhullier Date :04/09/97
Description : header file for tree of project or file functions
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __VSSFUNCT_H__
#define __VSSFUNCT_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
typedef struct tdstFileListConfig_ tdstFileListConfig;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
STRUCTURES
=======================================================================================
*/
/*
* structure to store info about project tree
*/
typedef struct tdstFile_
{
char *szName;
BOOL bGet;
HTREEITEM hTreeItem;
} tdstFile;
typedef struct tdstProject_
{
char *szName;
BOOL bGet;
BOOL bRecurse;
long lNumberOfSubProjects;
struct tdstProject_ *d_stSubProject;
long lNumberOfFiles;
tdstFile *d_stFile;
HTREEITEM hTreeItem;
} tdstProject;
/*
=======================================================================================
CONSTANT
=======================================================================================
*/
#define C_cVssProject 0
#define C_cLocalProject 1
/*
=======================================================================================
GLOBALS
=======================================================================================
*/
extern tdstProject *g_p_stVssRootProject;
extern tdstProject *g_p_stLocalRootProject;
extern char **gs_d_szFile;
extern char **gs_d_szProj;
/*
=======================================================================================
FUNCTIONS
=======================================================================================
*/
void fn_Tree_vInitProject ( tdstProject *_p_stProj, char *_szName );
void fn_Tree_vInitProjectWithPointerName ( tdstProject *_p_stProj, char *_szName );
void fn_Tree_vInitFile ( tdstFile *_p_stFile, char *_szName );
void fn_Tree_vInitFileWithPointerName ( tdstFile *_p_stFile, char *_szName );
tdstProject *fn_Tree_p_stGetProject ( tdstProject *_p_stInProj, char *_szName );
tdstFile *fn_Tree_p_stGetFile ( tdstProject *_p_stInProj, char *_szName );
void fn_Tree_vFreeProject ( tdstProject *_p_stProj, BOOL _bDelete );
void fn_Tree_vFreeProjectTree ( tdstProject *_p_stProj, BOOL _bDelete);
void fn_Tree_vFreeProjectFileList ( tdstProject *_p_stProj );
void fn_Tree_vGetNothing ( tdstProject *_p_stProj);
void fn_Tree_vRefreshWithFileList ( tdstProject *_p_stProj, tdstFileListConfig *_p_stFileList );
void fn_Tree_vGetNumberOfFilesOrProjectsToGet( tdstProject *_p_stProj, long *_p_lNbFiles );
void fn_Tree_vGetFilesOrProjectToGet ( tdstProject *_p_stProj, long *_p_lNbFiles, char **_d_szFile );
void fn_Tree_vGetNumberOfFilesToGet ( tdstProject *_p_stProj, long *_p_lNbFiles, BOOL _bAll );
void fn_Tree_vGetFilesToGet ( tdstProject *_p_stProj, long *_p_lNbFiles, char **_d_szFile, BOOL _bAll );
long fn_TREE_lBuildListOfFilesToGet ( tdstProject *_p_stProj, char ***_ppp_szFile );
void fn_TREE_vFreeListOfFilesToGet ( long _lNumberOfFiles, char **_pp_szFile );
BOOL fn_TREE_bGetFileList ( tdstProject *_p_stProj, tdstFileListConfig *_p_stFileList, char _cConfig, char *_szFileListName );
//void fn_vUpdateFilesToObtainList( void );
void fn_vRefreshVssTreeAndFilesToObtainList( void );
/*
=======================================================================================
Function for local tree
=======================================================================================
*/
BOOL fn_Tree_bBuildFromDisk ( tdstProject **_pp_stRootProject, char *_szRootName );
#endif //__VSSFUNCT_H__

View File

@@ -0,0 +1,208 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by MngData5.rc
//
#define IDC_BUTTON_OBTAINALL 3
#define IDC_BUTTON_UPDATE 3
#define IDC_BUTTON_YESALL 3
#define IDC_BUTTON_OBTAINNOTHING 4
#define IDC_BUTTON_OBTAIN 4
#define IDC_BUTTON_REFRESH 5
#define IDC_BUTTON_NOALL 5
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDR_MAINFRAME 100
#define IDS_ABOUTBOX 101
#define IDM_SHOWHELPFILE 101
#define IDM_UPDATE 102
#define IDM_UPDATEOPTIONS 103
#define IDC_RICHEDIT_RESULT 104
#define IDM_UPDATEHISTORY 105
#define IDC_RICHEDIT_VSSSECTION 106
#define IDC_RICHEDIT_LOCALSECTION 107
#define IDM_OBTAIN 108
#define IDM_OBTAINNOW 109
#define IDD_MNGDATA_DIALOG 110
#define IDM_UPDATEWITHCONFIG 110
#define IDM_CONFIGCHOOSE 111
#define IDM_CONFIGIMPORT 112
#define IDM_CONFIGEXPORT 113
#define IDD_DIALOG_LISTMODIF 130
#define IDB_BITMAP_ABOUT_0 130
#define IDD_DIALOG_LOGIN 131
#define IDB_BITMAP_NOTOBTAIN 133
#define IDB_BITMAP_OBTAIN 134
#define IDB_BITMAP_OBTAINCAUSERECURSE 135
#define IDB_BITMAP_FOND2 136
#define IDB_BITMAP_FOND 137
#define IDD_DIALOG_FILELIST 138
#define IDB_BITMAP_ABOUT_2 138
#define IDB_BITMAP_ABOUT_1 139
#define IDI_ICON_NOTOBTAIN 140
#define IDB_BITMAP_ABOUT_3 140
#define IDD_DIALOG_NEWCONFIG 141
#define IDI_ICON_OBTAINCAUSERECURSE 141
#define IDB_BITMAP_ABOUT_4 141
#define IDI_ICON_OBTAINRECURSE 142
#define IDB_BITMAP_ABOUT_5 142
#define IDI_ICON_OBTAIN 143
#define IDB_BITMAP_ABOUT_6 143
#define IDB_BITMAP_ABOUT_7 144
#define IDB_BITMAP_ABOUT_8 145
#define IDB_BITMAP_ABOUT_9 146
#define IDB_BITMAP_ABOUT_10 147
#define IDB_BITMAP_OBTAINRECURSE 148
#define IDB_BITMAP_WAIT 151
#define IDD_DIALOG_WAIT 152
#define IDI_ICON_WARNING 155
#define IDI_ICON_FILENOTOBTAIN 156
#define IDI_ICON_FILEOBTAIN 157
#define IDB_BITMAP_LENNON 157
#define IDI_ICON_FILEOBTAINCAUSERECURSE 158
#define IDB_BITMAP_GROUMPH 158
#define IDI_ICON_FILEOBTAINCAUSEPROJOBTAINED 159
#define IDB_BITMAP_PROGRESS0 159
#define IDI_ICON_TREESECTIONSAME 160
#define IDB_BITMAP_PROGRESS1 161
#define IDI_ICON_TREESECTIONDIFF 161
#define IDB_BITMAP_ANIM1 162
#define IDI_ICON_TREESECTIONLOCAL 162
#define IDB_BITMAP_ANIM2 163
#define IDI_ICON_TREESECTIONVSS 163
#define IDB_BITMAP_ANIM3 164
#define IDI_ICON_TREEENTRYSAME 164
#define IDB_BITMAP_ANIM4 165
#define IDI_ICON_TREEENTRYDIFF 165
#define IDD_DIALOG_UPDATEOPTIONS 166
#define IDI_ICON_TREEENTRYVSS 166
#define IDD_DIALOG_CONFLICT 167
#define IDI_ICON_TREEENTRYLOCAL 167
#define IDD_DIALOG_UPDATEHISTORY 168
#define IDI_ICON_KEY 168
#define IDD_DIALOG_BATCHOBTAIN 170
#define IDB_BITMAP_DIGIT8 172
#define IDB_BITMAP_DIGIT0 173
#define IDB_BITMAP_DIGIT1 174
#define IDB_BITMAP_DIGIT2 175
#define IDB_BITMAP_DIGIT3 176
#define IDB_BITMAP_DIGIT9 177
#define IDB_BITMAP_DIGIT4 178
#define IDB_BITMAP_DIGIT5 179
#define IDB_BITMAP_DIGIT6 180
#define IDB_BITMAP_DIGIT7 181
#define IDB_BITMAP_SEPAR 182
#define IDD_DIALOG_UPDATEFILELIST 184
#define IDD_DIALOG_MODIFLISTERROR 185
#define IDD_DIALOG_YESALLNOALL 186
#define IDB_BITMAP_BIKEEDDIE 188
#define IDB_BITMAP_KEYLEGEND 191
#define IDB_BITMAP_NEWSL 193
#define IDB_BITMAP_NEW 196
#define IDB_BITMAP1_DEATH 200
#define IDC_STATIC_ANIM 1000
#define IDC_EDIT_LOCALPATH 1002
#define IDC_EDIT_VSSPATH 1003
#define IDC_EDIT_INUPDATE 1005
#define IDC_EDIT_INOBTAIN 1006
#define IDC_EDIT_MODIFFILE 1007
#define IDC_EDIT_OBTAINTIME 1008
#define IDC_EDIT_MODIFICATION 1009
#define IDC_PROGRESS 1010
#define IDC_CHECK_HELP 1012
#define IDC_BUTTON_BROWSE 1013
#define IDC_BUTTON_HELP 1013
#define IDC_LIST_MODIF 1014
#define IDC_BUTTON_VIEWMODIF 1014
#define IDC_TREE_VSS 1015
#define IDC_BUTTON_LOOKUPDATE 1015
#define IDC_BUTTON_LOOKOBTAIN 1016
#define IDC_EDIT_USERNAME 1016
#define IDC_BUTTON_VSSFILES 1017
#define IDC_EDIT_PASSWORD 1017
#define IDC_EDIT_DATABASE 1018
#define IDC_BUTTON_CLEARMODIF 1018
#define IDC_CHECK_OBTAIN 1019
#define IDC_BUTTON_CHANGEMODIF 1019
#define IDC_CHECK_RECURSE 1020
#define IDC_STATIC_LEGEND 1021
#define IDC_EDIT_CONFIGNAME 1022
#define IDC_BUTTON_NEWCONFIG 1023
#define IDC_EDIT_NAME 1024
#define IDC_STATIC_LEGENDTEXT0 1024
#define IDC_STATIC_LEGENDTEXT1 1025
#define IDC_LIST_CONFIG 1026
#define IDC_STATIC_LEGENDTEXT2 1026
#define IDC_STATIC_LEGEND0 1027
#define IDC_STATIC_LEGENDTEXT4 1027
#define IDC_STATIC_LEGEND1 1028
#define IDC_STATIC_LEGEND2 1029
#define IDC_STATIC_LEGEND3 1030
#define IDC_STATIC_LEGENDTEXT3 1031
#define IDC_STATIC_PICTURE 1032
#define IDC_BUTTON_LEGEND0 1033
#define IDC_BUTTON_LEGEND1 1034
#define IDC_STATIC_PROJECT 1034
#define IDC_BUTTON_LEGEND2 1035
#define IDC_CHECK_OBTAINAFTERUPDATE 1035
#define IDC_BUTTON_LEGEND3 1036
#define IDC_CHECK_CONFIRM 1036
#define IDC_CHECK_CONFIRMBEFOREOBTAIN 1036
#define IDC_BUTTON_LEGEND4 1037
#define IDC_CHECK_CONFIRMBEFOREMODIF 1037
#define IDC_BUTTON_LEGEND5 1038
#define IDC_CHECK_UPDATE 1038
#define IDC_CHECK_SHOWDIFFERENCES 1038
#define IDC_BUTTON_LEGEND6 1039
#define IDC_STATIC_FORRICHEDIT 1039
#define IDC_BUTTON_LEGEND7 1040
#define IDC_CHECK_FORCEUPDATE 1040
#define IDC_CHECK_OBTAINMENU 1040
#define IDC_STATIC_VSS 1043
#define IDC_STATIC_LOCAL 1044
#define IDC_STATIC_SECTION 1045
#define IDC_CHECK_ALL 1046
#define IDC_BUTTON_STOP 1047
#define IDC_LIST_HISTORY 1048
#define IDC_TREE_LOCAL 1050
#define IDC_BUTTON_TREETEXT 1055
#define IDC_TREE_MERGE 1058
#define IDC_CHECK_WAIT 1060
#define IDC_CHECK_NOBODYELSE 1061
#define IDC_EDIT_SECONDS 1062
#define IDC_SPIN_SECONDS 1063
#define IDC_EDIT_TIME 1065
#define IDC_BUTTON_TIME 1066
#define IDC_COMBO_DAY 1067
#define IDC_SPIN_TIME 1068
#define IDC_CHECK_USETIMER 1069
#define IDC_STATIC_DAY 1070
#define IDC_STATIC_TIME 1071
#define IDC_STATIC_TIME2 1072
#define IDC_STATIC_WAIT 1073
#define IDC_STATIC_SECONDS 1074
#define IDC_STATIC_SECONDS2 1075
#define IDC_STATIC_TIMER 1076
#define IDC_STATIC_RESULT 1077
#define IDC_EDIT_CONFIG 1077
#define IDC_LIST_FILES 1078
#define IDC_STATIC_CONFIG 1079
#define IDC_STATIC_FILELIST 1080
#define IDC_LIST_ERRORS 1081
#define IDC_STATIC_TITLE 1082
#define IDC_STATIC_MESSAGE 1083
#define IDC_TAB_LEGEND 1084
#define IDC_STATIC_KEYS 1085
#define IDC_CHECK_CONFIG 1086
#define IDC_BUTTON_DELETE 1087
#define IDC_BUTTON_RENAME 1088
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1088
#define _APS_NEXT_SYMED_VALUE 114
#endif
#endif

View File

@@ -0,0 +1,189 @@
// Machine generated IDispatch wrapper class(es) created with ClassWizard
/////////////////////////////////////////////////////////////////////////////
// IVSSItem wrapper class
#include <afxdisp.h>
class IVSSItem : public COleDispatchDriver
{
public:
IVSSItem() {} // Calls COleDispatchDriver default constructor
IVSSItem(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSItem(const IVSSItem& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
CString GetSpec();
BOOL GetBinary();
void SetBinary(BOOL bNewValue);
BOOL GetDeleted();
void SetDeleted(BOOL bNewValue);
long GetType();
CString GetLocalSpec();
void SetLocalSpec(LPCTSTR lpszNewValue);
CString GetName();
void SetName(LPCTSTR lpszNewValue);
LPDISPATCH GetParent();
long GetVersionNumber();
LPDISPATCH GetItems(BOOL IncludeDeleted);
void Get(BSTR* Local, long iFlags);
void Checkout(LPCTSTR Comment, LPCTSTR Local, long iFlags);
void Checkin(LPCTSTR Comment, LPCTSTR Local, long iFlags);
void UndoCheckout(LPCTSTR Local, long iFlags);
long GetIsCheckedOut();
LPDISPATCH GetCheckouts();
BOOL GetIsDifferent(LPCTSTR Local);
LPDISPATCH Add(LPCTSTR Local, LPCTSTR Comment, long iFlags);
LPDISPATCH NewSubproject(LPCTSTR Name, LPCTSTR Comment);
void Share(LPDISPATCH pIItem, LPCTSTR Comment, long iFlags);
void Destroy();
void Move(LPDISPATCH pINewParent);
void Label(LPCTSTR Label, LPCTSTR Comment);
LPDISPATCH GetVersions(long iFlags);
LPDISPATCH GetVersion(const VARIANT& Version);
};
/////////////////////////////////////////////////////////////////////////////
// IVSSVersions wrapper class
/*
class IVSSVersions : public COleDispatchDriver
{
public:
IVSSVersions() {} // Calls COleDispatchDriver default constructor
IVSSVersions(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSVersions(const IVSSVersions& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
};
*/
/////////////////////////////////////////////////////////////////////////////
// IVSSVersion wrapper class
class IVSSVersion : public COleDispatchDriver
{
public:
IVSSVersion() {} // Calls COleDispatchDriver default constructor
IVSSVersion(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSVersion(const IVSSVersion& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
CString GetUsername();
long GetVersionNumber();
CString GetAction();
DATE GetDate();
CString GetComment();
CString GetLabel();
LPDISPATCH GetVSSItem();
};
/////////////////////////////////////////////////////////////////////////////
// IVSSItems wrapper class
class IVSSItems : public COleDispatchDriver
{
public:
IVSSItems() {} // Calls COleDispatchDriver default constructor
IVSSItems(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSItems(const IVSSItems& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
long GetCount();
LPDISPATCH GetItem(const VARIANT& sItem);
};
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckouts wrapper class
class IVSSCheckouts : public COleDispatchDriver
{
public:
IVSSCheckouts() {} // Calls COleDispatchDriver default constructor
IVSSCheckouts(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSCheckouts(const IVSSCheckouts& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
long GetCount();
LPDISPATCH GetItem(const VARIANT& sItem);
};
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckout wrapper class
class IVSSCheckout : public COleDispatchDriver
{
public:
IVSSCheckout() {} // Calls COleDispatchDriver default constructor
IVSSCheckout(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSSCheckout(const IVSSCheckout& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
CString GetUsername();
DATE GetDate();
CString GetLocalSpec();
CString GetMachine();
CString GetProject();
CString GetComment();
long GetVersionNumber();
};
/////////////////////////////////////////////////////////////////////////////
// IVSSDatabase wrapper class
class IVSSDatabase : public COleDispatchDriver
{
public:
IVSSDatabase() {} // Calls COleDispatchDriver default constructor
IVSSDatabase(LPDISPATCH pDispatch, BOOL bAutoRelease = TRUE) : COleDispatchDriver(pDispatch, bAutoRelease) {}
IVSSDatabase(const IVSSDatabase& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
void Open(LPCTSTR SrcSafeIni, LPCTSTR Username, LPCTSTR Password);
CString GetSrcSafeIni();
CString GetDatabaseName();
CString GetUsername();
CString GetCurrentProject();
void SetCurrentProject(LPCTSTR lpszNewValue);
LPDISPATCH GetVSSItem(LPCTSTR Spec, BOOL Deleted);
};
/////////////////////////////////////////////////////////////////////////////
// IVSS wrapper class
class IVSS : public COleDispatchDriver
{
public:
IVSS() {} // Calls COleDispatchDriver default constructor
IVSS(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
IVSS(const IVSS& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
LPDISPATCH GetVSSDatabase();
};

View File

@@ -0,0 +1,602 @@
/* This header file machine-generated by mktyplib.exe */
/* Interface to type library: SourceSafeTypeLib */
#ifndef _SourceSafeTypeLib_H_
#define _SourceSafeTypeLib_H_
DEFINE_GUID(LIBID_SourceSafeTypeLib,0x783CD4E0L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#endif
typedef enum _VSSFlags {
VSSFLAG_USERRONO = 1,
VSSFLAG_USERROYES = 2,
VSSFLAG_TIMENOW = 4,
VSSFLAG_TIMEMOD = 8,
VSSFLAG_TIMEUPD = 12,
VSSFLAG_EOLCR = 16,
VSSFLAG_EOLLF = 32,
VSSFLAG_EOLCRLF = 48,
VSSFLAG_REPASK = 64,
VSSFLAG_REPREPLACE = 128,
VSSFLAG_REPSKIP = 192,
VSSFLAG_REPMERGE = 256,
VSSFLAG_CMPFULL = 512,
VSSFLAG_CMPTIME = 1024,
VSSFLAG_CMPCHKSUM = 1536,
VSSFLAG_CMPFAIL = 2048,
VSSFLAG_RECURSNO = 4096,
VSSFLAG_RECURSYES = 8192,
VSSFLAG_FORCEDIRNO = 16384,
VSSFLAG_FORCEDIRYES = 32768,
VSSFLAG_KEEPNO = 65536,
VSSFLAG_KEEPYES = 131072,
VSSFLAG_DELNO = 262144,
VSSFLAG_DELYES = 524288,
VSSFLAG_DELNOREPLACE = 786432,
VSSFLAG_BINTEST = 1048576,
VSSFLAG_BINBINARY = 2097152,
VSSFLAG_BINTEXT = 3145728,
VSSFLAG_DELTAYES = 4194304,
VSSFLAG_DELTANO = 8388608,
VSSFLAG_UPDASK = 16777216,
VSSFLAG_UPDUPDATE = 33554432,
VSSFLAG_UPDUNCH = 50331648,
VSSFLAG_GETYES = 67108864,
VSSFLAG_GETNO = 134217728,
VSSFLAG_CHKEXCLUSIVEYES = 268435456,
VSSFLAG_CHKEXCLUSIVENO = 536870912,
VSSFLAG_HISTIGNOREFILES = 1073741824
} VSSFlags;
typedef enum _VSSFileStatus {
VSSFILE_NOTCHECKEDOUT = 0,
VSSFILE_CHECKEDOUT = 1,
VSSFILE_CHECKEDOUT_ME = 2
} VSSFileStatus;
typedef enum _VSSItemType {
VSSITEM_PROJECT = 0,
VSSITEM_FILE = 1
} VSSItemType;
interface IVSSItems;
interface IVSSVersions;
interface IVSSVersion;
interface IVSSCheckouts;
interface IVSSCheckout;
DEFINE_GUID(IID_IVSSItem,0x783CD4E1L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSItem */
#undef INTERFACE
#define INTERFACE IVSSItem
DECLARE_INTERFACE_(IVSSItem, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSItem methods */
STDMETHOD(get_Spec)(THIS_ BSTR FAR* pSpec) PURE;
STDMETHOD(get_Binary)(THIS_ VARIANT_BOOL FAR* pbBinary) PURE;
STDMETHOD(put_Binary)(THIS_ VARIANT_BOOL bBinary) PURE;
STDMETHOD(get_Deleted)(THIS_ VARIANT_BOOL FAR* pbDeleted) PURE;
STDMETHOD(put_Deleted)(THIS_ VARIANT_BOOL bDeleted) PURE;
STDMETHOD(get_Type)(THIS_ int FAR* piType) PURE;
STDMETHOD(get_LocalSpec)(THIS_ BSTR FAR* pLocal) PURE;
STDMETHOD(put_LocalSpec)(THIS_ BSTR Local) PURE;
STDMETHOD(get_Name)(THIS_ BSTR FAR* pName) PURE;
STDMETHOD(put_Name)(THIS_ BSTR Name) PURE;
STDMETHOD(get_Parent)(THIS_ IVSSItem FAR* FAR* ppIParent) PURE;
STDMETHOD(get_VersionNumber)(THIS_ long FAR* piVersion) PURE;
STDMETHOD(get_Items)(THIS_ VARIANT_BOOL IncludeDeleted, IVSSItems FAR* FAR* ppIItems) PURE;
STDMETHOD(Get)(THIS_ BSTR FAR* Local, long iFlags) PURE;
STDMETHOD(Checkout)(THIS_ BSTR Comment, BSTR Local, long iFlags) PURE;
STDMETHOD(Checkin)(THIS_ BSTR Comment, BSTR Local, long iFlags) PURE;
STDMETHOD(UndoCheckout)(THIS_ BSTR Local, long iFlags) PURE;
STDMETHOD(get_IsCheckedOut)(THIS_ long FAR* piStatus) PURE;
STDMETHOD(get_Checkouts)(THIS_ IVSSCheckouts FAR* FAR* ppICheckouts) PURE;
STDMETHOD(get_IsDifferent)(THIS_ BSTR Local, VARIANT_BOOL FAR* pbDifferent) PURE;
STDMETHOD(Add)(THIS_ BSTR Local, BSTR Comment, long iFlags, IVSSItem FAR* FAR* ppIItem) PURE;
STDMETHOD(NewSubproject)(THIS_ BSTR Name, BSTR Comment, IVSSItem FAR* FAR* ppIItem) PURE;
STDMETHOD(Share)(THIS_ IVSSItem FAR* pIItem, BSTR Comment, long iFlags) PURE;
STDMETHOD(Destroy)(THIS) PURE;
STDMETHOD(Move)(THIS_ IVSSItem FAR* pINewParent) PURE;
STDMETHOD(Label)(THIS_ BSTR Label, BSTR Comment) PURE;
STDMETHOD(get_Versions)(THIS_ long iFlags, IVSSVersions FAR* FAR* pIVersions) PURE;
STDMETHOD(get_Version)(THIS_ VARIANT Version, IVSSItem FAR* FAR* ppIItem) PURE;
};
DEFINE_GUID(IID_IVSSVersions,0x783CD4E7L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSVersions */
#undef INTERFACE
#define INTERFACE IVSSVersions
DECLARE_INTERFACE_(IVSSVersions, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSVersions methods */
STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppIEnum) PURE;
};
DEFINE_GUID(IID_IVSSVersion,0x783CD4E8L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSVersion */
#undef INTERFACE
#define INTERFACE IVSSVersion
DECLARE_INTERFACE_(IVSSVersion, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSVersion methods */
STDMETHOD(get_Username)(THIS_ BSTR FAR* pUsername) PURE;
STDMETHOD(get_VersionNumber)(THIS_ long FAR* piVersion) PURE;
STDMETHOD(get_Action)(THIS_ BSTR FAR* pAction) PURE;
STDMETHOD(get_Date)(THIS_ DATE FAR* pDate) PURE;
STDMETHOD(get_Comment)(THIS_ BSTR FAR* pComment) PURE;
STDMETHOD(get_Label)(THIS_ BSTR FAR* pLabel) PURE;
STDMETHOD(get_VSSItem)(THIS_ IVSSItem FAR* FAR* ppIItem) PURE;
};
DEFINE_GUID(IID_IVSSItems,0x783CD4E5L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSItems */
#undef INTERFACE
#define INTERFACE IVSSItems
DECLARE_INTERFACE_(IVSSItems, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSItems methods */
STDMETHOD(get_Count)(THIS_ long FAR* piCount) PURE;
STDMETHOD(get_Item)(THIS_ VARIANT sItem, IVSSItem FAR* FAR* ppIItem) PURE;
STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppIEnum) PURE;
};
DEFINE_GUID(IID_IVSSCheckouts,0x8903A770L,0xF55F,0x11CF,0x92,0x27,0x00,0xAA,0x00,0xA1,0xEB,0x95);
/* Definition of interface: IVSSCheckouts */
#undef INTERFACE
#define INTERFACE IVSSCheckouts
DECLARE_INTERFACE_(IVSSCheckouts, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSCheckouts methods */
STDMETHOD(get_Count)(THIS_ long FAR* piCount) PURE;
STDMETHOD(get_Item)(THIS_ VARIANT sItem, IVSSCheckout FAR* FAR* ppICheckout) PURE;
STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppIEnum) PURE;
};
DEFINE_GUID(IID_IVSSCheckout,0x783CD4E6L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSCheckout */
#undef INTERFACE
#define INTERFACE IVSSCheckout
DECLARE_INTERFACE_(IVSSCheckout, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSCheckout methods */
STDMETHOD(get_Username)(THIS_ BSTR FAR* pUsername) PURE;
STDMETHOD(get_Date)(THIS_ DATE FAR* pDate) PURE;
STDMETHOD(get_LocalSpec)(THIS_ BSTR FAR* pLocal) PURE;
STDMETHOD(get_Machine)(THIS_ BSTR FAR* pMachine) PURE;
STDMETHOD(get_Project)(THIS_ BSTR FAR* pProject) PURE;
STDMETHOD(get_Comment)(THIS_ BSTR FAR* pComment) PURE;
STDMETHOD(get_VersionNumber)(THIS_ long FAR* piVersion) PURE;
};
DEFINE_GUID(IID_IVSSDatabase,0x783CD4E2L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSDatabase */
#undef INTERFACE
#define INTERFACE IVSSDatabase
DECLARE_INTERFACE_(IVSSDatabase, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSDatabase methods */
STDMETHOD(Open)(THIS_ BSTR SrcSafeIni, BSTR Username, BSTR Password) PURE;
STDMETHOD(get_SrcSafeIni)(THIS_ BSTR FAR* pSrcSafeIni) PURE;
STDMETHOD(get_DatabaseName)(THIS_ BSTR FAR* pDatabaseName) PURE;
STDMETHOD(get_UserName)(THIS_ BSTR FAR* pUsername) PURE;
STDMETHOD(get_CurrentProject)(THIS_ BSTR FAR* pPrj) PURE;
STDMETHOD(put_CurrentProject)(THIS_ BSTR Prj) PURE;
STDMETHOD(get_VSSItem)(THIS_ BSTR Spec, VARIANT_BOOL Deleted, IVSSItem FAR* FAR* ppIVSSItem) PURE;
};
DEFINE_GUID(CLSID_VSSItem,0x783CD4E3L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifdef __cplusplus
class VSSItem;
#endif
DEFINE_GUID(CLSID_VSSVersion,0x783CD4ECL,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifdef __cplusplus
class VSSVersion;
#endif
DEFINE_GUID(CLSID_VSSCheckout,0x2A0DE0E0L,0x2E9F,0x11D0,0x92,0x36,0x00,0xAA,0x00,0xA1,0xEB,0x95);
#ifdef __cplusplus
class VSSCheckout;
#endif
DEFINE_GUID(CLSID_VSSDatabase,0x783CD4E4L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifdef __cplusplus
class VSSDatabase;
#endif
DEFINE_GUID(IID_IVSSEvents,0x783CD4E9L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSEvents */
#undef INTERFACE
#define INTERFACE IVSSEvents
DECLARE_INTERFACE_(IVSSEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif
/* IVSSEvents methods */
STDMETHOD(BeforeAdd)(THIS_ IVSSItem FAR* pIPrj, BSTR Local, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterAdd)(THIS_ IVSSItem FAR* pIItem, BSTR Local) PURE;
STDMETHOD(BeforeCheckout)(THIS_ IVSSItem FAR* pIItem, BSTR Local, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterCheckout)(THIS_ IVSSItem FAR* pIItem, BSTR Local) PURE;
STDMETHOD(BeforeCheckin)(THIS_ IVSSItem FAR* pIItem, BSTR Local, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterCheckin)(THIS_ IVSSItem FAR* pIItem, BSTR Local) PURE;
STDMETHOD(BeforeUndoCheckout)(THIS_ IVSSItem FAR* pIItem, BSTR Local, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterUndoCheckout)(THIS_ IVSSItem FAR* pIItem, BSTR Local) PURE;
STDMETHOD(BeforeRename)(THIS_ IVSSItem FAR* pIItem, BSTR NewName, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterRename)(THIS_ IVSSItem FAR* pIItem, BSTR OldName) PURE;
STDMETHOD(BeforeBranch)(THIS_ IVSSItem FAR* pIItem, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterBranch)(THIS_ IVSSItem FAR* pIItem) PURE;
STDMETHOD(BeforeEvent)(THIS_ long iEvent, IVSSItem FAR* pIItem, BSTR Str, VARIANT var, VARIANT_BOOL FAR* pbContinue) PURE;
STDMETHOD(AfterEvent)(THIS_ long iEvent, IVSSItem FAR* pIItem, BSTR Str, VARIANT var) PURE;
};
DEFINE_GUID(IID_IVSS,0x783CD4EBL,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSS */
#undef INTERFACE
#define INTERFACE IVSS
DECLARE_INTERFACE_(IVSS, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSS methods */
STDMETHOD(get_VSSDatabase)(THIS_ IVSSDatabase FAR* FAR* ppIVSSDatabase) PURE;
};
DEFINE_GUID(IID_IVSSEventHandler,0x783CD4EAL,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSEventHandler */
#undef INTERFACE
#define INTERFACE IVSSEventHandler
DECLARE_INTERFACE_(IVSSEventHandler, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif
/* IVSSEventHandler methods */
STDMETHOD(Init)(THIS_ IVSS FAR* pIVSS) PURE;
};
DEFINE_GUID(CLSID_VSSApp,0x2A0DE0E1L,0x2E9F,0x11D0,0x92,0x36,0x00,0xAA,0x00,0xA1,0xEB,0x95);
#ifdef __cplusplus
class VSSApp;
#endif
#endif

View File

@@ -0,0 +1,137 @@
/* This header file machine-generated by mktyplib.exe */
/* Interface to type library: SourceSafeTypeLib */
#ifndef _SourceSafeTypeLib_H_
#define _SourceSafeTypeLib_H_
DEFINE_GUID(LIBID_SourceSafeTypeLib,0x783CD4E0L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#endif
interface IVSSVersions;
//interface IVSSVersion;
DEFINE_GUID(IID_IVSSVersions,0x783CD4E7L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSVersions */
#undef INTERFACE
#define INTERFACE IVSSVersions
DECLARE_INTERFACE_(IVSSVersions, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSVersions methods */
STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppIEnum) PURE;
};
//DEFINE_GUID(IID_IVSSVersion,0x783CD4E8L,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
/* Definition of interface: IVSSVersion */
/*
#undef INTERFACE
#define INTERFACE IVSSVersion
DECLARE_INTERFACE_(IVSSVersion, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS
/* IUnknown methods */
/*
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/* IDispatch methods */
/*
STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
STDMETHOD(GetTypeInfo)(
THIS_
UINT itinfo,
LCID lcid,
ITypeInfo FAR* FAR* pptinfo) PURE;
STDMETHOD(GetIDsOfNames)(
THIS_
REFIID riid,
OLECHAR FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid) PURE;
STDMETHOD(Invoke)(
THIS_
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pdispparams,
VARIANT FAR* pvarResult,
EXCEPINFO FAR* pexcepinfo,
UINT FAR* puArgErr) PURE;
#endif
/* IVSSVersion methods */
/*
STDMETHOD(get_Username)(THIS_ BSTR FAR* pUsername) PURE;
STDMETHOD(get_VersionNumber)(THIS_ long FAR* piVersion) PURE;
STDMETHOD(get_Action)(THIS_ BSTR FAR* pAction) PURE;
STDMETHOD(get_Date)(THIS_ DATE FAR* pDate) PURE;
STDMETHOD(get_Comment)(THIS_ BSTR FAR* pComment) PURE;
STDMETHOD(get_Label)(THIS_ BSTR FAR* pLabel) PURE;
STDMETHOD(get_VSSItem)(THIS_ IVSSItem FAR* FAR* ppIItem) PURE;
};
DEFINE_GUID(CLSID_VSSVersion,0x783CD4ECL,0x9D54,0x11CF,0xB8,0xEE,0x00,0x60,0x8C,0xC9,0xA7,0x1F);
#ifdef __cplusplus
class VSSVersion;
#endif
*/
#endif //_SourceSafeTypeLib_H_

View File

@@ -0,0 +1,190 @@
/*
*=======================================================================================
* Name :Vss5_Fct.h
*
* Author :Vincent lhullier Date :15/04/97
*
* Description : header file for OLE function using Vss5
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
#ifndef __VSS5_FCT_H__
#define __VSS5_FCT_H__
#include "ssapi.h"
#include "Tree_Fct.h"
/*
*=======================================================================================
* CONSTANTS
*=======================================================================================
*/
#define VSSITEM_PROJECT 0
#define VSSITEM_FILE 1
#define C_cSearchForProject 1
#define C_cSearchForFile 2
#define C_cSearchForAll 3
#define VSSFILE_ERROR -1
#define VSSFILE_NOTCHECKEDOUT 0
#define VSSFILE_CHECKEDOUT 1
#define VSSFILE_CHECKEDOUT_ME 2
#define VSSFILE_NOTFOUND 3
#define VSSFLAG_USERRONO 1
#define VSSFLAG_USERROYES 2
#define VSSFLAG_TIMENOW 4
#define VSSFLAG_TIMEMOD 8
#define VSSFLAG_TIMEUPD 12
#define VSSFLAG_EOLCR 16
#define VSSFLAG_EOLLF 32
#define VSSFLAG_EOLCRLF 48
#define VSSFLAG_REPASK 64
#define VSSFLAG_REPREPLACE 128
#define VSSFLAG_REPSKIP 192
#define VSSFLAG_REPMERGE 256
#define VSSFLAG_CMPFULL 512
#define VSSFLAG_CMPTIME 1024
#define VSSFLAG_CMPCHKSUM 1536
#define VSSFLAG_CMPFAIL 2048
#define VSSFLAG_RECURSNO 4096
#define VSSFLAG_RECURSYES 8192
#define VSSFLAG_FORCEDIRNO 16384
#define VSSFLAG_FORCEDIRYES 32768
#define VSSFLAG_KEEPNO 65536
#define VSSFLAG_KEEPYES 131072
#define VSSFLAG_DELNO 262144
#define VSSFLAG_DELYES 524288
#define VSSFLAG_DELNOREPLACE 786432
#define VSSFLAG_BINTEST 1048576
#define VSSFLAG_BINBINARY 2097152
#define VSSFLAG_BINTEXT 3145728
#define VSSFLAG_DELTAYES 4194304
#define VSSFLAG_DELTANO 8388608
#define VSSFLAG_UPDASK 16777216
#define VSSFLAG_UPDUPDATE 33554432
#define VSSFLAG_UPDUNCH 50331648
#define VSSFLAG_GETYES 67108864
#define VSSFLAG_GETNO 134217728
#define VSSFLAG_CHKEXCLUSIVEYES 268435456
#define VSSFLAG_CHKEXCLUSIVENO 536870912
#define VSSFLAG_HISTIGNOREFILES 1073741824
#define C_Vss_cUpdateError 0
#define C_Vss_cUpdateAdd 1
#define C_Vss_cUpdateModify 2
#define C_Vss_cUpdateNothing 3
/*
*=======================================================================================
* GLOBALS
* I put this in extern but try to not use it outside vss5_fct module
*=======================================================================================
*/
extern IVSSDatabase OLE_g_oDatabase;
extern char g_cNbUsers;
extern char g_a_szUserName[10][20];
/*
*=======================================================================================
* FUNCTIONS
*=======================================================================================
*/
void fn_vTransformSpec ( char *_szSpec );
BOOL OLE_fn_bGetItemContent ( IVSSItem *_p_oItem, IVSSItems *_p_oContent );
BOOL OLE_fn_bGetContentItem ( IVSSItems *_p_oContent, int iItem, IVSSItem *_p_oItem );
BOOL OLE_fn_bGetLocalItem ( char *_szSpec, IVSSItem *_p_oItem, IVSSItem *_p_oLocalItem, char _cType = C_cSearchForAll );
BOOL OLE_fn_bDoesLocalItemExist ( char *_szSpec, IVSSItem *_p_oItem, char _cType = C_cSearchForAll );
BOOL OLE_fn_bGetLocalFile ( char *_szFileSpec, IVSSItem *_p_oItem, IVSSItem *_p_oLocalItem );
BOOL OLE_fn_bGetLocalProject ( char *_szProjectSpec, IVSSItem *_p_oItem, IVSSItem *_p_oLocalItem );
BOOL OLE_fn_bDoesLocalFileExist ( char *_szFileSpec, IVSSItem *_p_oItem );
BOOL OLE_fn_bDoesLocalProjectExist ( char *_szProjectSpec, IVSSItem *_p_oItem );
BOOL OLE_fn_bGetRootProject (IVSSItem *_p_oItem );
BOOL OLE_fn_bGetExistantItem ( char *_szSpec, IVSSItem *_p_oItem );
BOOL OLE_fn_bDoesProjectExist ( char *_szProjSpec, IVSSItem *_p_oVssItem );
BOOL OLE_fn_bCreateVssProject ( char *_szProjSpec );
BOOL OLE_fn_bAddFile ( char *_szInProj, char *_szLocalFile );
BOOL OLE_fn_bCheckoutFile ( char *_szFileSpec, char *_szLocalFile, int iFlags );
BOOL OLE_fn_bUndoCheckoutFile ( char *_szFileSpec, char *_szLocalFile, int _iFlags );
BOOL OLE_fn_bCheckinFile ( char *_szFileSpec, char *_szLocalFile, int iFlags );
BOOL OLE_fn_bGetFile ( char *_szSpec, char *_szLocalPath, int _iFlags, BOOL _bFile, BOOL *_bObtained );
char OLE_fn_cUpdateFile ( char *_szSpec, char *_szLocalName );
BOOL OLE_fn_bDeleteFile ( char *_szSpec );
BOOL OLE_fn_bDestroyFile ( char *_szSpec );
BOOL OLE_fn_bGetItemLastVersion ( char *_szFileSpec, IVSSVersion *_p_oVersion );
BOOL OLE_fn_bGetItemLastVersionDate ( char *_szFileSpec, COleDateTime *p_oOleDate );
BOOL OLE_fn_bGetItemLastVersionUserName( char *_szFileSpec );
/*
----------------------------------------------------------------------------------------
Description : initialize vss database
Returns (BOOL) TRUE if success, FALSE otherwise
----------------------------------------------------------------------------------------
*/
BOOL OLE_fn_bInitVss( void );
/*
----------------------------------------------------------------------------------------
Description : open vss database
_szIniFile -> name of initialisation file (with full path)
Returns (BOOL) : TRUE if success, FALSE otherwise
----------------------------------------------------------------------------------------
*/
BOOL OLE_fn_bOpenVss( char *_szVssDatabase, char *_szUserName, char *_szPassword );
BOOL OLE_fn_bVssLogin( CWnd *p_oFather );
/*
----------------------------------------------------------------------------------------
Description : get content of vss project
_p_stVssProj -> project to fill
_szProjSpec -> name of vss project
_bOnlyProject -> if TRUE get only project else get files and project
Returns (BOOL) TRUE if sucess
----------------------------------------------------------------------------------------
*/
BOOL OLE_fn_bGetVssProjectContent( IVSSItem *_p_oVssItem, tdstProject *_p_stVssProj, BOOL _bOnlyProject, BOOL _bRecurse );
/*
----------------------------------------------------------------------------------------
Description : get project tree from vss
_bOnlyProject -> if TRUE get only project name else get project and file
Returns (BOOL ) TRUE if success, FALSE otherwise
----------------------------------------------------------------------------------------
*/
BOOL OLE_fn_bGetVssProjectTree( BOOL _bOnlyProject, HWND _hProjectWindow );
/*
----------------------------------------------------------------------------------------
Description : refresh given vss project
_szSpec -> name of project
_bRecurse -> TRUE if refresh recursively
_hProjectWindow -> window were to put current project name
Returns (BOOL ) TRUE if refresh success, FALSE else
----------------------------------------------------------------------------------------
*/
BOOL fn_bRefreshVssProjectTree( char *_szSpec, BOOL _bRecurse, HWND _hProjectWindow );
/*
----------------------------------------------------------------------------------------
Description : Get file status
_szFileSpec -> name of file
Returns (char ) status of file
----------------------------------------------------------------------------------------
*/
char OLE_fn_cGetVssFileStatus( char *_szFileSpec );
#endif /*__VSS5_FCT_H__*/

View File

@@ -0,0 +1,755 @@
# Microsoft Developer Studio Project File - Name="MngData5" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=MngData5 - Win32 Static Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "MngData5.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "MngData5.mak" CFG="MngData5 - Win32 Static Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "MngData5 - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "MngData5 - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "MngData5 - Win32 Static Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/cpa_func/appli/MngData5", CBAAAAAA"
# PROP Scc_LocalPath ".."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "MngData5 - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\Exe\Release"
# PROP Intermediate_Dir "..\Out\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\inc" /I "x:\cpa\public" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FD /c
# SUBTRACT CPP /YX /Yc
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 x:\cpa\lib\SCRP5_vr.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /force
!ELSEIF "$(CFG)" == "MngData5 - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\MngData5"
# PROP Intermediate_Dir "..\Out\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\inc" /I "x:\CPA\public" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /D "SCR_DM_OptCFiles" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 wsock32.lib /nologo /subsystem:windows /debug /machine:I386
# SUBTRACT LINK32 /map /nodefaultlib /force
!ELSEIF "$(CFG)" == "MngData5 - Win32 Static Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "MngData5"
# PROP BASE Intermediate_Dir "MngData5"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".."
# PROP Intermediate_Dir "..\Out\Static Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\inc" /I "x:\CPA\public" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\inc" /I "x:\CPA\public" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x40c /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 x:\CPA\lib\SCRP5_vp.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386
# SUBTRACT BASE LINK32 /map /nodefaultlib /force
# ADD LINK32 wsock32.lib /nologo /subsystem:windows /profile /debug /machine:I386
# SUBTRACT LINK32 /map /nodefaultlib /force
!ENDIF
# Begin Target
# Name "MngData5 - Win32 Release"
# Name "MngData5 - Win32 Debug"
# Name "MngData5 - Win32 Static Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\Src\DlgAbout.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgConfl.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgFile.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgLogin.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgMain.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgModif.cpp
# ADD CPP /I "X:\Cpa\Appli\MngData5\Inc"
# End Source File
# Begin Source File
SOURCE=..\Src\DlgNwCfg.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\DlgObtai.cpp
# ADD CPP /I "X:\Cpa\Appli\MngData5\Inc"
# End Source File
# Begin Source File
SOURCE=..\Src\DlgUpdOp.cpp
# ADD CPP /I "X:\Cpa\Appli\MngData5\Inc"
# End Source File
# Begin Source File
SOURCE=..\Src\Error.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\IniData.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\LogFile.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\MajData.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\MngData5.cpp
# End Source File
# Begin Source File
SOURCE=..\Inc\MngData5.rc
!IF "$(CFG)" == "MngData5 - Win32 Release"
!ELSEIF "$(CFG)" == "MngData5 - Win32 Debug"
!ELSEIF "$(CFG)" == "MngData5 - Win32 Static Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\Src\ModifLst.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\ProgBar.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\SaveMngr.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\ssapi.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\StdAfx.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\TimeFunc.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\Tree_Fct.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\Vss5_Fct.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=..\Inc\constant.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgAbout.h
# End Source File
# Begin Source File
SOURCE=..\Inc\dlgconfl.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgFile.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgLogin.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgMain.h
# End Source File
# Begin Source File
SOURCE=..\Inc\dlgmodif.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgNwCfg.h
# End Source File
# Begin Source File
SOURCE=..\Inc\DlgObtai.h
# End Source File
# Begin Source File
SOURCE=..\Inc\dlgupdop.h
# End Source File
# Begin Source File
SOURCE=..\Inc\error.h
# End Source File
# Begin Source File
SOURCE=..\Inc\HelpId.h
# End Source File
# Begin Source File
SOURCE=..\Inc\IniData.h
# End Source File
# Begin Source File
SOURCE=..\Inc\LogFile.h
# End Source File
# Begin Source File
SOURCE=..\Inc\MajData.h
# End Source File
# Begin Source File
SOURCE=..\Inc\MngData5.h
# End Source File
# Begin Source File
SOURCE=..\Inc\ModifLst.h
# End Source File
# Begin Source File
SOURCE=..\Inc\progbar.h
# End Source File
# Begin Source File
SOURCE=..\Inc\resource.h
# End Source File
# Begin Source File
SOURCE=..\Inc\SaveMngr.h
# End Source File
# Begin Source File
SOURCE=..\Inc\ssapi.h
# End Source File
# Begin Source File
SOURCE=..\Inc\Ssauterr.h
# End Source File
# Begin Source File
SOURCE=..\Inc\ssmyauto.h
# End Source File
# Begin Source File
SOURCE=..\Inc\StdAfx.h
# End Source File
# Begin Source File
SOURCE=..\Inc\TimeFunc.h
# End Source File
# Begin Source File
SOURCE=..\Inc\Tree_Fct.h
# End Source File
# Begin Source File
SOURCE=..\Inc\vss5_Fct.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\Res\about_00.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_01.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_02.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_03.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_04.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_05.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_06.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_07.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_08.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_09.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\about_10.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\anim1.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\anim2.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\anim3.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\anim4.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\bikeddie.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\canard2.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\death.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit0.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit1.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit2.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit3.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit4.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit5.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit6.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit7.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit8.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\digit9.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\ed.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\EntrDiff.ico
# End Source File
# Begin Source File
SOURCE=..\Res\EntrLocl.ico
# End Source File
# Begin Source File
SOURCE=..\Res\EntrSame.ico
# End Source File
# Begin Source File
SOURCE=..\Res\EntrVss.ico
# End Source File
# Begin Source File
SOURCE=..\Res\filenoto.ico
# End Source File
# Begin Source File
SOURCE=..\Res\fileobcr.ico
# End Source File
# Begin Source File
SOURCE=..\Res\fileobta.ico
# End Source File
# Begin Source File
SOURCE=..\Res\fileocpo.ico
# End Source File
# Begin Source File
SOURCE=..\Res\Groumpf.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\iconkey.ico
# End Source File
# Begin Source File
SOURCE=..\Res\Keys.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\lennon.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\Maiden.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\navet.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\NECRO.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\new.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\newsl.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\noobtain.bmp
# End Source File
# Begin Source File
SOURCE=..\res\noobtain.ico
# End Source File
# Begin Source File
SOURCE=..\Res\ObCauRec.bmp
# End Source File
# Begin Source File
SOURCE=..\res\ObCauRec.ico
# End Source File
# Begin Source File
SOURCE=..\Res\obRecurs.bmp
# End Source File
# Begin Source File
SOURCE=..\res\ObRecurs.ico
# End Source File
# Begin Source File
SOURCE=..\Res\obtain.bmp
# End Source File
# Begin Source File
SOURCE=..\res\Obtain.ico
# End Source File
# Begin Source File
SOURCE=..\res\ProgIcon.ico
# End Source File
# Begin Source File
SOURCE=..\Res\progres0.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\progres1.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\separ.bmp
# End Source File
# Begin Source File
SOURCE=..\Res\TreeDiff.ico
# End Source File
# Begin Source File
SOURCE=..\Res\TreeLocl.ico
# End Source File
# Begin Source File
SOURCE=..\Res\treesame.ico
# End Source File
# Begin Source File
SOURCE=..\Res\TreeVss.ico
# End Source File
# Begin Source File
SOURCE=..\Res\warning.ico
# End Source File
# End Group
# Begin Group "Help Files"
# PROP Default_Filter "hpj"
# Begin Group "Bitmaps"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\Doc\Bitmap\ABug.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\BtObtain.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\BtUpdate.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\bugs.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\dlg_fcfg.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\dlg_intf.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\dlg_LDir.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\DLG_LOG.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Dlg_ModL.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\DLG_VSSF.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\HowTo.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Interfac.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\INTERFAC.SHG
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\LETTRE.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\LocalDir.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Logo_1.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Logo_2.BMP
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\ModifLst.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Open.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\open2.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\Question.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\TELEPHON.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\ubilogo.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\UbiSimLg.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\vlhullier.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\VssFCfg.bmp
# End Source File
# Begin Source File
SOURCE=..\Doc\Bitmap\VssFiles.bmp
# End Source File
# End Group
# Begin Source File
SOURCE=..\Doc\MngData5.HPJ
# End Source File
# Begin Source File
SOURCE=..\Doc\MngData5.RTF
# End Source File
# End Group
# Begin Group "Exe Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\MngData5.exe
# End Source File
# Begin Source File
SOURCE=..\MNGDATA5.HLP
# End Source File
# Begin Source File
SOURCE=..\ReadMe.txt
# End Source File
# End Group
# Begin Group "Libs"
# PROP Default_Filter "lib"
# Begin Source File
SOURCE=..\..\..\Lib\ERMP5_vd.lib
# End Source File
# Begin Source File
SOURCE=..\..\..\Lib\MMGP5_vd.lib
# End Source File
# Begin Source File
SOURCE=..\..\..\Lib\SCRP5_vd.lib
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,5 @@
SCC = This is a Source Code Control file
[MngData5.dsp]
SCC_Aux_Path = "\\srvprojets-ma\Rayman4_DS\Versions\Rayman4DS\Tools"
SCC_Project_Name = "$/CPA/Appli/MngData5/Make", DWAAAAAA

View File

@@ -0,0 +1,3 @@
[Vss]
DataRoot=$\GameData
DataBase=\\FileServer\Hed\VssData\srcsafe.ini

Binary file not shown.

View File

@@ -0,0 +1,53 @@
* Que faire pour installer le Vss Manager Data la premi<6D>re fois
1 - cr<63>er un r<>pertoire quelconque (par exemple c:\program files\MngData5)
2 - copier dans ce r<>pertoire les fichiers
MngData5.exe
MngData.ini
MngData5.hlp
MngDtBg.msg
* Que faire pour r<>cup<75>rer une nouvelle version du DataManager
Copier dans le r<>pertoire cr<63><72> lors de la premi<6D>re installation tous les fichiers
pr<EFBFBD>c<EFBFBD>demment sit<69>s sauf le MngData.ini qui contient vos r<>glages. Si ce fichier devient
incompatible lors d'un changement de version vous serez pr<70>venus par le programme.
* Que faire pour lancer le programme
executer le programme Mngdata5.exe
Une boite de login apparait avec
user = <un nom>
Password = <pas de password>
database = \\Fileserver\HED\VssData\srcsafe.ini
tapez votre mot de passe et faire OK, ca doit <20>tre correct.
sinon m'appeler (Vincent au 04.50.52.98.84)
* Que faire pour obtenir
D<EFBFBD>finir un r<>pertoire d'obtention
( Par d<>faut ce r<>pertoire est le r<>pertoire temporaire systeme, il fuat le changer pour que ce soit
le r<>pertoire des donn<6E>es du jeu)
cliquer sur le bouton Obtain de l'interface
Par d<>faut l'obtention obtient toutes les donn<6E>es (c'est ce qu'il faut pour la premi<6D>re fois)
ensuite il est possible de d<>finir l'ensemble des sous r<>pertoires <20> obtenir pour n'obtenir que ce sur quoi
vous travaillez.
* Que faire pour mettre <20> jour
Avant de mettre <20> jour il faut avoir obtenu au moins une fois.
Si les donn<6E>es on <20>t<EFBFBD> obtenue et qu'il y a eu des modifications le bouton Update est valide (non gris<69>)
Il suffit de cliquer sur ce bouton pour mettre <20> jour les donn<6E>es modifi<66>es en local dans la base VSS.
Si ca plante pr<70>venez moi le plus vite possible.
* A propos de l'aide
Elle n'est malheureusement pas tout <20> fait compl<70>te et <20> jour
Vincent
vlhullier@annecy.ubisoft.fr

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -0,0 +1,13 @@
//
// MNGDATA.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,136 @@
/*
=======================================================================================
Name : DlgAbout.cpp
Author : VL Date :17/07/97
Description : implementation of about dialog for MngData5 program
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "mngdata5.h"
#include "DlgAbout.h"
#include "HelpId.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CAboutDlg dialog
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : constructor
---------------------------------------------------------------------------------------
*/
CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/) : CDialog(CAboutDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAboutDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
---------------------------------------------------------------------------------------
Description : message map
---------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_WM_TIMER()
ON_WM_DESTROY()
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CAboutDlg message handlers
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : WM_INITDIALOG
---------------------------------------------------------------------------------------
*/
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_cCurBitmap = 0;
m_cNbBitmaps = 11;
m_a_oBitmap[0].LoadBitmap( IDB_BITMAP_ABOUT_0 );
m_a_oBitmap[1].LoadBitmap( IDB_BITMAP_ABOUT_1 );
m_a_oBitmap[2].LoadBitmap( IDB_BITMAP_ABOUT_2 );
m_a_oBitmap[3].LoadBitmap( IDB_BITMAP_ABOUT_3 );
m_a_oBitmap[4].LoadBitmap( IDB_BITMAP_ABOUT_4 );
m_a_oBitmap[5].LoadBitmap( IDB_BITMAP_ABOUT_5 );
m_a_oBitmap[6].LoadBitmap( IDB_BITMAP_ABOUT_6 );
m_a_oBitmap[7].LoadBitmap( IDB_BITMAP_ABOUT_7 );
m_a_oBitmap[8].LoadBitmap( IDB_BITMAP_ABOUT_8 );
m_a_oBitmap[9].LoadBitmap( IDB_BITMAP_ABOUT_9 );
m_a_oBitmap[10].LoadBitmap( IDB_BITMAP_ABOUT_10 );
m_uiTimer = SetTimer(1, 200, NULL );
((CStatic *) GetDlgItem( IDC_STATIC_ANIM ))->SetBitmap( HBITMAP(m_a_oBitmap[m_cCurBitmap]) );
return TRUE;
}
/*
---------------------------------------------------------------------------------------
Description : WM_DESTROY
---------------------------------------------------------------------------------------
*/
void CAboutDlg::OnDestroy()
{
CDialog::OnDestroy();
KillTimer( m_uiTimer );
for (m_cCurBitmap = 0; m_cCurBitmap < m_cNbBitmaps; m_cCurBitmap ++)
m_a_oBitmap[m_cCurBitmap].DeleteObject();
}
/*
---------------------------------------------------------------------------------------
Description : WM_TIMER
---------------------------------------------------------------------------------------
*/
void CAboutDlg::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
m_cCurBitmap ++;
if (m_cCurBitmap == m_cNbBitmaps)
m_cCurBitmap = 0;
((CStatic *) GetDlgItem( IDC_STATIC_ANIM ))->SetBitmap( HBITMAP(m_a_oBitmap[m_cCurBitmap]) );
}
/*
---------------------------------------------------------------------------------------
Description : WM_HELPINFO
---------------------------------------------------------------------------------------
*/
BOOL CAboutDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_SUMMARY );
return TRUE;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,189 @@
/*
=======================================================================================
Name : DlgLogin.cpp
Author : vincent lhullier Date :27/07/97
Description : implementation fiole for login dialog box
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include <afxdlgs.h>
#include "MngData5.h"
#include "DlgLogin.h"
#include "HelpId.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CLoginDialog dialog
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CLoginDialog::CLoginDialog(CWnd* pParent /*=NULL*/) : CDialog(CLoginDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CLoginDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
*m_szUserName = 0;
*m_szDatabase = 0;
*m_szPassword = 0;
}
/*
----------------------------------------------------------------------------------------
Description : Message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CLoginDialog, CDialog)
//{{AFX_MSG_MAP(CLoginDialog)
ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnButtonBrowse)
ON_WM_SHOWWINDOW()
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
Specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : Set user name that will be in Username edit box
----------------------------------------------------------------------------------------
*/
void CLoginDialog::m_fn_vSetUserName( char *_szName )
{
DWORD dwUserLength = 100;
if (*_szName == 0)
GetUserName( m_szUserName, &dwUserLength );
else
strcpy ( m_szUserName, _szName );
}
/*
----------------------------------------------------------------------------------------
Description : Set database name that will be in database edit box
----------------------------------------------------------------------------------------
*/
void CLoginDialog::m_fn_vSetDatabase( char *_szDatabase )
{
strcpy( m_szDatabase, _szDatabase );
}
/*
=======================================================================================
CLoginDialog message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CLoginDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_bInit = TRUE;
GetDlgItem( IDC_EDIT_USERNAME ) ->SetWindowText( m_szUserName );
GetDlgItem( IDC_EDIT_PASSWORD ) ->SetWindowText( m_szPassword );
GetDlgItem( IDC_EDIT_DATABASE ) ->SetWindowText( m_szDatabase );
if (*m_szPassword != 0)
{
((CEdit *) GetDlgItem( IDC_EDIT_PASSWORD ))->SetSel( 0, -1 );
}
SetWindowPos( &wndTopMost, 0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDOK button
----------------------------------------------------------------------------------------
*/
void CLoginDialog::OnOK()
{
GetDlgItem( IDC_EDIT_USERNAME )->GetWindowText( m_szUserName, 100 );
GetDlgItem( IDC_EDIT_PASSWORD )->GetWindowText( m_szPassword, 100 );
GetDlgItem( IDC_EDIT_DATABASE )->GetWindowText( m_szDatabase, MAX_PATH );
CDialog::OnOK();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_BROWSE
----------------------------------------------------------------------------------------
*/
void CLoginDialog::OnButtonBrowse()
{
static char BASED_CODE szFilter[] = "Vss Database(srcsafe.ini)|srcsafe.ini||";
DWORD dwFlags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
CFileDialog oFD( TRUE, "ini", "srcsafe.ini", dwFlags, szFilter, this);
if (oFD.DoModal() == IDOK)
{
strcpy ( m_szDatabase, (char *) (LPCTSTR) oFD.GetPathName() );
GetDlgItem( IDC_EDIT_DATABASE ) ->SetWindowText( m_szDatabase );
}
}
/*
----------------------------------------------------------------------------------------
Description : WM_SHOWWINDOW
----------------------------------------------------------------------------------------
*/
void CLoginDialog::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
/*
* Assure that PASSWORD edit box has the focus
*/
if (m_bInit)
{
m_bInit = FALSE;
GetDlgItem( IDC_EDIT_PASSWORD )->SetFocus();
}
}
/*
----------------------------------------------------------------------------------------
Description : WM_HELPINFO
----------------------------------------------------------------------------------------
*/
BOOL CLoginDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_LOGIN );
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,400 @@
/*
=======================================================================================
Name :DlgModif.cpp
Author :vincent lhullier Date :24/07/97
Description :implementation file for dialog box that will contain list of modification
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "DlgModif.h"
#include "HelpId.h"
#include "constant.h"
#include "majdata.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CModifListDialog dialog
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
constructor
----------------------------------------------------------------------------------------
*/
CModifListDialog::CModifListDialog(CWnd* pParent /*=NULL*/) : CDialog(CModifListDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CModifListDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
----------------------------------------------------------------------------------------
message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CModifListDialog, CDialog)
//{{AFX_MSG_MAP(CModifListDialog)
ON_BN_CLICKED(IDC_BUTTON_HELP, OnButtonHelp)
ON_WM_SIZE()
ON_WM_SIZING()
ON_WM_DESTROY()
ON_BN_CLICKED(IDC_CHECK_ALL, OnCheckAll)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CModifListDialog specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : display modif in list box
_bAll -> if true display all modif (i.e. modif of first level + child modif)
----------------------------------------------------------------------------------------
*/
void CModifListDialog::m_fn_vFillModifList(BOOL _bAll)
{
CListBox *p_oLB = (CListBox *) GetDlgItem( IDC_LIST_MODIF );
tdstModif *p_stModif = g_p_stFirstModif;
char szString[SCR_CV_ui_Cfg_MaxLenLine];
p_oLB->ResetContent();
while( p_stModif != NULL )
{
if ( _bAll || (p_stModif->p_stFather == NULL) )
{
sprintf
(
szString,
"%s%s (%s)",
p_stModif->p_stFather == NULL ? "" : " ",
p_stModif->szName,
g_a_szModifName[ p_stModif->cType ]
);
p_oLB->AddString( szString );
}
p_stModif = p_stModif->p_stNext;
}
}
/*
=======================================================================================
CModifListDialog message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CModifListDialog::OnInitDialog()
{
CDialog::OnInitDialog();
((CButton *) GetDlgItem( IDC_CHECK_ALL))->SetCheck( 0 );
m_fn_vFillModifList( FALSE );
MoveWindow( &g_stWinPref.stModifPos );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
BN_CLICKED on IDC_BUTTON_HELP
----------------------------------------------------------------------------------------
*/
void CModifListDialog::OnButtonHelp()
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_VIEWMODIF );
}
/*
----------------------------------------------------------------------------------------
WM_SIZING
----------------------------------------------------------------------------------------
*/
void CModifListDialog::OnSizing( UINT nSide, LPRECT lpRect )
{
long lWidth = lpRect->right - lpRect->left + 1;
long lHeight= lpRect->bottom - lpRect->top + 1;
if (lWidth < C_iModifMinWidth)
{
switch (nSide)
{
case WMSZ_BOTTOMLEFT:
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
lpRect->left = lpRect->right - C_iModifMinWidth;
break;
case WMSZ_BOTTOMRIGHT:
case WMSZ_RIGHT:
case WMSZ_TOPRIGHT:
lpRect->right = lpRect->left + C_iModifMinWidth;
break;
}
}
if (lHeight < C_iModifMinHeight)
{
switch (nSide)
{
case WMSZ_BOTTOM:
case WMSZ_BOTTOMLEFT:
case WMSZ_BOTTOMRIGHT:
lpRect->bottom = lpRect->top + C_iModifMinHeight;
break;
case WMSZ_TOP:
case WMSZ_TOPLEFT:
case WMSZ_TOPRIGHT:
lpRect->top = lpRect->bottom - C_iModifMinHeight;
}
}
CDialog::OnSizing( nSide, lpRect );
}
/*
----------------------------------------------------------------------------------------
WM_SIZE
----------------------------------------------------------------------------------------
*/
void CModifListDialog::OnSize(UINT nType, int cx, int cy)
{
RECT stRect;
CDialog::OnSize(nType, cx, cy);
if ( (nType != SIZE_MINIMIZED) && (GetDlgItem( IDC_LIST_MODIF ) != NULL) )
{
/*
* resizing List box
*/
stRect.top = 5;
stRect.bottom = cy - 30;
stRect.left = 5;
stRect.right = cx - 10;
GetDlgItem( IDC_LIST_MODIF )->MoveWindow( &stRect, FALSE );
/*
* moving Close button
*/
stRect.bottom = cy - 5;
stRect.top = stRect.bottom - 20;
stRect.left = cx / 2 - 45;
stRect.right = stRect.left + 40;
GetDlgItem( IDCANCEL )->MoveWindow( &stRect, FALSE );
/*
* moving help button
*/
stRect.left += 50;
stRect.right += 50;
GetDlgItem( IDC_BUTTON_HELP )->MoveWindow( &stRect, FALSE );
/*
* moving all check button
*/
stRect.left = 5;
stRect.right = 50;
GetDlgItem( IDC_CHECK_ALL )->MoveWindow( &stRect, FALSE );
Invalidate();
}
}
/*
----------------------------------------------------------------------------------------
Description : WM_DESTROY
----------------------------------------------------------------------------------------
*/
void CModifListDialog::OnDestroy()
{
CDialog::OnDestroy();
GetWindowRect( &g_stWinPref.stModifPos );
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_CHECK_ALL
----------------------------------------------------------------------------------------
*/
void CModifListDialog::OnCheckAll()
{
BOOL bAll;
bAll = ((CButton *) GetDlgItem( IDC_CHECK_ALL ))->GetCheck() == 1;
m_fn_vFillModifList( bAll );
}
/*
----------------------------------------------------------------------------------------
Description : WM_HELPINFO
----------------------------------------------------------------------------------------
*/
BOOL CModifListDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_VIEWMODIF );
return TRUE;
}
/*
=======================================================================================
CModifListErrorDlg dialog
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
constructor
----------------------------------------------------------------------------------------
*/
CModifListErrorDlg::CModifListErrorDlg(long _lNbErrors, char **_d_szError, CWnd* pParent ) : CDialog(CModifListErrorDlg::IDD, pParent)
{
m_lNumberOfErrors = _lNbErrors;
m_pp_szError = _d_szError;
//{{AFX_DATA_INIT(CModifListErrorDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
----------------------------------------------------------------------------------------
Message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CModifListErrorDlg, CDialog)
//{{AFX_MSG_MAP(CModifListErrorDlg)
ON_WM_SIZE()
ON_WM_SIZING()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CModifListErrorDlg message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CModifListErrorDlg::OnInitDialog()
{
CListBox *p_oLB = ((CListBox *) GetDlgItem( IDC_LIST_ERRORS ));
long lError;
char szTitle[100];
CDialog::OnInitDialog();
p_oLB->ResetContent();
for (lError = 0; lError < m_lNumberOfErrors; lError++)
{
p_oLB->AddString( m_pp_szError[ lError ] );
}
sprintf( szTitle, "I detect %d errors in list of modifications", m_lNumberOfErrors );
GetDlgItem( IDC_STATIC_TITLE )->SetWindowText( szTitle );
RECT stRect;
GetWindowRect( &stRect );
stRect.left += 1;
MoveWindow( &stRect );
SetWindowPos( &wndTopMost, 0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
WM_SIZE
----------------------------------------------------------------------------------------
*/
void CModifListErrorDlg::OnSize(UINT nType, int cx, int cy)
{
if (GetDlgItem( IDC_STATIC_TITLE) != NULL)
{
GetDlgItem( IDC_STATIC_TITLE )->SetWindowPos( NULL, 5, 5, cx - 10, 16, SWP_NOZORDER );
GetDlgItem( IDC_LIST_ERRORS )->SetWindowPos( NULL, 5, 25, cx - 10, cy - 55, SWP_NOZORDER );
GetDlgItem( IDOK )->SetWindowPos( NULL, cx - 80, cy - 25, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
}
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
}
/*
----------------------------------------------------------------------------------------
WM_SIZING
----------------------------------------------------------------------------------------
*/
void CModifListErrorDlg::OnSizing(UINT nSide, LPRECT lpRect)
{
long lWidth = lpRect->right - lpRect->left + 1;
long lHeight= lpRect->bottom - lpRect->top + 1;
if (lWidth < 200)
{
switch (nSide)
{
case WMSZ_BOTTOMLEFT:
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
lpRect->left = lpRect->right - 200;
break;
case WMSZ_BOTTOMRIGHT:
case WMSZ_RIGHT:
case WMSZ_TOPRIGHT:
lpRect->right = lpRect->left + 200;
break;
}
}
if (lHeight < 200)
{
switch (nSide)
{
case WMSZ_BOTTOM:
case WMSZ_BOTTOMLEFT:
case WMSZ_BOTTOMRIGHT:
lpRect->bottom = lpRect->top + 200;
break;
case WMSZ_TOP:
case WMSZ_TOPLEFT:
case WMSZ_TOPRIGHT:
lpRect->top = lpRect->bottom - 200;
}
}
CDialog::OnSizing(nSide, lpRect);
}

View File

@@ -0,0 +1,340 @@
/*
=======================================================================================
Name : DlgNwCfg.cpp
Author :vincent lhullier Date :24/07/97
Description :implementation file for config file name management dialog box
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "DlgNwCfg.h"
#include "MajData.h"
#include "HelpId.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CNewConfigDialog class
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
constructor
----------------------------------------------------------------------------------------
*/
CNewConfigDialog::CNewConfigDialog(char _cConfigType, CWnd* pParent /*=NULL*/) : CDialog(CNewConfigDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewConfigDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_cConfigType = _cConfigType;
}
/*
----------------------------------------------------------------------------------------
message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CNewConfigDialog, CDialog)
//{{AFX_MSG_MAP(CNewConfigDialog)
ON_LBN_SELCHANGE(IDC_LIST_CONFIG, OnSelchangeListConfig)
ON_BN_CLICKED(IDC_BUTTON_HELP, OnButtonHelp)
ON_WM_HELPINFO()
ON_BN_CLICKED(IDC_BUTTON_DELETE, OnButtonDelete)
ON_BN_CLICKED(IDC_BUTTON_RENAME, OnButtonRename)
ON_EN_KILLFOCUS(IDC_EDIT_NAME, OnKillfocusEditName)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
----------------------------------------------------------------------------------------
Pre translate message
----------------------------------------------------------------------------------------
*/
BOOL CNewConfigDialog::PreTranslateMessage(MSG* pMsg)
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
CWnd *pWnd = GetDlgItem(IDC_TREE_VSS);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
if ( pMsg->hwnd == GetDlgItem(IDC_EDIT_NAME)->GetSafeHwnd() )
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_RETURN )
{
GetDlgItem( IDOK )->SetFocus();
return 1;
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}
/*
=======================================================================================
CNewConfigDialog message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
BN_CLICKED on IDOK button
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnOK()
{
char szConfigName[40];
GetDlgItem( IDC_EDIT_NAME )->GetWindowText( szConfigName, 40 );
if (*szConfigName == 0)
{
if (m_cConfig == -1 )
{
MessageBox("Select a config or type a new config name", "Info", MB_OK | MB_ICONINFORMATION );
return;
}
}
else
{
if (m_cConfig != -1)
{
if (strcmp( szConfigName, m_szConfigName) != 0)
m_cConfig = -1;
}
if (m_cConfig == -1)
{
m_iCurSel = m_p_oListConfig->FindStringExact( 0, szConfigName );
if (m_iCurSel != LB_ERR )
{
m_cConfig = (char) m_p_oListConfig->GetItemData( m_iCurSel );
m_p_oListConfig->GetText( m_iCurSel, m_szConfigName );
}
else
{
strcpy( m_szConfigName, szConfigName );
}
}
}
CDialog::OnOK();
}
/*
----------------------------------------------------------------------------------------
WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CNewConfigDialog::OnInitDialog()
{
char cConfig;
int iIndex;
char szName[40];
CDialog::OnInitDialog();
m_p_oListConfig = (CListBox *) GetDlgItem( IDC_LIST_CONFIG );
/*
* fill list of config
*/
for (cConfig = 0; cConfig < 100; cConfig ++)
{
if (g_stIniData.a_cAvailableConfig[ cConfig ] )
{
if (fn_IniD_cGetConfigType( cConfig ) == m_cConfigType)
{
fn_IniD_vGetConfigName(cConfig, szName );
iIndex = m_p_oListConfig->AddString( szName );
m_p_oListConfig->SetItemData( iIndex, cConfig );
}
}
}
/*
* set current config and configure display
*/
m_iCurSel = -1;
m_cConfig = -1;
*m_szConfigName = 0;
GetDlgItem( IDC_BUTTON_DELETE )->EnableWindow( FALSE );
GetDlgItem( IDC_BUTTON_RENAME )->EnableWindow( FALSE );
((CEdit *) GetDlgItem( IDC_EDIT_NAME ))->LimitText(39);
GetDlgItem( IDC_EDIT_NAME )->SetFocus();
return FALSE;
}
/*
----------------------------------------------------------------------------------------
LBN_SELCHANGE on IDC_LIST_CONFIG
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnSelchangeListConfig()
{
if ( (m_iCurSel = m_p_oListConfig->GetCurSel() ) == LB_ERR)
{
m_cConfig = -1;
*m_szConfigName = 0;
}
else
{
m_cConfig = (char) m_p_oListConfig->GetItemData( m_iCurSel );
m_p_oListConfig->GetText( m_iCurSel, m_szConfigName);
}
GetDlgItem( IDC_BUTTON_DELETE )->EnableWindow( m_cConfig != -1 );
//GetDlgItem( IDC_BUTTON_RENAME )->EnableWindow( m_cConfig != -1 );
GetDlgItem( IDC_EDIT_NAME )->SetWindowText( m_szConfigName );
OnKillfocusEditName();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICK on IDC_BUTTON_DELETE
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnButtonDelete()
{
char szText[100];
/*
* check if there's a selected sonfig
*/
/*
if (m_cConfig == -1)
{
MessageBox("Select a config in list before", "error", MB_OK | MB_ICONERROR );
return;
}
*/
/*
* display confirmation box
*/
sprintf( szText, "Are you sure you want to delete %s config ?\r\n!! Operation can't be undone !!", m_szConfigName );
if ( MessageBox( szText, "Confirm", MB_YESNO | MB_ICONQUESTION ) == IDYES )
{
/*
* delete config and refresh display
*/
fn_IniD_vDeleteFileList( m_cConfig, g_szIniFile );
m_p_oListConfig->DeleteString( m_iCurSel );
if (m_iCurSel == m_p_oListConfig->GetCount() )
m_p_oListConfig->SetCurSel( m_iCurSel - 1 );
else
m_p_oListConfig->SetCurSel( m_iCurSel );
OnSelchangeListConfig();
}
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICK on IDC_BUTTON_RENAME
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnButtonRename()
{
char szText[100];
char szNewConfigName[40];
/*
if (m_cConfig == -1)
{
MessageBox("Select a config in list before\r\nand type a new name in edit box", "Error", MB_OK | MB_ICONERROR );
return;
}
*/
//m_p_oListConfig->GetText( iIndex, szOldConfigName );
GetDlgItem( IDC_EDIT_NAME )->GetWindowText( szNewConfigName, 40 );
/*
if ( *szConfigName == 0)
{
sprintf( szText, "Type a new name in edit box for %s config", szOldConfigName );
MessageBox(szText, "Error", MB_OK | MB_ICONERROR );
return;
}
if (strcmp( szConfigName, szOldConfigName) == 0)
return;
*/
sprintf( szText, "Are you sure you want to rename %s config with %s ?\r\n!! Operation can't be undone !!", m_szConfigName, szNewConfigName );
if ( MessageBox( szText, "Confirm", MB_YESNO | MB_ICONQUESTION ) == IDYES )
{
fn_IniD_vRenameFileList( m_cConfig, szNewConfigName, g_szIniFile );
m_p_oListConfig->DeleteString( m_iCurSel );
m_iCurSel = m_p_oListConfig->AddString( szNewConfigName );
m_p_oListConfig->SetItemData( m_iCurSel, m_cConfig );
m_p_oListConfig->SetCurSel( m_iCurSel );
OnSelchangeListConfig();
}
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICK on IDC_BUTTON_RENAME
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnKillfocusEditName()
{
char szName[40];
BOOL bRename;
char *p_cCur;
GetDlgItem( IDC_EDIT_NAME )->GetWindowText( szName, 39 );
for (p_cCur = szName; *p_cCur != 0; p_cCur++)
if ( (*p_cCur == ' ') || (*p_cCur == '\t'))
*p_cCur = '_';
GetDlgItem( IDC_EDIT_NAME )->SetWindowText( szName );
bRename = ( (m_cConfig != -1) && (*szName != 0) && (strcmp( m_szConfigName, szName) != 0));
GetDlgItem( IDC_BUTTON_RENAME )->EnableWindow( bRename );
}
/*
----------------------------------------------------------------------------------------
BN_CLICKED on IDC_BUTTON_HELP
----------------------------------------------------------------------------------------
*/
void CNewConfigDialog::OnButtonHelp()
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_CONFIGFILELIST );
}
/*
----------------------------------------------------------------------------------------
Description : WM_HELPINFO
----------------------------------------------------------------------------------------
*/
BOOL CNewConfigDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_CONFIGFILELIST );
return TRUE;
}

View File

@@ -0,0 +1,541 @@
/*
=======================================================================================
Name : DlgObtai.cpp
Author : vincent lhullier Date :28/08/97
Description : implementation file for obtain dialog box
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "mngdata5.h"
#include "DlgObtai.h"
#include "IniData.h"
#include "modiflst.h"
#include "majdata.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
=======================================================================================
CBatchObtainDlg dialog
=======================================================================================
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CBatchObtainDlg::CBatchObtainDlg(CWnd* pParent) : CDialog(CBatchObtainDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CBatchObtainDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
/*
* load bitmap for digit and separation
*/
m_a_oDigit[0].LoadBitmap( IDB_BITMAP_DIGIT0 );
m_a_oDigit[1].LoadBitmap( IDB_BITMAP_DIGIT1 );
m_a_oDigit[2].LoadBitmap( IDB_BITMAP_DIGIT2 );
m_a_oDigit[3].LoadBitmap( IDB_BITMAP_DIGIT3 );
m_a_oDigit[4].LoadBitmap( IDB_BITMAP_DIGIT4 );
m_a_oDigit[5].LoadBitmap( IDB_BITMAP_DIGIT5 );
m_a_oDigit[6].LoadBitmap( IDB_BITMAP_DIGIT6 );
m_a_oDigit[7].LoadBitmap( IDB_BITMAP_DIGIT7 );
m_a_oDigit[8].LoadBitmap( IDB_BITMAP_DIGIT8 );
m_a_oDigit[9].LoadBitmap( IDB_BITMAP_DIGIT9 );
m_oSeparator.LoadBitmap( IDB_BITMAP_SEPAR );
m_bObtain = FALSE;
}
/*
----------------------------------------------------------------------------------------
Description : destructor
----------------------------------------------------------------------------------------
*/
CBatchObtainDlg::~CBatchObtainDlg()
{
char cBitmap;
for (cBitmap = 0; cBitmap < 10; cBitmap ++)
m_a_oDigit[ cBitmap ].DeleteObject();
m_oSeparator.DeleteObject();
}
/*
----------------------------------------------------------------------------------------
Description : message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CBatchObtainDlg, CDialog)
//{{AFX_MSG_MAP(CBatchObtainDlg)
ON_WM_DRAWITEM()
ON_BN_CLICKED(IDC_CHECK_WAIT, OnCheckWait)
ON_EN_KILLFOCUS(IDC_EDIT_SECONDS, OnKillfocusEditSeconds)
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_TIME, OnDeltaposSpinTime)
ON_BN_CLICKED(IDC_CHECK_USETIMER, OnCheckUsetimer)
ON_WM_TIMER()
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_SECONDS, OnDeltaposSpinSeconds)
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDCANCEL button
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnCancel()
{
CDialog::OnCancel();
}
/*
=======================================================================================
Specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : compute elapse time before next try to obtain
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::fn_vComputeElapseTime()
{
time_t xTimer;
struct tm *p_stTime;
long lSecondsLeft;
div_t stDiv;
time ( &xTimer );
if (m_bUseTimer)
{
p_stTime = localtime( &xTimer );
m_cHours = g_stWinPref.cHour - p_stTime->tm_hour;
m_cMinutes = g_stWinPref.cMinute - p_stTime->tm_min;
m_cSeconds = - p_stTime->tm_sec;
m_lSeconds = m_cSeconds + m_cMinutes * 60 + m_cHours * 3600;
m_lSeconds += g_stWinPref.cRelativeDay * 24*3600;
if (m_lSeconds <= 0)
{
m_lSeconds = m_cHours = m_cMinutes = m_cSeconds = 0;
m_bUseTimer = FALSE;
m_bTry = TRUE;
}
else
{
stDiv = div( m_lSeconds, 3600);
m_cHours = stDiv.quot;
lSecondsLeft = stDiv.rem;
stDiv = div (lSecondsLeft, 60 );
m_cMinutes = stDiv.quot;
m_cSeconds = stDiv.rem;
}
}
else
{
m_lSeconds = m_xNextTry - xTimer;
if (m_lSeconds <= 0)
{
m_lSeconds = m_cHours = m_cMinutes = m_cSeconds = 0;
m_bTry = TRUE;
}
stDiv = div(m_lSeconds, 60 );
m_cMinutes = stDiv.quot;
m_cSeconds = stDiv.rem;
}
}
/*
=======================================================================================
Message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CBatchObtainDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CComboBox *p_oCB;
CSpinButtonCtrl *p_oSpin;
char szValue[10];
/*
* set elapse time and spin to that data
*/
//GetDlgItem( IDC_EDIT_TIME )->SetWindowText( itoa( g_stWinPref.lElapseTime, szValue, 10 ) );
p_oSpin = (CSpinButtonCtrl *) GetDlgItem( IDC_SPIN_TIME );
p_oSpin->SetRange( 10, 600 );
p_oSpin->SetPos( g_stWinPref.lElapseTime );
GetDlgItem( IDC_EDIT_SECONDS )->SetWindowText( itoa( g_stWinPref.lElapseTime, szValue, 10 ) );
/*
* set use timer check
*/
((CButton *) GetDlgItem( IDC_CHECK_USETIMER))->SetCheck( g_stWinPref.bUseTimer ? 1 : 0 );
/*
* set relative day
*/
p_oCB = (CComboBox *) GetDlgItem( IDC_COMBO_DAY );
p_oCB->SetCurSel( g_stWinPref.cRelativeDay );
/*
* set date
*/
sprintf( szValue, "%02d:%02d", g_stWinPref.cHour, g_stWinPref.cMinute );
GetDlgItem( IDC_EDIT_TIME )->SetWindowText( szValue );
/*
* set check for wait to be alone
*/
((CButton *) GetDlgItem( IDC_CHECK_NOBODYELSE))->SetCheck( g_stWinPref.bWaitToBeAlone ? 1 : 0 );
OnCheckUsetimer();
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : WM_DRAWITEM
----------------------------------------------------------------------------------------
*/
#define C_xLightColor RGB(255,0,0)
#define C_xMiddleColor RGB(192,0,0)
#define C_xDarkColor RGB(128,0,0)
void CBatchObtainDlg::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
{
div_t stDiv;
CPoint oPos( 10, 10);
CSize oDigitSize( 15, 30 );
CSize oSeparSize( 5, 30 );
CBrush oBrush( C_xMiddleColor );
if (nIDCtl == IDC_BUTTON_TIME)
{
CDC *p_oDC = CDC::FromHandle( lpDIS->hDC );
p_oDC->Draw3dRect( &lpDIS->rcItem, C_xLightColor, C_xDarkColor );
lpDIS->rcItem.left++; lpDIS->rcItem.top++; lpDIS->rcItem.bottom--; lpDIS->rcItem.right--;
p_oDC->FrameRect( &lpDIS->rcItem, &oBrush );
lpDIS->rcItem.left++; lpDIS->rcItem.top++; lpDIS->rcItem.bottom--; lpDIS->rcItem.right--;
p_oDC->FrameRect( &lpDIS->rcItem, &oBrush );
lpDIS->rcItem.left++; lpDIS->rcItem.top++; lpDIS->rcItem.bottom--; lpDIS->rcItem.right--;
p_oDC->Draw3dRect( &lpDIS->rcItem, C_xDarkColor, C_xLightColor );
lpDIS->rcItem.left++; lpDIS->rcItem.top++; lpDIS->rcItem.bottom--; lpDIS->rcItem.right--;
p_oDC->FillSolidRect( &lpDIS->rcItem, RGB( 0,0,0 ) );
/* hour */
stDiv = div( m_cHours, 10);
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.quot ], DST_BITMAP );
oPos.x += 16;
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.rem ], DST_BITMAP );
oPos.x += 16;
p_oDC->DrawState( oPos, oDigitSize, &m_oSeparator, DST_BITMAP );
oPos.x += 6;
/* minute */
stDiv = div( m_cMinutes, 10);
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.quot ], DST_BITMAP );
oPos.x += 16;
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.rem ], DST_BITMAP );
oPos.x += 16;
p_oDC->DrawState( oPos, oDigitSize, &m_oSeparator, DST_BITMAP );
oPos.x += 6;
/* seconds */
stDiv = div( m_cSeconds, 10);
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.quot ], DST_BITMAP );
oPos.x += 16;
p_oDC->DrawState( oPos, oDigitSize, &m_a_oDigit[ stDiv.rem ], DST_BITMAP );
}
CDialog::OnDrawItem(nIDCtl, lpDIS);
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_WAIT
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnCheckWait()
{
BOOL bWait= ((CButton *) GetDlgItem( IDC_CHECK_WAIT ))->GetCheck() == 1;
BOOL bContinue = TRUE;
GetDlgItem( IDC_STATIC_SECONDS )->ShowWindow( !bWait );
GetDlgItem( IDC_EDIT_SECONDS )->ShowWindow( !bWait );
GetDlgItem( IDC_SPIN_SECONDS )->ShowWindow( !bWait );
GetDlgItem( IDC_STATIC_SECONDS2 )->ShowWindow( !bWait );
GetDlgItem( IDC_CHECK_USETIMER )->ShowWindow( !bWait );
GetDlgItem( IDC_STATIC_TIMER )->ShowWindow( !bWait );
GetDlgItem( IDC_STATIC_DAY )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_COMBO_DAY )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_STATIC_TIME )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_EDIT_TIME )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_SPIN_TIME )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_STATIC_TIME2 )->ShowWindow( !bWait && g_stWinPref.bUseTimer );
GetDlgItem( IDC_CHECK_NOBODYELSE )->ShowWindow( !bWait );
GetDlgItem( IDCANCEL )->ShowWindow( !bWait );
GetDlgItem( IDC_STATIC_WAIT )->ShowWindow( bWait );
GetDlgItem( IDC_BUTTON_TIME )->ShowWindow( bWait );
GetDlgItem( IDC_STATIC_RESULT )->ShowWindow( bWait );
if ( bWait )
{
g_stWinPref.cRelativeDay = ((CComboBox *) GetDlgItem( IDC_COMBO_DAY ))->GetCurSel();
g_stWinPref.bWaitToBeAlone = ((CButton *) GetDlgItem( IDC_CHECK_NOBODYELSE ))->GetCheck() == 1;
/*
* display what we are waiting
*/
char szMessage[1024], *p_szMessage = szMessage;
char szDay[ 40 ];
m_bUseTimer = g_stWinPref.bUseTimer;
if (g_stWinPref.bUseTimer)
{
((CComboBox *) GetDlgItem( IDC_COMBO_DAY) )->GetLBText( g_stWinPref.cRelativeDay, szDay );
p_szMessage += sprintf( p_szMessage, "Wait %s %02d:%02d and then\r\n", szDay, g_stWinPref.cHour, g_stWinPref.cMinute );
}
p_szMessage += sprintf( p_szMessage, "Try to obtain every %d seconds\r\n", g_stWinPref.lElapseTime );
if (g_stWinPref.bWaitToBeAlone)
p_szMessage += sprintf( p_szMessage, "Obtain only if database is unoccupied" );
else
p_szMessage += sprintf( p_szMessage, "Obtain even if another one is obtaining data" );
GetDlgItem( IDC_STATIC_WAIT )->SetWindowText( szMessage );
GetDlgItem( IDC_STATIC_RESULT )->SetWindowText( "" );
m_lTryCount = 0;
time ( &m_xNextTry );
m_bTry = FALSE;
fn_vComputeElapseTime();
GetDlgItem( IDC_BUTTON_TIME)->Invalidate();
m_uiTimer = SetTimer( 1, 1000, NULL );
}
else
{
KillTimer( m_uiTimer );
}
}
/*
----------------------------------------------------------------------------------------
Description : EM_KILLFOCUS on IDC_EDIT_SECONDS
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnKillfocusEditSeconds()
{
char szValue[10];
GetDlgItem( IDC_EDIT_SECONDS )->GetWindowText( szValue, 9 );
g_stWinPref.lElapseTime = atoi( szValue );
if (g_stWinPref.lElapseTime < 10)
g_stWinPref.lElapseTime = 10;
else if (g_stWinPref.lElapseTime > 600)
g_stWinPref.lElapseTime = 600;
GetDlgItem( IDC_EDIT_SECONDS )->SetWindowText( itoa( g_stWinPref.lElapseTime, szValue, 10 ) );
}
/*
----------------------------------------------------------------------------------------
Description : UDN_DELTAPOS on IDC_SPIN_TIME
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnDeltaposSpinTime(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
int iDelta;
char szTime[10];
iDelta = pNMUpDown->iDelta;
if ( (GetKeyState( VK_SHIFT ) & 0x8000) == 0)
{
g_stWinPref.cMinute += iDelta;
if (g_stWinPref.cMinute < 0)
{
g_stWinPref.cMinute = 59;
iDelta = -1;
}
else if (g_stWinPref.cMinute > 59)
{
g_stWinPref.cMinute = 0;
iDelta = 1;
}
else
iDelta = 0;
}
if (iDelta)
{
g_stWinPref.cHour += iDelta;
if (g_stWinPref.cHour < 0)
g_stWinPref.cHour = 23;
else if (g_stWinPref.cHour > 23)
g_stWinPref.cHour = 0;
}
sprintf( szTime, "%02d:%02d", g_stWinPref.cHour, g_stWinPref.cMinute );
GetDlgItem( IDC_EDIT_TIME )->SetWindowText( szTime );
*pResult = 1;
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_USE_TIMER
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnCheckUsetimer()
{
g_stWinPref.bUseTimer = ((CButton *) GetDlgItem( IDC_CHECK_USETIMER ))->GetCheck() == 1;
GetDlgItem( IDC_STATIC_DAY )->ShowWindow( g_stWinPref.bUseTimer );
GetDlgItem( IDC_COMBO_DAY )->ShowWindow( g_stWinPref.bUseTimer );
GetDlgItem( IDC_STATIC_TIME )->ShowWindow( g_stWinPref.bUseTimer );
GetDlgItem( IDC_EDIT_TIME )->ShowWindow( g_stWinPref.bUseTimer );
GetDlgItem( IDC_SPIN_TIME )->ShowWindow( g_stWinPref.bUseTimer );
GetDlgItem( IDC_STATIC_TIME2 )->ShowWindow( g_stWinPref.bUseTimer );
}
/*
----------------------------------------------------------------------------------------
Description : WM_TIMER
nIDEvent -> ident of timer
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnTimer(UINT nIDEvent)
{
char szMessage[ 256 ], *p_szMessage;
if (nIDEvent == m_uiTimer )
{
fn_vComputeElapseTime();
GetDlgItem( IDC_BUTTON_TIME)->Invalidate();
if ( m_bTry )
{
/*
* try to obtain
*/
p_szMessage = szMessage + sprintf( szMessage, "%d ->", ++m_lTryCount );
if (g_stWinPref.bWaitToBeAlone && fn_bSomeoneObtain( FALSE ))
{
if (g_cNbUsers)
sprintf( p_szMessage, "Can't obtain cause %s is obtaining\r\n", g_a_szUserName[0] );
else
sprintf( p_szMessage, "Can't access server" );
}
else
{
if (fn_bSomeoneUpdate(FALSE, FALSE))
{
if (g_cNbUsers)
sprintf( p_szMessage, "Can't obtain cause %s is updating\r\n", g_a_szUserName[0] );
else
sprintf( p_szMessage, "Can't access server" );
}
else
{
if (!fn_bBeginObtaining() )
sprintf( p_szMessage, "Can't access server" );
else
{
m_bObtain = TRUE;
OnCancel();
}
}
}
GetDlgItem( IDC_STATIC_RESULT )->SetWindowText( szMessage );
/*
* obtain can not be done
*/
time_t xTimer;
time ( &xTimer );
m_bTry = FALSE;
m_xNextTry = xTimer + g_stWinPref.lElapseTime;
}
}
CDialog::OnTimer(nIDEvent);
}
/*
----------------------------------------------------------------------------------------
Description : UDN_DELTAPOS on IDC_SPIN_TIME
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnDeltaposSpinSeconds(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
int iDelta;
char szValue[10];
iDelta = -pNMUpDown->iDelta;
g_stWinPref.lElapseTime += iDelta;
if (g_stWinPref.lElapseTime < 10)
g_stWinPref.lElapseTime = 10;
else if (g_stWinPref.lElapseTime > 600)
g_stWinPref.lElapseTime = 600;
GetDlgItem( IDC_EDIT_SECONDS )->SetWindowText( itoa( g_stWinPref.lElapseTime, szValue, 10 ) );
*pResult = 1;
}
/*
----------------------------------------------------------------------------------------
Description : WM_DESTROY
----------------------------------------------------------------------------------------
*/
void CBatchObtainDlg::OnDestroy()
{
CDialog::OnDestroy();
KillTimer( m_uiTimer );
}

View File

@@ -0,0 +1,711 @@
/*
=======================================================================================
Name :DlgUpdOp.cpp
Author :Vincent Date :17/07/97
Description :implementation file for dialog box with update options
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "mngdata5.h"
#include "dlgupdop.h"
#include "inidata.h"
#include "HelpId.h"
#include "Vss5_fct.h"
#include "constant.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
=======================================================================================
CUpdateOptionsDlg dialog
=======================================================================================
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CUpdateOptionsDlg::CUpdateOptionsDlg(CWnd* pParent /*=NULL*/) : CDialog(CUpdateOptionsDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CUpdateOptionsDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
----------------------------------------------------------------------------------------
Description : Message Map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CUpdateOptionsDlg, CDialog)
//{{AFX_MSG_MAP(CUpdateOptionsDlg)
ON_BN_CLICKED(IDC_CHECK_OBTAINAFTERUPDATE, OnCheckObtainafterupdate)
ON_BN_CLICKED(IDC_CHECK_FORCEUPDATE, OnCheckForceupdate)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CUpdateOptionsDlg message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CUpdateOptionsDlg::OnInitDialog()
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
CButton *p_oBtObtain, *p_oBtConfirm, *p_oBtForce, *p_oBtDiff;
BOOL bObtain, bForce, bConfirm, bDiff;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
CDialog::OnInitDialog();
/*
* Set first group of options buttons ( force updating )
*/
p_oBtForce = (CButton *) GetDlgItem( IDC_CHECK_FORCEUPDATE );
p_oBtConfirm = (CButton *) GetDlgItem( IDC_CHECK_CONFIRMBEFOREMODIF );
p_oBtDiff = (CButton *) GetDlgItem( IDC_CHECK_SHOWDIFFERENCES );
bForce = g_stWinPref.lUpdateFlags & C_UpdateOption_lForce;
bConfirm = g_stWinPref.lUpdateFlags & C_UpdateOption_lConfirmForce;
bDiff = g_stWinPref.lUpdateFlags & C_UpdateOption_lShowDifferences;
p_oBtForce->SetCheck( bForce ? 1 : 0 );
p_oBtConfirm->EnableWindow( bForce ? 1 : 0 );
p_oBtConfirm->SetCheck( bConfirm ? 1 : 0 );
p_oBtDiff->EnableWindow( bForce ? 1 : 0 );
p_oBtDiff->SetCheck( bDiff ? 1 : 0 );
/*
* Set secong group of options buttons (obtain after updating )
*/
p_oBtObtain = (CButton *) GetDlgItem( IDC_CHECK_OBTAINAFTERUPDATE );
p_oBtConfirm = (CButton *) GetDlgItem( IDC_CHECK_CONFIRMBEFOREOBTAIN );
bObtain = ( g_stWinPref.lUpdateFlags & C_UpdateOption_lObtainAfter );
bConfirm = ( g_stWinPref.lUpdateFlags & C_UpdateOption_lConfirmObtainAfter );
p_oBtObtain->SetCheck( bObtain ? 1 : 0 );
p_oBtConfirm->EnableWindow( bObtain ? 1 : 0 );
p_oBtConfirm->SetCheck( bConfirm ? 1 : 0 );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDOK button
----------------------------------------------------------------------------------------
*/
void CUpdateOptionsDlg::OnOK()
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
BOOL bObtain, bForce, bConfirm, bDiff;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
bForce = ((CButton *) GetDlgItem ( IDC_CHECK_FORCEUPDATE ))->GetCheck() == 1;
fn_IniD_vSetUpdateFlag( C_UpdateOption_lForce, bForce );
bConfirm = ((CButton *) GetDlgItem ( IDC_CHECK_CONFIRMBEFOREMODIF))->GetCheck() == 1;
fn_IniD_vSetUpdateFlag( C_UpdateOption_lConfirmForce, bConfirm );
bDiff = ((CButton *) GetDlgItem( IDC_CHECK_SHOWDIFFERENCES ))->GetCheck() == 1;
fn_IniD_vSetUpdateFlag( C_UpdateOption_lShowDifferences, bDiff );
bObtain = ((CButton *) GetDlgItem (IDC_CHECK_OBTAINAFTERUPDATE))->GetCheck() == 1;
fn_IniD_vSetUpdateFlag( C_UpdateOption_lObtainAfter, bObtain );
bConfirm = ((CButton *) GetDlgItem (IDC_CHECK_CONFIRMBEFOREOBTAIN))->GetCheck() == 1;
fn_IniD_vSetUpdateFlag( C_UpdateOption_lConfirmObtainAfter, bConfirm );
CDialog::OnOK();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_CHECK_OBTAINAFTERUPDATE
----------------------------------------------------------------------------------------
*/
void CUpdateOptionsDlg::OnCheckObtainafterupdate()
{
BOOL bObtain = ((CButton *) GetDlgItem( IDC_CHECK_OBTAINAFTERUPDATE ))->GetCheck() == 1;
GetDlgItem( IDC_CHECK_CONFIRMBEFOREOBTAIN )->EnableWindow( bObtain );
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_CHECK_FORCEUPDATE
----------------------------------------------------------------------------------------
*/
void CUpdateOptionsDlg::OnCheckForceupdate()
{
BOOL bForce = ((CButton *) GetDlgItem( IDC_CHECK_FORCEUPDATE ))->GetCheck() == 1;
GetDlgItem( IDC_CHECK_CONFIRMBEFOREMODIF )->EnableWindow( bForce );
GetDlgItem( IDC_CHECK_SHOWDIFFERENCES )->EnableWindow( bForce );
}
/*
----------------------------------------------------------------------------------------
Description : WM_HELPINFO
----------------------------------------------------------------------------------------
*/
BOOL CUpdateOptionsDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_UPDATEOPTIONS );
return TRUE;
}
/*
=======================================================================================
=======================================================================================
CUpdateHistoryDlg dialog
=======================================================================================
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CUpdateHistoryDlg::CUpdateHistoryDlg(CWnd* pParent): CDialog(CUpdateHistoryDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CUpdateHistoryDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
----------------------------------------------------------------------------------------
Description : Message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CUpdateHistoryDlg, CDialog)
//{{AFX_MSG_MAP(CUpdateHistoryDlg)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CUpdateHistoryDlg message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_HELPINFO
----------------------------------------------------------------------------------------
*/
BOOL CUpdateHistoryDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_SUMMARY );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CUpdateHistoryDlg::OnInitDialog()
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
BOOL bObtain;
CListBox *p_oLB;
FILE *hpFile;
char szLine[1024];
char *p_szEndLine;
BOOL bError = TRUE;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
CDialog::OnInitDialog();
p_oLB = (CListBox *) GetDlgItem( IDC_LIST_HISTORY );
p_oLB->ResetContent();
/*
* Get latest InUpdate file version
*/
if ( OLE_fn_bGetFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, 0, TRUE, &bObtain ) )
{
if ((hpFile = fopen( g_stIniData.szLocalInUpdate, "rt")) != NULL)
{
while (fgets( szLine, 1023, hpFile))
{
if (*szLine != '*')
{
p_szEndLine = szLine + strlen(szLine) -1;
while ((*p_szEndLine == '\n') || (*p_szEndLine == '\r'))
*p_szEndLine-- = 0;
p_oLB->InsertString( 0, szLine );
}
}
bError = FALSE;
}
}
/*
* display no history if an error occurs
*/
if (bError)
p_oLB->AddString("No previous update operation found" );
return TRUE;
}
/*
=======================================================================================
=======================================================================================
CUpdateFileListDlg dialog
=======================================================================================
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CUpdateFileListDlg::CUpdateFileListDlg(CWnd* pParent /*=NULL*/) : CDialog(CUpdateFileListDlg::IDD, pParent)
{
m_p_oFileDlg = NULL;
//{{AFX_DATA_INIT(CUpdateFileListDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
----------------------------------------------------------------------------------------
Description : MessageMap
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CUpdateFileListDlg, CDialog)
//{{AFX_MSG_MAP(CUpdateFileListDlg)
ON_BN_CLICKED(IDC_BUTTON_NEWCONFIG, OnButtonNewconfig)
ON_WM_DESTROY()
ON_WM_SIZE()
ON_WM_SIZING()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CUpdateFileListDlg message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CUpdateFileListDlg::OnInitDialog()
{
CDialog::OnInitDialog();
GetDlgItem( IDC_BUTTON_NEWCONFIG )->ShowWindow( m_p_oFileDlg != NULL );
m_p_stConfig = &g_stIniData.stUpdateConfig;
m_fn_vRefreshFileList();
/* set color of certain Wnd */
CDC *p_oDC = GetDlgItem( IDC_STATIC_FILELIST )->GetDC();
p_oDC->SetBkColor( RGB(255,0, 255) );
p_oDC->SetTextColor( RGB( 0,0,0) );
MoveWindow( &g_stWinPref.stUpdateWithConfigPos );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_NEWCONFIG
----------------------------------------------------------------------------------------
*/
void CUpdateFileListDlg::OnDestroy()
{
CDialog::OnDestroy();
GetWindowRect( &g_stWinPref.stUpdateWithConfigPos );
}
/*
----------------------------------------------------------------------------------------
Description : WM_SIZE
----------------------------------------------------------------------------------------
*/
void CUpdateFileListDlg::OnSize(UINT nType, int cx, int cy)
{
if (GetDlgItem( IDC_STATIC_CONFIG) != NULL)
{
GetDlgItem( IDC_STATIC_CONFIG )->SetWindowPos( NULL, 5, 7, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
GetDlgItem( IDC_EDIT_CONFIG )->SetWindowPos( NULL, 75 ,5, cx - 230, 20, SWP_NOZORDER );
GetDlgItem( IDC_BUTTON_NEWCONFIG )->SetWindowPos( NULL, cx - 150, 5,0, 0, SWP_NOZORDER | SWP_NOSIZE );
GetDlgItem( IDC_STATIC_FILELIST )->SetWindowPos( NULL, 5, 30, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
GetDlgItem( IDC_LIST_FILES )->SetWindowPos( NULL, 5, 45, cx - 10, cy - 80, SWP_NOZORDER );
GetDlgItem( IDOK )->SetWindowPos( NULL, 5, cy - 25, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
GetDlgItem( IDCANCEL )->SetWindowPos( NULL, cx- 80, cy - 25, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
}
CDialog::OnSize(nType, cx, cy);
}
/*
----------------------------------------------------------------------------------------
Description : WM_SIZING
----------------------------------------------------------------------------------------
*/
void CUpdateFileListDlg::OnSizing(UINT nSide, LPRECT lpRect)
{
long lWidth = lpRect->right - lpRect->left + 1;
long lHeight= lpRect->bottom - lpRect->top + 1;
if (lWidth < C_iUpdateWithConfigMinWidth)
{
switch (nSide)
{
case WMSZ_BOTTOMLEFT:
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
lpRect->left = lpRect->right - C_iUpdateWithConfigMinWidth;
break;
case WMSZ_BOTTOMRIGHT:
case WMSZ_RIGHT:
case WMSZ_TOPRIGHT:
lpRect->right = lpRect->left + C_iUpdateWithConfigMinWidth;
break;
}
}
if (lHeight < C_iUpdateWithConfigMinHeight)
{
switch (nSide)
{
case WMSZ_BOTTOM:
case WMSZ_BOTTOMLEFT:
case WMSZ_BOTTOMRIGHT:
lpRect->bottom = lpRect->top + C_iUpdateWithConfigMinHeight;
break;
case WMSZ_TOP:
case WMSZ_TOPLEFT:
case WMSZ_TOPRIGHT:
lpRect->top = lpRect->bottom - C_iUpdateWithConfigMinHeight;
}
}
CDialog::OnSizing(nSide, lpRect);
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_NEWCONFIG
----------------------------------------------------------------------------------------
*/
void CUpdateFileListDlg::OnButtonNewconfig()
{
if (fn_Tree_bBuildFromDisk( &g_p_stLocalRootProject, g_stIniData.szLocalPath ) )
{
fn_Tree_vRefreshWithFileList( g_p_stLocalRootProject, m_p_stConfig );
m_p_oFileDlg->m_fn_vSetConfigType( C_ConfigType_cUpdate );
if (m_p_oFileDlg->DoModal() == IDOK)
{
fn_IniD_vWriteFileList( m_p_stConfig, g_szIniFile );
m_fn_vRefreshFileList();
}
else
{
if (g_stIniData.a_cAvailableConfig[ m_p_stConfig->cIndex ] == 0)
{
m_p_stConfig->cIndex = -1;
fn_IniD_vFreeFileList( m_p_stConfig );
m_fn_vRefreshFileList();
}
}
}
}
/*
=======================================================================================
CUpdateFileListDlg specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : add to file list all file of file list configuration
----------------------------------------------------------------------------------------
*/
void CUpdateFileListDlg::m_fn_vRefreshFileList( void )
{
CListBox *p_oLB = (CListBox *) GetDlgItem( IDC_LIST_FILES );
int iFile;
p_oLB->ResetContent();
if (m_p_stConfig->lNumberOfFiles == 0)
{
p_oLB->AddString( "<No Files>" );
GetDlgItem ( IDOK )->EnableWindow( FALSE );
}
else
{
GetDlgItem( IDC_EDIT_CONFIG ) ->SetWindowText( m_p_stConfig->szName );
for (iFile = 0; iFile < m_p_stConfig->lNumberOfFiles; iFile++ )
p_oLB->AddString( m_p_stConfig->d_szFile[ iFile ] );
GetDlgItem ( IDOK )->EnableWindow( TRUE );
}
}
/*
=======================================================================================
=======================================================================================
CYesNoAllDlg dialog
=======================================================================================
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CYesNoAllDlg::CYesNoAllDlg(CWnd* pParent /*=NULL*/) : CDialog(CYesNoAllDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CYesNoAllDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_p_stFont = (PLOGFONT) LocalAlloc(LPTR, sizeof(LOGFONT));
strcpy(m_p_stFont->lfFaceName, "Arial");
m_p_stFont->lfWeight = FW_NORMAL ;
m_p_stFont->lfHeight = 16;
m_p_stFont->lfEscapement = 0;
m_oFont.CreateFontIndirect(m_p_stFont);
}
/*
----------------------------------------------------------------------------------------
Description : destructor
----------------------------------------------------------------------------------------
*/
CYesNoAllDlg::~CYesNoAllDlg()
{
m_oFont.DeleteObject();
LocalFree(m_p_stFont);
}
/*
----------------------------------------------------------------------------------------
Description : Message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CYesNoAllDlg, CDialog)
//{{AFX_MSG_MAP(CYesNoAllDlg)
ON_BN_CLICKED(IDC_BUTTON_NOALL, OnButtonNoall)
ON_BN_CLICKED(IDC_BUTTON_YESALL, OnButtonYesall)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CYesNoAllDlg message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_INITDIALOG
----------------------------------------------------------------------------------------
*/
BOOL CYesNoAllDlg::OnInitDialog()
{
int iX, iDeltaX, iY;
CDialog::OnInitDialog();
fn_vComputeDialogSize();
//GetDlgItem( IDC_STATIC_MESSAGE )->SetWindowPos( NULL, 5, 5, m_oDialogSize.cx - 10, m_oDialogSize.cy - 40, SWP_NOZORDER );
GetDlgItem( IDC_STATIC_MESSAGE )->ShowWindow( FALSE );
iX = 5;
iY = m_oDialogSize.cy - 25;
iDeltaX = (m_oDialogSize.cx - 10) / 4;
GetDlgItem( IDOK )->SetWindowPos( NULL, iX, iY, iDeltaX, 20, SWP_NOZORDER );
iX += iDeltaX;
GetDlgItem( IDC_BUTTON_YESALL )->SetWindowPos( NULL, iX, iY, iDeltaX, 20, SWP_NOZORDER );
iX += iDeltaX;
GetDlgItem( IDCANCEL )->SetWindowPos( NULL, iX, iY, iDeltaX, 20, SWP_NOZORDER );
iX += iDeltaX;
GetDlgItem( IDC_BUTTON_NOALL )->SetWindowPos( NULL, iX, iY, iDeltaX, 20, SWP_NOZORDER );
iX = m_oDialogSize.cx + 2 * GetSystemMetrics( SM_CXSIZEFRAME );
iY = m_oDialogSize.cy + 2 * GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
SetWindowPos( NULL, 0, 0, iX, iY, SWP_NOZORDER | SWP_NOMOVE);
SetWindowText( cstrTitle );
//GetDlgItem( IDC_STATIC_MESSAGE )->SetWindowText( cstrMessage );
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_NOALL
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::OnButtonNoall()
{
cChoice = C_CHOICE_cNoAll;
CDialog::OnCancel();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDC_BUTTON_YESALL button
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::OnButtonYesall()
{
cChoice = C_CHOICE_cYesAll;
CDialog::OnOK();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDCANCEL button
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::OnCancel()
{
cChoice = C_CHOICE_cNo;
CDialog::OnCancel();
}
/*
----------------------------------------------------------------------------------------
Description : BN_CLICKED on IDOK button
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::OnOK()
{
cChoice = C_CHOICE_cYes;
CDialog::OnOK();
}
/*
=======================================================================================
CYesNoAllDlg specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : set title of YesallNo dialog box
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::fn_vSetTitle( char *_szTitle )
{
cstrTitle = _szTitle;
}
/*
----------------------------------------------------------------------------------------
Description : Set message
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::fn_vSetMessage( char *_szMessage )
{
cstrMessage = _szMessage;
}
/*
----------------------------------------------------------------------------------------
Description : Set message
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::fn_vComputeDialogSize( void )
{
char *szBeginLine, *szEndLine;
char cNbLines;
CSize oLineSize, oMsgSize(0,0) ;
CDC *p_oDC = GetDC();
p_oDC->SelectObject(&m_oFont);
cNbLines = 0;
szBeginLine = (char *) (LPCTSTR) cstrMessage;
while ( *szBeginLine )
{
cNbLines++;
if ( (szEndLine = strchr( szBeginLine, '\n' )) == NULL)
szEndLine = strchr( szBeginLine, 0 );
oLineSize = p_oDC->GetOutputTextExtent( szBeginLine, szEndLine - szBeginLine );
if (oLineSize.cx > oMsgSize.cx)
oMsgSize.cx = oLineSize.cx;
oMsgSize.cy += oLineSize.cy;
szBeginLine = szEndLine + ((*szEndLine == 0) ? 0 : 1);
}
GetDlgItem( IDC_STATIC_MESSAGE )->ReleaseDC( p_oDC );
m_oDialogSize.cx = oMsgSize.cx + 10;
m_oDialogSize.cy = oMsgSize.cy + 40;
if (m_oDialogSize.cx < 200 )
m_oDialogSize.cx = 200;
}
/*
----------------------------------------------------------------------------------------
Description : WM_PAINT
----------------------------------------------------------------------------------------
*/
void CYesNoAllDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
RECT stRect;
dc.SelectObject(&m_oFont);
stRect.left = stRect.top = 5;
stRect.right = m_oDialogSize.cx - 5;
stRect.bottom = m_oDialogSize.cy - 35;
dc.FillSolidRect( &stRect, RGB(247, 210, 213) );
dc.SetBkMode( TRANSPARENT );
dc.DrawText( cstrMessage, CRect(5,5,m_oDialogSize.cx-5, m_oDialogSize.cy - 35), 0 );
// Do not call CDialog::OnPaint() for painting messages
}

View File

@@ -0,0 +1,144 @@
/*
=======================================================================================
Name :error.cpp
Author :Vincent lhullier Date :27/04/97
Description :error management
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "error.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
char Error_g_szSystemMessage[1024];
char Error_g_szMessage[1024];
Error_tdeValue Error_g_eLast;
/*
=======================================================================================
Set functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : set last error
_eError -> last error
_szErrorString -> error message
----------------------------------------------------------------------------------------
*/
void Error_fn_vSet( Error_tdeValue _eError, char *_szErrorString )
{
/* get system error */
DWORD dwError = GetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,NULL,dwError,0, Error_g_szSystemMessage,1024, NULL);
/* copy or clear last error message */
strcpy( Error_g_szMessage, (_szErrorString == NULL) ? "" : _szErrorString );
/* set last error */
Error_g_eLast = _eError;
}
/*
----------------------------------------------------------------------------------------
Description : set last error with a va_list parameter
_eError -> last error
_szFormat -> string format
... -> other parameter
----------------------------------------------------------------------------------------
*/
void Error_fn_vSetFmt( Error_tdeValue _eError, char *_szFormat, ... )
{
/* get system error */
DWORD dwError = GetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,NULL,dwError,0, Error_g_szSystemMessage,1024, NULL);
/* set last error */
Error_g_eLast = _eError;
/* get last error message */
va_list argptr;
va_start( argptr, _szFormat );
vsprintf( Error_g_szMessage, _szFormat, argptr );
va_end( argptr );
}
/*
=======================================================================================
Access functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : get last error number
Returns (tdeError ) last error
----------------------------------------------------------------------------------------
*/
Error_tdeValue Error_fn_eGet( void )
{
return Error_g_eLast;
}
/*
----------------------------------------------------------------------------------------
Description : get last error message
Returns (char *) last error message
----------------------------------------------------------------------------------------
*/
char *Error_fn_p_szGetMessage( void )
{
return Error_g_szMessage;
}
/*
----------------------------------------------------------------------------------------
Description : return last system error message
Returns (char *) last system error message
----------------------------------------------------------------------------------------
*/
char *Error_fn_p_szGetSystemMessage( void )
{
return Error_g_szSystemMessage;
}
/*
=======================================================================================
Display function
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : display last error in a message box
_bSystem -> if True display system message also
----------------------------------------------------------------------------------------
*/
void Error_fn_vDisplay( BOOL _bSystem )
{
char szText[2048];
char* p_szText;
p_szText = szText + sprintf( szText, "%s", Error_g_szMessage );
if ( _bSystem )
{
sprintf( p_szText, "\r\n---------\r\n%s", Error_g_szSystemMessage );
}
MessageBox( NULL, szText, "Error", MB_ICONERROR );
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,110 @@
/*
=======================================================================================
Name : LogFile.cpp
Author : vincent lhullier Date :27/07/97
Description : implement function to write in a log file MngData operation
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include <stdafx.h>
#include <io.h>
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* put this line in comment if you don't want log file generation
*/
#define __LOGFILE__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CONSTANTS
=======================================================================================
*/
/*
* Name of log file
*/
#define C_szLogFile "MngData.Log"
/*
=======================================================================================
GLOBALS
=======================================================================================
*/
char g_szLogFileFullName[MAX_PATH];
/*
=======================================================================================
FUNCTIONS
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : initialize full name of log file, create it if it does'nt exist
---------------------------------------------------------------------------------------
*/
void LOG_fn_vInitLogFile( void )
{
#ifdef __LOGFILE__
GetCurrentDirectory( MAX_PATH, g_szLogFileFullName );
if (g_szLogFileFullName[ strlen( g_szLogFileFullName ) - 1 ] != '\\' )
strcat( g_szLogFileFullName, "\\" );
strcat( g_szLogFileFullName, C_szLogFile );
if ( _access( g_szLogFileFullName, 0 ) != 0)
{
// if file doesn't exist create it
FILE *hpFile;
hpFile = fopen( g_szLogFileFullName, "wt" );
if (hpFile == NULL)
::MessageBox( NULL, "Unable to create Log file", "Warning", MB_OK );
else
fclose( hpFile );
}
#endif //__LOGFILE__
}
/*
---------------------------------------------------------------------------------------
Description : delete log file
---------------------------------------------------------------------------------------
*/
void LOG_fn_vDeleteLogFile( void )
{
#ifdef __LOGFILE__
remove( C_szLogFile );
#endif //__LOGFILE__
}
/*
---------------------------------------------------------------------------------------
Description : write data in log file
szBuffer -> data to write in Log File
Returns (long ) number of bytes written in file
---------------------------------------------------------------------------------------
*/
long LOG_fn_lWriteInLogFile( char *szBuffer )
{
#ifdef __LOGFILE__
long lWrite;
FILE *hpFile;
hpFile = fopen( g_szLogFileFullName, "at");
if (hpFile == NULL)
return 0;
lWrite = fwrite( szBuffer, 1, strlen( szBuffer ), hpFile );
fclose ( hpFile );
return lWrite;
#endif //__LOGFILE__
}

View File

@@ -0,0 +1,961 @@
/*
=======================================================================================
Name :MajData.cpp
Author :vincent lhullie Date :21/07/97
Description : High level functions to update Vss data base
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "majdata.h"
#include "error.h"
#include "inidata.h"
#include "DlgConfl.h"
#include "DlgUpdOp.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
char g_szVssFileName[ MAX_PATH ]; // info on checked out file
tdstFileInfo g_stTarget; // info on target (vss) section
tdstFileInfo g_stSource; // info on source (local) section
char g_cDeleteSectionModif;
char g_cAddModifiedFile;
/*
=======================================================================================
Functions to create semaphore file
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : function that create the InUpdate semaphore file
---------------------------------------------------------------------------------------
*/
void fn_vCreateInUpdateSemFile( char *szName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
FILE *hpFile;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
hpFile = fopen( szName, "wt" );
fprintf( hpFile, "*******************************************\n");
fprintf( hpFile, "* >>>>>>>>>>>>> WARNING <<<<<<<<<<<<<<< *\n");
fprintf( hpFile, "*******************************************\n");
fprintf( hpFile, "* This file is used to know if someone is *\n");
fprintf( hpFile, "* updating the data base. If this file is *\n");
fprintf( hpFile, "* extract it's the case and nobody else *\n");
fprintf( hpFile, "* can update or obtain data *\n");
fprintf( hpFile, "*******************************************\n");
fclose( hpFile );
}
/*
---------------------------------------------------------------------------------------
Description : function that create the InObtain semaphore file
---------------------------------------------------------------------------------------
*/
void fn_vCreateInObtainFile( char *szName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
FILE *hpFile;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
hpFile = fopen( szName, "wt" );
fprintf( hpFile, "*******************************************\n");
fprintf( hpFile, "* >>>>>>>>>>>>> WARNING <<<<<<<<<<<<<<< *\n");
fprintf( hpFile, "*******************************************\n");
fprintf( hpFile, "* This file is used to know if someone is *\n");
fprintf( hpFile, "* obtaining the data base. If this file is*\n");
fprintf( hpFile, "* extract it's the case and no one can *\n");
fprintf( hpFile, "* update. Because there can be more than *\n");
fprintf( hpFile, "* one obtaning at the same time, this file*\n");
fprintf( hpFile, "* can be in multiple extraction *\n");
fprintf( hpFile, "*******************************************\n");
fclose( hpFile );
}
/*
=======================================================================================
function to manage section : read, build, save
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : read desired section and section des
---------------------------------------------------------------------------------------
*/
BOOL fn_bGetSection( tdstFileInfo *p_stFI, char *p_szSectionName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szFullSectionName[MAX_PATH];
char *p_cCur, *szEndLine;
BOOL bDate;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* get section desc for file info and section name
*/
sprintf( szFullSectionName, "%s^%s", p_stFI->szFullName, p_szSectionName );
p_stFI->p_stSection = fnp_st_Anl_SearchSectionDes( p_stFI->p_stFile, szFullSectionName, 0);
p_stFI->oTime.SetDate( 100, 1, 1 );
if (p_stFI->p_stSection == NULL)
return FALSE;
/*
* get entire source section
*/
p_stFI->lSize = p_stFI->p_stSection->stEndPosition.lAfterSeekInFile - p_stFI->p_stSection->stBeginPosition.lAfterSeekInFile;
p_stFI->p_cBuffer = (char *) malloc (p_stFI->lSize + 1);
SCR_M_File_Seek( &p_stFI->p_stFile->stFile, p_stFI->p_stSection->stBeginPosition.lAfterSeekInFile, SEEK_SET );
p_stFI->lSize = SCR_M_fread( p_stFI->p_cBuffer, 1, p_stFI->lSize, &p_stFI->p_stFile->stFile);
p_stFI->p_cBuffer[p_stFI->lSize] = 0;
/*
* retrieve section date
*/
bDate = FALSE;
p_cCur = strchr(p_stFI->p_cBuffer, ';');
if (p_cCur != NULL)
{
p_cCur++;
if ( (szEndLine = strchr( p_cCur, 0x0D)) != NULL )
*szEndLine = 0;
if ( strlen( p_cCur ) >= 16 )
{
if (p_cCur[ 16 ] == 0)
{
bDate = p_stFI->oTime.ParseDateTime( p_cCur );
strcpy( p_stFI->szLastUserName, "Unknow" );
}
else if (p_cCur[ 16 ] == ' ')
{
p_cCur[16] = 0;
bDate = p_stFI->oTime.ParseDateTime( p_cCur );
strcpy( p_stFI->szLastUserName, p_cCur + 17 );
p_cCur[16] = ' ';
}
}
if (szEndLine !=NULL)
*szEndLine = 0x0D;
}
if ( !bDate )
{
p_stFI->oTime.SetDate( 100, 1, 1 );
strcpy( p_stFI->szLastUserName, "Unknow" );
}
return TRUE;
}
/*
---------------------------------------------------------------------------------------
Description : Check if parent section of a section exist
---------------------------------------------------------------------------------------
*/
BOOL fn_bCheckParentSection( tdstFileInfo *p_stFI, char *p_szSectionName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szParentSectionName[MAX_PATH];
char *p_cCur;
SCR_tdst_Anl_SectionDes *p_stParentSection;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* get section desc for file info and section name
*/
if ( (p_cCur = strrchr( p_szSectionName, '^' )) == NULL )
return TRUE;
*p_cCur = 0;
sprintf( szParentSectionName, "%s^%s", p_stFI->szFullName, p_szSectionName );
*p_cCur = '^';
p_stParentSection = fnp_st_Anl_SearchSectionDes( p_stFI->p_stFile, szParentSectionName, 0);
return (p_stParentSection != NULL);
}
/*
---------------------------------------------------------------------------------------
Description : read a comment line in script file
---------------------------------------------------------------------------------------
*/
BOOL fn_bGetCommentLine( SCR_tdst_File_Description *p_stFile, char *szLine )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int iRead;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
SCR_M_Pars_GetNextNonSpaceChar(p_stFile, iRead);
if ((iRead == SCR_CC_c_Cfg_CommentMark) || (iRead == SCR_CC_c_Cfg_CommentMark1))
{
while((iRead != '\n') && (iRead != EOF))
{
if (szLine != NULL)
*szLine++ = (char) iRead;
SCR_M_Pars_ReadChar(p_stFile, iRead);
}
return TRUE;
}
return FALSE;
}
/*
---------------------------------------------------------------------------------------
Description : save a section
---------------------------------------------------------------------------------------
*/
void fn_vSaveSection(SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char *p_cSection = (char *)p_vData;
char *p_cCur = p_cSection;
SCR_tdst_Anl_SectionDes *p_stSection;
SCR_tdst_File_Open *p_stOpenFile;
char szCommentLine[SCR_CV_ui_Cfg_MaxLenLine];
char szIndent[100];
BOOL bAlreadyADate;
struct tm stTime;
char *p_cSectionSeparation;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* If it's a new section or subsection file pointer is on father section beginning
* we deplace file pointer to the end of section
* if father section isn't the file we must go one line back to set file pointer
* before the end of section (before the '}' character )
*/
if (eAction == SCR_EA_Ntfy_AddSection)
{
SCR_fn_v_SvL1_ToEndSection( p_stFile );
p_cSectionSeparation = strchr( szSectionName, '^' );
if (p_cSectionSeparation != NULL)
{
p_cSectionSeparation = strchr( p_cSectionSeparation + 1, '^' );
if (p_cSectionSeparation != NULL)
{
SCR_fn_v_SvL1_ToPrevLine( p_stFile );
}
}
}
/*
* write section (or sub-section)
*/
while (*p_cCur != 0)
{
if (*p_cCur != '\r')
fn_v_SvL0_fputc( p_stFile, *p_cCur );
p_cCur ++;
}
fn_v_SvL0_fputc( p_stFile, '\n' );
free( p_cSection );
/*
* if parent section exist save updating time for parent section too
*/
memset ( szIndent, '\t', 100 );
p_stOpenFile = SCR_fnp_st_RdL0_GetOpenFile( p_stFile->a_szFileName );
*strrchr( szSectionName, '^' ) = 0;
p_stSection = fnp_st_Anl_SearchSectionDes( p_stOpenFile, szSectionName, 0);
while( p_stSection != NULL)
{
szIndent[p_stSection->stBeginPosition.uiLevel - 1] = 0;
SCR_M_File_Seek( p_stFile, p_stSection->stBeginPosition.lAfterSeekInFile, SEEK_SET );
/*
* look if there's already a date in section beginning, if so delete line
*/
bAlreadyADate = FALSE;
if (fn_bGetCommentLine( p_stFile, szCommentLine ) )
bAlreadyADate = fn_bReadDate( szCommentLine + 1, &stTime );
SCR_M_File_Seek( p_stFile, p_stSection->stBeginPosition.lAfterSeekInFile, SEEK_SET );
if (bAlreadyADate)
SCR_fn_v_SvL1_DeleteLine( p_stFile );
/*
* save date for parent section
*/
SCR_fn_v_SvL0_SaveWord( p_stFile, SCR_CC_C_Cfg_NoChar, szIndent ,SCR_CC_C_Cfg_NoChar );
//SCR_fn_v_SvL0_SaveWord( p_stFile, SCR_CC_c_Cfg_CommentMark, g_szUpdateTimeString ,SCR_CC_C_Cfg_EOL );
SCR_fn_v_SvL0_SaveWord( p_stFile, SCR_CC_c_Cfg_CommentMark, g_szUpdateTimeString ,' ' );
SCR_fn_v_SvL0_SaveWord( p_stFile, SCR_CC_C_Cfg_NoChar, g_stIniData.szVssUserName ,SCR_CC_C_Cfg_EOL );
p_stSection = p_stSection->p_stParentSection;
}
}
/*
---------------------------------------------------------------------------------------
Description build a section from a SectionDes
---------------------------------------------------------------------------------------
*/
char *fn_p_cBuildSection( tdstFileInfo *p_stFI, BOOL _bCurrentTime )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
long lSize;
char *p_cBuf;
char *p_cCur;
char *p_szParam;
SCR_tdst_Cxt_DynBuffers *p_stBuf = &p_stFI->p_stSection->stBuffers;
SCR_tdst_Anl_SectionDes *p_stParentSection = p_stFI->p_stSection->p_stParentSection;
char szIndent[SCR_CV_ui_Cfg_MaxLenLine];
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* compute indent string
*/
*szIndent = 0;
while ( p_stParentSection != NULL)
{
strcat( szIndent, "\t" );
p_stParentSection = p_stParentSection->p_stParentSection;
}
/*
*allocate memory for section content
*/
lSize = p_stFI->lSize + 2 * SCR_CV_ui_Cfg_MaxLenLine;
p_cCur = p_cBuf = (char *) malloc (lSize);
/*
* write begin section line
*/
p_cCur += sprintf( p_cCur, "\r\n%s{%s:%s", szIndent, p_stBuf->p_szBufferName, p_stBuf->p_szBufferNameExt );
if (*p_stBuf->a_szBufferFormat)
p_cCur += sprintf( p_cCur, "[%s]", p_stBuf->a_szBufferFormat );
if (*p_stBuf->a_szBufferParams)
{
p_cCur += sprintf( p_cCur, "(" );
p_szParam = p_stBuf->a_szBufferParams;
while ( *p_szParam )
{
p_cCur += sprintf( p_cCur, "%s,", p_szParam );
p_szParam += strlen( p_szParam ) + 1;
}
p_cCur--;
p_cCur += sprintf( p_cCur, ")" );
}
p_cCur += sprintf( p_cCur, "\r\n" );
p_szParam = p_stFI->p_cBuffer;
if ( _bCurrentTime )
{
/*
* write time
*/
p_cCur += sprintf( p_cCur, "%s;%s %s\r\n", szIndent, g_szUpdateTimeString, g_stIniData.szVssUserName );
/*
* swap old date line
*/
if ( (p_stFI->oTime.GetYear() != 1899) && (p_stFI->oTime.GetYear() != 100) )
{
p_szParam = strchr( p_stFI->p_cBuffer, ';' );
while (*p_szParam++ != '\n');
}
}
/*
* write other's line of section in buffer
*/
strcpy(p_cCur, p_szParam );
return p_cBuf;
}
/*
=======================================================================================
Algorithm functions
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
function that watch if semaphore file is extract or not
---------------------------------------------------------------------------------------
*/
BOOL fn_bSomeoneUpdate( BOOL bCreateFile, BOOL _bMessage )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char cStatus;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* get status of InUpdate.Sem file
*/
cStatus = OLE_fn_cGetVssFileStatus( g_stIniData.szVssInUpdate );
/*
* if file is extract by current user, display problem
*/
if (cStatus == VSSFILE_CHECKEDOUT_ME)
{
if (
(!_bMessage)
||
(
AfxMessageBox
(
"There's a problem, base status indicate\r\nthat you currently update base\r\nWould you correct problem ?",
MB_ICONEXCLAMATION | MB_YESNO
) == IDYES
)
)
{
/*
* try to correct problem by undoing checkout
*/
OLE_fn_bUndoCheckoutFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, 0 );
cStatus = OLE_fn_cGetVssFileStatus( g_stIniData.szVssInUpdate );
/*
* if still extract by current user, display error
*/
if (cStatus == VSSFILE_CHECKEDOUT_ME)
{
if (_bMessage)
AfxMessageBox( "Can't correct problem, contact administraton", MB_ICONSTOP );
return TRUE;
}
}
else
{
return TRUE;
}
}
/*
* if file is extract, someone update, stop
*/
if (cStatus == VSSFILE_CHECKEDOUT)
return TRUE;
/*
* if file does'nt exist, create it and add it in VSS
*/
if ((cStatus == VSSFILE_NOTFOUND) && bCreateFile)
{
fn_vCreateInUpdateSemFile(g_stIniData.szLocalInUpdate);
OLE_fn_bAddFile( g_stIniData.szVssPath, g_stIniData.szLocalInUpdate );
}
return FALSE;
}
/*
----------------------------------------------------------------------------------------
Description : return update status of base (TRUE) if someone update and write in
_p_szMsg variable a status string
Returns (BOOL ) TRUE if someone update, otherwise FALSE
----------------------------------------------------------------------------------------
*/
BOOL fn_bGetUpdateStatus( char *_p_szMsg )
{
BOOL bResult;
bResult = fn_bSomeoneUpdate(FALSE, TRUE);
if (_p_szMsg != NULL )
{
if (bResult)
sprintf( _p_szMsg, "%s is updating", g_a_szUserName[0] );
else
sprintf( _p_szMsg, "Nobody is being updating");
}
return bResult;
}
/*
---------------------------------------------------------------------------------------
begin updating
---------------------------------------------------------------------------------------
*/
BOOL fn_bBeginUpdating( void )
{
//return OLE_fn_bCheckoutFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, VSSFLAG_GETNO );
return OLE_fn_bCheckoutFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, VSSFLAG_GETYES | VSSFLAG_REPREPLACE );
}
/*
---------------------------------------------------------------------------------------
end obtaining data
---------------------------------------------------------------------------------------
*/
BOOL fn_bEndUpdating( void )
{
FILE *hpFile;
if ( (hpFile = fopen( g_stIniData.szLocalInUpdate, "at")) != NULL)
{
fprintf( hpFile, "%s %s\n", g_szUpdateTimeString, g_stIniData.szVssUserName );
fclose (hpFile );
}
return OLE_fn_bCheckinFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, VSSFLAG_DELYES );
//return OLE_fn_bUndoCheckoutFile( g_stIniData.szVssInUpdate, g_stIniData.szLocalInUpdate, VSSFLAG_DELYES );
}
/*
---------------------------------------------------------------------------------------
doing a modification
---------------------------------------------------------------------------------------
*/
BOOL fn_bDoModif( tdstModif *p_stModif )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char *p_szSectionName = strchr( p_stModif->szName, '^' );
char szNotifiedSection[MAX_PATH];
SCR_tde_Ntfy_Action eNotifyAction;
BOOL bSource;
BOOL bTarget;
BOOL bError = FALSE;
BOOL bContinue = TRUE;
char *szVssSection;
char *szLocalSection = NULL;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* check section
*/
if (p_szSectionName == NULL)
return FALSE;
sprintf( szNotifiedSection, "%s%s", g_stTarget.szFullName, p_szSectionName );
p_szSectionName++;
/*
* get target and source section
*/
bTarget = fn_bGetSection( &g_stTarget, p_szSectionName );
bSource = fn_bGetSection( &g_stSource, p_szSectionName );
if (!bSource && !bTarget)
{
/*
* none of source or target section exist
*/
Error_fn_vSet( Error_eSectionNotFound, "Section Not Found neither in Vss nor in local disk" );
return FALSE;
}
else
{
/*
* compute notify action
*/
if (!bSource)
eNotifyAction = SCR_EA_Ntfy_DeleteSection;
else
{
if (!bTarget)
eNotifyAction = SCR_EA_Ntfy_AddSection;
else
{
if (p_stModif->cType == C_ModifType_cAdd)
{
int cChoice;
if (g_cDeleteSectionModif == 0)
{
CYesNoAllDlg oQuestion;
char szMessage[1024], *p_szMessage = szMessage;
p_szMessage += sprintf( p_szMessage, "Warning : %s section\n", p_stModif->szName );
p_szMessage += sprintf( p_szMessage, "was created in your local directory but already exist in vss data\n");
p_szMessage += sprintf( p_szMessage, "-------------------------------------\n" );
p_szMessage += sprintf( p_szMessage, "Do you want I delete this section modification and \n");
p_szMessage += sprintf( p_szMessage, "take care of sub section modification ?");
oQuestion.fn_vSetMessage( szMessage );
oQuestion.DoModal();
cChoice = oQuestion.fn_cGetChoice();
switch( cChoice )
{
case C_CHOICE_cYesAll:
g_cDeleteSectionModif = cChoice;
cChoice = C_CHOICE_cYes;
break;
case C_CHOICE_cNoAll:
g_cDeleteSectionModif = cChoice;
cChoice = C_CHOICE_cNo;
break;
}
}
else
{
cChoice = (g_cDeleteSectionModif == C_CHOICE_cYesAll) ? C_CHOICE_cYes : C_CHOICE_cNo;
}
if (cChoice == C_CHOICE_cNo)
{
Error_fn_vSet( Error_eVssSectionAlreadyCreated, "Created local section already exist" );
bError = TRUE;
}
else
{
fn_vRestoreSubModif( p_stModif );
}
bContinue = FALSE;
}
eNotifyAction = SCR_EA_Ntfy_RebuildSection;
}
}
}
/*
* watch if time are ok
*/
if (bContinue)
{
if ( g_stTarget.oTime > *g_stIniData.p_oObtainingTime)
{
if (stricmp( g_stIniData.szVssUserName, g_stTarget.szLastUserName) != 0)
{
BOOL bForce = FALSE;
if ( g_stWinPref.lUpdateFlags & C_UpdateOption_lForce )
{
bForce = TRUE;
if (g_stWinPref.lUpdateFlags & C_UpdateOption_lConfirmForce )
{
CConflictDlg oConflictDlg;
szVssSection = fn_p_cBuildSection( &g_stTarget, FALSE );
if ( bSource )
szLocalSection = fn_p_cBuildSection( &g_stSource, TRUE );
oConflictDlg.m_fn_vSetSectionName( p_stModif->szName );
//oConflictDlg.m_fn_vSetUserName( g_a_szUserName[0] );
oConflictDlg.m_fn_vSetUserName( g_stTarget.szLastUserName );
oConflictDlg.m_fn_vSetVssSection( szVssSection );
oConflictDlg.m_fn_vSetLocalSection( szLocalSection );
bForce = oConflictDlg.DoModal() == IDOK;
free( szVssSection );
}
}
if ( !bForce )
{
if (szLocalSection != NULL)
free( szLocalSection );
Error_fn_vSetFmt( Error_eVssSectionNewer, "Vss Section is newer (last update was done by %s)", g_stTarget.szLastUserName );
bError = TRUE;
bContinue = FALSE;
}
}
}
}
/*
* check parent section in target file if we add a section
*/
if (eNotifyAction == SCR_EA_Ntfy_AddSection)
{
if (!fn_bCheckParentSection( &g_stTarget, p_szSectionName ) )
{
Error_fn_vSet( Error_eVssParentSectionInexistent, "Parent Section doesn't exist" );
bError = TRUE;
bContinue = FALSE;
}
}
/*
* notify section
*/
if (bContinue)
{
if (eNotifyAction != SCR_EA_Ntfy_DeleteSection)
{
if (szLocalSection == NULL)
szLocalSection = fn_p_cBuildSection( &g_stSource, TRUE );
SCR_fn_v_SvL1_RegisterNotify(szNotifiedSection, fn_vSaveSection, szLocalSection, eNotifyAction );
}
else
SCR_fn_v_SvL1_RegisterNotify(szNotifiedSection, NULL, NULL, eNotifyAction );
}
/*
* free memory
*/
if (bTarget)
free( g_stTarget.p_cBuffer );
if (bSource)
free( g_stSource.p_cBuffer );
return (!bError);
}
/*
----------------------------------------------------------------------------------------
Description : watch if someone is obtaining base
Returns (BOOL ) TRUE if someone obtain
----------------------------------------------------------------------------------------
*/
BOOL fn_bSomeoneObtain( BOOL _bMessage )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char cStatus;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* get In obtain sem file status
*/
cStatus = OLE_fn_cGetVssFileStatus( g_stIniData.szVssInObtain );
/*
* if file is extract by current user, display problem
*/
if (cStatus == VSSFILE_CHECKEDOUT_ME)
{
if (
(!_bMessage)
||
(
AfxMessageBox
(
"There's a problem, base status indicate\r\nthat you currently obtain base\r\nWould you correct problem ?",
MB_ICONEXCLAMATION | MB_YESNO
) == IDYES
)
)
{
/*
* try to correct problem by undoing checkout
*/
OLE_fn_bUndoCheckoutFile( g_stIniData.szVssInObtain, g_stIniData.szLocalInObtain, 0 );
cStatus = OLE_fn_cGetVssFileStatus( g_stIniData.szVssInObtain );
/*
* if still extract by current user, display error
*/
if (cStatus == VSSFILE_CHECKEDOUT_ME)
{
if (_bMessage)
AfxMessageBox( "Can't correct problem, contact administraton", MB_ICONSTOP );
return TRUE;
}
}
else
{
return TRUE;
}
}
return (cStatus == VSSFILE_CHECKEDOUT);
}
/*
----------------------------------------------------------------------------------------
Description : return obtain statusx of base (TRUE if someone obtain. And write in
_p_szMsg variable a status string
Returns (BOOL )TRUE if someone obtain, otherwise FALSE
----------------------------------------------------------------------------------------
*/
BOOL fn_bGetObtainStatus( char *_p_szMsg )
{
BOOL bResult;
bResult = fn_bSomeoneObtain( TRUE );
if (_p_szMsg != NULL)
{
if (bResult)
{
if (g_cNbUsers == 1)
sprintf( _p_szMsg , "%s is obtaining", g_a_szUserName[0] );
else
{
char cUser;
_p_szMsg += sprintf(_p_szMsg , "%d persons are obtaining ( ", g_cNbUsers );
for (cUser = 0; cUser < g_cNbUsers; cUser ++)
_p_szMsg += sprintf( _p_szMsg , "%s, ", g_a_szUserName[ cUser ] );
strcpy (_p_szMsg - 2, " )");
}
}
else
sprintf( _p_szMsg , "Nobody is being obtaining" );
}
return bResult;
}
/*
----------------------------------------------------------------------------------------
begin obtaining (extract InObtain semaphore file )
Returns (BOOL ) TRUE if operation is successfull
----------------------------------------------------------------------------------------
*/
BOOL fn_bBeginObtaining( void )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char cStatus;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* get file status for creating it if it's necessary
*/
cStatus = OLE_fn_cGetVssFileStatus( g_stIniData.szVssInObtain );
/*
* if already checked by user, return TRUE
*/
if (cStatus == VSSFILE_CHECKEDOUT_ME)
return TRUE;
/*
* if file not found, add it
*/
if (cStatus == VSSFILE_NOTFOUND)
{
fn_vCreateInObtainFile( g_stIniData.szLocalInObtain );
OLE_fn_bAddFile( g_stIniData.szVssPath, g_stIniData.szLocalInObtain );
}
return OLE_fn_bCheckoutFile( g_stIniData.szVssInObtain, g_stIniData.szLocalInObtain, VSSFLAG_GETNO);
}
/*
----------------------------------------------------------------------------------------
end obtaining data
----------------------------------------------------------------------------------------
*/
BOOL fn_bEndObtaining( void )
{
return OLE_fn_bUndoCheckoutFile( g_stIniData.szVssInObtain, g_stIniData.szLocalInObtain, VSSFLAG_DELYES );
}
/*
----------------------------------------------------------------------------------------
obtaining data (a unique folder or recursive)
----------------------------------------------------------------------------------------
*/
BOOL fn_bObtainFile( char *szFileName, BOOL *_bObtain )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szLocalPath[MAX_PATH];
char *szVssName;
int iFlags;
char *p_cSeparation;
BOOL bFile;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
* Init
*/
szVssName = szFileName;
iFlags = 0;
bFile = FALSE;
/*
* type of file to obtain
*/
if (*szFileName == '-')
{
switch ( *(szFileName + 1) )
{
case 'R':
iFlags |= VSSFLAG_RECURSYES;
break;
case 'F':
bFile = TRUE;
break;
}
szVssName += 3;
}
/*
* Get Local path
*/
sprintf( szLocalPath, "%s%s", g_stIniData.szLocalPath, szVssName + strlen( g_stIniData.szVssPath) );
if ( bFile )
{
p_cSeparation = strrchr( szLocalPath, '\\');
if (p_cSeparation == NULL)
return FALSE;
*p_cSeparation = 0;
}
/*
* Create local directory if it does'nt exist
*/
if ( (!CreateDirectory( szLocalPath, NULL )) && (GetLastError() != ERROR_ALREADY_EXISTS) )
{
char *p_szCur = szLocalPath;
/*
* swap first \ character
*/
while ( *p_szCur == '\\' )
p_szCur ++;
/*
* search first \ or second if this is a drive letter before the \\ character
*/
p_szCur = strchr( p_szCur, '\\');
if (*(p_szCur - 1) == ':')
p_szCur = strchr( p_szCur + 1, '\\');
/*
* create recursively each sub directory
*/
while (p_szCur != NULL)
{
*p_szCur = 0;
if ((!CreateDirectory (szLocalPath, NULL)) && (GetLastError() != ERROR_ALREADY_EXISTS) )
{
Error_fn_vSetFmt( Error_eCantCreateLocalPath, "Can't create local path %s", szLocalPath );
Error_fn_vDisplay( TRUE );
return FALSE;
}
*p_szCur++ = '\\';
p_szCur = strchr( p_szCur, '\\');
};
if ((!CreateDirectory (szLocalPath, NULL)) && (GetLastError() != ERROR_ALREADY_EXISTS) )
{
Error_fn_vSetFmt( Error_eCantCreateLocalPath, "Can't create local path %s", szLocalPath );
Error_fn_vDisplay( TRUE );
return FALSE;
}
}
if (bFile)
*p_cSeparation = '\\';
return OLE_fn_bGetFile( szVssName, szLocalPath, iFlags, bFile, _bObtain );
}
/*
----------------------------------------------------------------------------------------
update a file
----------------------------------------------------------------------------------------
*/
char fn_cUpdateFile( char *_szLocalFileName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szVssPath[MAX_PATH];
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
sprintf( szVssPath, "%s%s", g_stIniData.szVssPath, _szLocalFileName+ strlen( g_stIniData.szLocalPath ) );
return OLE_fn_cUpdateFile( szVssPath, _szLocalFileName );
}

View File

@@ -0,0 +1,178 @@
/*
=======================================================================================
Name :MngData5.cpp
Author : VL Date :10/07/97
Description : Defines the class behaviors for the MngData5 application.
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include <afxdisp.h>
#include "MngData5.h"
#include "DlgMain.h"
#include "winsock2.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
/*
* The one and only CMngDataApp object
*/
CMngDataApp theApp;
HANDLE g_hMutex;
/*
=======================================================================================
CMngDataApp
=======================================================================================
*/
/*
------------------------------------------------------------------------------
message map
------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CMngDataApp, CWinApp)
//{{AFX_MSG_MAP(CMngDataApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/*
------------------------------------------------------------------------------
constructor
------------------------------------------------------------------------------
*/
CMngDataApp::CMngDataApp()
{
}
/*
------------------------------------------------------------------------------
initialization
------------------------------------------------------------------------------
*/
BOOL CMngDataApp::InitInstance()
{
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
/*
* create mutex to be sure that there's only one instance at same time
*/
g_hMutex = CreateMutex( NULL, FALSE, "Vss data manager application" );
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
ReleaseMutex( g_hMutex );
AfxMessageBox( "Vss data manager is already running", MB_ICONSTOP );
return FALSE;
}
/*
* Init OLE
*/
if (!AfxOleInit())
{
AfxMessageBox("OLE initialization failed.\r\nMake sure that the OLE libraries\r\nare the correct version.", MB_ICONSTOP);
return FALSE;
}
/*
* init windows socket
*/
if ( !fn_bInitWindowsSocket() != 0 )
return FALSE;
/*
* display main dialog box
*/
CMngDataDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
fn_vCloseWindowsSocket();
return FALSE;
}
/*
------------------------------------------------------------------------------
Exit program : release mutex
------------------------------------------------------------------------------
*/
int CMngDataApp::ExitInstance()
{
ReleaseMutex( g_hMutex );
return CWinApp::ExitInstance();
}
/*
=======================================================================================
Specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : initialize winsows socket to communicate with time server
Returns (BOOL ) true if init success
----------------------------------------------------------------------------------------
*/
BOOL CMngDataApp::fn_bInitWindowsSocket( void )
{
WORD wVersionRequested;
WSADATA wsaData;
int iError;
wVersionRequested = MAKEWORD( 2, 0 );
iError = WSAStartup( wVersionRequested, &wsaData );
if ( iError != 0 )
{
AfxMessageBox( "Cannot initialize windows socket", MB_ICONSTOP );
return FALSE;
}
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : close windows socket
----------------------------------------------------------------------------------------
*/
void CMngDataApp::fn_vCloseWindowsSocket( void )
{
WSACleanup();
}

View File

@@ -0,0 +1,600 @@
/*
=======================================================================================
Name :ModifLst.cpp
Author :vincent lhullier Date :23/07/97
Description :manage list of modifications
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "IniData.h"
#include "ModifLst.h"
#include "SCR.h"
#include "dlgmodif.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
tdstModif *g_p_stLastModif = NULL;
tdstModif *g_p_stFirstModif = NULL;
long g_lNumberOfModifs = 0;
long g_lNumberOfChildModifs = 0;
long g_lNumberOfFatherModifs = 0;
/*
=======================================================================================
Functions to decompose modif name
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : extract from a modif name the filename and short filename
_p_stModif -> modif
szFileName -> string to store filename
szShortFileName -> string to store short name
Returns (BOOL) TRUE if section modified is the file, FALSE if it's a section in the
file
----------------------------------------------------------------------------------------
*/
BOOL fn_bGetModifiedFile( tdstModif *_p_stModif, char *_szFileName, char *_szShortFileName )
{
char *p_szEnd;
BOOL bResult;
strcpy( _szFileName, _p_stModif->szName );
p_szEnd = strchr( _szFileName, '^' );
if (p_szEnd != NULL)
*p_szEnd = 0;
bResult = ( p_szEnd == NULL );
p_szEnd = strrchr( _szFileName, '\\');
if (p_szEnd == NULL)
p_szEnd = _szFileName;
else
p_szEnd++;
strcpy( _szShortFileName, p_szEnd );
return bResult;
}
/*
----------------------------------------------------------------------------------------
Description : find in modif first child modif of given father modif
_p_stFather -> father of modif searched
Returns (tdstModif ) a child modif
----------------------------------------------------------------------------------------
*/
tdstModif *fn_p_stGetChildModif( tdstModif *_p_stFather )
{
tdstModif *p_stChild = g_p_stFirstModif;
while (p_stChild != NULL)
{
if (p_stChild->p_stFather == _p_stFather)
return p_stChild;
p_stChild = p_stChild->p_stNext;
}
return NULL;
}
/*
----------------------------------------------------------------------------------------
Description : return number of children of a section modification
_p_stFather -> father
Returns (long ) number of children
----------------------------------------------------------------------------------------
*/
long fn_lNumberOfChildModif( tdstModif *_p_stFather )
{
long lNumber = 0;
tdstModif *p_stChild = g_p_stFirstModif;
tdstModif *p_stFather;
while (p_stChild != NULL)
{
p_stFather = p_stChild->p_stFather;
while (p_stFather != NULL)
{
if (p_stFather == _p_stFather )
{
lNumber++;
break;
}
p_stFather = p_stFather->p_stFather;
}
p_stChild = p_stChild->p_stNext;
}
return lNumber;
}
/*
----------------------------------------------------------------------------------------
Description : delete a modification on a section and restore all modification on
subsection of this section
----------------------------------------------------------------------------------------
*/
void fn_vRestoreSubModif(tdstModif *_p_stModif )
{
tdstModif *p_stSubModif = g_p_stFirstModif;
while (p_stSubModif != NULL)
{
if (p_stSubModif->p_stFather == _p_stModif)
{
p_stSubModif->p_stFather = NULL;
g_lNumberOfChildModifs--;
g_lNumberOfFatherModifs++;
}
p_stSubModif = p_stSubModif->p_stNext;
}
//fn_lDeleteModif( _p_stModif, FALSE );
}
/*
---------------------------------------------------------------------------------------
delete a modif from list
---------------------------------------------------------------------------------------
*/
long fn_lDeleteModif( tdstModif *_p_stModif, BOOL _bDeleteChild )
{
tdstModif *p_stChild;
long lDeleted = 0;
if (_p_stModif == NULL)
return 0;
// free all child modification
if (_bDeleteChild)
while ( (p_stChild = fn_p_stGetChildModif( _p_stModif )) != NULL)
lDeleted += fn_lDeleteModif( p_stChild, _bDeleteChild );
//deallocate memory for name
free (_p_stModif->szName );
// keep link between modification
if (_p_stModif == g_p_stFirstModif )
g_p_stFirstModif = _p_stModif->p_stNext;
if (_p_stModif == g_p_stLastModif)
g_p_stLastModif = _p_stModif->p_stPrevious;
if (_p_stModif->p_stPrevious != NULL)
_p_stModif->p_stPrevious->p_stNext = _p_stModif->p_stNext;
if (_p_stModif->p_stNext != NULL)
_p_stModif->p_stNext->p_stPrevious = _p_stModif->p_stPrevious;
//deallocate memory for modif
if (_p_stModif->p_stFather == NULL)
g_lNumberOfFatherModifs--;
else
g_lNumberOfChildModifs--;
g_lNumberOfModifs--;
free( _p_stModif );
return lDeleted + 1;
}
/*
---------------------------------------------------------------------------------------
delete all modif in list
---------------------------------------------------------------------------------------
*/
void fn_vDeleteAllModifs( void )
{
tdstModif *p_stModif = g_p_stFirstModif;
while (p_stModif != NULL)
{
fn_lDeleteModif( p_stModif, FALSE );
p_stModif = g_p_stFirstModif;
}
g_lNumberOfFatherModifs = g_lNumberOfChildModifs = g_lNumberOfModifs = 0;
}
/*
---------------------------------------------------------------------------------------
search for a modification in the same file
---------------------------------------------------------------------------------------
*/
tdstModif *fnp_stGetModifInFile( char *_szFileName, BOOL _bChild, BOOL _bAll )
{
tdstModif *p_stModif = g_p_stFirstModif;
size_t xSize = strlen( _szFileName );
while (p_stModif != NULL)
{
if (
((_bChild) || (p_stModif->p_stFather == NULL)) &&
((_bAll) || (!p_stModif->bConflict)) &&
(strnicmp(p_stModif->szName, _szFileName, xSize ) == 0)
)
break;
p_stModif = p_stModif->p_stNext;
}
return p_stModif;
}
/*
---------------------------------------------------------------------------------------
delete all modif that are in a given file
returns nuumber of modif deleted from list
---------------------------------------------------------------------------------------
*/
int fn_iDeleteAllModifForAFile( char *_szFileName )
{
int iIndex = 0;
tdstModif *p_stModif = fnp_stGetModifInFile( _szFileName, TRUE, TRUE );
while (p_stModif != NULL)
{
iIndex ++;
fn_lDeleteModif( p_stModif, TRUE );
p_stModif = fnp_stGetModifInFile( _szFileName, TRUE, TRUE );
}
return iIndex;
}
/*
---------------------------------------------------------------------------------------
Mark all modif that are in a given file
returns number of modif deleted from list
---------------------------------------------------------------------------------------
*/
int fn_iMarkAllModifForAFile( char *_szFileName )
{
int iIndex = 0;
tdstModif *p_stModif = fnp_stGetModifInFile( _szFileName, TRUE, FALSE );
while (p_stModif != NULL)
{
iIndex ++;
p_stModif->bConflict = TRUE;
p_stModif = fnp_stGetModifInFile( _szFileName, TRUE, FALSE );
}
return iIndex;
}
/*
----------------------------------------------------------------------------------------
Description : get first not marked modification
Returns (tdstModif ) first not marked modification
----------------------------------------------------------------------------------------
*/
tdstModif *fn_p_stGetFirstNotMarkedModif( void )
{
tdstModif *p_stModif;
p_stModif = g_p_stFirstModif;
while ( (p_stModif != NULL) && ((p_stModif->bConflict) || (p_stModif->p_stFather != NULL)) )
p_stModif = p_stModif->p_stNext;
return p_stModif;
}
/*
---------------------------------------------------------------------------------------
delete modif file
---------------------------------------------------------------------------------------
*/
BOOL fn_bDeleteModifFile( void )
{
char szTxtFullName[ MAX_PATH ];
char szBakFullName[ MAX_PATH ];
sprintf( szTxtFullName, "%s\\%s", g_stIniData.szLocalPath, g_stIniData.szModifFile );
strcpy ( szBakFullName, szTxtFullName );
strcpy( strrchr( szBakFullName, '.'), ".bak" );
if (_access( szTxtFullName, 0) == 0)
{
if (_access( szBakFullName, 0) == 0)
remove( szBakFullName );
return MoveFile( szTxtFullName, szBakFullName);
}
return TRUE;
}
/*
---------------------------------------------------------------------------------------
rewrite modif file with all modif that are always in file
---------------------------------------------------------------------------------------
*/
void fn_vWriteModifInFile( BOOL _bDelete )
{
char szFullName[ MAX_PATH ];
FILE *hpFile;
tdstModif *p_stModif = g_p_stFirstModif;
tdstModif *p_stDeleteModif;
fn_bDeleteModifFile();
sprintf( szFullName, "%s\\%s", g_stIniData.szLocalPath, g_stIniData.szModifFile );
hpFile = fopen( szFullName, "wt" );
while ( p_stModif != NULL )
{
fprintf( hpFile, "(%c)%s\n", *g_a_szModifName[ p_stModif->cType ], p_stModif->szName );
p_stDeleteModif = p_stModif;
p_stModif = p_stModif->p_stNext;
if (_bDelete)
fn_lDeleteModif (p_stDeleteModif, FALSE);
}
fclose( hpFile );
}
/*
---------------------------------------------------------------------------------------
function that read file where Modification list was saved.
returns number of modification
---------------------------------------------------------------------------------------
*/
int fn_iReadModificationFile( void )
{
char szFullName[ MAX_PATH ];
char szLine[1024];
char *p_szEnd;
FILE *hpFile;
tdstModif *p_stModif;
char *p_szLine;
long lCurrentLine = 0;
/* emptied list before reading file */
fn_vDeleteAllModifs();
/* building full name of modif file */
sprintf( szFullName, "%s\\%s", g_stIniData.szLocalPath, g_stIniData.szModifFile );
/* open file */
if ( (hpFile = fopen( szFullName, "rt" ) ) == NULL )
return 0;
/* for each line */
while (fgets(szLine, 1023, hpFile) != NULL)
{
lCurrentLine++;
/* go to last character, swap \r\n char */
p_szEnd = szLine + strlen(szLine) - 1;
while (
(p_szEnd != szLine - 1) &&
(
(isspace(*p_szEnd)) ||
(*p_szEnd == '\n') ||
(*p_szEnd == '\r')
)
)
*p_szEnd--;
*(++p_szEnd) = 0;
if (strlen(szLine) == 0)
continue;
/* create a new modif */
p_stModif = (tdstModif *) malloc (sizeof(tdstModif));
p_stModif->lLine = lCurrentLine;
p_stModif->bConflict = FALSE;
p_stModif->p_stFather = NULL;
if ( *(p_szLine = szLine) == '(' )
{
switch( *(p_szLine + 1) )
{
case C_ModifChar_cAdd: p_stModif->cType = C_ModifType_cAdd; break;
case C_ModifChar_cRebuild: p_stModif->cType = C_ModifType_cRebuild; break;
case C_ModifChar_cModif: p_stModif->cType = C_ModifType_cModif; break;
case C_ModifChar_cDelete: p_stModif->cType = C_ModifType_cDelete; break;
}
p_szLine += 3;
}
else
p_stModif->cType = C_ModifType_cModif;
if (strnicmp( p_szLine, "GameData\\", 9) == 0)
p_szLine += 9;
p_stModif->szName = (char *) malloc (strlen( p_szLine ) + 1);
strcpy( p_stModif->szName, p_szLine );
p_stModif->p_stNext = NULL;
p_stModif->p_stPrevious = g_p_stLastModif;
/* add it in modif list */
if (g_p_stFirstModif == NULL)
g_p_stFirstModif = p_stModif;
else
g_p_stLastModif->p_stNext = p_stModif;
g_p_stLastModif = p_stModif;
g_lNumberOfModifs ++;
}
g_lNumberOfFatherModifs = g_lNumberOfModifs;
g_lNumberOfChildModifs = 0;
/* close file */
fclose( hpFile );
/* clean modif list : delete all redondant modifications */
fn_vCleanModifList();
return g_lNumberOfModifs;
}
/*
---------------------------------------------------------------------------------------
update modification file
delete it, rewrite it with all modif that causes conflict
display conflict if there's some
---------------------------------------------------------------------------------------
*/
void fn_vUpdateModifFile( void )
{
/* delete modif file */
fn_bDeleteModifFile();
fn_vWriteModifInFile( FALSE );
}
/*
----------------------------------------------------------------------------------------
Description : delete all redondant modification such as a modified sub section when
it's parent section is modified too
----------------------------------------------------------------------------------------
*/
char g_aa_cComposedType[5][5] =
{
/* Destroy , Add , Rebuild , Modif , Delete */
{ C_ModifType_cError, C_ModifType_cAdd , C_ModifType_cError , C_ModifType_cError, C_ModifType_cError }, /* Destroy */
{ C_ModifType_cError, C_ModifType_cError, C_ModifType_cAdd , C_ModifType_cAdd , C_ModifType_cDestroy}, /* Add */
{ C_ModifType_cError, C_ModifType_cError, C_ModifType_cRebuild, C_ModifType_cModif, C_ModifType_cDelete }, /* Rebuild */
{ C_ModifType_cError, C_ModifType_cError, C_ModifType_cRebuild, C_ModifType_cModif, C_ModifType_cDelete }, /* Modif */
{ C_ModifType_cError, C_ModifType_cModif, C_ModifType_cError , C_ModifType_cError, C_ModifType_cError } /* Delete */
};
char *g_a_szModifName[5] =
{
"Destroyed",
"Added",
"Rebuild",
"Modified",
"Deleted"
};
void fn_vCleanModifList( void )
{
tdstModif *p_stModif = g_p_stFirstModif;
tdstModif *p_stOtherModif;
char cNextChar;
char cNewType;
long lNumberOfErrors = 0;
char **d_szError = NULL;
long lError;
long lCurrentFatherLength, lFatherLength;
/*
* First : find all error and all double notification
*/
while ( p_stModif != NULL )
{
p_stOtherModif = p_stModif->p_stNext;
while (p_stOtherModif != NULL)
{
if ( stricmp( p_stOtherModif->szName, p_stModif->szName ) == 0)
{
p_stOtherModif->bConflict = TRUE;
p_stOtherModif->cPrevType = p_stModif->cType;
cNewType = g_aa_cComposedType[ p_stModif->cType ][ p_stOtherModif->cType ];
if (cNewType != C_ModifType_cError)
p_stModif->cType = cNewType;
}
p_stOtherModif = p_stOtherModif->p_stNext;
}
do
{
p_stModif = p_stModif->p_stNext;
} while ( (p_stModif != NULL) && (p_stModif->bConflict) );
}
/* count eventual errors */
p_stModif = g_p_stFirstModif;
while (p_stModif != NULL)
{
if (p_stModif->bConflict)
{
cNewType = g_aa_cComposedType[ p_stModif->cPrevType ][ p_stModif->cType ];
if (cNewType == C_ModifType_cError)
lNumberOfErrors++;
}
p_stModif = p_stModif->p_stNext;
}
if (lNumberOfErrors)
d_szError = (char **) malloc( lNumberOfErrors * sizeof(char *) );
/* get errors and delete eventual doublon */
p_stModif = g_p_stFirstModif;
lError = 0;
while (p_stModif != NULL)
{
p_stOtherModif = p_stModif->p_stNext;
if (p_stModif->bConflict)
{
cNewType = g_aa_cComposedType[ p_stModif->cPrevType ][ p_stModif->cType ];
if (cNewType == C_ModifType_cError)
{
d_szError[ lError] = (char *) malloc ( strlen( p_stModif->szName) + 100 );
sprintf( d_szError[lError] , "(Line %4d) %s section has been %s after being %s", p_stModif->lLine, p_stModif->szName, g_a_szModifName[ p_stModif->cType ], g_a_szModifName[ p_stModif->cPrevType ] );
lError++;
}
fn_lDeleteModif( p_stModif, FALSE );
}
p_stModif = p_stOtherModif;
}
/* build section / sous section hierarchy */
p_stModif = g_p_stFirstModif;
while (p_stModif != NULL)
{
lCurrentFatherLength = 0;
p_stOtherModif = g_p_stFirstModif;
while (p_stOtherModif != NULL)
{
if (p_stOtherModif != p_stModif)
{
lFatherLength = strlen( p_stOtherModif->szName );
if ( (lFatherLength > lCurrentFatherLength) && strnicmp( p_stOtherModif->szName, p_stModif->szName, lFatherLength ) == 0)
{
cNextChar = p_stModif->szName[lFatherLength];
if (cNextChar == SCR_CC_c_Cfg_NameSeparator)
{
if (lCurrentFatherLength != 0)
{
g_lNumberOfFatherModifs--;
g_lNumberOfChildModifs++;
}
lCurrentFatherLength = lFatherLength;
p_stModif->p_stFather = p_stOtherModif;
}
}
}
p_stOtherModif = p_stOtherModif->p_stNext;
}
p_stModif = p_stModif->p_stNext;
}
/* delete eventual destroyed modif */
p_stModif = g_p_stFirstModif;
while (p_stModif != NULL)
{
if (p_stModif->cType == C_ModifType_cDestroy)
{
fn_lDeleteModif( p_stModif, TRUE );
p_stModif = g_p_stFirstModif;
}
else
p_stModif = p_stModif->p_stNext;
}
/*
* display error if that happens
*/
if (lNumberOfErrors )
{
CModifListErrorDlg oErrorDlg( lNumberOfErrors, d_szError );
oErrorDlg.DoModal();
for ( lError = 0; lError < lNumberOfErrors; lError++)
free ( d_szError[ lError ] );
free ( d_szError );
}
}

View File

@@ -0,0 +1,336 @@
/*
=======================================================================================
Name :progbar.cpp
Author :Vincent Lhullier Date :15/07/97
Description :A beautiful progress bar
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "mngdata5.h"
#include "progbar.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CMyProgressBar implementation
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
----------------------------------------------------------------------------------------
*/
CMyProgressBar::CMyProgressBar()
{
m_bInit = FALSE;
}
/*
----------------------------------------------------------------------------------------
Description : destructor
----------------------------------------------------------------------------------------
*/
CMyProgressBar::~CMyProgressBar()
{
}
/*
----------------------------------------------------------------------------------------
Description : message map
----------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CMyProgressBar, CProgressCtrl)
//{{AFX_MSG_MAP(CMyProgressBar)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CMyProgressBar message handlers
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : WM_PAINT Message
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::OnPaint()
{
RECT stWinRect;
RECT stDrawRect;
int iCol;
CPaintDC dc(this); // device context for painting
GetClientRect( &stWinRect );
stDrawRect = stWinRect;
iCol = (stDrawRect.right * OffsetPos(0)) / (m_iEnd - m_iStart + 1);
if ( iCol > 256 )
{
stDrawRect.right = iCol - 257;
dc.FillSolidRect( &stDrawRect, m_xForegroundColor );
dc.BitBlt( iCol - 256, 0, 256, stDrawRect.bottom, &m_oDC, 0, 0, SRCCOPY );
}
else
{
dc.BitBlt( 0, 0, iCol, stDrawRect.bottom, &m_oDC, 256 - iCol, 0, SRCCOPY );
}
if ( m_cNumberOfFrames )
{
dc.BitBlt( iCol - m_cFrameWidth, 0, m_cFrameWidth, stDrawRect.bottom, &m_oAnimDC, m_cCurrentFrame * m_cFrameWidth, 0, SRCINVERT );
m_cCurrentFrame = (m_cCurrentFrame + 1) % m_cNumberOfFrames;
}
stDrawRect.left = iCol + 1;
stDrawRect.right = stWinRect.right;
dc.FillSolidRect( &stDrawRect, m_xBackgroundColor );
}
/*
=======================================================================================
Specific functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : set range of progression
_iStart -> beginning value
_iEnd -> end value
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vSetRange( int _iStart, int _iEnd )
{
m_iStart = _iStart;
m_iEnd = _iEnd;
SetRange( _iStart, _iEnd );
}
/*
----------------------------------------------------------------------------------------
Description : initialize DC and bitmap to draw
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vInitDC( void )
{
if (!m_bInit)
{
RECT stRect;
GetClientRect( &stRect );
m_oDC.CreateCompatibleDC( GetDC() );
m_oBitmap.CreateCompatibleBitmap( GetDC() , 256, stRect.bottom );
m_oDC.SelectObject( &m_oBitmap );
m_oAnimDC.CreateCompatibleDC( GetDC() );
m_oAnimBitmap.CreateCompatibleBitmap( GetDC() , 256, stRect.bottom );
m_oAnimDC.SelectObject( &m_oBitmap );
m_cNumberOfFrames = 0;
m_bInit = TRUE;
}
}
/*
----------------------------------------------------------------------------------------
Description : set position of progression to beginning value, change drawing type
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vReinit( void )
{
SetPos( m_iStart );
}
/*
=======================================================================================
function to prepare drawing
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : colored bar with random color value
_xBackground -> background color
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vInitDrawing( COLORREF _xBackground )
{
char cColor;
int a_iColor[3];
//srand( (unsigned) time ( NULL ) );
for (cColor = 0; cColor < 3; cColor ++ )
{
a_iColor[ cColor ] = (rand() % 3) - 2;
if (a_iColor[ cColor ] == 0)
a_iColor[ cColor ] = rand() & 0xFF;
}
m_fn_vInitDrawing( a_iColor[0], a_iColor[1], a_iColor[2], _xBackground );
}
/*
----------------------------------------------------------------------------------------
Description : colored bar with given color
_iRed -> red value (-2 = increasing, -1 = decreasing)
_iGreen -> green value
_iBlue -> blue value
_xBackground -> background color
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vInitDrawing( int _iRed, int _iGreen, int _iBlue, COLORREF _xBackground )
{
char cColor;
int iColor;
unsigned char ucColor[3];
int a_iColor[3];
RECT stRect;
a_iColor[0] = _iRed;
a_iColor[1] = _iGreen;
a_iColor[2] = _iBlue;
m_fn_vInitDC();
for (cColor = 0; cColor < 3; cColor ++ )
{
if (a_iColor[ cColor ] == -2)
ucColor[ cColor ] = (unsigned char) 0xFF;
else if (a_iColor[ cColor ] == -1)
ucColor[ cColor ] = (unsigned char) 0x7F;
else
ucColor[ cColor ] = (unsigned char) a_iColor[ cColor ];
}
m_xBackgroundColor = _xBackground;
m_xForegroundColor = RGB( ucColor[0], ucColor[1], ucColor[2] );
GetClientRect( &stRect );
stRect.left = 0;
stRect.right = 2;
for (iColor = 0; iColor < 128; iColor ++)
{
m_oDC.FillSolidRect( &stRect, RGB( ucColor[0], ucColor[1], ucColor[2] ) );
for (cColor = 0; cColor < 3; cColor++)
{
if (a_iColor[ cColor ] == -2)
ucColor[ cColor ]--;
else if (a_iColor[ cColor ] == -1)
ucColor[ cColor ]++;
}
stRect.left += 2;
stRect.right += 2;
}
}
/*
----------------------------------------------------------------------------------------
Description : draw a bitmap
uiBitmap -> id of bimap
_xForeground -> foreground color
_xBackground -> background color
----------------------------------------------------------------------------------------
*/
void CMyProgressBar::m_fn_vInitDrawing( UINT _uiBitmap, COLORREF _xForeground, COLORREF _xBackground )
{
m_fn_vInitDC();
m_oBitmap.DeleteObject();
m_oBitmap.LoadBitmap( _uiBitmap );
m_oDC.SelectObject( &m_oBitmap );
m_xBackgroundColor = _xBackground;
m_xForegroundColor = _xForeground;
}
void CMyProgressBar::m_fn_vInitDrawing( tdstProgressBarDrawingData *_p_stPBDD )
{
float a_fColor[3];
float a_fDelta[3];
RECT stRect;
unsigned char cColor;
m_fn_vInitDC();
m_xBackgroundColor = _p_stPBDD->xBackColor;
m_xForegroundColor = _p_stPBDD->xTailColor;
a_fColor[0] = (float) GetRValue( _p_stPBDD->xTailColor );
a_fColor[1] = (float) GetGValue( _p_stPBDD->xTailColor );
a_fColor[2] = (float) GetBValue( _p_stPBDD->xTailColor );
a_fDelta[0] = ((float) GetRValue(_p_stPBDD->xHeadColor) - a_fColor[0]) / 128;
a_fDelta[1] = ((float) GetGValue(_p_stPBDD->xHeadColor) - a_fColor[1]) / 128;
a_fDelta[2] = ((float) GetBValue(_p_stPBDD->xHeadColor) - a_fColor[2]) / 128;
GetClientRect( &stRect );
stRect.left = 0;
stRect.right = 2;
for (cColor = 0; cColor < 128; cColor ++)
{
m_oDC.FillSolidRect( &stRect, RGB( (char) a_fColor[0], (char) a_fColor[1], (float) a_fColor[2] ) );
a_fColor[0] += a_fDelta[0];
a_fColor[1] += a_fDelta[1];
a_fColor[2] += a_fDelta[2];
stRect.left += 2;
stRect.right += 2;
}
if ( *_p_stPBDD->szText != 0)
{
stRect.left = stRect.top = 0;
stRect.bottom = 20;
stRect.right = 256 - ( (_p_stPBDD->cAnimNbFrames == 0 ) ? 0 : _p_stPBDD->cAnimFrameWidth );
m_oDC.SetTextColor( _p_stPBDD->xTextColor );
m_oDC.SetBkMode( TRANSPARENT );
m_oDC.DrawText( _p_stPBDD->szText, strlen(_p_stPBDD->szText), &stRect, DT_VCENTER | DT_RIGHT );
}
m_fn_vInitAnim( _p_stPBDD->uiAnimBitmap, _p_stPBDD->cAnimNbFrames, _p_stPBDD->cAnimFrameWidth );
}
void CMyProgressBar::m_fn_vInitAnim( UINT _uiBitmap, char _cFrame, char _cFrameWidth )
{
if ( (m_cNumberOfFrames = _cFrame) == 0)
return;
m_cFrameWidth = _cFrameWidth;
m_fn_vInitDC();
m_oAnimBitmap.DeleteObject();
m_oAnimBitmap.LoadBitmap( _uiBitmap );
m_oAnimDC.SelectObject( &m_oAnimBitmap );
m_cCurrentFrame = 0;
}

View File

@@ -0,0 +1,344 @@
/*
=======================================================================================
Name :SaveMngr.cpp
Author :Vincent Lhullier Date :11/07/97
Description :manage save of data before modification
Create a copy of GameData tree with all file that would be modified. That will allow
someone to recuperate previous version if save generate some problem in data.
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include <io.h>
#include <sys/stat.h>
#include "SaveMngr.h"
#include "IniData.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CONSTANTS
=======================================================================================
*/
#define C_szGameDataDir "GameData"
#define C_szOldGameDataDir "GameDat_"
/*
=======================================================================================
GLOBALS
=======================================================================================
*/
static char SAVE_g_szDirName[ _MAX_PATH ];
/*
=======================================================================================
=======================================================================================
FUNCTIONS
=======================================================================================
=======================================================================================
*/
/*
=======================================================================================
Directory Functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Don't call this function directly, it is used by SAVE_fn_bDeleteTree
Description : delete recursively a directory
Returns (BOOL ) true if success
----------------------------------------------------------------------------------------
*/
BOOL fn_bDeleteTree( void )
{
WIN32_FIND_DATA stFindData;
HANDLE hFind;
char *p_szEndDirName;
p_szEndDirName = SAVE_g_szDirName + strlen( SAVE_g_szDirName );
strcpy( p_szEndDirName, "\\*.*" );
if( (hFind = FindFirstFile(SAVE_g_szDirName, &stFindData )) == INVALID_HANDLE_VALUE)
return TRUE;
*p_szEndDirName = 0;
do
{
*p_szEndDirName = '\\';
strcpy( p_szEndDirName + 1, stFindData.cFileName );
if ( stFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
if ( *stFindData.cFileName != '.')
{
if ( !fn_bDeleteTree() )
return FALSE;
}
}
else
{
if (_access( SAVE_g_szDirName, 2) == -1 )
_chmod( SAVE_g_szDirName, _S_IWRITE );
if ( !DeleteFile( SAVE_g_szDirName ) )
return FALSE;
}
*p_szEndDirName = 0;
} while(FindNextFile( hFind, &stFindData ));
FindClose( hFind );
return RemoveDirectory( SAVE_g_szDirName );
}
/*
----------------------------------------------------------------------------------------
Description : delete completely a directory
szDirName -> name of dir to delete
Returns (BOOL ) true if success
----------------------------------------------------------------------------------------
*/
BOOL SAVE_fn_bDeleteTree( char *szDirName )
{
strcpy( SAVE_g_szDirName, szDirName );
return fn_bDeleteTree();
}
/*
=======================================================================================
Error functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : display an error message
_szMessage -> message to display
----------------------------------------------------------------------------------------
*/
void SAVE_fn_vErrorMessage( char *_szMessage )
{
char szError[1024];
char *p_szError = szError;
p_szError += sprintf( p_szError, "Error deleting all existing version of saved data\n" );
p_szError += sprintf( p_szError, "Data in %s.XXX directory will not be correct\n" );
p_szError += sprintf( p_szError, "---------------------------------------------------\n" );
p_szError += sprintf( p_szError, "%s\n\n", _szMessage );
AfxMessageBox( szError, MB_ICONSTOP | MB_OK );
}
/*
=======================================================================================
Version functions
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description :
_szSavedDirectoryName -> name of directory from which function extract version number
Returns (long ) version number if it's a valid directory, -1 else
----------------------------------------------------------------------------------------
*/
long SAVE_fn_lGetVersionNumberFromDirExt( char *_szSavedDirectoryName )
{
char *p_szExt;
long lVersionNumber = -1;
p_szExt = strchr( _szSavedDirectoryName, '.' );
if (p_szExt != NULL)
{
if ( strlen( ++p_szExt ) == 3)
{
lVersionNumber = 0;
while (*p_szExt != 0)
{
if ( !isdigit (*p_szExt) )
return -1;
lVersionNumber = lVersionNumber * 10 + (*p_szExt++ - '0');
}
}
}
return lVersionNumber;
}
/*
----------------------------------------------------------------------------------------
Description : return name of directory used to store data for a given version
lVersion -> version number
szVersionDirName -> to put dir name (assumed to be long enough )
----------------------------------------------------------------------------------------
*/
void SAVE_fn_vGetVersionDirName( long _lVersion, char *_szVersionDirName, BOOL _bOld )
{
sprintf( _szVersionDirName, "%s\\..\\%s.%03d", g_stIniData.szLocalPath, _bOld ? C_szOldGameDataDir : C_szGameDataDir, _lVersion );
}
/*
----------------------------------------------------------------------------------------
Description : delete a version directory
_lVersion -> number of version
Returns (BOOL ) true if success
----------------------------------------------------------------------------------------
*/
BOOL SAVE_fn_bDeleteVersion( long _lVersion, BOOL _bOld )
{
char szVersionName[ _MAX_PATH ];
SAVE_fn_vGetVersionDirName( _lVersion, szVersionName, _bOld);
if (!SAVE_fn_bDeleteTree( szVersionName ))
{
char szMessage[100];
sprintf( szMessage, "Can't delete old %s version directory", szVersionName );
SAVE_fn_vErrorMessage( szMessage );
return FALSE;
}
return TRUE;
}
/*
----------------------------------------------------------------------------------------
Description : analyse the current version that are on disk
a_cVersion -> array of 1000 char that will be filled
each case is a flag that indicate if a version number is used or not
return (long) number of used version
----------------------------------------------------------------------------------------
*/
long SAVE_fn_lGetUsedVersion( char *a_cVersion, BOOL _bOld )
{
WIN32_FIND_DATA stFindData;
HANDLE hFind;
char szFilter[ _MAX_PATH ];
long lNumberOfVersions = 0;
long lVersion;
/*
* set all version as unused
*/
memset ( a_cVersion , 0, 1000 );
sprintf( szFilter, "%s\\..\\%s.*", g_stIniData.szLocalPath, _bOld ? C_szOldGameDataDir : C_szGameDataDir );
if( (hFind = FindFirstFile(szFilter, &stFindData )) == INVALID_HANDLE_VALUE)
return 0;
do
{
if ( stFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
lVersion = SAVE_fn_lGetVersionNumberFromDirExt( stFindData.cFileName );
if (lVersion != -1)
{
a_cVersion[ lVersion ] = 1;
lNumberOfVersions++ ;
}
}
} while(FindNextFile( hFind, &stFindData ));
FindClose( hFind );
return lNumberOfVersions;
}
/*
----------------------------------------------------------------------------------------
Description : rename a version
_lOldVersion -> old version number
_lNewVersion -> new version number
Returns (BOOL )
----------------------------------------------------------------------------------------
*/
BOOL SAVE_fn_bRenameVersionToOldVersion( long _lVersion )
{
char szOldVersion[ _MAX_PATH ];
char szVersion[ _MAX_PATH ];
SAVE_fn_vGetVersionDirName( _lVersion, szVersion, FALSE );
SAVE_fn_vGetVersionDirName( _lVersion, szOldVersion, TRUE );
if ( !MoveFile( szVersion, szOldVersion) )
{
char szMessage[100];
sprintf( szMessage, "Can't rename %s version to old version %s ", szVersion, szOldVersion );
SAVE_fn_vErrorMessage( szMessage );
return FALSE;
}
return TRUE;
}
/*
=======================================================================================
principal function
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : delete all old versions and rename recent version
----------------------------------------------------------------------------------------
*/
BOOL SAVE_fn_bDeleteAllVersions( void )
{
char a_cVersion[1000];
long lNumberOfVersions;
long lVersion;
long lVersionIndex;
/*
* get old used versions
*/
lNumberOfVersions = SAVE_fn_lGetUsedVersion( a_cVersion, TRUE );
/*
* remove all old versions
*/
for (lVersion = 0, lVersionIndex = 0; lVersion < lNumberOfVersions; lVersionIndex ++)
{
if (a_cVersion[ lVersionIndex ])
{
lVersion ++;
if (!SAVE_fn_bDeleteVersion( lVersionIndex, TRUE ))
return FALSE;
}
}
/*
* get used versions
*/
lNumberOfVersions = SAVE_fn_lGetUsedVersion( a_cVersion, FALSE );
if (lNumberOfVersions == 0)
return TRUE;
/*
* check for hole in version number
*/
for (lVersion = 0, lVersionIndex = 0; lVersion < lNumberOfVersions; lVersionIndex ++)
{
if (a_cVersion[ lVersionIndex ])
{
lVersion ++;
if (!SAVE_fn_bRenameVersionToOldVersion( lVersionIndex ))
return FALSE;
}
}
return TRUE;
}

View File

@@ -0,0 +1,6 @@
// stdafx.cpp : source file that includes just the standard includes
// MajData interface.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@@ -0,0 +1,297 @@
/*
=======================================================================================
Name :TimeFunc.cpp
Author :vincent lhullier Date :26/07/97
Description :time functions
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "TimeFunc.h"
#include "IniData.h"
#include <winsock.h>
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
time_t g_xServerTime;
time_t g_xUpdateTime;
char g_szUpdateTimeString[20];
COleDateTime g_oOleUpdatingTime;
/*
=======================================================================================
Functions to read an int or a date in a buffer
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
read an int in char buffer
---------------------------------------------------------------------------------------
*/
BOOL fn_bReadInt( char *p_cBuf, int iNumDigit, int *p_iResult)
{
int iNum;
*p_iResult = 0;
for (iNum = 0; iNum < iNumDigit; iNum++)
{
if (!isdigit( *p_cBuf ))
return FALSE;
*p_iResult = *p_iResult * 10 + (*p_cBuf++ - '0');
}
return TRUE;
}
/*
---------------------------------------------------------------------------------------
read a date int in char buffer
---------------------------------------------------------------------------------------
*/
BOOL fn_bReadDate( char *p_cBuf, struct tm *p_stTime)
{
memset( p_stTime, 0, sizeof( struct tm) );
if ( (fn_bReadInt( p_cBuf, 2, &p_stTime->tm_mday )) && (*(p_cBuf+=2) == '/') )
{
if (( fn_bReadInt( ++p_cBuf, 2, &p_stTime->tm_mon)) && (*(p_cBuf+=2) == '/') )
{
if (( fn_bReadInt( ++p_cBuf, 4, &p_stTime->tm_year)) && (*(p_cBuf+=4) == ' ') )
{
p_stTime->tm_year -= 1900;
if (( fn_bReadInt( ++p_cBuf, 2, &p_stTime->tm_hour)) && (*(p_cBuf+=2) == ':') )
{
if ( fn_bReadInt( ++p_cBuf, 2, &p_stTime->tm_min) )
{
p_stTime->tm_sec = 0;
p_stTime->tm_isdst = 1;
return TRUE;
}
}
}
}
}
return FALSE;
}
/*
=======================================================================================
Time functions
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
synchronyze with time serveur
---------------------------------------------------------------------------------------
*/
BOOL fn_bSynchronizeTime( BOOL _bMessage )
{
if (!fn_bRequestTimeServer( _bMessage ) )
return FALSE;
SYSTEMTIME stSysTime;
struct tm *p_stTime;
_tzset();
p_stTime = gmtime( &g_xServerTime );
//p_stTime = localtime( &g_xServerTime );
stSysTime.wYear = p_stTime->tm_year + 1900;
stSysTime.wMonth = p_stTime->tm_mon + 1;
stSysTime.wDay = p_stTime->tm_mday;
stSysTime.wHour = p_stTime->tm_hour;
stSysTime.wMinute = p_stTime->tm_min;
stSysTime.wSecond = p_stTime->tm_sec;
if ( !SetSystemTime( &stSysTime ) )
return FALSE;
return TRUE;
}
/*
---------------------------------------------------------------------------------------
updating variable for updating time
---------------------------------------------------------------------------------------
*/
void fn_vInitUpdateTime( void )
{
time (&g_xUpdateTime );
fn_vFormatDateTime( g_xUpdateTime, g_szUpdateTimeString );
}
/*
---------------------------------------------------------------------------------------
format time in a string (if time is 0 get current time )
---------------------------------------------------------------------------------------
*/
void fn_vFormatDateTime( time_t xTime, char *szString )
{
struct tm *p_stTime;
if (xTime == 0)
time ( &xTime );
p_stTime = localtime( &xTime );
sprintf
(
szString,
"%02d/%02d/%04d %02d:%02d",
p_stTime->tm_mday,
p_stTime->tm_mon + 1,
p_stTime->tm_year + 1900,
p_stTime->tm_hour,
p_stTime->tm_min
);
}
/*
---------------------------------------------------------------------------------------
Ask server time
---------------------------------------------------------------------------------------
*/
BOOL fn_bRequestTimeServer( BOOL _bMessage )
{
int iSocketDescriptor; // socket descriptor
struct sockaddr_in stDestAddr; // destination address
int iAddrLength; // address length
char a_cBuffer[200];
char *p_cBuffer;
int iOption; /* option for setsockopt() */
int iErrNo;
fd_set stFDSet;
struct timeval stTimeout;
unsigned short uwDestPort;
// open socket
iSocketDescriptor=socket(PF_INET, SOCK_DGRAM, 0);
if(iSocketDescriptor<0)
{
p_cBuffer = a_cBuffer + sprintf( a_cBuffer, "Error with time server (socket error)\r\n" );
iErrNo = WSAGetLastError();
switch (iErrNo)
{
case WSANOTINITIALISED:
strcpy( a_cBuffer, "Window socket not initialized");
break;
case WSAENETDOWN:
strcpy( a_cBuffer, "Network subsystem has failed" );
break;
case WSAEAFNOSUPPORT:
strcpy( a_cBuffer, "The specified address family is not supported" );
break;
case WSAEINPROGRESS :
strcpy( a_cBuffer, "There's a blocking socket" );
break;
case WSAEMFILE:
strcpy( a_cBuffer, "No more socket descriptors are available." );
break;
case WSAENOBUFS:
strcpy( a_cBuffer, "No buffer space is available. The socket cannot be created." );
break;
case WSAEPROTONOSUPPORT:
strcpy( a_cBuffer, "The specified protocol is not supported." );
break;
case WSAEPROTOTYPE :
strcpy( a_cBuffer, "The specified protocol is the wrong type for this socket." );
break;
case WSAESOCKTNOSUPPORT:
strcpy( a_cBuffer, "The specified socket type is not supported in this address family." );
break;
default :
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
}
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
// set socket option
iOption = ~0;
if( setsockopt(iSocketDescriptor, SOL_SOCKET, SO_BROADCAST, (char *) &iOption, sizeof(iOption)) < 0)
{
iErrNo = WSAGetLastError();
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
uwDestPort = 1515;
iAddrLength = sizeof( struct sockaddr_in );
// Give the destination socket a name.
stDestAddr.sin_family = AF_INET;
stDestAddr.sin_port = htons ( uwDestPort );
stDestAddr.sin_addr.s_addr = INADDR_BROADCAST;
// send request
sprintf(a_cBuffer, "time_v2");
if( sendto(iSocketDescriptor, a_cBuffer, strlen(a_cBuffer) + 1, 0, (struct sockaddr *) &stDestAddr, sizeof ( struct sockaddr_in ))<0)
{
iErrNo = WSAGetLastError();
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
iAddrLength = sizeof(struct sockaddr_in);
// get server response
FD_ZERO( &stFDSet );
FD_SET( iSocketDescriptor, &stFDSet);
stTimeout.tv_sec=5;
stTimeout.tv_usec=0;
if (select(0, &stFDSet, NULL, NULL, &stTimeout) == 0)
{
iErrNo = WSAGetLastError();
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
if ( !FD_ISSET( iSocketDescriptor, &stFDSet ) )
{
iErrNo = WSAGetLastError();
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
if( recvfrom(iSocketDescriptor, a_cBuffer, sizeof(a_cBuffer), 0, (struct sockaddr *) &stDestAddr, &iAddrLength) < 0)
{
iErrNo = WSAGetLastError();
sprintf( a_cBuffer, "Erreur (%d) : %s", iErrNo, strerror( iErrNo ) );
if (_bMessage)
AfxMessageBox( a_cBuffer, MB_ICONSTOP );
return FALSE;
}
memcpy( &g_xServerTime, a_cBuffer, sizeof( time_t ) );
// close socket
closesocket(iSocketDescriptor);
return TRUE;
}

View File

@@ -0,0 +1,801 @@
/*
=======================================================================================
Name : VssFunct.cpp
Author : vincent lhullier Date :27/07/97
Description : Manage vss tree, file of list to obtain
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "TimeFunc.h"
#include "Tree_Fct.h"
#include "IniData.h"
#include "vss5_Fct.h"
#include <io.h>
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
GLOBALS
=======================================================================================
*/
char g_szFullName[MAX_PATH];
tdstProject *g_p_stVssRootProject = NULL;
tdstProject *g_p_stLocalRootProject = NULL;
char **gs_d_szFile;
char **gs_d_szProj;
/*
=======================================================================================
VSS FUNCTIONS
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
fill a tdstProject structure with name and describing an empty project
---------------------------------------------------------------------------------------
*/
void fn_Tree_vInitProject( tdstProject *_p_stProj, char *_szName )
{
_p_stProj->szName = (char *) malloc( strlen(_szName) + 1 );
strcpy( _p_stProj->szName, _szName );
_p_stProj->bGet = FALSE;
_p_stProj->bRecurse = FALSE;
_p_stProj->lNumberOfSubProjects = 0;
_p_stProj->d_stSubProject = NULL;
_p_stProj->lNumberOfFiles = 0;
_p_stProj->d_stFile = NULL;
}
/*
---------------------------------------------------------------------------------------
fill a tdstProject structure with pointer name and describing an empty project
---------------------------------------------------------------------------------------
*/
void fn_Tree_vInitProjectWithPointerName( tdstProject *_p_stProj, char *_szName )
{
_p_stProj->szName = _szName;
_p_stProj->bGet = FALSE;
_p_stProj->bRecurse = FALSE;
_p_stProj->lNumberOfSubProjects = 0;
_p_stProj->d_stSubProject = NULL;
_p_stProj->lNumberOfFiles = 0;
_p_stProj->d_stFile = NULL;
}
/*
---------------------------------------------------------------------------------------
fill a tdstFile structure with name
---------------------------------------------------------------------------------------
*/
void fn_Tree_vInitFile( tdstFile *_p_stFile, char *_szName )
{
_p_stFile->szName = (char *) malloc( strlen(_szName) + 1 );
strcpy( _p_stFile->szName, _szName );
_p_stFile->bGet = FALSE;
}
/*
---------------------------------------------------------------------------------------
fill a tdstFile structure with pointer name
---------------------------------------------------------------------------------------
*/
void fn_Tree_vInitFileWithPointerName( tdstFile *_p_stFile, char *_szName )
{
_p_stFile->szName = _szName;
_p_stFile->bGet = FALSE;
}
/*
---------------------------------------------------------------------------------------
retrieve a subproject
---------------------------------------------------------------------------------------
*/
tdstProject *fn_Tree_p_stGetProject( tdstProject *_p_stInProj, char *_szName )
{
char *p_cCur;
char *p_cNext;
tdstProject *p_stCurProj;
long lSubProj;
if (_p_stInProj == NULL)
return NULL;
p_cCur = _szName;
while (1)
{
p_cCur = strchr( p_cCur, '/' );
if (p_cCur == NULL)
break;
*p_cCur = '\\';
}
if ( strnicmp( _szName, _p_stInProj->szName, strlen( _p_stInProj->szName )) != 0)
return NULL;
p_cCur = _szName + strlen( _p_stInProj->szName );
p_stCurProj = _p_stInProj;
while (*p_cCur != 0)
{
p_cCur ++;
p_cNext = strchr(p_cCur, '\\');
if (p_cNext != NULL) *p_cNext = 0;
for (lSubProj = 0; lSubProj < p_stCurProj->lNumberOfSubProjects; lSubProj++)
{
if (stricmp( p_stCurProj->d_stSubProject[lSubProj].szName, p_cCur) == 0)
break;
}
if (lSubProj == p_stCurProj->lNumberOfSubProjects)
return NULL;
p_stCurProj = &p_stCurProj->d_stSubProject[lSubProj];
p_cCur += strlen( p_cCur );
if (p_cNext != NULL) *p_cNext = '\\';
}
return p_stCurProj;
}
/*
---------------------------------------------------------------------------------------
retrieve a file with name
---------------------------------------------------------------------------------------
*/
tdstFile *fn_Tree_p_stGetFile( tdstProject *_p_stInProj, char *_szName )
{
tdstProject *p_stProj;
tdstFile *p_stFile;
char *p_szShortName;
long lFile = 0;
p_szShortName = strrchr( _szName, '\\' );
*p_szShortName++ = 0;
p_stProj = fn_Tree_p_stGetProject( _p_stInProj, _szName );
*(p_szShortName - 1) = '\\';
if ( p_stProj == NULL)
return NULL;
for ( p_stFile = p_stProj->d_stFile; lFile < p_stProj->lNumberOfFiles; lFile++, p_stFile ++)
{
if (stricmp( p_szShortName, p_stFile->szName) == 0)
return p_stFile;
}
return NULL;
}
/*
---------------------------------------------------------------------------------------
free a project information
---------------------------------------------------------------------------------------
*/
void fn_Tree_vFreeProject( tdstProject *_p_stProj, BOOL _bDelete )
{
long lIndex;
/* free files */
if (_p_stProj == NULL)
return;
if (_p_stProj->d_stFile)
{
for (lIndex = 0; lIndex < _p_stProj->lNumberOfFiles; lIndex ++)
free ( _p_stProj->d_stFile[lIndex].szName );
free (_p_stProj->d_stFile );
_p_stProj->d_stFile = NULL;
_p_stProj->lNumberOfFiles = 0;
}
/* free sub project */
if (_p_stProj->d_stSubProject )
{
for (lIndex = 0; lIndex < _p_stProj->lNumberOfSubProjects; lIndex ++)
fn_Tree_vFreeProject( &_p_stProj->d_stSubProject[lIndex], TRUE );
free (_p_stProj->d_stSubProject );
_p_stProj->d_stSubProject = NULL;
_p_stProj->lNumberOfSubProjects = 0;
}
/* free project */
if (_bDelete)
free ( _p_stProj->szName );
}
/*
---------------------------------------------------------------------------------------
free a project information tree
---------------------------------------------------------------------------------------
*/
void fn_Tree_vFreeProjectTree( tdstProject *_p_stProj, BOOL _bDelete )
{
fn_Tree_vFreeProject( _p_stProj, _bDelete );
if (_bDelete)
{
free ( _p_stProj );
_p_stProj = NULL;
}
}
/*
----------------------------------------------------------------------------------------
Description : free list of file in a vss project structure
----------------------------------------------------------------------------------------
*/
void fn_Tree_vFreeProjectFileList( tdstProject *_p_stProj )
{
long lIndex;
if (_p_stProj->d_stFile)
{
for (lIndex = 0; lIndex < _p_stProj->lNumberOfFiles; lIndex ++)
free ( _p_stProj->d_stFile[lIndex].szName );
free (_p_stProj->d_stFile );
_p_stProj->d_stFile = NULL;
_p_stProj->lNumberOfFiles = 0;
}
}
/*
---------------------------------------------------------------------------------------
set all vss project to not obtain
---------------------------------------------------------------------------------------
*/
void fn_Tree_vGetNothing( tdstProject *_p_stProj)
{
long lSubProj;
long lFile = 0;
tdstFile *p_stFile = _p_stProj->d_stFile;
/*
* dont obtain current project
*/
_p_stProj->bGet = FALSE;
_p_stProj->bRecurse = FALSE;
/*
* dont obtain files
*/
for (; lFile < _p_stProj->lNumberOfFiles; lFile++, p_stFile ++)
{
p_stFile->bGet = FALSE;
}
/*
* dont obtain sub project
*/
for (lSubProj = 0; lSubProj < _p_stProj->lNumberOfSubProjects; lSubProj ++)
fn_Tree_vGetNothing( &_p_stProj->d_stSubProject[lSubProj] );
}
/*
---------------------------------------------------------------------------------------
refresh obtaining state for vss tree
---------------------------------------------------------------------------------------
*/
void fn_Tree_vRefreshWithFileList( tdstProject *_p_stProj, tdstFileListConfig *_p_stFileList )
{
int iFile;
char *szFileName;
tdstProject *p_stSubProj;
tdstFile *p_stFile;
BOOL bRecurse;
BOOL bFile;
fn_Tree_vGetNothing( _p_stProj );
for (iFile = 0; iFile < _p_stFileList->lNumberOfFiles; iFile ++)
{
szFileName = _p_stFileList->d_szFile[iFile];
if (*szFileName == '-')
{
switch( *(szFileName + 1) )
{
case 'R':
bRecurse = TRUE;
bFile = FALSE;
break;
case 'F':
bRecurse = FALSE;
bFile = TRUE;
break;
default:
bRecurse = FALSE;
bFile = FALSE;
}
szFileName += 3;
}
else
{
bRecurse = FALSE;
bFile = FALSE;
}
if (bFile)
{
if ( (p_stFile = fn_Tree_p_stGetFile( _p_stProj, szFileName ) ) != NULL)
p_stFile->bGet = TRUE;
}
else
{
if ( (p_stSubProj = fn_Tree_p_stGetProject( _p_stProj, szFileName ) ) != NULL)
{
p_stSubProj->bGet = TRUE;
p_stSubProj->bRecurse = bRecurse;
}
}
}
}
/*
---------------------------------------------------------------------------------------
count recursively number of file to get all folder name the user want to obtain
---------------------------------------------------------------------------------------
*/
void fn_Tree_vGetNumberOfFilesOrProjectsToGet( tdstProject *_p_stProj, long *_p_lNbFiles )
{
long lSubProj;
long lFile;
tdstFile *p_stFile;
if (_p_stProj->bGet)
{
(*_p_lNbFiles)++;
if (_p_stProj->bRecurse)
return;
}
else
{
for (lFile = 0, p_stFile = _p_stProj->d_stFile; lFile < _p_stProj->lNumberOfFiles; lFile++, p_stFile++ )
if (p_stFile->bGet)
(*_p_lNbFiles) ++;
}
for (lSubProj = 0; lSubProj < _p_stProj->lNumberOfSubProjects; lSubProj ++)
fn_Tree_vGetNumberOfFilesOrProjectsToGet( &_p_stProj->d_stSubProject[lSubProj], _p_lNbFiles );
}
/*
---------------------------------------------------------------------------------------
write recursively file to obtain in given array of string
---------------------------------------------------------------------------------------
*/
void fn_Tree_vGetFilesOrProjectToGet( tdstProject *_p_stProj, long *_p_lNbFiles, char **_d_szFile )
{
long lSubProj;
long lFile;
tdstFile *p_stFile;
if (_p_stProj->bGet)
{
strcpy ( _d_szFile[ *_p_lNbFiles ], (_p_stProj->bRecurse)?"-R ":"");
strcat( _d_szFile[ (*_p_lNbFiles)++ ], g_szFullName );
if (_p_stProj->bRecurse)
return;
}
else
{
for (lFile = 0, p_stFile = _p_stProj->d_stFile; lFile < _p_stProj->lNumberOfFiles; lFile++, p_stFile++ )
if (p_stFile->bGet)
sprintf(_d_szFile[ (*_p_lNbFiles)++ ], "-F %s\\%s", g_szFullName, p_stFile->szName );
}
for (lSubProj = 0; lSubProj < _p_stProj->lNumberOfSubProjects; lSubProj ++)
{
strcat( g_szFullName, "\\");
strcat( g_szFullName, _p_stProj->d_stSubProject[lSubProj].szName );
fn_Tree_vGetFilesOrProjectToGet( &_p_stProj->d_stSubProject[lSubProj], _p_lNbFiles, _d_szFile );
*strrchr( g_szFullName, '\\' ) = 0;
}
}
/*
---------------------------------------------------------------------------------------
count recursively all files to obtain (not project)
---------------------------------------------------------------------------------------
*/
void fn_Tree_vGetNumberOfFilesToGet( tdstProject *_p_stProj, long *_p_lNbFiles, BOOL _bAll )
{
long lFile = 0;
tdstProject *p_stSubProj = _p_stProj->d_stSubProject;
tdstFile *p_stFile = _p_stProj->d_stFile;
/*
* add number of obtained file in current project
*/
if (_p_stProj->bGet || _bAll)
(*_p_lNbFiles) += _p_stProj->lNumberOfFiles;
else
{
for ( ; lFile < _p_stProj->lNumberOfFiles; p_stFile++, lFile++ )
if (p_stFile->bGet)
(*_p_lNbFiles)++;
}
/*
* call recursively function for each sub project
*/
for (lFile = 0; lFile < _p_stProj->lNumberOfSubProjects; lFile++, p_stSubProj++)
{
fn_Tree_vGetNumberOfFilesToGet( p_stSubProj, _p_lNbFiles, (_p_stProj->bRecurse) || _bAll );
}
}
/*
---------------------------------------------------------------------------------------
write recursively file to obtain (no project) in given array of string
---------------------------------------------------------------------------------------
*/
void fn_Tree_vGetFilesToGet( tdstProject *_p_stProj, long *_p_lNbFiles, char **_d_szFile, BOOL _bAll )
{
long lFile = 0;
tdstProject *p_stSubProj = _p_stProj->d_stSubProject;
tdstFile *p_stFile = _p_stProj->d_stFile;
for ( ; lFile < _p_stProj->lNumberOfFiles; lFile++, p_stFile ++)
{
if ( _bAll || (_p_stProj->bGet) || (p_stFile->bGet) )
sprintf( _d_szFile[ (*_p_lNbFiles)++ ], "-F %s\\%s", g_szFullName, p_stFile->szName );
}
for (lFile = 0; lFile < _p_stProj->lNumberOfSubProjects; lFile ++, p_stSubProj++)
{
strcat( g_szFullName, "\\");
strcat( g_szFullName, p_stSubProj->szName );
fn_Tree_vGetFilesToGet( p_stSubProj, _p_lNbFiles, _d_szFile, _bAll || _p_stProj->bRecurse );
*strrchr( g_szFullName, '\\' ) = 0;
}
}
/*
----------------------------------------------------------------------------------------
Description : build list of files to get
_p_stProj -> project to look in
**_ppp_szFile -> pointer on a list that will be filled
Returns (long ) number of files in list
----------------------------------------------------------------------------------------
*/
long fn_TREE_lBuildListOfFilesToGet( tdstProject *_p_stProj, char ***_ppp_szFile )
{
long lNbFiles, lFile;
lNbFiles = 0;
fn_Tree_vGetNumberOfFilesToGet( _p_stProj, &lNbFiles, FALSE );
if (lNbFiles == 0)
return 0;
*_ppp_szFile = (char **) malloc (lNbFiles * sizeof ( char *) );
for (lFile = 0; lFile < lNbFiles; lFile ++)
(*_ppp_szFile)[lFile] = (char *) malloc ( MAX_PATH );
strcpy (g_szFullName, _p_stProj->szName );
lNbFiles = 0;
fn_Tree_vGetFilesToGet( _p_stProj, &lNbFiles, *_ppp_szFile, FALSE );
return lNbFiles;
}
/*
----------------------------------------------------------------------------------------
Description : free a list of files previously build with fn_TREE_lBuildListOfFilesToGet
function
_lNumberOfFiles -> number of files in list
*_pp_szFile -> list of file
----------------------------------------------------------------------------------------
*/
void fn_TREE_vFreeListOfFilesToGet( long _lNumberOfFiles, char **_pp_szFile )
{
long lFile;
if (_lNumberOfFiles == 0)
return;
for (lFile = 0; lFile < _lNumberOfFiles; lFile ++)
free( _pp_szFile[lFile] );
free( _pp_szFile );
}
/*
---------------------------------------------------------------------------------------
set new list of file from analysis of vss tree obtaining state
---------------------------------------------------------------------------------------
*/
BOOL fn_TREE_bGetFileList( tdstProject *_p_stProj, tdstFileListConfig *_p_stFileList, char _cConfig, char *_szFileListName )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szFileListId[20];
long lNbFiles;
char **d_szFile;
long lFile;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
sprintf(szFileListId, "FileList-Config%02d", _cConfig);
lNbFiles = 0;
fn_Tree_vGetNumberOfFilesOrProjectsToGet( _p_stProj, &lNbFiles );
if (lNbFiles == 0)
return FALSE;
d_szFile = (char **) malloc (lNbFiles * sizeof ( char *) );
for (lFile = 0; lFile < lNbFiles; lFile ++)
d_szFile[lFile] = (char *) malloc ( MAX_PATH );
strcpy (g_szFullName, _p_stProj->szName );
lNbFiles = 0;
fn_Tree_vGetFilesOrProjectToGet( _p_stProj, &lNbFiles, d_szFile );
fn_IniD_vFreeFileList( _p_stFileList );
strcpy( _p_stFileList->szId, szFileListId );
strcpy( _p_stFileList->szName, _szFileListName );
_p_stFileList->cIndex = _cConfig;
_p_stFileList->lNumberOfFiles = lNbFiles;
_p_stFileList->d_szFile = d_szFile;
return TRUE;
}
/*
---------------------------------------------------------------------------------------
update list of file to obtain
---------------------------------------------------------------------------------------
*/
/*
void fn_vUpdateFilesToObtainList( void )
{
long lNbFiles;
char **d_szFile;
long lFile;
lNbFiles = 0;
fn_Tree_vGetNumberOfFilesToGet( g_p_stVssRootProject, &lNbFiles, FALSE );
d_szFile = (char **) malloc (lNbFiles * sizeof ( char *) );
for (lFile = 0; lFile < lNbFiles; lFile ++)
d_szFile[lFile] = (char *) malloc ( MAX_PATH );
strcpy (g_szFullName, g_p_stVssRootProject->szName );
lNbFiles = 0;
fn_Tree_vGetFilesToGet( g_p_stVssRootProject, &lNbFiles, d_szFile, FALSE );
fn_IniD_vFreeFileListToObtain();
g_stIniData.lNumberOfFilesToObtain = lNbFiles;
g_stIniData.d_szFileToObtain = d_szFile;
}
*/
/*
---------------------------------------------------------------------------------------
update list of file to obtain
---------------------------------------------------------------------------------------
*/
void fn_vRefreshVssTreeAndFilesToObtainList( void )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char *szFileName, *szFileName2;
int iFile, iFile2;
char *szEndProj, *szEndProj2;
BOOL bContinue, bRecurse, bFile;
tdstFileListConfig *p_stConfig = &g_stIniData.stObtainConfig;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
for (iFile = 0; iFile < p_stConfig->lNumberOfFiles; iFile ++)
{
szFileName = p_stConfig->d_szFile[iFile];
if (*szFileName == '-')
{
switch( *(szFileName + 1) )
{
case 'R':
bRecurse = TRUE;
bFile = FALSE;
break;
case 'F':
bRecurse = FALSE;
bFile = TRUE;
break;
default:
bRecurse = FALSE;
bFile = FALSE;
}
szFileName += 3;
}
else
{
bRecurse = FALSE;
bFile = FALSE;
}
if (bFile)
{
szEndProj = strrchr( szFileName, '\\' );
if (*szEndProj != NULL)
{
*szEndProj = 0;
/*
* Watch if owner project has not been yet refreshed
*/
bContinue = TRUE;
for (iFile2 = 0; (iFile2 < iFile) && bContinue; iFile2++)
{
szFileName2 = p_stConfig->d_szFile[iFile2];
if (*szFileName2++ == '_')
{
if (*szFileName2 == 'F')
{
szFileName += 2;
szEndProj2 = strrchr( szFileName2, '\\' );
if (szEndProj2 != NULL)
{
*szEndProj2 = 0;
if (stricmp( szFileName, szFileName2) == 0)
bContinue = FALSE;
*szEndProj2 = '\\';
}
}
}
}
/*
* first file of this project, refresh project
*/
if (bContinue)
{
fn_bRefreshVssProjectTree( szFileName, FALSE, NULL );
}
*szEndProj = '\\';
}
}
else
{
fn_bRefreshVssProjectTree( szFileName, bRecurse, NULL );
}
}
fn_Tree_vRefreshWithFileList( g_p_stVssRootProject, p_stConfig);
//fn_vUpdateFilesToObtainList();
}
/*
=======================================================================================
Function for local tree
=======================================================================================
*/
char gs_szCurrentPath[ _MAX_PATH ];
/*
----------------------------------------------------------------------------------------
Description : fill project with local content
_p_stProject -> project to fill
_szEndName -> end of current path which is a global var )
----------------------------------------------------------------------------------------
*/
void fn_Tree_vFillProjectFromDisk( tdstProject *_p_stProject, char *_szEndName )
{
long lNbFiles = 0;
long lNbProjs = 0;
tdstProject *p_stSubProj;
WIN32_FIND_DATA stFindData;
HANDLE hFind;
strcpy( _szEndName, "*.*" );
hFind = FindFirstFile(gs_szCurrentPath, &stFindData );
*_szEndName = 0;
if( hFind != INVALID_HANDLE_VALUE)
{
do
{
if ( stFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
if ( *stFindData.cFileName != '.')
{
gs_d_szProj[ lNbProjs ] = (char *) malloc( strlen(stFindData.cFileName) + 1 );
strcpy ( gs_d_szProj[ lNbProjs ], stFindData.cFileName );
lNbProjs++;
}
}
else
{
gs_d_szFile[ lNbFiles ] = (char *) malloc( strlen(stFindData.cFileName) + 1 );
strcpy ( gs_d_szFile[ lNbFiles ], stFindData.cFileName );
lNbFiles++;
}
} while(FindNextFile( hFind, &stFindData ));
FindClose( hFind );
}
/*
* allocate memory for all files and all sub projects
*/
if (lNbProjs)
{
_p_stProject->lNumberOfSubProjects = lNbProjs;
_p_stProject->d_stSubProject = (tdstProject *) malloc ( lNbProjs * sizeof( tdstProject) );
for (lNbProjs = 0; lNbProjs < _p_stProject->lNumberOfSubProjects; lNbProjs ++)
fn_Tree_vInitProjectWithPointerName( &_p_stProject->d_stSubProject[ lNbProjs ], gs_d_szProj[lNbProjs] );
}
if ( lNbFiles )
{
if (lNbFiles > 2048)
AfxMessageBox( "more than 2048 files in a folder\r\nthere will soon be a big bug !!!\r\nContact me .\r\n", MB_ICONSTOP | MB_OK);
_p_stProject->lNumberOfFiles = lNbFiles;
_p_stProject->d_stFile = (tdstFile *) malloc ( lNbFiles * sizeof( tdstFile) );
for (lNbFiles = 0; lNbFiles < _p_stProject->lNumberOfFiles; lNbFiles ++)
fn_Tree_vInitFileWithPointerName( &_p_stProject->d_stFile[ lNbFiles ], gs_d_szFile[ lNbFiles ] );
}
/*
* iterate again Ivss project content to construct sub project tree
*/
for (p_stSubProj = _p_stProject->d_stSubProject, lNbProjs = 0; lNbProjs < _p_stProject->lNumberOfSubProjects; lNbProjs ++, p_stSubProj++)
{
lNbFiles = sprintf( _szEndName, "%s\\", p_stSubProj->szName );
fn_Tree_vFillProjectFromDisk( p_stSubProj, _szEndName + lNbFiles );
*_szEndName = 0;
}
}
/*
----------------------------------------------------------------------------------------
Description : build local tree
_p_stRootProject -> project to fill (correspond to root project)
_szRootName -> project name (root)
Returns (BOOL ) TRUE if tree has been build, otherwise FALSE
----------------------------------------------------------------------------------------
*/
BOOL fn_Tree_bBuildFromDisk( tdstProject **_pp_stRootProject, char *_szRootName )
{
/*
* check existance of root project
*/
if (_access( _szRootName, 0) != 0 )
return FALSE;
if (*_pp_stRootProject != NULL)
fn_Tree_vFreeProjectTree(*_pp_stRootProject, TRUE );
/*
* create and initialize root project
*/
*_pp_stRootProject = (tdstProject *) malloc( sizeof (tdstProject) );
fn_Tree_vInitProject( *_pp_stRootProject, _szRootName );
// allocate memory for name storage
gs_d_szFile = (char **) malloc ( 2048 * sizeof( char *) );
gs_d_szProj = (char **) malloc ( 2048 * sizeof( char *) );
// get recursively and from root project vss tree
sprintf( gs_szCurrentPath, "%s\\", _szRootName );
fn_Tree_vFillProjectFromDisk( *_pp_stRootProject, gs_szCurrentPath + strlen( gs_szCurrentPath) );
free( gs_d_szFile );
free( gs_d_szProj );
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,482 @@
// Machine generated IDispatch wrapper class(es) created with ClassWizard
#include "stdafx.h"
#include "ssapi.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// IVSSItem properties
/////////////////////////////////////////////////////////////////////////////
// IVSSItem operations
CString IVSSItem::GetSpec()
{
CString result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
BOOL IVSSItem::GetBinary()
{
BOOL result;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void IVSSItem::SetBinary(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
bNewValue);
}
BOOL IVSSItem::GetDeleted()
{
BOOL result;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void IVSSItem::SetDeleted(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
bNewValue);
}
long IVSSItem::GetType()
{
long result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
CString IVSSItem::GetLocalSpec()
{
CString result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void IVSSItem::SetLocalSpec(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
CString IVSSItem::GetName()
{
CString result;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void IVSSItem::SetName(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
LPDISPATCH IVSSItem::GetParent()
{
LPDISPATCH result;
InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long IVSSItem::GetVersionNumber()
{
long result;
InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH IVSSItem::GetItems(BOOL IncludeDeleted)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
IncludeDeleted);
return result;
}
void IVSSItem::Get(BSTR* Local, long iFlags)
{
static BYTE parms[] =
VTS_PBSTR VTS_I4;
InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
Local, iFlags);
}
void IVSSItem::Checkout(LPCTSTR Comment, LPCTSTR Local, long iFlags)
{
static BYTE parms[] =
VTS_BSTR VTS_BSTR VTS_I4;
InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
Comment, Local, iFlags);
}
void IVSSItem::Checkin(LPCTSTR Comment, LPCTSTR Local, long iFlags)
{
static BYTE parms[] =
VTS_BSTR VTS_BSTR VTS_I4;
InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
Comment, Local, iFlags);
}
void IVSSItem::UndoCheckout(LPCTSTR Local, long iFlags)
{
static BYTE parms[] =
VTS_BSTR VTS_I4;
InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
Local, iFlags);
}
long IVSSItem::GetIsCheckedOut()
{
long result;
InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH IVSSItem::GetCheckouts()
{
LPDISPATCH result;
InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
BOOL IVSSItem::GetIsDifferent(LPCTSTR Local)
{
BOOL result;
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, parms,
Local);
return result;
}
LPDISPATCH IVSSItem::Add(LPCTSTR Local, LPCTSTR Comment, long iFlags)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_BSTR VTS_BSTR VTS_I4;
InvokeHelper(0x11, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
Local, Comment, iFlags);
return result;
}
LPDISPATCH IVSSItem::NewSubproject(LPCTSTR Name, LPCTSTR Comment)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_BSTR VTS_BSTR;
InvokeHelper(0x12, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
Name, Comment);
return result;
}
void IVSSItem::Share(LPDISPATCH pIItem, LPCTSTR Comment, long iFlags)
{
static BYTE parms[] =
VTS_DISPATCH VTS_BSTR VTS_I4;
InvokeHelper(0x13, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
pIItem, Comment, iFlags);
}
void IVSSItem::Destroy()
{
InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void IVSSItem::Move(LPDISPATCH pINewParent)
{
static BYTE parms[] =
VTS_DISPATCH;
InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
pINewParent);
}
void IVSSItem::Label(LPCTSTR Label, LPCTSTR Comment)
{
static BYTE parms[] =
VTS_BSTR VTS_BSTR;
InvokeHelper(0x16, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
Label, Comment);
}
LPDISPATCH IVSSItem::GetVersions(long iFlags)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
iFlags);
return result;
}
LPDISPATCH IVSSItem::GetVersion(const VARIANT& Version)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x18, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
&Version);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSSVersions properties
/////////////////////////////////////////////////////////////////////////////
// IVSSVersions operations
/////////////////////////////////////////////////////////////////////////////
// IVSSVersion properties
/////////////////////////////////////////////////////////////////////////////
// IVSSVersion operations
CString IVSSVersion::GetUsername()
{
CString result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
long IVSSVersion::GetVersionNumber()
{
long result;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
CString IVSSVersion::GetAction()
{
CString result;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
DATE IVSSVersion::GetDate()
{
DATE result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DATE, (void*)&result, NULL);
return result;
}
CString IVSSVersion::GetComment()
{
CString result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSVersion::GetLabel()
{
CString result;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
LPDISPATCH IVSSVersion::GetVSSItem()
{
LPDISPATCH result;
InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSSItems properties
/////////////////////////////////////////////////////////////////////////////
// IVSSItems operations
long IVSSItems::GetCount()
{
long result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH IVSSItems::GetItem(const VARIANT& sItem)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
&sItem);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckouts properties
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckouts operations
long IVSSCheckouts::GetCount()
{
long result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH IVSSCheckouts::GetItem(const VARIANT& sItem)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
&sItem);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckout properties
/////////////////////////////////////////////////////////////////////////////
// IVSSCheckout operations
CString IVSSCheckout::GetUsername()
{
CString result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
DATE IVSSCheckout::GetDate()
{
DATE result;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_DATE, (void*)&result, NULL);
return result;
}
CString IVSSCheckout::GetLocalSpec()
{
CString result;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSCheckout::GetMachine()
{
CString result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSCheckout::GetProject()
{
CString result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSCheckout::GetComment()
{
CString result;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
long IVSSCheckout::GetVersionNumber()
{
long result;
InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSSDatabase properties
/////////////////////////////////////////////////////////////////////////////
// IVSSDatabase operations
void IVSSDatabase::Open(LPCTSTR SrcSafeIni, LPCTSTR Username, LPCTSTR Password)
{
static BYTE parms[] =
VTS_BSTR VTS_BSTR VTS_BSTR;
InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
SrcSafeIni, Username, Password);
}
CString IVSSDatabase::GetSrcSafeIni()
{
CString result;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSDatabase::GetDatabaseName()
{
CString result;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSDatabase::GetUsername()
{
CString result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CString IVSSDatabase::GetCurrentProject()
{
CString result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void IVSSDatabase::SetCurrentProject(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
LPDISPATCH IVSSDatabase::GetVSSItem(LPCTSTR Spec, BOOL Deleted)
{
LPDISPATCH result;
static BYTE parms[] =
VTS_BSTR VTS_BOOL;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
Spec, Deleted);
return result;
}
/////////////////////////////////////////////////////////////////////////////
// IVSS properties
/////////////////////////////////////////////////////////////////////////////
// IVSS operations
LPDISPATCH IVSS::GetVSSDatabase()
{
LPDISPATCH result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}