Пример #1
0
        private void DefaultTextEncComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DefaultTextScanMode item =
                (DefaultTextScanMode)defaultTextEncComboBox.SelectedItem;

            mWorkProps.AnalysisParams.DefaultTextScanMode = item.Mode;
            IsDirty = true;
        }
Пример #2
0
        /// <summary>
        /// Constructor.  Initial state is configured from an existing ProjectProperties object.
        /// </summary>
        /// <param name="owner">Parent window.</param>
        /// <param name="project">Project object.</param>
        /// <param name="projectDir">Project directory, if known.</param>
        /// <param name="formatter">Text formatter.</param>
        /// <param name="initialTab">Tab to open initially.  Pass "Unknown" for default.</param>
        public EditProjectProperties(Window owner, DisasmProject project, string projectDir,
                                     Formatter formatter, Tab initialTab)
        {
            InitializeComponent();
            Owner       = owner;
            DataContext = this;

            mWorkProps  = new ProjectProperties(project.ProjectProps);  // make a work copy
            mProjectDir = projectDir;
            mFormatter  = formatter;
            mInitialTab = initialTab;

            IsRelocDataAvailable = (project.RelocList.Count > 0);

            // Construct arrays used as item sources for combo boxes.
            CpuItems = new CpuItem[] {
                new CpuItem((string)FindResource("str_6502"), CpuDef.CpuType.Cpu6502),
                new CpuItem((string)FindResource("str_65C02"), CpuDef.CpuType.Cpu65C02),
                new CpuItem((string)FindResource("str_W65C02"), CpuDef.CpuType.CpuW65C02),
                new CpuItem((string)FindResource("str_65816"), CpuDef.CpuType.Cpu65816),
            };
            DefaultTextScanModeItems = new DefaultTextScanMode[] {
                new DefaultTextScanMode(Res.Strings.SCAN_LOW_ASCII,
                                        TextScanMode.LowAscii),
                new DefaultTextScanMode(Res.Strings.SCAN_LOW_HIGH_ASCII,
                                        TextScanMode.LowHighAscii),
                new DefaultTextScanMode(Res.Strings.SCAN_C64_PETSCII,
                                        TextScanMode.C64Petscii),
                new DefaultTextScanMode(Res.Strings.SCAN_C64_SCREEN_CODE,
                                        TextScanMode.C64ScreenCode),
            };
            MinCharsItems = new MinCharsItem[] {
                new MinCharsItem((string)FindResource("str_DisableStringScan"),
                                 DataAnalysis.MIN_CHARS_FOR_STRING_DISABLED),
                new MinCharsItem("3", 3),
                new MinCharsItem("4", 4),
                new MinCharsItem("5", 5),
                new MinCharsItem("6", 6),
                new MinCharsItem("7", 7),
                new MinCharsItem("8", 8),
                new MinCharsItem("9", 9),
                new MinCharsItem("10", 10),
            };
            AutoLabelItems = new AutoLabelItem[] {
                new AutoLabelItem((string)FindResource("str_AutoLabelSimple"),
                                  AutoLabel.Style.Simple),
                new AutoLabelItem((string)FindResource("str_AutoLabelAnnotated"),
                                  AutoLabel.Style.Annotated),
                new AutoLabelItem((string)FindResource("str_AutoLabelFullyAnnotated"),
                                  AutoLabel.Style.FullyAnnotated),
            };
        }