Beispiel #1
0
        /// <summary>
        /// Loads the current Docking Layout if exists, or creates the default layout.
        /// Generates all the Events that we need to watch for.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            m_deserializeDockContent = new DeserializeDockContent(GetDockContentFromPersistString);
            string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");

            if (File.Exists(configFile)) // Load DockingPanel Layout.
            {
                try
                {
                    DockingPanel.LoadFromXml(configFile, m_deserializeDockContent);
                }
                catch (Exception ex)
                {
                    if (ConsoleWindow != null)
                    {
                        ConsoleWindow.Log("Error: " + ex.Message);
                    }
                }
            }

            else // Create default layout.
            {
                ConsoleWindow.Show(DockingPanel, DockState.DockBottom);
                FileLoader.Show(DockingPanel, DockState.DockLeft);
                Histogram.Show(DockingPanel, DockState.DockLeft);
                Statistics.Show(DockingPanel, DockState.DockLeft);
                ModificationTypes.Show(DockingPanel, DockState.DockRight);
                ModificationProperties.Show(DockingPanel, DockState.DockRight);
                ImageDisplay.Show(DockingPanel, DockState.DockRight);
                CommandBox.Show(DockingPanel, DockState.DockBottom);
            }



            ImageDisplay.FormClosing           += ImageDisplay_FormClosing;
            ImageDisplay.MediaFailedToLoad     += ImageDisplay_MediaFailedToLoad;
            ImageDisplay.MediaLoaded           += ImageDisplay_MediaLoaded;
            ImageDisplay.MediaPixelColour      += ImageDisplay_MediaPixelColour;
            ImageDisplay.MediaPixelCoordinates += ImageDisplay_MediaPixelCoordinates;
            ImageDisplay.ImageDisplayLog       += ImageDisplay_ImageDisplayLog;
            Histogram.histogramLog             += Histogram_histogramStatus;
            Histogram.histogramCompleted       += Histogram_histogramCompleted;
            Statistics.StatisticsLog           += Statistics_StatisticsLog;
            FileLoader.ThumbnailSelected       += FileLoader_ThumbnailSelected;
            ModificationTypes.SusanSelected    += ModificationTypes_SusanSelected;
            ModificationTypes.HarrisSelected   += ModificationTypes_HarrisSelected;
            ModificationTypes.MoravecSelected  += ModificationTypes_MoravecSelected;
            ModificationTypes.FASTSelected     += ModificationTypes_FASTSelected;
            ModificationProperties.ModificationPropertiesLog += ModificationProperties_ModificationPropertiesLog;
            ModificationProperties.UpdateImage += ModificationProperties_UpdateImage;
            ModificationProperties.CurrentImage = CurrentImage;
        }
Beispiel #2
0
        private void btnStatistics_Click(object sender, EventArgs e)
        {
            pnMain.Controls.Clear();
            FrmStatistics frmStatistics = new FrmStatistics();

            frmStatistics.TopLevel = false;
            pnMain.Controls.Add(frmStatistics);
            frmStatistics.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frmStatistics.Dock            = DockStyle.Fill;
            frmStatistics.Show();
        }
Beispiel #3
0
 /// <summary>
 /// If the Statistics window is not displayed show it, Create and show if necessary
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void statisticsMenuItem_Click(object sender, EventArgs e)
 {
     if (Statistics != null && statisticsMenuItem.Checked == false)
     {
         statisticsMenuItem.Checked = true;
         Statistics.Show(DockingPanel, DockState.DockBottom);
     }
     else if (Statistics != null && statisticsMenuItem.Checked == true)
     {
         statisticsMenuItem.Checked = false;
         Statistics.Close();
     }
     else
     {
         Statistics = new FrmStatistics();
         statisticsMenuItem.Checked = true;
         Statistics.Show(DockingPanel, DockState.DockBottom);
     }
 }