<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>neoZip Sample App</AppTitle>
	<AppShortName>neoZip</AppShortName>
	<Author>SinLios</Author>
	<Version>1.0</Version>
	<Description>neoZip Plugin Sample App for VisualNEO Web</Description>
	<DesignDeviceName>HTC Evo 3D</DesignDeviceName>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>960</PageWidth>
	<PageHeight>540</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<ResponsiveSize>False</ResponsiveSize>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<AppIcon>C:\Users\sinli\OneDrive\Documentos\VisualNeoWeb\Libraries\img\default-icon.png</AppIcon>
	<CustomCSS>textarea {
  resize: none;
}</CustomCSS>
	<LanguageCode>en</LanguageCode>
	<DisplayMode>standalone</DisplayMode>
	<ServiceWorker>Offline page</ServiceWorker>
	<ThemeColor>#000000</ThemeColor>
	<PwaScope>/</PwaScope>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="parseFiles">
					<Code>SetVar [list] &quot;&quot;
SetVar [listHtml] &quot;&quot;
CreateEmptyArray [thefiles]
neoZipGetFileList &quot;myzip&quot; [list]
SetVar [files] [list.length]-1
Loop 0 [files] [n]
   ArrayAddItem [thefiles] &quot;[list([n])]&quot;
EndLoop
</Code>
				</Function>
				<Function name="showImage">
					<Code>OpenDialog &quot;NewDialog&quot;
Wait 300
  SetObjectAttribute &quot;Image1&quot; &quot;src&quot; &quot;[base64prefix][imagecontent]&quot;
EndWait
</Code>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="NewPage">
					<pageenter>neoZipCreate &quot;myzip&quot;
SetVar [filecontent] &quot;Load a .zip file and click on any listed .txt, .jpg or .png file&quot;
SetVar [textfilename] &quot;&quot;
SetVar [content] &quot;&quot;</pageenter>
					<Components>
						<Container id="Container2">
							<left>20px</left>
							<top>15px</top>
							<width>450px</width>
							<height>505px</height>
							<style>background-color:#fff;border-color:#E0E0E0;border-radius:5px;border-style:solid;border-width:1px</style>
							<Components>
								<TextArea id="TextArea1">
									<left>10px</left>
									<top>70px</top>
									<width>430px</width>
									<height>145px</height>
									<variable>[content]</variable>
									<place_holder>Write some text here...</place_holder>
								</TextArea>
								<TextInput id="TextInput1">
									<left>10px</left>
									<top>225px</top>
									<width>315px</width>
									<height>45px</height>
									<variable>[textfilename]</variable>
									<place_holder>File name (ie: myfile.txt)</place_holder>
								</TextInput>
								<PushButton id="PushButton1">
									<left>330px</left>
									<top>225px</top>
									<width>110px</width>
									<height>45px</height>
									<caption>Add to .zip</caption>
									<kind>success</kind>
									<click>IfEx [textfilename] != &quot;&quot; &amp;&amp; [content] != &quot;&quot;
  neoZipAddTextFile &quot;myzip&quot; &quot;[textfilename]&quot; &quot;[content]&quot;
  AlertBox &quot;Done&quot; &quot;File [textfilename] succesfully included into .zip file&quot; &quot;&quot;
  SetVar [textfilename] &quot;&quot;
  SetVar [content] &quot;&quot;
  FocusObject &quot;TextArea1&quot;
Else
  AlertBox &quot;Error&quot; &quot;Please write a text and a file name for your text file&quot; &quot;&quot;
  FocusObject &quot;TextInput1&quot;
EndIf
</click>
								</PushButton>
								<FileInput id="FileInput1">
									<left>10px</left>
									<top>320px</top>
									<width>105px</width>
									<height>45px</height>
									<style>background-color:#E0E0E0;border-color:#A8A8A8;border-style:solid;border-width:1px</style>
									<prop_name>file1</prop_name>
									<variable>[imgname]</variable>
									<change>LocalBinaryFileToVar &quot;FileInput1&quot; [filedata]
.Get the file name from the array
SetVar [filename] [imgname(0)]</change>
									<caption>Select file...</caption>
								</FileInput>
								<PushButton id="PushButton2">
									<left>10px</left>
									<top>445px</top>
									<width>430px</width>
									<height>45px</height>
									<caption>Download .zip file</caption>
									<kind>danger</kind>
									<click>.Download
neoZipSave &quot;myzip&quot; &quot;6&quot; &quot;neozipsample.zip&quot;

.resets the package
neoZipCreate &quot;myzip&quot;</click>
								</PushButton>
								<PushButton id="PushButton3">
									<left>330px</left>
									<top>375px</top>
									<width>110px</width>
									<height>45px</height>
									<caption>Add to .zip</caption>
									<kind>success</kind>
									<click>.Check if there is any file selected
If [filename] != undefined
  neoZipAddBinaryFile &quot;myzip&quot; &quot;[filename]&quot; &quot;[filedata]&quot;
  AlertBox &quot;Done&quot; &quot;File [filename] succesfully included into .zip file&quot; &quot;&quot;
