Exemplo n.º 1
0
        public updateSearchDialog(updateController controller)
        {
            InitializeComponent();

            base.Font      = SystemFonts.MessageBoxFont;
            lblStatus.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 12);

            //Localization
            lblStatus.Text         = localizationHelper.Instance.controlText(lblStatus, "search");
            aclSearch.State        = statusLabelStates.Progress;
            aclSearch.Text         = lblStatus.Text = localizationHelper.Instance.controlText(aclSearch, "search");
            lblCurrentVersion.Text = string.Format(localizationHelper.Instance.controlText(lblCurrentVersion),
                                                   controller.releaseInfo.Version);
            if (controller.releaseInfo.Type != releaseTypes.Final)
            {
                lblCurrentVersion.Text += string.Format(" ({0} {1})", controller.releaseInfo.Type.ToString(),
                                                        controller.releaseInfo.Step.ToString(CultureInfo.InvariantCulture));
            }

            btnCancel.Text = localizationHelper.Instance.controlText(btnCancel);

            _controller = controller;
            Shown      += SearchDialog_Shown;
            bgwSearch.RunWorkerCompleted += bgwSearch_RunWorkerCompleted;
        }
Exemplo n.º 2
0
        internal static WebClient buildBaseWebClient(updateController controller)
        {
            var client = new WebClient();

            //Proxy setzen, falls notwendig
            if (controller.proxyEnabled)
            {
                client.Proxy = new WebProxy(controller.proxyUrl, controller.proxyPort);
                if (!string.IsNullOrEmpty(controller.proxyUsername))
                {
                    client.Proxy.Credentials = new NetworkCredential(controller.proxyUsername,
                                                                     controller.proxyPassword);
                }
                else if (controller.proxyUseDefaultCredentials)
                {
                    client.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
                }
            }

            //Anmeldeinformationen setzen, falls notwendig
            if (controller.authenticationMode == authenticationModes.Credentials)
            {
                client.Credentials = new NetworkCredential(controller.authenticationUsername,
                                                           controller.authenticationPassword);
            }

            return(client);
        }
		public updateSearchDialog(updateController controller) {
			InitializeComponent();

			//Systemschriftart ermitteln
			base.Font = SystemFonts.MessageBoxFont;
			lblStatus.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 12);

			//Initialisiere Strings
			lblStatus.Text = Language.GetString("SearchDialog_lblStatus_search");
			aclSearch.State = statusLabelStates.Progress;
			aclSearch.Text = lblStatus.Text = Language.GetString("SearchDialog_lblStatus_search");
			lblCurrentVersion.Text = string.Format(Language.GetString("SearchDialog_lblCurrentVersion_text"),
			                                       controller.releaseInfo.Version);
			if (controller.releaseInfo.Type != releaseTypes.Final) {
				lblCurrentVersion.Text += string.Format(" ({0} {1})", controller.releaseInfo.Type.ToString(),
				                                        controller.releaseInfo.Step.ToString());
			}

			btnCancel.Text = Language.GetString("general_button_cancel");

			//Setze private Variable
			_controller = controller;

			//Initialisiere Events
			Shown += SearchDialog_Shown;
			bgwSearch.RunWorkerCompleted += bgwSearch_RunWorkerCompleted;
		}
        public updateDownloader(updateController instance, UpdateResult result)
        {
            _currentConfiguration = result.Configuration;
            _currentInstance      = instance;
            _highestVersion       = result.newUpdatePackages[result.newUpdatePackages.Count - 1].releaseInfo.Version;

            //WebClient initialisieren
            _wclDownload = new WebClient();

            _wclDownload.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);

            //Proxyeinstellungen setzen
            if (instance.proxyEnabled)
            {
                _wclDownload.Proxy = new WebProxy(instance.proxyUrl, instance.proxyPort);
                if (!string.IsNullOrEmpty(instance.proxyUsername))
                {
                    _wclDownload.Proxy.Credentials = new NetworkCredential(instance.proxyUsername, instance.proxyPassword);
                }
                else if (instance.proxyUseDefaultCredentials)
                {
                    _wclDownload.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
                }
            }

            //Falls eine Authentifizierung erforderlich ist
            if (instance.authenticationMode == authenticationModes.Credentials)
            {
                _wclDownload.Credentials = new NetworkCredential(
                    instance.authenticationUsername,
                    instance.authenticationPassword);
            }

            //SSLFehler umleiten und ignorieren
            ServicePointManager.ServerCertificateValidationCallback += OnCheckSSLCert;

            //Urls erzeugen
            //updateInstaller
            //UpdateInstaller - Manifest
            _urls = new List <string> {
                internalHelper.prepareUpdateLocation(instance.updateLocation) + "updateInstaller.zip",
                internalHelper.prepareUpdateLocation(instance.updateLocation) + "updateInstaller.xml"
            };

            //Urls der Updatepakete erzeugen
            foreach (updatePackage package in result.newUpdatePackages)
            {
                _urls.Add(internalHelper.prepareUpdateLocation(instance.updateLocation, "updates") + package.getFilename());
            }

            _wclDownload.DownloadFileCompleted   += _wclDownload_DownloadFileCompleted;
            _wclDownload.DownloadProgressChanged += _wclDownload_DownloadProgressChanged;

            //Temporäres Verzeichnis erstellen
            _tempDirectory = instance.internalSettings.downloadLocation;
            if (!Directory.Exists(_tempDirectory))
            {
                Directory.CreateDirectory(_tempDirectory);
            }
        }
