コード例 #1
0
ファイル: MainForm.cs プロジェクト: tyranid/canape
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fileName">A file to open at startup</param>
        public MainForm(string fileName)
        {
            if (!Properties.Settings.Default.DontShowSplash)
            {
                using (AboutForm frm = new AboutForm(true))
                {
                    frm.ShowDialog();
                }
            }

            InitializeComponent();

            MainFormMenuExtensionManager.Instance.AddToMenu(menuStrip, extensionToolStripMenuItem, ExtensionMenuClicked);

            CANAPEServiceProvider.GlobalInstance.RegisterService(typeof(IDocumentControl), this);
            _projectExplorer = new ProjectExplorer();
            _fileName        = fileName;
            _entries         = new Dictionary <IDocumentObject, DockContent>();

            // Check for help file precense
            aPIHelpToolStripMenuItem.Enabled = File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Help", "CANAPE_Documentation.chm"));
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: michyer/canape
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fileName">A file to open at startup</param>
        public MainForm(string fileName)
        {
            if (!Properties.Settings.Default.DontShowSplash)
            {
                using (AboutForm frm = new AboutForm(true))
                {
                    frm.ShowDialog();
                }
            }

            InitializeComponent();

            MainFormMenuExtensionManager.Instance.AddToMenu(menuStrip, extensionToolStripMenuItem, ExtensionMenuClicked);

            CANAPEServiceProvider.GlobalInstance.RegisterService(typeof(IDocumentControl), this);
            _projectExplorer = new ProjectExplorer();
            _fileName = fileName;
            _entries = new Dictionary<IDocumentObject, DockContent>();

            // Check for help file precense
            aPIHelpToolStripMenuItem.Enabled = File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Help", "CANAPE_Documentation.chm"));
        }