Exemple #1
0
        public DiffWindow(string left, string right)
        {
            Data              = new DiffData();
            Data.DiffsLoaded += Data_DiffsLoaded;

            InitializeComponent();

            if (!string.IsNullOrEmpty(left))
            {
                OpenLeftPackage(left);
            }

            if (!string.IsNullOrEmpty(right))
            {
                OpenRightPackage(right);
            }

            IconManager = new IconManager();

#if DEBUG
            menuMain.Items.Add(FindResource("debugMenu"));
#endif
        }
Exemple #2
0
        public MainWindow(string file, WebViewHost webViewHost)
        {
            InitializeComponent();

            UpdateListViewAndMenus(ListViewState.Default);
            IconManager = new IconManager();

            Unloaded   += MainWindow_Unloaded;
            WebViewHost = webViewHost ?? throw new ArgumentNullException(nameof(webViewHost));
            Data        = new Data();
            DataContext = Data;

            Data.Settings.EditorReadOnlyModeChanged += Data_EditorReadOnlyModeChanged;
            Data.Settings.EditorDarkModeChanged     += Data_EditorDarkModeChanged;

#if DEBUG
            menuMain.Items.Add(FindResource("debugMenu"));
#endif

            if (file != null)
            {
                OpenPackage(file);
            }
        }