Exemplo n.º 5
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var startwindow = new DocumentWindow();

            startwindow.Text = "StartPage";
            startwindow.Controls.Add(new StartPageCtrl()
            {
                Dock = DockStyle.Fill
            });

            dock.AddDocument(startwindow);

            /*   var pf = new ProjectFile();
             *
             * pf.Body.Properties.Add("Version", "1.0.0.0");
             * pf.ProjectHeader = new Header() { Name = "TestProject", Type = ProjectType.WindowsFormsApplication };
             *
             * ProjectFile.Save("test.ecproj", ref pf);*/

            if (File.Exists("dock.xml"))
            {
                //  this.radDock1.LoadFromXml("dock.xml");
            }


            engine = new Engine {
                Flag = Engine.ExecutanFlags.RamOptimized
            };
            engine.Evaluate(this.fastColoredTextBox1.Text);
            console.Clear();

            if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
            {
                var updController = new updateController
                {
                    updateUrl = "http://eclang.tk/updates/",
                    projectId = "8ffc8e6d-93d9-4bc2-a48e-238f27efae9e",
                    publicKey =
                        "<RSAKeyValue><Modulus>z6FnsZcLX3Cl864s1x/8fR8/Mg1kIJIiFBouMUdRpMxe13t5J/B4S3obzr94oQgjiXR/09vjKUQdoAsUm1AwxjI+7TkR3TEnu2HHEw2O8e4gkbfnwHqODtSWuHzsIxFnhhYcmVWfY/eRniilfnUBb6bcVomFUxwQFfAqXl8vC58iVjIW+4Ir05qTTH3KIf24J+ADoLYuX0rQD6wCdfmWCII7QuqkN7NBfmoq1G2Ol5p366ILnANMdz+3n+u6lkkjl+RVEAoG/pDaRIbSnb52k0p517Cb1N4D3zfr3cftYLKQImDAc9xtC9V8F2nVdjTz05pooZuONrg8J7lmwkYER1+xDnzAg4hL0g2jefjsbrlUuvs0/nIff8DKGsqkAzg/Qg5ylYdQ/lrge6tdISrIql1PZY6qo6VlllCDn8yLhpdZfUuBMEdVrW0xLo7qWZ8Y9dHsO2It52BtvAtEpKwwPOLyL9PTU+A9DnbdSgVckdDye8dVgcZeApsrIf1qWRJyqcdXjP9Y4pKefYcBizCIjL4gGUQilR5I7WsqXfAwPkqEcWCPtaBrX8jb9JmGqY0aUH7FDYdoK0kmkaM2PGiSMaugTnfcs0HUFStj4Liaz7I0b3zM+sN7sx/dW/0KYDXCNZWVxFndcG9aZk/0umaA7q+ISITadaY+axa3DsVwelU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
                    releaseFilter =
                    {
                        checkForFinal = true,
                        checkForBeta  = true,
                        checkForAlpha = true
                    },
                    restartApplication       = true,
                    autoCloseHostApplication = true,
                    retrieveHostVersion      = true,
                    Language = Languages.Auto
                };

                if (updController.checkForUpdates())
                {
                    updController.updateInteractive(this);
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initialisiert die Updateform. Diese Methode wird automatisch vom <see cref="updateController"/> aufgerufen und muss daher nicht manuell aufgerufen werden.
        /// </summary>
        /// <param name="instance">Die Instanz des updateControllers</param>
        /// <param name="result">Das Suchresultat des UpdateControllers.</param>
        internal void initializeForm(updateController instance, UpdateResult result)
        {
            _updateDownloader = new updateDownloader(instance, result);

            _updateDownloader.downloadUpdatesCompleted       += _updateDownloader_downloadUpdatesCompleted;
            _updateDownloader.downloadUpdatesProgressChanged += _updateDownloader_downloadUpdatesProgressChanged;

            Result = result;
        }
		public updateLocationControl(string value, updateController controller) {
			InitializeComponent();
			base.Font = SystemFonts.MessageBoxFont;
			_ttError = new ToolTip();
			_controller = controller;
			txtUpdateUri.Text = value;

			bgwCheckConnection.RunWorkerCompleted += bgwCheckConnection_RunWorkerCompleted;
			txtUpdateUri.TextChanged += txtUpdateUri_TextChanged;
		}
        public updateLocationControl(string value, updateController controller)
        {
            InitializeComponent();
            base.Font         = SystemFonts.MessageBoxFont;
            _ttError          = new ToolTip();
            _controller       = controller;
            txtUpdateUri.Text = value;

            bgwCheckConnection.RunWorkerCompleted += bgwCheckConnection_RunWorkerCompleted;
            txtUpdateUri.TextChanged += txtUpdateUri_TextChanged;
        }
Exemplo n.º 9
0
 private void initializeUpdateController()
 {
     updateController = new updateController {
         updateLocation = "https://updates.updatesystem.net/1.6/beta",
         projectId      = "a1836990-a407-4b7d-925f-66b970ff8baf",
         publicKey      =
             "<RSAKeyValue><Modulus>5SKTVlel98X+yybUszedBjR1JI8cqEjiffbleW2bN/k9h2PcCTjCRp9SvZU+kEyCd2JQTLCVMyfTV0TScT3UoRGF+eXONCy6uitfHv+vtrFka1Emy2aJpY4pElPrLd3KLD1U10B4Jcplv8L7EorOdihzTH2y21Uq254kH2f8tctBgwlM97/xiXCU7aMrsxW8E/GTZRen2I+92S261pWt+mGCDY49mjsQZvx2leYE/mKuassLWL/k7mxyFjN0Zeo9UphVo89IsSPF58LtcrpUQ7Lxihx72CXeL42ajn9/Zb9jv4ITwd7jKR6FNWFepweJvzBkGitnddAcvfbPK/7Mvw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
         restartApplication  = true,
         retrieveHostVersion = true
     };
     refreshApplicationSettings();
 }
Exemplo n.º 10
0
		public updateDownloader(updateController instance, UpdateResult result) {
			_currentConfiguration = result.Configuration;
			_currentInstance = instance;
			_highestVersion = result.newUpdatePackages[result.newUpdatePackages.Count - 1].releaseInfo.Version;

			//WebClient initialisieren
			_wclDownload = new WebClient();

			_wclDownload.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);

			//Proxyeinstellungen setzen
			if (instance.proxyEnabled) {
				_wclDownload.Proxy = new WebProxy(new Uri(instance.proxyUrl + ":" + instance.proxyPort));
				if (!string.IsNullOrEmpty(instance.proxyUsername))
					_wclDownload.Proxy.Credentials = new NetworkCredential(instance.proxyUsername, instance.proxyPassword);
				else if (instance.proxyUseDefaultCredentials)
					_wclDownload.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
			}

			//Falls eine Authentifizierung erforderlich ist
			if (instance.authenticationMode == authenticationModes.Credentials) {
				_wclDownload.Credentials = new NetworkCredential(
					instance.authenticationUsername,
					instance.authenticationPassword);
			}

			//SSLFehler umleiten und ignorieren
			ServicePointManager.ServerCertificateValidationCallback += OnCheckSSLCert;

			//Urls erzeugen
			//updateInstaller 
			//UpdateInstaller - Manifest
			_urls = new List<string> {
										internalHelper.prepareUpdateLocation(instance.updateLocation) + "updateInstaller.zip",
										internalHelper.prepareUpdateLocation(instance.updateLocation) + "updateInstaller.xml"
									 };

			//Urls der Updatepakete erzeugen
			foreach (updatePackage package in result.newUpdatePackages)
				_urls.Add(internalHelper.prepareUpdateLocation(instance.updateLocation, "updates") + package.getFilename());

			_wclDownload.DownloadFileCompleted += _wclDownload_DownloadFileCompleted;
			_wclDownload.DownloadProgressChanged += _wclDownload_DownloadProgressChanged;

			//Temporäres Verzeichnis erstellen
			_tempDirectory = instance.internalSettings.downloadLocation;
			if (!Directory.Exists(_tempDirectory)) {
				Directory.CreateDirectory(_tempDirectory);
			}
		}
Exemplo n.º 11
0
        static Updater()
        {
            updController           = new updateController();
            updController.updateUrl = "http://updates.furesoft.de/openide";
            updController.projectId = "7062637b-ad46-4a34-b261-5af105874382";
            updController.publicKey = "<RSAKeyValue><Modulus>2s+M0OaN71CKZbuTctXhiY8j0h2NeEogEIHhLuBT2OOOkez6qsQ9+n4hJ40EX2hvwClCYXsV2RK3WwJm/SlunIXiCjGnaRNhfCNqU5nfoZ9GXpSGixYi55s099KrngtAEgt2dPYZTN1aKjXE0xVAWXiY1ukgRbMye0GwgCiXccsns3k8gIGrtssgb5gQGwPvm8Lp10RUk7fsNHbKiI2oK7zpP8+CIwO7kAOTkxy+xuB+Ki9QW6y/I9SJYf/mF5IvGPNOmpXDMLlPNhtLinGcOdF3Jfv+PaBDrEvf3dEi0M4yP93TQY96JCzTx/f/0PUyHmu954DAM9Y6H/fhWWxP5YN+iD1iEaqgSvv/gozuJOdDU31lmb3VtZZl016WzgiJ4G+sTUxHssbI41Ec70IsqHaI6OkLSAKbgqGvQD9HFxbD2weUJrj6KMrBtuYHQFddyAGxNbwMuBX1edZDs2prdx/Wjd436nnZdiWhgGx0ZMV0+9pDO+hbVDQQehKR4wxz8RdtM2BtaoYDyBnQv5V0+pWhV6Io+nYln5lhmgYW6/QtQh6SNZXoTDtMGZRdtydZRPs5dll9ltDhYxJxsJj0l1rOjqPsT8vBiXe5meMuRzXHPDNJ6S4FLVmLLi6kqqvk8E6cAXVe/6Kc6Qop5NLoBN9vZet5kEV3/HBu1gKV4sc=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";

            updController.releaseFilter.checkForFinal = true;
            updController.releaseFilter.checkForBeta  = true;
            updController.releaseFilter.checkForAlpha = true;

            updController.restartApplication       = true;
            updController.retrieveHostVersion      = true;
            updController.autoCloseHostApplication = true;
            updController.Language = Languages.English;
        }
Exemplo n.º 12
0
        public Updater(string version, string projectId, string publicKey, string updateUrl)
        {
            _updateUrl = updateUrl;
            _version   = version.ToString();
            _projectId = projectId;
            _publicKey = publicKey;

            m_Controller           = new updateController(_updateUrl, _version, _publicKey);
            m_Controller.projectId = _projectId;

            m_Controller.updateInstallerStarted += (s, e) =>
            {
                if (ExitApplication != null)
                {
                    ExitApplication.Invoke(this, EventArgs.Empty);
                }
            };
        }
Exemplo n.º 13
0
        public UpdateService(Language currentlanguage)
        {
            _language      = currentlanguage;
            _updController = new updateController
            {
                updateUrl                = "http://hurricaneproject.bplaced.net/updater/updates/",
                projectId                = "337f8837-7d1c-4659-8cc4-5e22f6eaf4e3",
                publicKey                = "<RSAKeyValue><Modulus>0WxHvbAz4V0URRjsNxCRjYA3HMx3L40Woa+mriLOTDF5YkjKUPoKlZxWIrBFSbBTAogkcNAryphaGzI8sAAsxeWE+SlVjKI2vGPFZA1EedXSbmPXQdWY1jD15F6Ks6/TmL0Aacvk6OHc3d6RzGyGQ52GSInGEmeQq1iIgvhT/HXZzftpRthTEx9YtfKRMtyd/Vsq99B25gTQ+kl1OzlzmogN9apwQLavKxYFSCkZZRDlzND6hxMKLBpeWiZOqlw0lYyDAcE72EkxjQqPMmPD06t+UDBQE+0++uXmLWMfgMxKDi1G8U1An7OfsNC1iZVcR2dytNMW+5FE84bN8ZJTSDXHGuUwn+z6Se+kglaQEmpHLSt6SunH33BxouQa5bliB3LHa6+84p4VjJR2EoYRPRjjN46cTZbq8w8AHLBqLJ+2nirXBbDI50pGs+ek0YKMj5qb4x0pDl4P0MhHvdvHQL4Sia6ZzssI5bOwTSI/hl1HezNznVKlGzx5i0H5fRaVXLoHBNWXMKvdgqhRTJJr6zcPc+iKUBNTLoqbInRy8oX7dmJIZQbq3PvV5CJygIkbiFvLPw+DKSn9ffE2SRF1ZWnzQ33lCQc3c0BLU585BjAkAzX4TQLgU+PbZGX/V3JNqQBcvmdDurRwmU1td1Fx7gGlBtvcWS8BdP6oUWa6+8M=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
                releaseFilter            = { checkForFinal = true, checkForBeta = true, checkForAlpha = false },
                restartApplication       = true,
                retrieveHostVersion      = true,
                autoCloseHostApplication = true,
                Language = _language == Language.English ? Languages.English : Languages.Deutsch
            };

            _updController.updateFound += updController_updateFound;
            _updController.downloadUpdatesCompleted       += updController_downloadUpdatesCompleted;
            _updController.downloadUpdatesProgressChanged += updController_downloadUpdatesProgressChanged;
        }
Exemplo n.º 14
0
		internal static WebClient buildBaseWebClient(updateController controller) {
			
			var client = new WebClient();
			//Proxy setzen, falls notwendig
			if (controller.proxyEnabled) {
				client.Proxy = new WebProxy(controller.proxyUrl, controller.proxyPort);
				if (!string.IsNullOrEmpty(controller.proxyUsername))
					client.Proxy.Credentials = new NetworkCredential(controller.proxyUsername,
																   controller.proxyPassword);
				else if (controller.proxyUseDefaultCredentials)
					client.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
			}

			//Anmeldeinformationen setzen, falls notwendig
			if (controller.authenticationMode == authenticationModes.Credentials)
				client.Credentials = new NetworkCredential(controller.authenticationUsername,
														 controller.authenticationPassword);

			return client;
		}
Exemplo n.º 15
0
		public updateSearchDialog(updateController controller) {
			InitializeComponent();

			base.Font = SystemFonts.MessageBoxFont;
			lblStatus.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 12);

			//Localization
			lblStatus.Text = localizationHelper.Instance.controlText(lblStatus, "search");
			aclSearch.State = statusLabelStates.Progress;
			aclSearch.Text = lblStatus.Text = localizationHelper.Instance.controlText(aclSearch, "search");
			lblCurrentVersion.Text = string.Format(localizationHelper.Instance.controlText(lblCurrentVersion),
			                                       controller.releaseInfo.Version);
			if (controller.releaseInfo.Type != releaseTypes.Final) {
				lblCurrentVersion.Text += string.Format(" ({0} {1})", controller.releaseInfo.Type.ToString(),
				                                        controller.releaseInfo.Step.ToString(CultureInfo.InvariantCulture));
			}

			btnCancel.Text = localizationHelper.Instance.controlText(btnCancel);

			_controller = controller;
			Shown += SearchDialog_Shown;
			bgwSearch.RunWorkerCompleted += bgwSearch_RunWorkerCompleted;
		}
