Example #1
0
        static void Main()
        {
//          Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            TaskMain.Init();

            Application.Run(/*new FrmMain()*/);
        }
Example #2
0
        /// <summary>Initialize.</summary>
        public static void Init()
        {
            _self = new TaskMain();

            /*
             * IPC
             */
            RemotingConfiguration.Configure(Path.Combine(ThetisCore.Lib.Def.COMMON_CONFIG_ROOT_DIR, @"remotingTask.config"), false);

            IpcTaskService ipcTaskService = new IpcTaskService();

            ipcTaskService.RssTargetInfosUpdated += _self.ipcTaskService_RssTargetInfosUpdated;

            RemotingServices.Marshal(ipcTaskService, "ipcTaskService");

#if ZEPTAIR
            Zeptair.Lib.Common.ConfParam zeptConf = TaskMain.Instance.ZeptConf(false);

            /*
             * License-Key Validation
             */
            LicKeyInfo licKeyInfo = LicKeyParser.Parse(zeptConf.LicenseKey);
            if (licKeyInfo == null || licKeyInfo.GetErrorMsg() != null)
            {
                _self._hasValidZeptLicKey = false;
 #if true
                _self._menuItemZeptConnect.Enabled = false;
 #else
                CommonUtil.StartProcessWithCallback(
                    Path.Combine(CommonUtil.GetAppPath(), @"ZeptairClientConf.exe"),
                    @"/default=tbiLicenseKey /edit",
                    _self,
                    new EventHandler(_self.zeptConfProcess_Exited)
                    );
 #endif
            }
            else
            {
                _self._hasValidZeptLicKey = true;
            }
#endif

            _self._rssManager = new RssManager();
            if (_self._rssManager.LoadWatchers())
            {
                _self._rssManager.Start();
            }
            //else
            //    Process.Start("ThetisCoreConf.exe");

#if ZEPTAIR
            _self._zeptDistManager = new ZeptDistManager();
            _self._zeptDistManager.Init(zeptConf.AcceptCmd);
#endif
        }