public MainWindow()
        {
            InitializeComponent();
            mainContext                        = new MainContext();
            debugContext                       = new DebugContext();
            variableExportContext              = new VariableExportContext();
            this.DataContext                   = mainContext;
            DebugPanel.DataContext             = debugContext;
            this.Grid.ItemsSource              = debugContext.BossList;
            EntityDataPanel.DataContext        = debugContext;
            this.EntityStats.ItemsSource       = debugContext.EntityStatsListView;
            this.VariableExportTab.DataContext = variableExportContext;
            this.VariableExportTab.Initialise(debugContext, variableExportContext);
            BossEventDebug.DataContext = debugContext;
            rabiRibiDisplay            = new RabiRibiDisplay(mainContext, debugContext, variableExportContext, this);
            memoryThread = new Thread(() =>
            {
                while (true)
                {
                    try
                    {
                        ReadMemory();
                    }
                    catch (Exception e)
                    {
                        DebugLog(e.ToString());
                    }

                    Thread.Sleep(1000 / 60);
                }
            });
            memoryThread.IsBackground = true;
            memoryThread.Start();
        }
示例#2
0
 public RabiRibiDisplay(MainContext mainContext, DebugContext debugContext, VariableExportContext variableExportContext, MainWindow mainWindow)
 {
     this.rabiRibiState         = new RabiRibiState();
     this.mainContext           = mainContext;
     this.debugContext          = debugContext;
     this.variableExportContext = variableExportContext;
     this.mainWindow            = mainWindow;
     this.memoryReadCount       = 0;
     StartNewGame();
     ConfigureVariableExports();
 }
 public void Initialise(DebugContext debugContext, VariableExportContext variableExportContext)
 {
     this.debugContext          = debugContext;
     this.variableExportContext = variableExportContext;
     variableExportContext.SetItemControls(VariableListBox.Items, VariableExportListBox.Items);
 }