public PetSCIITable(StudioCore Core) { this.Core = Core; DocumentInfo.UndoManager.MainForm = Core.MainForm; InitializeComponent(); GR.Image.DPIHandler.ResizeControlsForDPI(this); _DefaultFont = new System.Drawing.Font(listPETSCII.Font.FontFamily, listPETSCII.Font.Size * 96.0f / DPIHandler.DPIY, listPETSCII.Font.Style); listPETSCII.ItemWidth = (int)(80 * GR.Image.DPIHandler.DPIX / 96.0f); listPETSCII.ItemHeight = (int)(40 * GR.Image.DPIHandler.DPIY / 96.0f); listPETSCII.SetDisplaySize(listPETSCII.ClientSize.Width, listPETSCII.ClientSize.Height); listPETSCII.DisplayPage.Create(120, 120, GR.Drawing.PixelFormat.Format24bppRgb); listPETSCII.PixelFormat = GR.Drawing.PixelFormat.Format24bppRgb; listPETSCII.Font = new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], Core.Settings.SourceFontSize, Core.Settings.SourceFontStyle); foreach (Types.C64Character character in ConstantData.PetSCIIToChar.Values) { if (character.HasChar) { listPETSCII.Items.Add(CreateItem(character)); } } }
public Disassembler(StudioCore Core) { this.Core = Core; DocumentInfo.Type = ProjectElement.ElementType.DISASSEMBLER; DocumentInfo.UndoManager.MainForm = Core.MainForm; string opCodes = @"\b(lda|sta|ldy|sty|ldx|stx|rts|jmp|jsr|rti|sei|cli|asl|lsr|inc|dec|inx|dex|iny|dey|cpx|cpy|cmp|bit|bne|beq|bcc|bcs|bpl|bmi|adc|sec|clc|sbc|tax|tay|tya|txa|pha|pla|eor|and|ora|ror|rol|php|plp|clv|cld|bvc|bvs|brk|nop|txs|tsx|slo|rla|sre|rra|sax|lax|dcp|isc|anc|alr|arr|xaa|axs|ahx|shy|shx|tas|las|sed)\b"; string pseudoOps = @"(!byte|!by|!basic|!8|!08|!word|!wo|!16|!text|!tx|!scr|!pet|!raw|!pseudopc|!realpc|!bank|!convtab|!ct|!binary|!bin|!bi|!source|!src|!to|!zone|!zn|!error|!serious|!warn|" + @"!message|!ifdef|!ifndef|!if|!fill|!fi|!align|!endoffile|!nowarn|!for|!end|!macro|!trace|!media|!mediasrc|!sl|!cpu|!set)\b"; m_TextRegExp[(int)Types.ColorableElement.LITERAL_NUMBER] = new System.Text.RegularExpressions.Regex(@"\b\d+[\.]?\d*([eE]\-?\d+)?[lLdDfF]?\b|\B\$[a-fA-F\d]+\b|\b0x[a-fA-F\d]+\b"); m_TextRegExp[(int)Types.ColorableElement.LITERAL_STRING] = new System.Text.RegularExpressions.Regex(@"""""|''|"".*?[^\\]""|'.*?[^\\]'"); m_TextRegExp[(int)Types.ColorableElement.CODE] = new System.Text.RegularExpressions.Regex(opCodes, System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Compiled); m_TextRegExp[(int)Types.ColorableElement.PSEUDO_OP] = new System.Text.RegularExpressions.Regex(pseudoOps, System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Compiled); m_TextRegExp[(int)Types.ColorableElement.LABEL] = new System.Text.RegularExpressions.Regex(@"[+\-a-zA-Z]+[a-zA-Z_\d]*[:]*"); m_TextRegExp[(int)Types.ColorableElement.COMMENT] = new System.Text.RegularExpressions.Regex(@";.*"); InitializeComponent(); GR.Image.DPIHandler.ResizeControlsForDPI(this); editDisassembly.TextChanged += new EventHandler <FastColoredTextBoxNS.TextChangedEventArgs>(editDisassembly_TextChanged); RefreshDisplayOptions(); }
public DlgPaletteEditor(StudioCore Core, ColorSettings Colors) { PaletteMapping = new List <int>(); OriginalOrder = new List <Palette>(); this.Colors = new ColorSettings(Colors); this.Core = Core; InitializeComponent(); int palIndex = 0; foreach (var pal in this.Colors.Palettes) { paletteList.Items.Add(new ArrangedItemEntry() { Text = pal.Name, Tag = pal }); OriginalOrder.Add(pal); PaletteMapping.Add(palIndex); ++palIndex; } for (int i = 0; i < Colors.Palette.NumColors; ++i) { listPalette.Items.Add(Colors.Palette.Colors[i]); } listPalette.SelectedIndex = 0; Core.Theming.ApplyTheme(this); }
public FileManager(StudioCore Core, string Filename) { m_Filename = Filename; m_IsSaveable = true; this.Core = Core; DocumentInfo.UndoManager.MainForm = Core.MainForm; DocumentInfo.Type = ProjectElement.ElementType.MEDIA_MANAGER; InitializeComponent(); oldFont = listFiles.Font; listFiles.ItemFonts.Add(new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], 16, System.Drawing.GraphicsUnit.Pixel)); statusFileManager.Font = new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], 8, System.Drawing.GraphicsUnit.Pixel); labelMediaTitle.Font = statusFileManager.Font; GR.Image.DPIHandler.ResizeControlsForDPI(this); if (Filename.Length > 0) { LoadMediaFile(); } RefreshFileView(); UpdateStatusInfo(); }
public Help(StudioCore Core) { this.Core = Core; HideOnClose = true; InitializeComponent(); webBrowser.ScriptErrorsSuppressed = true; try { #if DEBUG string helpDocPath = @"..\..\..\..\Doc\main.html"; #else string helpDocPath = @"Doc\main.html"; #endif string fullPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Application.ExecutablePath), helpDocPath); Core.AddToOutput("Help Path: " + fullPath); webBrowser.Navigate(fullPath); } catch (Exception ex) { Debug.Log("Got exception: " + ex.ToString()); Core.AddToOutput("Help exception: " + ex.ToString()); } webBrowser.CanGoBackChanged += new EventHandler(webBrowser_CanGoBackChanged); webBrowser.CanGoForwardChanged += new EventHandler(webBrowser_CanGoForwardChanged); toolStripBtnForward.Enabled = webBrowser.CanGoForward; toolStripBtnBack.Enabled = webBrowser.CanGoBack; }
public FormAppMode(StudioCore Core) { this.Core = Core; InitializeComponent(); Core.Theming.ApplyTheme(this); }
public DebugMemory(StudioCore Core) { InitializeComponent(); this.Core = Core; GR.Image.DPIHandler.ResizeControlsForDPI(this); Core.Debugging.MemoryViews.Add(this); SetHexData(Core.Debugging.ActiveMemory.RAM); hexView.SelectedByteProvider = new DynamicByteSelectionProvider(65536); hexView.ViewScrolled += new EventHandler(hexView_ViewScrolled); hexView.ContextMenuStrip.Items.Add("-"); m_MenuItemHexStringView = new ToolStripMenuItem("Set to String View"); m_MenuItemHexStringView.Click += btnBinaryStringView_Click; m_MenuItemHexStringView.Checked = true; hexView.ContextMenuStrip.Items.Add(m_MenuItemHexStringView); m_MenuItemHexCharView = new ToolStripMenuItem("Set to Character View"); m_MenuItemHexCharView.Click += btnBinaryCharView_Click; hexView.ContextMenuStrip.Items.Add(m_MenuItemHexCharView); m_MenuItemHexSpriteView = new ToolStripMenuItem("Set to Sprite View"); m_MenuItemHexSpriteView.Click += btnBinarySpriteView_Click; hexView.ContextMenuStrip.Items.Add(m_MenuItemHexSpriteView); SetMemoryDisplayType(); ViewScrolled += new DebugMemory.DebugMemoryEventCallback(Core.MainForm.m_DebugMemory_ViewScrolled); }
public ImportSpriteFromBASICDATA(StudioCore Core) : base(Core) { InitializeComponent(); editInput.Font = new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], 16, System.Drawing.GraphicsUnit.Pixel); }
public FormWizard(StudioCore Core) { InitializeComponent(); btnOK.Enabled = false; Core.Theming.ApplyTheme(this); }
public BinaryDisplay(StudioCore Core, GR.Memory.ByteBuffer WorkData, bool AllowEditing, bool FixedWidth) { this.Core = Core; DocumentInfo.UndoManager.MainForm = Core.MainForm; InitializeComponent(); DPIHandler.ResizeControlsForDPI(this); if (WorkData == null) { SetHexData(new GR.Memory.ByteBuffer()); } else { SetHexData(WorkData); } this.AllowEditing = AllowEditing; this.FixedWidth = FixedWidth; hexView.ByteProvider.Changed += new EventHandler(ByteProvider_Changed); // modify context menu hexView.ContextMenuStrip.Items.Add("-"); m_MenuItemChangeOffset = new ToolStripMenuItem("Offset Displayed Address"); m_MenuItemChangeOffset.Click += OnMenuItemChangeOffsetClick; hexView.ContextMenuStrip.Items.Add(m_MenuItemChangeOffset); }
public FormRenameFile(StudioCore Core, GR.Memory.ByteBuffer OrigFilename) { this.Core = Core; Filename = new GR.Memory.ByteBuffer(OrigFilename); InitializeComponent(); editFilename.Text = Util.FilenameToUnicode(OrigFilename); editFilename.Font = new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], 16, System.Drawing.GraphicsUnit.Pixel); _DefaultFont = listPETSCII.Font; listPETSCII.ItemWidth = 80; listPETSCII.ItemHeight = 40; listPETSCII.SetDisplaySize(listPETSCII.ClientSize.Width, listPETSCII.ClientSize.Height); listPETSCII.DisplayPage.Create(120, 120, GR.Drawing.PixelFormat.Format24bppRgb); listPETSCII.PixelFormat = GR.Drawing.PixelFormat.Format24bppRgb; listPETSCII.Font = new System.Drawing.Font(Core.MainForm.m_FontC64.Families[0], Core.Settings.SourceFontSize, Core.Settings.SourceFontStyle); foreach (Types.C64Character character in ConstantData.PetSCIIToChar.Values) { if (character.HasChar) { listPETSCII.Items.Add(CreateItem(character)); } } Core.Theming.ApplyTheme(this); }
public FormFilesChanged(DocumentInfo Document, StudioCore Core) { ChangedDocuments.Add(Document); InitializeComponent(); Core.Theming.ApplyTheme(this); }
public FormMacros(StudioCore Core, DocumentInfo Doc, TextBox EditToInsert, bool ShowRunCommands) { InitializeComponent(); m_Doc = Doc; m_Edit = EditToInsert; this.Core = Core; InsertMacro("$(Filename)"); InsertMacro("$(File)"); InsertMacro("$(FilenameWithoutExtension)"); InsertMacro("$(FilePath)"); InsertMacro("$(BuildTargetPath)"); InsertMacro("$(BuildTargetFilename)"); InsertMacro("$(BuildTargetFilenameWithoutExtension)"); InsertMacro("$(BuildTargetFile)"); InsertMacro("$(BuildTargetFileWithoutExtension)"); if (ShowRunCommands) { InsertMacro("$(RunPath)"); InsertMacro("$(RunFilename)"); InsertMacro("$(RunFile)"); InsertMacro("$(RunFilenameWithoutExtension)"); } InsertMacro("$(DebugStartAddress)"); InsertMacro("$(DebugStartAddressHex)"); InsertMacro("$(ConfigName)"); InsertMacro("$(ProjectPath)"); InsertMacro("$(MediaManager)"); InsertMacro("$(MediaTool)"); }
public ValueTableEditor(StudioCore Core) { this.Core = Core; DocumentInfo.Type = ProjectElement.ElementType.VALUE_TABLE; DocumentInfo.UndoManager.MainForm = Core.MainForm; m_IsSaveable = true; InitializeComponent(); GR.Image.DPIHandler.ResizeControlsForDPI(this); pictureGraphPreview.DisplayPage.Create(pictureGraphPreview.ClientSize.Width, pictureGraphPreview.ClientSize.Height, GR.Drawing.PixelFormat.Format32bppArgb); checkExportToDataIncludeRes.Checked = true; checkExportToDataWrap.Checked = true; pictureGraphPreview.DisplayPage.Box(0, 0, pictureGraphPreview.DisplayPage.Width, pictureGraphPreview.DisplayPage.Height, (uint)System.Drawing.SystemColors.Window.ToArgb()); pictureGraphPreview.Invalidate(); // default values m_Project.ValueTable.StartValue = "0"; m_Project.ValueTable.StepValue = "1"; m_Project.ValueTable.Formula = "x*2"; m_Project.ValueTable.EndValue = "10"; RefreshDisplayOptions(); GenerateValues(); }
public ColorSettingsBase(StudioCore Core, ColorSettings Colors, int CustomColor) { this.Colors = new ColorSettings(Colors); this.Core = Core; this.CustomColor = CustomColor; InitializeComponent(); }
public FormDeltaValue(StudioCore Core) { InitializeComponent(); btnOK.Enabled = false; Delta = 0; Core.Theming.ApplyTheme(this); }
public ElementProperties(StudioCore Core, ProjectElement Element) { m_Element = Element; m_Core = Core; InitializeComponent(); AddElementTabs(); GR.Image.DPIHandler.ResizeControlsForDPI(this); Core.Theming.ApplyTheme(this); }
public FormAbout(StudioCore Core) { InitializeComponent(); labelInfo.Text = labelInfo.Text.Replace("<v>", StudioCore.StudioVersion); pictureBox1.Image = pictureBox1.Image.GetImageStretchedDPI(); pictureBox2.Image = pictureBox2.Image.GetImageStretchedDPI(); Core.Theming.ApplyTheme(this); }
public DlgInterleaveData(StudioCore Core, GR.Memory.ByteBuffer OrigData) { this.OrigData = new GR.Memory.ByteBuffer(OrigData); InitializeComponent(); SetHexData(hexOrig, OrigData); InterleavedData = new GR.Memory.ByteBuffer(OrigData); editInterleave.Text = "8"; Core.Theming.ApplyTheme(this); }
public FormProjectWizard(string ProjectName, StudioSettings Settings, StudioCore Core) { this.Settings = Settings; InitializeComponent(); editProjectName.Text = ProjectName; editBasePath.Text = Settings.DefaultProjectBasePath; btnOK.Enabled = false; UpdateSummary(); Core.Theming.ApplyTheme(this); }
public ImportCharsetFromDefault(StudioCore Core) : base(Core) { InitializeComponent(); comboImportFromDefault.Items.Add("C64 Uppercase"); comboImportFromDefault.Items.Add("C64 Lowercase"); comboImportFromDefault.Items.Add("VIC20 Uppercase"); comboImportFromDefault.Items.Add("VIC20 Lowercase"); comboImportFromDefault.SelectedIndex = 0; }
public FormRenumberBASIC(StudioCore Core, SourceBasicEx Basic, bool SymbolMode, int FirstLineNumber, int LastLineNumber) { m_Basic = Basic; m_Core = Core; m_SymbolMode = SymbolMode; InitializeComponent(); editStartLine.Text = "10"; editLineStep.Text = "10"; editFirstLineNumber.Text = FirstLineNumber.ToString(); editLastLineNumber.Text = LastLineNumber.ToString(); Core.Theming.ApplyTheme(this); }
public ColorSettingsHiRes(StudioCore Core, ColorSettings Colors, int CustomColor) : base(Core, Colors, CustomColor) { InitializeComponent(); for (int i = 0; i < Colors.Palette.NumColors; ++i) { comboCharColor.Items.Add(i.ToString("d2")); comboBackground.Items.Add(i.ToString("d2")); } comboBackground.SelectedIndex = Colors.BackgroundColor; comboCharColor.SelectedIndex = CustomColor; radioCharColor.Checked = true; }
public ExportCharscreenAsCharset(StudioCore Core) : base(Core) { InitializeComponent(); comboCharsetFiles.Items.Add(new Types.ComboItem("To new charset project")); foreach (BaseDocument doc in Core.MainForm.panelMain.Documents) { if (doc.DocumentInfo.Type == ProjectElement.ElementType.CHARACTER_SET) { string nameToUse = doc.DocumentFilename ?? "New File"; comboCharsetFiles.Items.Add(new Types.ComboItem(nameToUse, doc.DocumentInfo)); } } comboCharsetFiles.SelectedIndex = 0; Core.MainForm.ApplicationEvent += new MainForm.ApplicationEventHandler(MainForm_ApplicationEvent); }
public CharsetEditor(StudioCore Core) { this.Core = Core; DocumentInfo.Type = ProjectElement.ElementType.CHARACTER_SET; DocumentInfo.UndoManager.MainForm = Core.MainForm; m_IsSaveable = true; InitializeComponent(); characterEditor.Core = Core; GR.Image.DPIHandler.ResizeControlsForDPI(this); characterEditor.UndoManager = DocumentInfo.UndoManager; characterEditor.Core = Core; for (int i = 0; i < 256; ++i) { PaletteManager.ApplyPalette(m_Charset.Characters[i].Tile.Image); } comboExportRange.Items.Add("All"); comboExportRange.Items.Add("Selection"); comboExportRange.Items.Add("Range"); comboExportRange.SelectedIndex = 0; comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("as assembly", typeof(ExportCharsetAsAssembly))); comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("to binary file", typeof(ExportCharsetAsBinaryFile))); comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("to image file", typeof(ExportCharsetAsImageFile))); comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("to image (clipboard)", typeof(ExportCharsetAsImage))); comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("as BASIC DATA statements", typeof(ExportCharsetAsBASICData))); comboExportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("as BASIC CHARDEF statements", typeof(ExportCharsetAsBASICChardef))); comboExportMethod.SelectedIndex = 0; m_DefaultOutputFont = editDataExport.Font; comboImportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("from character set/binary file", typeof(ImportCharsetFromBinaryFile))); comboImportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("from image file", typeof(ImportCharsetFromImageFile))); comboImportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("from assembly", typeof(ImportCharsetFromASM))); comboImportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("from BASIC DATA statements", typeof(ImportCharsetFromBASICDATA))); comboImportMethod.Items.Add(new GR.Generic.Tupel <string, Type>("set default character sets", typeof(ImportCharsetFromDefault))); comboImportMethod.SelectedIndex = 0; CreateDefaultUppercaseCharset(); Modified = false; }
public ColorSettingsVC20(StudioCore Core, ColorSettings Colors, int CustomColor) : base(Core, Colors, CustomColor) { InitializeComponent(); for (int i = 0; i < Colors.Palette.NumColors; ++i) { comboCharColor.Items.Add(i.ToString("d2")); comboBackground.Items.Add(i.ToString("d2")); comboMulticolor1.Items.Add(i.ToString("d2")); comboMulticolor2.Items.Add(i.ToString("d2")); } comboBackground.SelectedIndex = Colors.BackgroundColor; comboMulticolor1.SelectedIndex = Colors.MultiColor1; comboMulticolor2.SelectedIndex = Colors.MultiColor2; comboCharColor.SelectedIndex = CustomColor; radioCharColor.Checked = true; _CurrentColorType = ColorType.MULTICOLOR_2; }
public ExportCharsetAsBASIC(StudioCore Core) : base(Core) { InitializeComponent(); comboBasicFiles.Items.Add(new Types.ComboItem("To new file")); comboBasicFiles.Items.Add(new Types.ComboItem("To output")); foreach (BaseDocument doc in Core.MainForm.panelMain.Documents) { if (doc.DocumentInfo.Type == ProjectElement.ElementType.BASIC_SOURCE) { string nameToUse = doc.DocumentFilename ?? "New File"; comboBasicFiles.Items.Add(new Types.ComboItem(nameToUse, doc.DocumentInfo)); } } comboBasicFiles.SelectedIndex = 0; Core.MainForm.ApplicationEvent += new MainForm.ApplicationEventHandler(MainForm_ApplicationEvent); }
public ColorSettingsMCSprites(StudioCore Core, ColorSettings Colors, int CustomColor, bool MulticolorEnabled) : base(Core, Colors, CustomColor) { InitializeComponent(); for (int i = 0; i < Colors.Palette.NumColors; ++i) { comboCustomColor.Items.Add(i.ToString("d2")); comboBackground.Items.Add(i.ToString("d2")); comboMulticolor1.Items.Add(i.ToString("d2")); comboMulticolor2.Items.Add(i.ToString("d2")); } comboBackground.SelectedIndex = Colors.BackgroundColor; comboMulticolor1.SelectedIndex = Colors.MultiColor1; comboMulticolor2.SelectedIndex = Colors.MultiColor2; comboCustomColor.SelectedIndex = CustomColor; radioCustomColor.Checked = true; checkMulticolor.Checked = MulticolorEnabled; }
public ColorSettingsMega65(StudioCore Core, ColorSettings Colors, int CustomColor) : base(Core, Colors, CustomColor) { InitializeComponent(); for (int i = 0; i < Colors.Palette.NumColors; ++i) { comboCharColor.Items.Add(i.ToString("d2")); comboBackground.Items.Add(i.ToString("d2")); } comboBackground.SelectedIndex = Colors.BackgroundColor; comboCharColor.SelectedIndex = CustomColor; radioCharColor.Checked = true; foreach (var pal in Colors.Palettes) { comboActivePalette.Items.Add(pal.Name); } comboActivePalette.SelectedIndex = 0; }
public ProjectProperties(Project MyProject, ProjectSettings Settings, StudioCore Core) { m_Settings = Settings; m_Core = Core; m_Project = MyProject; InitializeComponent(); editProjectName.Text = m_Settings.Name; labelProjectFile.Text = MyProject.Settings.Filename; foreach (var configName in m_Settings.GetConfigurationNames()) { comboConfiguration.Items.Add(configName); } if (m_Settings.CurrentConfig == null) { m_Settings.CurrentConfig = m_Settings.GetConfigurations().First(); } comboConfiguration.SelectedItem = m_Settings.CurrentConfig.Name; Core.Theming.ApplyTheme(this); }