コード例 #1
0
ファイル: CajApp.cs プロジェクト: ajaxvs/poeNavigator
        //================================================================================
        static private void checkWindows()
        {
            if (!hideOnPoeBackground)
            {
                return;
            }

            //hide overlay if PoE window isn't on front:
            string s = CajFuns.getForegroundWindowTitle();

            if (s == poeWindowTitle || s == appName)
            {
                if (hiddenByForegroundCheck)
                {
                    trace("foreground show");
                    hiddenByForegroundCheck = false;
                    mainForm.setVisibilitySafe(true);
                }
            }
            else
            {
                if (!hiddenByForegroundCheck)
                {
                    trace("foreground hide");
                    hiddenByForegroundCheck = true;
                    mainForm.setVisibilitySafe(false);
                }
            }
        }
コード例 #2
0
ファイル: CajApp.cs プロジェクト: ajaxvs/poeNavigator
        //================================================================================
        static private void validateDirs()
        {
            //dataDir:
            string appPath = CajFuns.getAppPath();

            dataDir = appPath + dataFolderName;
            if (!System.IO.Directory.Exists(dataDir))
            {
                dataDir = appPath + "..\\..\\" + dataFolderName;                 //dev path.
                if (!System.IO.Directory.Exists(dataDir))
                {
                    appError("Can't find data folder. Did you unzip the archive?" +
                             "\n\nUnzip all and launch again.");
                }
            }
        }