void GetShipNumber() { GameObject gameManager = GameObject.Find("GameManager"); LoadSettings script = gameManager.GetComponent <LoadSettings> (); shipNumber = script.shipNumber; }
private void Main_TC_SelectedIndexChanged(object sender, EventArgs e) { if (Main_TC.SelectedIndex == 1) { LoadSettings?.Invoke(); } }
public void LoadTest() { string location = "Setting\bobsGameBackup.json"; Assert.IsTrue(LoadSettings.LoadFile(location, out GameSettings gameSettings)); Assert.IsNotNull(gameSettings); }
private void MainForm_Load(object sender, EventArgs e) { try { object obj = ProxyChange.GetSystemProxy(); string[] list = LoadSettings.LoadProxyList(); foreach (string addr in list) { cBoxProxyList.Items.Add(addr); if (obj.ToString() == addr) { fruitContextMenuStrip.Items.Add(addr, Bitmap.FromFile("g1.gif"), cms_SetProxy); } else { fruitContextMenuStrip.Items.Add(addr, Bitmap.FromFile("g2.gif"), cms_SetProxy); } } cBoxProxyList.SelectedItem = obj; Hide(); this.ShowInTaskbar = false; } catch (System.IO.FileNotFoundException ex) { MessageBox.Show("Не знайдено файл " + ex.FileName + ".", "Помилка при завантаженні"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public static async Task <FormResultsData> FullPredictionProcess(FormInputData inputFormData) { var validationErrors = InputDataValidation.MachineLearningSpecificValidation(inputFormData); if (validationErrors.Any()) { InputDataValidation.ThrowValidationErrors(validationErrors); return(null); } var glassUnitList = GlassUnit.CreateGlassUnitsWithAllInterlayerStiffness(inputFormData).ToList(); var loadCombinations = inputFormData.LoadCombinations; var loadSettings = new LoadSettings(inputFormData); var externalLoads = LoadGenerationExternal.GenerateExternalLoadsAllUnits(loadSettings, glassUnitList, new ObjectsStore(), true); var climateLoads = LoadGenerationClimate.GenerateClimaticLoadsAllUnits(loadSettings, glassUnitList); glassUnitList .Where(x => x.IsUnitWithCavity) .ForEach(x => x.SetDeflectedVolumeEmpiricCalculation(externalLoads)); var transferredLoads = LoadTransferThroughCavity.GenerateTransferredLoads(glassUnitList); var allLoads = externalLoads.Merge(climateLoads).Merge(transferredLoads); var machineLearningObjects = CreateAllPredictionObjects(glassUnitList, loadCombinations, allLoads); var resultsFormData = await GetPredictionsAndResultsOutput(inputFormData, machineLearningObjects, glassUnitList); return(resultsFormData); }
protected void Page_Load(object sender, EventArgs e) { // handle the AJAX postback string eventTarget = Convert.ToString(Request.Params.Get("__EVENTTARGET")); string eventArgument = Convert.ToString(Request.Params.Get("__EVENTARGUMENT")); // if the event argument is set, toggle the checkbox if (eventArgument != null) { ToggleCheckBox(eventArgument); } // load a document at the first start if (!IsPostBack) { byte[] data; using (TXTextControl.ServerTextControl tx = new ServerTextControl()) { tx.Create(); TXTextControl.LoadSettings ls = new LoadSettings(); ls.ApplicationFieldFormat = ApplicationFieldFormat.MSWord; tx.Load(Server.MapPath("template.docx"), StreamType.WordprocessingML, ls); tx.Save(out data, BinaryStreamType.InternalUnicodeFormat); data = ProcessCheckboxFields(data); } TextControl1.LoadTextAsync(data, TXTextControl.Web.BinaryStreamType.InternalUnicodeFormat); } }
void ImageSwap() { GameObject gameManager = GameObject.Find("GameManager"); LoadSettings script = gameManager.GetComponent <LoadSettings> (); switch (script.shipNumber) { case 0: if (shipSpriteRenderer.sprite.name == "Ship01a") { shipSpriteRenderer.sprite = SecondImage[0]; engines.SetActive(false); } else if (shipSpriteRenderer.sprite.name == "Ship01b") { shipSpriteRenderer.sprite = FirstImage[0]; engines.SetActive(true); } break; case 1: if (shipSpriteRenderer.sprite.name == "Ship02a") { shipSpriteRenderer.sprite = SecondImage[1]; engines.SetActive(false); } else if (shipSpriteRenderer.sprite.name == "Ship02b") { shipSpriteRenderer.sprite = FirstImage[1]; engines.SetActive(true); } break; case 2: if (shipSpriteRenderer.sprite.name == "Ship03a") { shipSpriteRenderer.sprite = SecondImage[2]; engines.SetActive(false); } else if (shipSpriteRenderer.sprite.name == "Ship03b") { shipSpriteRenderer.sprite = FirstImage[2]; engines.SetActive(true); } break; case 3: if (shipSpriteRenderer.sprite.name == "Ship04a") { shipSpriteRenderer.sprite = SecondImage[3]; engines.SetActive(false); } else if (shipSpriteRenderer.sprite.name == "Ship04b") { shipSpriteRenderer.sprite = FirstImage[3]; engines.SetActive(true); } break; } }
private void LoadButton_Click(object sender, RoutedEventArgs e) { LoadButton.IsEnabled = false; LoadSettings loadSettings = new LoadSettings { CardFee = CardFeeTextBox.Text, ExpireFee = ExpireFeeCheckBox.IsChecked ?? false, LockCard = LockCardCheckBox.IsChecked ?? false, TestSettings = TestSettingsCheckBox.IsChecked ?? false }; //Call VM: var res = VM.LoadClick(loadSettings); //UPDATE ERROR CODES: if (res != null && res.Success) { ErrorLabel.Foreground = Brushes.DarkGreen; if (!loadSettings.TestSettings) { PrintWindow printWindow = new PrintWindow("C:\\Users\\mcb\\Dropbox\\Hobby stuff\\Card loader 2000\\CardLoader2000\\CardLoader2000.PrintLibrary\\CustomerLetter.html"); printWindow.Show(); } ErrorLabel.Content = "Card loaded and letter sent to printer. " + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); } else { ErrorLabel.Foreground = Brushes.Red; ErrorLabel.Content = res != null ? res.ErrorMessage : "Unknown error occured. Stop doing anything. " + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); } LoadButton.IsEnabled = true; }
void SetShipBoundary(float boundary) { GameObject gameManager = GameObject.Find("GameManager"); LoadSettings gameScript = gameManager.GetComponent <LoadSettings> (); ShipMove script = ships[gameScript.shipNumber].GetComponent <ShipMove> (); script.xBoarder = boundary; }
private void loadTemplate() { TXTextControl.LoadSettings ls = new LoadSettings(); ls.ApplicationFieldFormat = ApplicationFieldFormat.MSWord; textControl1.Load("template.docx", StreamType.WordprocessingML, ls); webBrowser1.DocumentText = File.ReadAllText("data.xml"); }
/// <summary> /// Creates a new settings object for easy management of settings. /// </summary> /// <param name="filename">The file to watch, load, and save from</param> /// <param name="folder">The folder that this file will be saved in.</param> /// <param name="save">True to make the settings loader handle saving of this file.</param> /// <param name="readFunction">The function that will be called when this file is loaded.</param> public Settings(string filename, LoadSettings readFunction, string folder = "Settings/", bool save = true) { Filename = Path.Combine(folder, filename); CurrentGroup = ""; SettingsDictionary = new Dictionary<string, Dictionary<string, string>>(); Save = save; LoadFunction = readFunction; }
/// <summary> /// Creates a new settings object for easy management of settings. /// </summary> /// <param name="filename">The file to watch, load, and save from</param> /// <param name="folder">The folder that this file will be saved in.</param> /// <param name="save">True to make the settings loader handle saving of this file.</param> /// <param name="readFunction">The function that will be called when this file is loaded.</param> public PreferenceLoader(string filename, LoadSettings readFunction, string folder = "Settings/", bool save = true) { Filename = Path.Combine(folder, filename); CurrentGroup = ""; SettingsDictionary = new Dictionary <string, Dictionary <string, string> >(); SettingsDictionary.Add("", new Dictionary <string, string>()); Save = save; LoadFunction = readFunction; }
public void ShouldAllowToSetValues() { // Arrange var loadSettings = new LoadSettings(); var webSettings = new WebSettings(); var cookieJar = _fixture.Create <string>(); var cropHeight = _fixture.Create <string>(); var cropLeft = _fixture.Create <string>(); var cropTop = _fixture.Create <string>(); var cropWidth = _fixture.Create <string>(); var format = _fixture.Create <string>(); var pin = _fixture.Create <string>(); var pout = _fixture.Create <string>(); var quality = _fixture.Create <string>(); var screenWidth = _fixture.Create <string>(); var smartWidth = _fixture.Create <bool>(); var transparent = _fixture.Create <bool>(); // Act var sut = new ImageSettings { LoadSettings = loadSettings, WebSettings = webSettings, CookieJar = cookieJar, CropHeight = cropHeight, CropLeft = cropLeft, CropTop = cropTop, CropWidth = cropWidth, Format = format, In = pin, Out = pout, Quality = quality, ScreenWidth = screenWidth, SmartWidth = smartWidth, Transparent = transparent, }; // Assert using (new AssertionScope()) { sut.LoadSettings.Should().Be(loadSettings); sut.WebSettings.Should().Be(webSettings); sut.CookieJar.Should().Be(cookieJar); sut.CropHeight.Should().Be(cropHeight); sut.CropLeft.Should().Be(cropLeft); sut.CropTop.Should().Be(cropTop); sut.CropWidth.Should().Be(cropWidth); sut.Format.Should().Be(format); sut.In.Should().Be(pin); sut.Out.Should().Be(pout); sut.Quality.Should().Be(quality); sut.ScreenWidth.Should().Be(screenWidth); sut.SmartWidth.Should().Be(smartWidth); sut.Transparent.Should().Be(transparent); } }
public override void Load(string moduleName) { LoadSettings settings = new LoadSettings("MovieTime.xml"); settings.Open("MovieTime"); settings.SelectNode(moduleName + "ColorFilm"); brightness = settings.Get<float>("Brightness", brightness); vignetteAmount = settings.Get<float>("VignetteAmount", vignetteAmount); overlay1Amount = settings.Get<float>("Overlay1Amount", overlay1Amount); overlay2Amount = settings.Get<float>("Overlay2Amount", overlay2Amount); }
public LoadSettingsInstance(ObjectInstance prototype, LoadSettings loadSettings) : this(prototype) { if (loadSettings == null) { throw new ArgumentNullException("loadSettings"); } m_loadSettings = loadSettings; }
private void loadToolStripMenuItem_Click(object sender, EventArgs e) { // load the document // LoadSettings must be adjusted to load the MS Word fields LoadSettings ls = new LoadSettings(); ls.ApplicationFieldFormat = ApplicationFieldFormat.MSWord; textControl1.Load(StreamType.RichTextFormat | StreamType.MSWord | StreamType.WordprocessingML, ls); SetFields(); }
public CleanupForm() { m_LoadSettings = new LoadSettings(); m_CleanupJobSettings = new CleanupJobSettings(); InitializeComponent(); cboAppendDateToShortFileNames.BindToEnum <CleanupAction>(); UpdateLoadSettings(); UpdateProcessSettings(); SetState(AppState.Unloaded); }
public override void Load(string moduleName) { LoadSettings settings = new LoadSettings("MovieTime.xml"); settings.Open("MovieTime"); settings.SelectNode(moduleName + "ColorLoResTV"); brightness = settings.Get<float>("Brightness", brightness); vignetteAmount = settings.Get<float>("VignetteAmount", vignetteAmount); overlay1Amount = settings.Get<float>("Overlay1Amount", overlay1Amount); overlay2Amount = settings.Get<float>("Overlay2Amount", overlay2Amount); rollFrequency = settings.Get<int>("RollFrequency", rollFrequency); rollSpeed = settings.Get<float>("RollSpeed", rollSpeed); }
public NewProject(Form menu) { InitializeComponent(); LoadSettings load = new LoadSettings(); StructSettings settings = load.ReadSettings(); if (settings != null) { _coreUML.LoadCoreUML(settings); } _coreUML.IsLoading = true; UpdateSettingsForm(); _menu = menu; }
public void ShouldAllowToSetValues() { // Arrange var blockLocalFileAccess = _fixture.Create <bool>(); var cookies = _fixture.Create <Dictionary <string, string> >(); var debugJavascript = _fixture.Create <bool>(); var customHeaders = _fixture.Create <Dictionary <string, string> >(); var jsDelay = _fixture.Create <int>(); var loadErrorHandling = _fixture.Create <ContentErrorHandling>(); var password = _fixture.Create <string>(); var proxy = _fixture.Create <string>(); var repeatCustomHeaders = _fixture.Create <bool>(); var stopSlowScript = _fixture.Create <bool>(); var username = _fixture.Create <string>(); var zoomFactor = _fixture.Create <double>(); // Act var sut = new LoadSettings { BlockLocalFileAccess = blockLocalFileAccess, Cookies = cookies, DebugJavascript = debugJavascript, CustomHeaders = customHeaders, JSDelay = jsDelay, LoadErrorHandling = loadErrorHandling, Password = password, Proxy = proxy, RepeatCustomHeaders = repeatCustomHeaders, StopSlowScript = stopSlowScript, Username = username, ZoomFactor = zoomFactor, }; // Assert using (new AssertionScope()) { sut.BlockLocalFileAccess.Should().Be(blockLocalFileAccess); sut.Cookies.Should().BeEquivalentTo(cookies); sut.CustomHeaders.Should().BeEquivalentTo(customHeaders); sut.DebugJavascript.Should().Be(debugJavascript); sut.JSDelay.Should().Be(jsDelay); sut.LoadErrorHandling.Should().Be(loadErrorHandling); sut.Password.Should().Be(password); sut.Proxy.Should().Be(proxy); sut.RepeatCustomHeaders.Should().Be(repeatCustomHeaders); sut.StopSlowScript.Should().Be(stopSlowScript); sut.Username.Should().Be(username); sut.ZoomFactor.Should().Be(zoomFactor); } }
/// <summary> /// Returns null at success and error message otherwise. /// </summary> public static string LoadCard(LoadSettings loadSettings) { string cardState = loadSettings.LockCard ? "Run" : "Test"; //Manual page 125: How the compiler is called. CommandOutput result = CommandHelper.Execute('\"' + compilerExePath + '\"' + " " + '\"' + cardSources + "BitcoinCard.BAS" + '\"' + " -X -CF\"" + cardSources + "ZC75_D.zcf\" -S" + cardState + " -OI\"" + cardSources + "BitcoinCard.IMG\"", cardSources, 10000, 30, true); if (!String.IsNullOrWhiteSpace(result.error) || result.exitCode != 0) { return("Compile error: " + result.error); } result = CommandHelper.Execute('\"' + loaderExePath + "\" \"" + cardSources + "BitcoinCard.IMG\" -E\"" + cardSources + "BitcoinCard.ERR\" -S" + cardState + " -P103", cardSources, 10000, 30, true); if (!String.IsNullOrWhiteSpace(result.error) || result.exitCode != 0) { return("Load command error: " + result.error); } if (File.Exists(cardSources + "BitcoinCard.ERR")) { string error = File.ReadAllText(cardSources + "BitcoinCard.ERR", Encoding.UTF8); return(error); } /*Previous commands in card loader .BAT: * @ECHO OFF * :Start * CD "C:\Users\mcb\Dropbox\Hobby stuff\75Branch\" * @ECHO ON * BCLoad BitcoinCard.img -E -STest -P103 * @ECHO OFF * IF EXIST "BitcoinCard.ERR" ECHO ERROR OCCURED * ECHO . * ECHO Retry? * Pause * CLS * GOTO Start */ //Remove file with secret customer information after use: //File.Delete(cardSources + "SetupConstants.DEF"); //File.Delete(cardSources + "BitcoinCard.IMG"); return(null); //OK }
private void loadItems() { object obj = ProxyChange.GetSystemProxy(); string[] list = LoadSettings.LoadProxyList(); fruitContextMenuStrip.Items.Clear(); foreach (string addr in list) { cBoxProxyList.Items.Add(addr); if (obj.ToString() == addr) { fruitContextMenuStrip.Items.Add(addr, Bitmap.FromFile("g1.gif"), cms_SetProxy); } else { fruitContextMenuStrip.Items.Add(addr, Bitmap.FromFile("g2.gif"), cms_SetProxy); } } cBoxProxyList.SelectedItem = obj; }
void SetShip() { GameObject gameManager = GameObject.Find("GameManager"); LoadSettings script = gameManager.GetComponent <LoadSettings> (); switch (script.shipNumber) { case 0: Ship = Ship01; break; case 1: Ship = Ship02; break; case 2: Ship = Ship03; break; } }
void RemovePowerup() { GameObject gameManager = GameObject.Find("GameManager"); LoadSettings script = gameManager.GetComponent <LoadSettings> (); switch (script.shipNumber) { case 1: ShipFire fireScript = Ship.GetComponent <ShipFire>(); fireScript.enabled = true; ShipDoubleShot doubleShotScript = Ship.GetComponent <ShipDoubleShot>(); doubleShotScript.enabled = false; break; case 2: ShipShield shieldScript = Ship.GetComponent <ShipShield>(); shieldScript.SpawnShield = false; break; } }
public void SetFields() { byte[] binaryDocument = null; // LoadSettings must be adjusted to load the MS Word fields TXTextControl.LoadSettings ls = new LoadSettings(); ls.ApplicationFieldFormat = ApplicationFieldFormat.MSWord; // save the document to the variable textControl1.Save(out binaryDocument, BinaryStreamType.InternalUnicodeFormat); // create a ServerTextControl instance to convert the checkboxes using( TXTextControl.ServerTextControl serverTextControl = new ServerTextControl() ) { serverTextControl.Create(); // load the document from the variable serverTextControl.Load(binaryDocument, TXTextControl.BinaryStreamType.InternalUnicodeFormat, ls); // loop through all fields to activate the checkbox fields foreach (TXTextControl.ApplicationField appfield in serverTextControl.ApplicationFields) { if ((appfield.TypeName == "FORMCHECKBOX")) { // create a new adapter field FormCheckBox ChkBoxField = new FormCheckBox(appfield); // select the field to change the font name serverTextControl.Select(ChkBoxField.Start - 1, ChkBoxField.Length); serverTextControl.Selection.FontName = "Arial Unicode MS"; // set the text (state) if (ChkBoxField.Checked == true) ChkBoxField.Text = CHECKED; else ChkBoxField.Text = UNCHECKED; } } // save the document back to the variable serverTextControl.Save(out binaryDocument, BinaryStreamType.InternalUnicodeFormat); // load the document back into the TextControl to show it to the user textControl1.Load(binaryDocument, BinaryStreamType.InternalUnicodeFormat, ls); } }
public void ShouldBeProperlyInitialized() { // Act var sut = new LoadSettings(); // Assert using (new AssertionScope()) { sut.BlockLocalFileAccess.Should().BeNull(); sut.Cookies.Should().BeNull(); sut.CustomHeaders.Should().BeNull(); sut.DebugJavascript.Should().BeNull(); sut.JSDelay.Should().BeNull(); sut.LoadErrorHandling.Should().BeNull(); sut.Password.Should().BeNull(); sut.Proxy.Should().BeNull(); sut.RepeatCustomHeaders.Should().BeNull(); sut.StopSlowScript.Should().BeNull(); sut.Username.Should().BeNull(); sut.ZoomFactor.Should().BeNull(); } }
void StartingPowerup() { //get game manager GameObject gameManager = GameObject.Find("GameManager"); LoadSettings script = gameManager.GetComponent <LoadSettings> (); // get powerups GameObject powerUps = GameObject.Find("PowerUps"); PowerUpCollide powerScript = powerUps.GetComponent <PowerUpCollide>(); switch (script.shipNumber) { case 1: Debug.Log("Start with double shot"); powerScript.Power2(); break; case 2: Debug.Log("Start with Shield"); powerScript.Power3(); break; } }
public static SimpleLoadResponse ExecuteLoad(LoadSettings loadSettings, Order2 waitingPaidOrder) { //1. Generate crypto values: CardSettings settings = CryptoHelper.GetRandomSettings(); //2. Fill letter: string errorMessage = HtmlDocumentCreator.ModifyHtmlFile(settings, waitingPaidOrder); if (errorMessage != null) { lastLoaded = null; return(new SimpleLoadResponse { ErrorMessage = errorMessage }); } //3. Send to printer: //Happens automatically in main window on ExecuteLoad success. //4. Email requires pre-known address... type-able to begin with? Will consider... it IS a lot to insert bits and send an email. //TODO //5. Insert variables into card image file: errorMessage = CardFileCreator.ModifyCardFile(settings, loadSettings); if (errorMessage != null) { lastLoaded = null; return(new SimpleLoadResponse { ErrorMessage = errorMessage }); } //6. Load card: errorMessage = CardLoader.LoadCard(loadSettings); if (errorMessage != null) { lastLoaded = null; return(new SimpleLoadResponse { ErrorMessage = errorMessage }); } //7 Delete the generated card settings file containing the private key: errorMessage = CardLoader.DeleteCardFile(CardFileCreator.outputPath); if (errorMessage != null) { lastLoaded = null; return(new SimpleLoadResponse { ErrorMessage = errorMessage }); } //8. Save order to simple database. if (!loadSettings.TestSettings) { OrderDB db = new OrderDB(); Order2 order = new Order2 { OrderNumber = settings.OrderNumber, Password = settings.aesPassword, Address = settings.AddressString, WebOrder = false }; db.SaveOrder(order); lastLoaded = order; } return(new SimpleLoadResponse { Success = true, ErrorMessage = null }); }
/// <summary> /// Returns error message or null at success. /// </summary> public static string ModifyCardFile(CardSettings settings, LoadSettings loadSettings) { if (loadSettings.TestSettings) { try { File.Copy(settingsPathTest, outputPath, true); } catch (Exception ex) { return("Failed to copy test settings for test load. Ex.: " + ex.Message + " " + ex.StackTrace); } } else { byte[] file = File.ReadAllBytes(settingsPath); string fileString = Encoding.UTF8.GetString(file); string errorMsg = null; errorMsg = InsertString(out fileString, fileString, settings.DisplayKeyAndVignereTable, "DisplayKey"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.PinValue, "Pin"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.PrivateKey, "PrivateKey"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.PublicKey, "PublicKey"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.PublicKeyHash160, "PublicKeyHash160"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.PukValue, "Puk"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, settings.AddressString, "Address"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, loadSettings.CardFee, "CardFee"); if (errorMsg != null) { return(errorMsg); } errorMsg = InsertString(out fileString, fileString, loadSettings.ExpireFee ? "183" : "0", "ExpireUsageTimes"); if (errorMsg != null) { return(errorMsg); } file = Encoding.UTF8.GetBytes(fileString); FileStream fileStream = new FileStream(outputPath, FileMode.Create); fileStream.Write(file, 0, file.Length); fileStream.SetLength(file.Length); fileStream.Flush(true); fileStream.Close(); } return(null); }
/// <summary> /// Loads a routing network created from OSM data. /// </summary> public static void LoadOsmDataAndShortcuts(this RouterDb db, OsmStreamSource source, LoadSettings settings, params Itinero.Profiles.Vehicle[] vehicles) { if (!db.IsEmpty) { throw new ArgumentException( "Can only load a new routing network into an empty router db, add multiple streams at once to load multiple files."); } if (vehicles == null || vehicles.Length == 0) { throw new ArgumentNullException("vehicles", "A least one vehicle is needed to load OSM data."); } if (settings == null) { settings = new LoadSettings(); } // merge sources if needed. var progress = new OsmStreamFilterProgress(); progress.RegisterSource(source); source = progress; // make sure the routerdb can handle multiple edges. db.Network.GeometricGraph.Graph.MarkAsMulti(); // load the data. var target = new RouterDbStreamTarget(db, vehicles, settings.AllCore, processRestrictions: settings.ProcessRestrictions, processors: settings.Processors, simplifyEpsilonInMeter: settings.NetworkSimplificationEpsilon); target.KeepNodeIds = settings.KeepNodeIds; target.KeepWayIds = settings.KeepWayIds; target.RegisterSource(source); target.Pull(); foreach (var profile in db.GetSupportedProfiles()) { db.AddIslandData(profile); } foreach (var vehicleType in db.GetRestrictedVehicleTypes().ToList()) { db.RemoveRestrictions(vehicleType); } db.Sort(); // // optimize the network. db.RemoveDuplicateEdges(); // db.SplitLongEdges(); db.ConvertToSimple(); AddVelo(db); // // optimize the network if requested. // if (settings.NetworkSimplificationEpsilon > 0) // { // db.OptimizeNetwork(settings.NetworkSimplificationEpsilon); // } // // compress the network. // db.Compress(); }
private void HandleLoadSettings(LoadSettings msg) { _settingsActor.Tell(new SettingsActor.LoadSettingsRequest(), Self); }
/*---------------------------------------------------------------- ** Form Load event **--------------------------------------------------------------*/ private void frmFieldMapping_Load(object sender, EventArgs e) { bLoaded = true; // fill the combo box with available tables foreach (DataTable dt in m_datasource.Tables) { comboBox1.Items.Add(dt); } comboBox1.DisplayMember = "TableName"; if (comboBox1.Items.Count != 0) comboBox1.SelectedIndex = 1; // load the template into TX Text Control TXTextControl.LoadSettings ls = new LoadSettings(); ls.ApplicationFieldFormat = ApplicationFieldFormat.MSWord; textControl1.Load(m_template, templateStreamType, ls); FitToWindow(); FillApplicationFieldList(); EnableNavigateButtons(); }
public SimpleLoadResponse LoadClick(LoadSettings loadSettings) { //Pass call to model: return(SimpleRandomLoader.ExecuteLoad(loadSettings, waitingPaidOrder)); }
public Settings RegisterFile(string filename, bool save, LoadSettings readFunction) { var newSettings = new Settings { Filename = filename, CurrentGroup = "", SettingsDictionary = new Dictionary<string, Dictionary<string, string>>(), Save = save, LoadSettings = readFunction }; SettingsFiles.Add(newSettings); return newSettings; }