Exemplo n.º 16
0
		public searchProvider(updateController instance) {
			_controllerInstance = instance;
			foundUpdates = new List<updatePackage>();
		}
Exemplo n.º 17
0
 public searchProvider(updateController instance)
 {
     _controllerInstance = instance;
     foundUpdates        = new List <updatePackage>();
 }
Exemplo n.º 18
0
 /// <summary>
 /// Konstruktur
 /// </summary>
 /// <param name="component">Der UpdateController welcher um den SmartTag erweitert werden soll.</param>
 public ControllerActionList(IComponent component)
     : base(component)
 {
     m_control = (updateController)component;
 }
Exemplo n.º 19
0
		/// <summary>
		/// Konstruktur
		/// </summary>
		/// <param name="component">Der UpdateController welcher um den SmartTag erweitert werden soll.</param>
		public ControllerActionList(IComponent component)
			: base(component) {
			m_control = (updateController) component;
		}
Exemplo n.º 20
0
		public updateLogRequest(updateController controller, updateConfiguration configuration) {
			_controller = controller;
			_configuration = configuration;
		}
Exemplo n.º 21
0
 public updateLogRequest(updateController controller, updateConfiguration configuration)
 {
     _controller    = controller;
     _configuration = configuration;
 }
Exemplo n.º 22
0
 public updateViewDialog(updateController instance)
 {
     controllerInstance = instance;
     dataExchange       = new Dictionary <string, object>();
     initializeComponents();
 }