Beispiel #1
0
        public frmCR2WDocument(CR2WDocumentViewModel documentViewModel)
        {
            vm = documentViewModel;
            vm.ClosingRequest  += (sender, e) => this.Close();
            vm.ActivateRequest += (sender, e) => this.Activate();
            vm.PropertyChanged += ViewModel_PropertyChanged;

            InitializeComponent();
            ApplyCustomTheme();

            chunkList = new frmChunkList(vm)
            {
                DockAreas = DockAreas.Document
            };
            propertyWindow = new frmChunkProperties(vm);

            backgroundWorker1.WorkerReportsProgress      = true;
            backgroundWorker1.WorkerSupportsCancellation = true;
            backgroundWorker1.DoWork             += backgroundWorker1_DoWork;
            backgroundWorker1.ProgressChanged    += backgroundWorker1_ProgressChanged;
            backgroundWorker1.RunWorkerCompleted += backgroundWorker1_RunWorkerCompleted;

            m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);

            docLoggerService = new LoggerService();
            docLoggerService.PropertyChanged += LoggerUpdated;
            docLoggerService.OnStringLogged  += (sender, e) => MainController.LogString(e.Message, e.Logtype);
        }
Beispiel #2
0
        public frmCR2WDocument()
        {
            InitializeComponent();

            try
            {
                dockPanel.LoadFromXml(
                    Path.Combine(Path.GetDirectoryName(Configuration.ConfigurationPath), "cr2wdocument_layout.xml"),
                    DeserializeDockContent);
            }
            catch { }
            ApplyCustomTheme();

            chunkList = new frmChunkList
            {
                File      = File,
                DockAreas = DockAreas.Document
            };
            chunkList.Show(dockPanel, DockState.Document);
            chunkList.OnSelectChunk += frmCR2WDocument_OnSelectChunk;
            propertyWindow           = new frmChunkProperties();
            propertyWindow.Show(dockPanel, DockState.DockBottom);
            propertyWindow.OnItemsChanged += PropertyWindow_OnItemsChanged;

            chunkList.Activate();
        }