public MainWindow()
        {
            //AfterbirthPlusTransformations.AllTransformations.ToList().ForEach(pair => {
            //    var trans = pair.Value;
            //    Console.WriteLine(trans.I18N);
            //    trans.Items.ForEach(item => {
            //        var scale = item.Scale.ToString("N", new CultureInfo("en-US"));
            //        var str = $"                new TransformationItem(\"{item.Tooltip}\", {item.Id}, {item.X - 32}, {item.Y - 32}, {scale}F),";
            //        Console.WriteLine(str);
            //    });
            //});

            var generalSettings = IsaacDashSerializer.Settings.GeneralSettings;

            Settings = generalSettings.MainWindow;

            InitializeComponent();

            Title = FormUtils.BuiltTitle("Kabalistus Isaac Tools", this);

            LoadSettings();

            TransformationTrackerElement = new TransformationTracker.TransformationTracker();
            CreateTab("tt", UnmoddedItemResource(145), "Transformation Tracker", TransformationTrackerElement, generalSettings.TransformationTracker);

            PillPoolElement = new PillPool.PillPool();
            CreateTab("pill", PillResource(1), "Pills", PillPoolElement, generalSettings.Pills);

            VoidedItemsElement = new VoidedItems.VoidedItems();
            CreateTab("void", UnmoddedItemResource(477), "Voided Items", VoidedItemsElement, generalSettings.VoidedItems);

            SmeltedTrinketsElement = new SmeltedTrinkets.SmeltedTrinkets();
            CreateTab("smelt", UnmoddedItemResource(479), "Smelted Trinkets", SmeltedTrinketsElement, generalSettings.SmeltedTrinkets);

            SoundFunElement = new SoundFun.SoundFun();
            CreateTab("sound", UnmoddedItemResource(4), "Sound Fun", SoundFunElement, generalSettings.SoundFun);

            CreateBindings();

            var reader = new AfterbirthPlusIsaacReader();

            MemoryReader.Init((status) => {
                _statusBarModel.Status = status.Message;
                ModdedHelper.Update(status, reader);
                SmeltedTrinketsElement.Update(status, reader);
                SoundFunElement.Update(status, reader);
                TransformationTrackerElement.Update(status);
                PillPoolElement.Update(status, reader);
                VoidedItemsElement.Update(status, reader);
            });
        }
Esempio n. 2
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            _mainForm = new MainForm();

            MemoryReader.Init((status) => {
                FormUtils.SetStatusAsync(status, _mainForm.statusLabel, _mainForm);
                _mainForm.UpdateTransformationsView();
            });

            Application.Run(_mainForm);
        }
        public MainWindow()
        {
            InitializeComponent();
            Title = FormUtils.BuiltTitle("Isaac Sound Fun", this);

            CreateBindings();
            LoadSave();
            StartPooling();

            var reader = new AfterbirthPlusIsaacReader();

            MemoryReader.Init((status) => {
                _statusBarModel.Status = status.Message;
                Update(status, reader);
            }, 500);
        }