コード例 #1
0
        public void Initialize(ISharpControl control)
        {
            _frontEndControl = new FrontEndControl(control);
            _basicProcessor = new BasicProcessor(control, _frontEndControl);
            _settingsControl = new SettingsControl(control, _basicProcessor);

            control.RegisterStreamHook(_basicProcessor, Radio.ProcessorType.FilteredAudioOutput);
            control.RegisterFrontControl(_frontEndControl, PluginPosition.Bottom);

            _basicProcessor.Enabled = true;
        }
コード例 #2
0
ファイル: C64BasicRewriterTests.cs プロジェクト: Seabreg/reko
 public void Setup()
 {
     lines    = new SortedList <ushort, C64BasicInstruction>();
     arch     = new C64Basic(lines);
     arch6502 = new Mos6502ProcessorArchitecture("m6502");
     m        = new BasicProcessor(lines);
     host     = new Mock <RewriterTestBase.RewriterHost>(arch)
     {
         CallBase = true
     };
     host.Setup(h => h.GetArchitecture("m6502"))
     .Returns(arch6502);
 }
コード例 #3
0
 public void Setup()
 {
     lines    = new SortedList <ushort, C64BasicInstruction>();
     arch     = new C64Basic(lines);
     arch6502 = new Mos6502ProcessorArchitecture("m6502");
     m        = new BasicProcessor(lines);
     host     = new Mock <RewriterTestBase.RewriterHost>(arch)
     {
         CallBase = true
     };
     host.Setup(h => h.GetArchitecture("m6502"))
     .Returns(arch6502);
     base.Given_MemoryArea(new MemoryArea(Address.Ptr16(0x10), new byte[10]));
 }
コード例 #4
0
 public void Setup()
 {
     lines    = new SortedList <ushort, C64BasicInstruction>();
     sc       = CreateServiceContainer();
     arch     = new C64Basic(sc, "c64", new Dictionary <string, object>());
     arch6502 = new Mos6502Architecture(sc, "m6502", new Dictionary <string, object>());
     m        = new BasicProcessor(lines);
     host     = new Mock <RewriterHost>(arch)
     {
         CallBase = true
     };
     host.Setup(h => h.GetArchitecture("m6502"))
     .Returns(arch6502);
     base.Given_MemoryArea(new ByteMemoryArea(Address.Ptr16(0x800), new byte[10]));
 }
コード例 #5
0
 public void Setup()
 {
     lines = new SortedList<ushort, C64BasicInstruction>();
     arch = new C64Basic(lines);
     m = new BasicProcessor(lines);
 }
コード例 #6
0
ファイル: Configuration.cs プロジェクト: EngineersPoint/nslim
        public Copyable GetItem(string typeName)
        {
            Type type = new BasicProcessor().Parse <RuntimeType>(typeName).Type;

            return(GetItem(type));
        }
コード例 #7
0
 public void Setup()
 {
     lines = new SortedList <ushort, C64BasicInstruction>();
     arch  = new C64Basic(lines);
     m     = new BasicProcessor(lines);
 }
コード例 #8
0
ファイル: ProcessorTest.cs プロジェクト: skolima/fitsharp
 [SetUp] public void SetUp()
 {
     processor = new BasicProcessor();
 }
コード例 #9
0
        private void ProcessRequest()
        {
            try
            {
                while (true)
                {
                    int            protocalType     = mSocketTalker.ReceiveInt();
                    BasicProcessor requestProcessor = null;
                    switch (protocalType)
                    {
                    case ProtocolTypes.TYPE_LIST_CONTENTS:
                        requestProcessor = new ListContentsProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_LIST_ALL_FILES:
                        requestProcessor = new ListAllFilesProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_LIST_ALL_DIRECTORIES:
                        requestProcessor = new ListAllDirectoriesProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_DELETE_CONTENTS:
                        requestProcessor = new DeleteContentsProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_RENAME_CONTENT:
                        requestProcessor = new RenameContentProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_CREATE_DIRECTORY:
                        requestProcessor = new CreateDirectoryProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_START_PROCESS:
                        requestProcessor = new StartProcessProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_GET_CONTENT_INFO:
                        requestProcessor = new GetContentInfoProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_MOVE_CONTENTS:
                        requestProcessor = new MoveContentsProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_COPY_CONTENTS:
                        requestProcessor = new CopyContentsProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_GET_CONTENT:
                        requestProcessor = new GetContentProcessor(mSocketTalker);
                        break;

                    case ProtocolTypes.TYPE_PUT_CONTENT:
                        requestProcessor = new PutContentProcessor(mSocketTalker);
                        break;

                    default:
                        throw new Exception("Invalid requested protocol type.");
                    }
                    requestProcessor.ProcessRequest();

                    if (requestProcessor.CanProcessNextRequest)
                    {
                        continue;
                    }
                    else
                    {
                        break;
                    }
                }
            }
            catch
            {
            }
            finally
            {
                Close();
            }
        }
コード例 #10
0
        public SettingsControl(ISharpControl control, BasicProcessor processor)
        {
            InitializeComponent();

            // processor can be used to update its parameters according to user changes on this control
        }