using ProximaAnalizer.Data;
using ProximaAnalizer.Helpers;
using ProximaAnalizer.ViewModels;
using ProximaAnalizer.ViewModels.DBInfoAlarmRegions;
using ProximaAnalizer.ViewModels.Dialog;
using ProximaAnalizer.Views;
using ProximaAnalizer.Views.DBInfoAlarmRegions;
using ProximaAnalizer.Views.Dialog;
using SqlSugarORM;
using System.Windows;

namespace ProximaAnalizer;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : PrismApplication
{
    protected override Window CreateShell()
    {
        return Container.Resolve<MainWindow>();
    }
    protected override void RegisterTypes(IContainerRegistry containerRegistry)
    {
        containerRegistry.RegisterForNavigation<Loading, LoadingViewModel>("Loading");
        containerRegistry.RegisterForNavigation<DBInfoTrace, DBInfoTraceViewModel>("DBInfoTrace");
        containerRegistry.RegisterForNavigation<DBInfoAlarm, DBInfoAlarmViewModel>("DBInfoAlarm");
        containerRegistry.RegisterForNavigation<AlarmData, AlarmDataViewModel>("AlarmData");
        containerRegistry.RegisterForNavigation<AlarmGasPanel, AlarmGasPanelViewModel>("AlarmGasPanel");

        containerRegistry.RegisterDialog<LinePicker, DialogPickerViewModel>("LinePicker");
        containerRegistry.RegisterDialog<TraceDataList, TraceDataListViewModel>("TraceData");
        containerRegistry.RegisterDialog<SingleTracePlot, SingleTracePlotViewModel>("SingleTrace");

        containerRegistry.RegisterSingleton<SqlSugarCustom>();
        containerRegistry.RegisterSingleton<TraceData>();
        containerRegistry.RegisterSingleton<LineCollection>();
        containerRegistry.RegisterSingleton<DBDataHelper>();
    }
}