Else
  AlertBox &quot;Atention&quot; &quot;Please select a file first&quot; &quot;&quot;
EndIf</click>
								</PushButton>
								<Container id="Container1">
									<left>115px</left>
									<top>320px</top>
									<width>325px</width>
									<height>45px</height>
									<style>background-color:#fff;border-color:#E0E0E0;border-style:solid;border-width:1px;padding-left:10px;padding-top:10px;overflow-x:hidden;overflow-y:hidden</style>
									<html>[filename]</html>
								</Container>
								<Headline id="Headline1">
									<left>15px</left>
									<top>15px</top>
									<width>425px</width>
									<height>45px</height>
									<style>color:#A8A8A8;text-align:center</style>
									<text>Generate ZIP File</text>
								</Headline>
							</Components>
						</Container>
						<Container id="Container3">
							<left>485px</left>
							<top>15px</top>
							<width>450px</width>
							<height>505px</height>
							<style>background-color:#fff;border-color:#E0E0E0;border-radius:5px;border-style:solid;border-width:1px</style>
							<Components>
								<Headline id="Headline2">
									<left>15px</left>
									<top>15px</top>
									<width>425px</width>
									<height>45px</height>
									<style>color:#A8A8A8;text-align:center</style>
									<text>Read ZIP File</text>
								</Headline>
								<FileInput id="FileInput2">
									<left>10px</left>
									<top>70px</top>
									<width>210px</width>
									<height>45px</height>
									<style>color:#FFFFFF;background-color:#d9534f;border-color:#A13D3A;border-style:solid;border-width:1px</style>
									<prop_name>file2</prop_name>
									<change>neoZipCreate &quot;myzip&quot;
neoZipLoadLocal &quot;FileInput2&quot; &quot;myzip&quot; &quot;parseFiles&quot;</change>
									<caption>Load local .zip file</caption>
									<accept>.zip</accept>
								</FileInput>
								<Listbox id="Listbox1">
									<left>10px</left>
									<top>125px</top>
									<width>430px</width>
									<height>180px</height>
									<style>border-color:#E0E0E0;border-radius:5px;border-width:1px</style>
									<items>[thefiles]</items>
									<prop_name>files</prop_name>
									<variable>[selectedfile]</variable>
									<multi_select>False</multi_select>
									<change>SetVar [filecontent] &quot;&quot;

StrSearch &quot;.txt&quot; &quot;[selectedfile]&quot; [istext]
If [istext] != -1
   neoZipReadTextFile &quot;myzip&quot; &quot;[selectedfile]&quot; [filecontent] &quot;&quot;
EndIf

StrSearch &quot;.jpg&quot; &quot;[selectedfile]&quot; [isimage]
If [isimage] != -1
   SetVar [base64prefix] &quot;data:image/jpg;base64,&quot;
   neoZipReadBase64File &quot;myzip&quot; &quot;[selectedfile]&quot; [imagecontent] &quot;showImage&quot;
EndIf

StrSearch &quot;.png&quot; &quot;[selectedfile]&quot; [isimage]
If [isimage] != -1
   SetVar [base64prefix] &quot;data:image/png;base64,&quot;
   neoZipReadBase64File &quot;myzip&quot; &quot;[selectedfile]&quot; [imagecontent] &quot;showImage&quot;
EndIf</change>
								</Listbox>
								<TextArea id="TextArea2">
									<left>12px</left>
									<top>315px</top>
									<width>430px</width>
									<height>175px</height>
									<style>cursor:default</style>
									<enabled>False</enabled>
									<prop_name>filecontent</prop_name>
									<variable>[filecontent]</variable>
								</TextArea>
								<PushButton id="PushButton5">
									<left>227px</left>
									<top>70px</top>
									<width>213px</width>
									<height>45px</height>
									<caption>Load remote .zip file</caption>
									<kind>danger</kind>
									<click>neoZipCreate &quot;myzip&quot;
neoZipLoad &quot;myzip&quot; &quot;sample.zip&quot; &quot;parseFiles&quot;</click>
								</PushButton>
							</Components>
						</Container>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>500px</width>
							<height>500px</height>
							<caption>File content</caption>
							<close_button>True</close_button>
							<kind>primary</kind>
							<Components>
								<PushButton id="PushButton4">
									<left>450px</left>
									<top>10px</top>
									<width>40px</width>
									<height>37px</height>
									<style>color:#FFFFFF;font-size:18pt;background-color:#0a3d64;border-color:#062238;padding-left:7px;padding-top:3px</style>
									<icon>glyphicon-remove</icon>
									<click>CloseDialog
</click>
								</PushButton>
								<Container id="Container5">
									<left>5px</left>
									<top>60px</top>
									<width>490px</width>
									<height>435px</height>
									<style>background-color:#fff</style>
									<Components>
										<Image id="Image1">
											<style>max-height:390px;max-width:450px;min-height:100px;min-width:100px</style>
											<css_class>neo-middle-center</css_class>
											<source>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8Xw8AAoMBgDTD2qgAAAAASUVORK5CYII=</source>
										</Image>
									</Components>
								</Container>
							</Components>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
