예제 #1
0
 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);
     }
 }
예제 #2
0
 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);
 }
예제 #3
0
        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();
        }
예제 #4
0
 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;
 }
예제 #5
0
 public ColorChanger(MainWindowSettings aWindowSettings)
 {
     windowSettings = aWindowSettings;
 }
예제 #6
0
        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
        }