コード例 #1
0
        static void OnProjectCompiled(object s, BuildEventArgs args)
        {
            if (args.Success)
            {
                // Unload stetic projects which are not currently
                // being used by the IDE. This will avoid unnecessary updates.
                if (IdeApp.Workspace.IsOpen)
                {
                    foreach (Project prj in IdeApp.Workspace.GetAllProjects())
                    {
                        GtkDesignInfo info = GtkDesignInfo.FromProject(prj);
                        if (!HasOpenDesigners(prj, false))
                        {
                            info.ReloadGuiBuilderProject();
                        }
                    }
                }

                SteticApp.UpdateWidgetLibraries(false);
            }
            else
            {
                // Some gtk# packages don't include the .pc file unless you install gtk-sharp-devel
                if (Runtime.SystemAssemblyService.DefaultAssemblyContext.GetPackage("gtk-sharp-2.0") == null)
                {
                    string msg = GettextCatalog.GetString("ERROR: MonoDevelop could not find the Gtk# 2.0 development package. Compilation of projects depending on Gtk# libraries will fail. You may need to install development packages for gtk-sharp-2.0.");
                    args.ProgressMonitor.Log.WriteLine();
                    args.ProgressMonitor.Log.WriteLine(msg);
                }
            }
        }
コード例 #2
0
        static void OnProjectCompiled(object s, BuildEventArgs args)
        {
            if (args.Success)
            {
                // Unload stetic projects which are not currently
                // being used by the IDE. This will avoid unnecessary updates.
                if (IdeApp.Workspace.IsOpen)
                {
                    foreach (Project prj in IdeApp.Workspace.GetAllProjects())
                    {
                        if (!HasOpenDesigners(prj, false) && GtkDesignInfo.HasDesignedObjects(prj))
                        {
                            GtkDesignInfo info = GtkDesignInfo.FromProject(prj);
                            info.ReloadGuiBuilderProject();
                        }
                    }
                }

                SteticApp.UpdateWidgetLibraries(false);
            }
        }