Beispiel #1
0
        static void f_Closing(object sender, CancelEventArgs e)
        {
            //ToolStripManager.SaveSettings(ServiceHost.Window.MainForm);
            //ServiceHost.ToolBar.Save();

            IToolsService its = ServiceHost.Tools;

            if (its != null)
            {
                //(its as ToolsService).SaveView();
            }

            IProjectManagerService pms = ServiceHost.Project;

            if (pms != null)
            {
                pms.CloseAll();
            }

            IFileManagerService fms = ServiceHost.File;

            if (fms != null)
            {
                if (!fms.CloseAll())
                {
                    e.Cancel = true;
                    return;
                }
            }

            Application.Exit();
        }