<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://theeyetribe.com/forum/feed.php?f=11&amp;t=466" />

<title>The Eye Tribe</title>
<subtitle>Developer Forum</subtitle>
<link href="http://theeyetribe.com/forum/index.php" />
<updated>2015-04-15T20:37:10+02:00</updated>

<author><name><![CDATA[The Eye Tribe]]></name></author>
<id>http://theeyetribe.com/forum/feed.php?f=11&amp;t=466</id>
<entry>
<author><name><![CDATA[sreedev@resnova.in]]></name></author>
<updated>2015-04-15T20:37:10+02:00</updated>
<published>2015-04-15T20:37:10+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1951#p1951</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1951#p1951"/>
<title type="html"><![CDATA[Re: Launch eye tribe server from  application]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1951#p1951"><![CDATA[
Thanks for your reply. I solved the issue by setting the window style to hidden.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=7129">skatasreedev@resnova.in</a> — 15 Apr 2015, 20:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Martin]]></name></author>
<updated>2015-04-15T00:22:55+02:00</updated>
<published>2015-04-15T00:22:55+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1948#p1948</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1948#p1948"/>
<title type="html"><![CDATA[Re: Launch eye tribe server from  application]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1948#p1948"><![CDATA[
No can do, it's not a DLL. It needs to run as it's own process (for many reasons). Perhaps minimize the application window programmatically?<br /><br />What are you trying to accomplish?<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=117">skataMartin</a> — 15 Apr 2015, 00:22</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[sreedev@resnova.in]]></name></author>
<updated>2015-04-14T18:29:46+02:00</updated>
<published>2015-04-14T18:29:46+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1947#p1947</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1947#p1947"/>
<title type="html"><![CDATA[Re: Launch eye tribe server from  application]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1947#p1947"><![CDATA[
I haven't tried the code yet. But it seems to me that what you suggested launches the already installed server. What I am actually looking for is not to launch the already existing server but to have it within my application and run in background without the command line window popping up.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=7129">skatasreedev@resnova.in</a> — 14 Apr 2015, 18:29</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Martin]]></name></author>
<updated>2015-04-14T16:02:06+02:00</updated>
<published>2015-04-14T16:02:06+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1946#p1946</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1946#p1946"/>
<title type="html"><![CDATA[Re: Launch eye tribe server from  application]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1946#p1946"><![CDATA[
Certainly possible. Here's one way of doing it.<br /><br />First, we determine if the server is running already<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>        private static bool IsServerProcessRunning()<br />        {<br />            try<br />            {<br />                foreach(Process p in Process.GetProcesses())<br />                {<br />                    if(p.ProcessName.ToLower() == &quot;eyetribe&quot;)<br />                        return true;<br />                }<br />            }<br />            catch (Exception)<br />            { }<br /><br />            return false;<br />        }<br /></code></dd></dl><br /><br />If the server is not running we locate the executable by the method GetServerExecutablePath() and then start it:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>        private static void StartServerProcess()<br />        {<br />            ProcessStartInfo psi = new ProcessStartInfo();<br />            psi.WindowStyle = ProcessWindowStyle.Minimized;<br />            psi.FileName = GetServerExecutablePath();<br /><br />            if (psi.FileName == string.Empty || File.Exists(psi.FileName) == false)<br />                return;<br /><br />            Process processServer = new Process();<br />            processServer.StartInfo = psi;<br />            processServer.Start();<br /><br />            Thread.Sleep(3000); // wait for it to spin up<br />        }<br /></code></dd></dl><br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>        private static string GetServerExecutablePath()<br />        { <br />            // check default paths           <br />            const string x86 = &quot;C:\\Program Files (x86)\\EyeTribe\\Server\\EyeTribe.exe&quot;;<br />            if (File.Exists(x86))<br />                return x86;                <br /><br />            const string x64 = &quot;C:\\Program Files\\EyeTribe\\Server\\EyeTribe.exe&quot;;<br />            if (File.Exists(x64))<br />                return x64;<br /><br />            // Still not found, let user select file<br />            OpenFileDialog dlg = new OpenFileDialog();<br />            dlg.DefaultExt = &quot;.exe&quot;;<br />            dlg.Title = &quot;Please select the Eye Tribe server executable&quot;;<br />            dlg.Filter = &quot;Executable Files (*.exe)|*.exe&quot;;<br /><br />            if (dlg.ShowDialog() == true)<br />                return dlg.FileName;<br /><br />            return string.Empty;<br />        }<br /></code></dd></dl><br /><br /><br />Hope this helps  <img src="http://theeyetribe.com/forum/images/smilies/icon_e_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=117">skataMartin</a> — 14 Apr 2015, 16:02</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[sreedev@resnova.in]]></name></author>
<updated>2015-04-14T14:49:18+02:00</updated>
<published>2015-04-14T14:49:18+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1945#p1945</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1945#p1945"/>
<title type="html"><![CDATA[Launch eye tribe server from  application]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=466&amp;p=1945#p1945"><![CDATA[
Hello,<br />I started out with the calibration example provided at Github. But it seems that I need to launch the eye tribe server application separately before my application can make use of the eye tracker. Is there any way of launching the server from my application?<br /><br />Thanks.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=7129">skatasreedev@resnova.in</a> — 14 Apr 2015, 14:49</p><hr />
]]></content>
</entry>
</feed>