private void FillFlpColorsFromSettings(MainWindowSettings aSettings) { PosterizedColorData pcd; foreach (KeyValuePair<int, PosterizedColorData> pair in aSettings.dictColorData) { pcd = pair.Value; ColorPanel cp = new ColorPanel(pcd); flpColors.Controls.Add(cp); } }
public void SetLastSaveInfo(MainWindowSettings settings) { RegistryKey regKey = Registry.CurrentUser; regKey.OpenSubKey(@"Software/R2V"); if (regKey == null) { regKey.CreateSubKey(@"Software/R2V"); regKey.OpenSubKey(@"Software/R2V"); } regKey.SetValue("lastSave", settings.thisSettingsPath); }
public MainWindow() { InitializeComponent(); //pobieranie informacji o ostatnim savie MainWindowRegister reg = new MainWindowRegister(); lastSavePath = reg.GetLastSaveInfo(); RefreshLastSaveButton(); windowSettings = new MainWindowSettings(); windowSettings.dpScale = 1; ScaleRefresh(); //tymczasowo LoadLastSave(); }
public VectorImageCrooper(Size aPanelSize, MapFactory aMapFactory, int aCenterX, int aCenterY, MainWindowSettings aSettings) : base(aPanelSize, 0, 0) { mapFactory = aMapFactory; settings = aSettings; if (aMapFactory != null) { srcBmpWidth = aMapFactory.vectArr.Length; Debug.Assert(aMapFactory.vectArr[0] != null, "aMapFactory.vectArr[0] jest null"); srcBmpHeight = aMapFactory.vectArr[0].Length; } centerX = aCenterX; centerY = aCenterY; }
public ColorChanger(MainWindowSettings aWindowSettings) { windowSettings = aWindowSettings; }
private void SettingsToScr(MainWindowSettings aSettings) { maskedTextBox1.Text = aSettings.leftXCoord; maskedTextBox2.Text = aSettings.leftYCoord; maskedTextBox3.Text = aSettings.rightXCoord; maskedTextBox4.Text = aSettings.rightYCoord; ScaleRefresh(); if (sourceImageCropper != null) { sourceImageCropper.centerX = aSettings.centerX; sourceImageCropper.centerY = aSettings.centerY; DrawCroppedScaledImage(windowSettings.dpScale); //Dodać kod, który odczytaną mapę odpoweirdnio ustawi i wyświetli przy pomocy destinationImageCropper } SetScaleControlEnable(true); chkBoxTestOptions.ClearSelected(); if (aSettings.testOptions != "") foreach (string stIdx in aSettings.GetCheckegTestOptionsList()) { chkBoxTestOptions.SetItemCheckState( int.Parse(stIdx), CheckState.Checked); } string result = ""; foreach (int i in chkBoxTestOptions.CheckedIndices) { if (result != "") result += ","; result += i.ToString(); } windowSettings.testOptions = result; //center }