Esempio n. 1
0
        public MainForm()
        {
            MetroSkinManager.SetManagerOwner(this);
            MetroSkinManager.ApplyMetroStyle(this);
            Load        += new EventHandler(MainForm_Load);
            FormClosing += new FormClosingEventHandler(MainForm_FormClosing);
            Activated   += new EventHandler(MainForm_Activated);
            Deactivate  += new EventHandler(MainForm_Deactivate);
            Padding      = new Padding(1, 0, 1, 20);
            Size         = new Size(800, 600);
            RefreshAppTitle();

            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                PropertyEditorsManager.Instance.RegisterPropertyEditorsFromAssembly(assembly);
            }

            m_projectFileSystemWatcher = new FileSystemWatcher();
            m_projectFileSystemWatcher.IncludeSubdirectories = true;
            m_projectFileSystemWatcher.NotifyFilter          = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
            m_projectFileSystemWatcher.Changed += new FileSystemEventHandler(m_fileSystemWatcher_Changed);
            m_projectFileSystemWatcher.Created += new FileSystemEventHandler(m_fileSystemWatcher_Created);
            m_projectFileSystemWatcher.Deleted += new FileSystemEventHandler(m_fileSystemWatcher_Deleted);
            m_projectFileSystemWatcher.Renamed += new RenamedEventHandler(m_fileSystemWatcher_Renamed);

            m_sdkFileSystemWatcher = new FileSystemWatcher();
            m_sdkFileSystemWatcher.IncludeSubdirectories = true;
            m_sdkFileSystemWatcher.NotifyFilter          = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
            m_sdkFileSystemWatcher.Changed += new FileSystemEventHandler(m_fileSystemWatcher_Changed);
            m_sdkFileSystemWatcher.Created += new FileSystemEventHandler(m_fileSystemWatcher_Created);
            m_sdkFileSystemWatcher.Deleted += new FileSystemEventHandler(m_fileSystemWatcher_Deleted);
            m_sdkFileSystemWatcher.Renamed += new RenamedEventHandler(m_fileSystemWatcher_Renamed);

            m_workingProcessOverlay         = new WorkingProcessOverlay();
            m_workingProcessOverlay.Dock    = DockStyle.Fill;
            m_workingProcessOverlay.Visible = false;
            Controls.Add(m_workingProcessOverlay);

            InitializeMainPanel();
        }