Exemplo n.º 1
0
        // Initializes MSec
        public bool initialize(MainDialog _handle)
        {
            // Local parameters
            TabControl tabCtrl = null;

            // Copy parameters
            m_mainDialog = _handle;

            // Try to load app configuration
            try
            {
                m_xmlDocument = XDocument.Load(APP_CONFIG_FILE);
            }
            catch (Exception _ex)
            {
                m_xmlDocument = null;
                MessageBox.Show(_ex.Message, "Error while parsin application configuration!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            // Get tab control handle
            tabCtrl = m_mainDialog.Controls.Find("MainDialog_MainTab", true)[0] as TabControl;

            // Create views
            m_viewImageVsImage    = new ViewImageVsImage(tabCtrl.TabPages["pageImageVsImage"]);
            m_viewCrossComparison = new ViewCrossComparison(tabCtrl.TabPages["pageCrossComparison"]);

            return(true);
        }
Exemplo n.º 2
0
        static void Main()
        {
            // Local variables
            MainDialog d = null;

            // Set settings
            Application.SetCompatibleTextRenderingDefault(false);


            // Create main dialog and initialize MSec
            d = new MainDialog();
            MSec.Instance.initialize(d);

            // Enable visual styles and run application
            Application.EnableVisualStyles();
            Application.Run(d);

            // Drop MSec
            MSec.Instance.drop();
        }