Managed ObjectArx 定制autocad的界面(包括menu.toolbar等...)-程序员宅基地

技术标签: ui  测试  runtime  

  //   Copyright 2005-2006 by Autodesk, Inc.
 
//  
 
//  Permission to use, copy, modify, and distribute this software in
 
//  object code form for any purpose and without fee is hereby granted, 
 
//  provided that the above copyright notice appears in all copies and 
 
//  that both that copyright notice and the limited warranty and
 
//  restricted rights notice below appear in all supporting 
 
//  documentation.
 
//  
 
//  AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
 
//  AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
 
//  MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC. 
 
//  DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
 
//  UNINTERRUPTED OR ERROR FREE.
 
//  
 
//  Use, duplication, or disclosure by the U.S. Government is subject to 
 
//  restrictions set forth in FAR 52.227-19 (Commercial Computer
 
//  Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
 
//  (Rights in Technical Data and Computer Software), as applicable. 
  using   System;
 
using   System.IO;
 
using   Autodesk.AutoCAD.Runtime;
 
using   Autodesk.AutoCAD.ApplicationServices;
 
using   Autodesk.AutoCAD.EditorInput;
 
using   Autodesk.AutoCAD.DatabaseServices;

 
using   Autodesk.AutoCAD.Customization;

 
//   This application implements several commands that shows how to
 
//   manipulate some of the existing CUI User interface and components.
 
//   The commands implemented here allow you to:
 
//  
 
//   1) Create/Remove menu and its items (ADDMENU/REMMENU)
 
//   3) Create/Remove a workspace (ADDWS/REMWS)
 
//   2) Create/Remove a toolbar and its items (ADDTOOLBAR/REMTOOLBAR)
 
//   4) Create a keyboard shortcut (CUISHORTCUT)
 
//   5) Create a temporary override (TEMPKEY)
 
//   6) Change position and docking of "Info Palette" 
 
//      window (DOCKR, DOCKL, DOCKF)
 
//   7) Add a double-click action (DBLCLICK)
 
//   8) A command that performs the tasks of ADDMENU,ADDTOOLBAR,
 
//      DOCKL and CUISHORTCUT (CUIALL)
 
//   9) Save a CUI after its modifications and reload it (SAVECUI)

 
//   Apart from the above commands, lisp wrappers have also been 
 
//   implemented to make the commands callable from windows.

 
//   To use CuiSamp.dll:
 
//   1) Start AutoCAD and open a new drawing.
 
//   2) Type netload and select CuiSamp.dll.
 
//   3) Execute the CUIALL command, if you want the UI related 
 
//      modifications.

 
//   Please add the References acdbmgd.dll,acmgd.dll,
 
//   AcCui.dll and AcCustomize.dll before trying to 
 
//   build this project. 
 
 
namespace   CuiSamp
  {
     
/**/  ///     <summary>  
     
///   Summary description for Class1.
     
///     </summary> 
       public     class   CuiSamp
      {
         
//   All Cui files (main/partial/enterprise) have to be loaded into an object of class 
         
//   CustomizationSection
         
//   cs - main AutoCAD CUI file 
         CustomizationSection cs;
        CustomizationSection entCs;
        CustomizationSection[]partials ;
        
         
int   numPartialFiles;

        YesNoIgnoreToggle yes  
=   YesNoIgnoreToggle.yes;
        YesNoIgnoreToggle no   
=   YesNoIgnoreToggle.no;
        
         
//   True when enterprise CUI file is loaded successfully 
           bool   entCsLoaded;

         
//   ed - access to the AutoCAD Command Line
         
//   Allows us to write messages or Issue Commands in the interface 
         Editor ed   =   Application.DocumentManager.MdiActiveDocument.Editor;


         
//  Default Constructor 
           public   CuiSamp()
          {
             
//   retrieve the location of, and open the ACAD Main CUI File 
               string   mainCuiFile   =   (  string  )Application.GetSystemVariable(  "  MENUNAME  "  );
            mainCuiFile  
+=     "  .cui  "  ;
            cs  
=     new   CustomizationSection(mainCuiFile);
            
             
string   entCuiFile   =   (  string  )Application.GetSystemVariable(  "  ENTERPRISEMENU  "  );
             
if  ( entCuiFile.Equals(  "  .  "  ))
                entCsLoaded  
=     false  ;
             
else  
               {
                entCs  
=     new   CustomizationSection(entCuiFile);
                entCsLoaded  
=     true  ;
            } 
            
             
//   Code for loading all partial CUI's listed in the main CUI file 
             
            partials  
=     new   CustomizationSection[cs.PartialCuiFiles.Count];
             
int   i  =  0  ;
             
foreach  (  string   fileName   in   cs.PartialCuiFiles)
              {    
                 
if   (File.Exists(fileName))
                  {
                    partials[i]  
=     new   CustomizationSection(fileName);
                    i 
++  ;
                } 
            } 
            numPartialFiles  
=   i;    
        } 
 
 
         
//   Command: savecui
         
//   This Command saves all open CUI Files that have been modified 
         [CommandMethod(  "  savecui  "  )]
         
public     void   saveCui()
          {
             
//   Save all Changes made to the CUI file in this session. 
             
//   If changes were made to the Main CUI file - save it
             
//   If changes were made to teh Partial CUI files need to save them too 
     
             
if  (cs.IsModified)
                cs.Save();

             
for  (  int   i  =  0  ;i   <   numPartialFiles;i  ++  )
              {    
                 
if  (partials[i].IsModified)
                    partials[i].Save();
            } 
            
             
if  (entCsLoaded   &&   entCs.IsModified)
                entCs.Save();

             
//   Here we unload and reload the main CUI file so the changes to the CUI file could take effect immediately. 
               string   flName   =   cs.CUIFileBaseName;
            Application.SetSystemVariable( 
"  FILEDIA  "  ,  0  );
            Application.DocumentManager.MdiActiveDocument.SendStringToExecute( 
"  cuiunload   "     +   flName   +     "     "  ,  false  ,  false  ,  false  );
            Application.DocumentManager.MdiActiveDocument.SendStringToExecute( 
"  cuiload   "     +   flName   +     "   filedia 1   "  ,  false  ,  false  ,  false  );
        } 
 
         
//   Lisp callable function: savecui
         
//   Lisp wrapper for savecui command 
         [LispFunction(  "  savecui  "  )]
         
public     void   saveCui(ResultBuffer args)
          {
            saveCui();
        } 
 
         
//   Command: addmenu
         
//   This Command adds a new menu to all workspaces called Custom Menu, which contains 2 sub items
         
//   The Menu is first added to the Main CUI File and then added to all it's workspaces.  
         [CommandMethod(  "  addmenu  "  )]
         
public     void   addMenu()
          {
             
if   (cs.MenuGroup.PopMenus.IsNameFree(  "  Custom Menu  "  ))
              {
                
                System.Collections.Specialized.StringCollection pmAliases  
=     new   System.Collections.Specialized.StringCollection();
                pmAliases.Add( 
"  POP12  "  );
                
                PopMenu pm  
=     new   PopMenu(  "  Custom Menu  "  ,pmAliases,  "  Custom Menu  "  ,cs.MenuGroup);
                
                addItemsToPM(pm);
                addMenu2Workspaces(pm);
            } 
             
else  
                ed.WriteMessage( 
"  Custom Menu already Exists\n  "  );    
        } 
 
         
//   Lisp callable function: addmenu
         
//   Lisp wrapper for addmenu command 
         [LispFunction(  "  addmenu  "  )]
         
public     void   addMenu(ResultBuffer args)
          {
            addMenu();
        } 
 
         
//   Add new Items to a PopMenu 
           private     void   addItemsToPM(PopMenu pm)
          {
            PopMenuItem pmi  
=     new   PopMenuItem(pm,  -  1  );
            pmi.MacroID  
=     "  ID_AUGI  "  ;pmi.Name   =     "  Autodesk User Group International  "  ;
            
            pmi  
=     new   PopMenuItem(pm,  -  1  );

            pmi  
=     new   PopMenuItem(pm,  -  1  );
            pmi.MacroID  
=     "  ID_CustomSafe  "  ;pmi.Name   =     "  Online Developer Center  "  ;
        } 
 
         
//   Add the menu to all the workspaces 
           private     void   addMenu2Workspaces(PopMenu pm)
          {
             
foreach  (Workspace wk   in   cs.Workspaces)
              {
                WorkspacePopMenu wkpm  
=     new   WorkspacePopMenu(wk,pm);
                wkpm.Display  
=     1  ;
            } 
        
        } 
    
         
//   Command: remmenu
         
//   This Command deletes the menu added above from the Main CUI File and any
         
//    workspaces that it was added to.  
         [CommandMethod(  "  remmenu  "  )]
         
public     void   remMenu()
          {
             
//   Find Index of the desired MenuItem
             
//   Remove it from all Workspaces that it exists in
             
//   Omitting this step leaves nasty left-overs in the Workspace files
             
//   Remove it from the Cui files' Menu List 
             
            PopMenu    pm  
=   cs.MenuGroup.PopMenus.FindPopWithAlias(  "  POP12  "  );
             
if   (pm   !=     null   )
              {
                 
foreach  (Workspace wk   in   cs.Workspaces)
                  {
                    WorkspacePopMenu wkPm  
=   wk.WorkspacePopMenus.FindWorkspacePopMenu(pm.ElementID,pm.Parent.Name);
            
                     
if  (wkPm   !=     null  )
                        wk.WorkspacePopMenus.Remove(wkPm);
                } 
                cs.MenuGroup.PopMenus.Remove(pm);     
//   Deletes the Menu from ACAD Menu Group 
             } 
        } 
 
         
//   Lisp callable function: remmenu
         
//   Lisp wrapper for remmenu command 
         [LispFunction(  "  remmenu  "  )]
         
public     void   remMenu(ResultBuffer args)
          {
            remMenu();
        } 
 
         
//   Command: addws
         
//   This command adds a new workspace. The name of the workspace to create is
         
//   obtained from the command line. 
         [CommandMethod(  "  addws  "  )]
         
public     void   addws()
          {
            String wsName;
            PromptResult prs  
=   ed.GetString(  "  Enter name of workspace to create:   "  );
             
if  (PromptStatus.OK   ==   prs.Status )
              {
                wsName  
=   prs.StringResult;
                 
if  (  -  1     ==   cs.Workspaces.IndexOfWorkspaceName(wsName))   //   If the workspace doesnot exist 
                    {
                    Workspace nwWs  
=     new   Workspace (cs, wsName);   //   Create the workspace 
                     saveCui();   //   Save and reload the CUI file 
                 } 
                 
else  
                   {
                    ed.WriteMessage( 
"  A workspace with this name already exists  "  );
                } 
            } 
 
        } 
 
         
//   Lisp callable function: addws
         
//   Lisp wrapper for addws command 
         [LispFunction(  "  addws  "  )]
         
public     void   addws(ResultBuffer args)
          {
            addws();
        } 
 
         
//   Command: remws
         
//   This command removes a workspace. The name of the workspace to remove is
         
//   obtained from the command line. 
         [CommandMethod(  "  remws  "  )]
         
public     void   remws()
          {
            String wsName;
            PromptResult prs  
=   ed.GetString(  "  Enter name of workspace to remove:   "  );
             
if  (PromptStatus.OK   ==   prs.Status )
              {
                wsName  
=   prs.StringResult;
                 
if  (  -  1     !=   cs.Workspaces.IndexOfWorkspaceName(wsName))   //   If the workspace exist 
                    {
                    cs.deleteWorkspace(wsName);  
//   Remove the workspace 
                     saveCui();   //   Save and reload the CUI file 
                 } 
                 
else  
                   {
                    ed.WriteMessage( 
"  No workspace exists with this name  "  );
                } 
            } 
            
        } 
         
//   Lisp callable function: remws
         
//   Lisp wrapper for remws command 
         [LispFunction(  "  remws  "  )]
         
public     void   remws(ResultBuffer args)
          {
            remws();
        } 
 
 
         
//   Command: cuishortcut
         
//   This adds a Shortcut key to the CUI command.
         
//   Ctrl+B is used for Toggling SNAP. It gets reassigned 
         [CommandMethod(  "  cuishortcut  "  )]
         
public     void   shortCut()
          {
             
//   In here we will make a shortcut Key combination to the Customize.. command 
             MacroGroup mg   =   cs.MenuGroup.MacroGroups[  0  ];   //   Search the ACAD Macros 
               foreach   (MenuMacro mcr   in   mg.MenuMacros)
              {
                 
if  (mcr.ElementID.Equals(  "  MM_1570  "  ))
                  {
                    MenuAccelerator ma  
=     new   MenuAccelerator(mcr,cs.MenuGroup);
                    ma.AcceleratorShortcutKey  
=     "  CTRL+B  "  ;
                } 
            } 
        } 
         
//   Lisp callable function: cuishortcut
         
//   Lisp wrapper for cuishortcut command 
         [LispFunction(  "  cuishortcut  "  )]
         
public     void   shortCut(ResultBuffer args)
          {
            shortCut();
        } 
 
         
//   Command: dockr
         
//   Dock Info Palette to the right 
         [CommandMethod(  "  dockr  "  )]
         
public     void   dockInfoPalR()
          {
            dockInfoPalette(DockableWindowOrient.right);
        } 
         
//   Lisp callable function: dockr
         
//   Lisp wrapper for dockr command 
         [LispFunction(  "  dockr  "  )]
         
public     void   dockInfoPalR(ResultBuffer args)
          {
            dockInfoPalR();
        } 
 
         
//   Command: dockl
         
//   Dock Info Palette to the left 
         [CommandMethod(  "  dockl  "  )]
         
public     void   dockInfoPalL()
          {
            dockInfoPalette(DockableWindowOrient.left);
        } 
 
         
//   Lisp callable function: dockl
         
//   Lisp wrapper for dockl command 
         [LispFunction(  "  dockl  "  )]
         
public     void   dockInfoPalL(ResultBuffer args)
          {
            dockInfoPalL();
        } 
 
         
//   Command: dockf
         
//   Set Info Palette to float 
         [CommandMethod(  "  dockf  "  )]
         
public     void   dockInfoPalF()
          {
            dockInfoPalette(DockableWindowOrient.floating);
        } 
         
//   Lisp callable function: dockf
         
//   Lisp wrapper for dockf command 
         [LispFunction(  "  dockf  "  )]
         
public     void   dockInfoPalF(ResultBuffer args)
          {
            dockInfoPalF();
        } 
 
 
         
//   Method to implement the positiioning/docking of the "Info Palette" window 
           private     void   dockInfoPalette(DockableWindowOrient orientation)
          {
             
int   wkB   =   cs.Workspaces.IndexOfWorkspaceName(  "  AutoCAD Default  "  );
             
//   check to see if it exists 
               if   (wkB   ==     -  1  )
              {
                 
//   if not, then see if it is called simply AutoCAD 
                 wkB   =   cs.Workspaces.IndexOfWorkspaceName(  "  AutoCAD  "  );
                 
if   (wkB   ==     -  1  )
                  {
                     
//   if not, then ok - it's something else 
                     Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(  "  Workspace not found.  "  );
                     
return  ;
                } 
            } 
            Workspace wk  
=   cs.Workspaces[wkB];
            
             
foreach  (WorkspaceDockableWindow dockableWindow   in   wk.DockableWindows)
              {
                 
if  (dockableWindow.Name.Equals(  "  Info Palette  "  ))
                  {    
                     
if  (orientation.Equals(DockableWindowOrient.floating))
                        dockableWindow.DockFloat  
=   DockedFloatingIgnoreToggle.floating;
                     
else      
                        dockableWindow.DockFloat  
=   DockedFloatingIgnoreToggle.docked;

                    dockableWindow.Display  
=   yes;
                    dockableWindow.Orientation  
=   orientation;
                    dockableWindow.AutoHide  
=   OnOffIgnoreToggle.off;
                    dockableWindow.UseTransparency  
=   no;
                     
break  ;
                } 
            } 
        } 
 
         
//   Command: addtoolbar
         
//   Creates a new toolbar called "New Toolbar", and adds it to all workspaces. 
         
//   This toolbar contains a Toolbar control for named view, button for drawing 
         
//   a pline, and a flyout that uses the "Draw" tool bar. 
         [CommandMethod(  "  addtoolbar  "  )]
         
public     void   addToolbar()
          {
            Toolbar newTb  
=     new   Toolbar(  "  New Toolbar  "  ,cs.MenuGroup);
            newTb.ToolbarOrient  
=   ToolbarOrient.floating;
            newTb.ToolbarVisible  
=   ToolbarVisible.show;
            
            ToolbarControl tbCtrl  
=     new   ToolbarControl(ControlType.NamedViewControl,newTb,  -  1  );
                        
            ToolbarButton tbBtn  
=     new   ToolbarButton(newTb,  -  1  );
            tbBtn.Name  
=     "  PolyLine  "  ;
            tbBtn.MacroID  
=     "  ID_Pline  "  ;

            ToolbarFlyout tbFlyout  
=     new   ToolbarFlyout(newTb,  -  1  );
            tbFlyout.ToolbarReference  
=     "  DRAW  "  ;

             
foreach  ( Workspace wk   in   cs.Workspaces)
              {
                WorkspaceToolbar wkTb  
=     new   WorkspaceToolbar(wk,newTb);
                wk.WorkspaceToolbars.Add(wkTb);
                wkTb.Display  
=     1  ;
            } 
        } 
         
//   Lisp callable function: addtoolbar
         
//   Lisp wrapper for addtoolbar command 
         [LispFunction(  "  addtoolbar  "  )]
         
public     void   addToolbar(ResultBuffer args)
          {
            addToolbar();
        } 
 
         
//   Command: remtoolbar
         
//   This Command removes the toolbar added above from the Main CUI File and any
         
//   workspaces that it was added to.  
         [CommandMethod(  "  remtoolbar  "  )]
         
public     void   remToolbar()
          {
            Toolbar tbr  
=   cs.MenuGroup.Toolbars.FindToolbarWithName(  "  New Toolbar  "  );
             
if   (tbr   !=     null   )
              {
                 
foreach  (Workspace wk   in   cs.Workspaces)
                  {
                    WorkspaceToolbar wkTb  
=   wk.WorkspaceToolbars.FindWorkspaceToolbar(tbr.ElementID,tbr.Parent.Name);
            
                     
if  (wkTb   !=     null  )
                        wk.WorkspaceToolbars.Remove(wkTb);
                } 
                cs.MenuGroup.Toolbars.Remove(tbr);     
//   Deletes the toolbar from ACAD Menu Group 
             } 
        } 
 
         
//   Lisp callable function: remtoolbar
         
//   Lisp wrapper for remtoolbar command 
         [LispFunction(  "  remtoolbar  "  )]
         
public     void   remToolbar(ResultBuffer args)
          {
            remToolbar();
        } 
 
         
//   Command: tempkey
         
//   This command will install a temporary override key. Temporary override keys are keys that temporarily 
         
//   turn on or turn off one of the drawing aids that are set in the Drafting Settings dialog box 
         
//   (for example, Ortho mode, object snaps, or Polar mode). 
         [CommandMethod(  "  tempkey  "  )]
         
public     void   tempOverride()
          {
            TemporaryOverride newTempOverride  
=     new   TemporaryOverride(cs.MenuGroup);    
            newTempOverride.OverrideShortcutKey  
=     "  SHIFT+Y  "  ;   //   Scan code for Y 
             newTempOverride.Name   =     "  Customization Override  "  ;
            newTempOverride.Description  
=     "  Customization Override  "  ;
            newTempOverride.ElementID  
=  "  EID_CUITEMPOVERRIDE  "  ;
             
//   Creating a override for Shift+Y (Key down) that will behave as temporary override for OSnap to endpoint (MM_1629) 
             OverrideItem newOverrideItem   =     new   OverrideItem(  "  MM_1629  "  ,OverrideKeyState.Down,newTempOverride);
            newTempOverride.DownOverride  
=   newOverrideItem;            
        } 
         
//   Lisp callable function: tempkey
         
//   Lisp wrapper for tempkey command 
         [LispFunction(  "  tempkey  "  )]
         
public     void   tempOverride(ResultBuffer args)
          {
            tempOverride();
        } 
 
         
//   Command: dblclick
         
//   This command adds a double click action for polylines (Non-LWpolylines like 2D polylines).
         
//   After running this command, When we double click a polyline (i.e., a non-light weight polyline), 
         
//   the "Properties" window is launched. This replaces the original behaviour where "pedit" was launched. 
         [CommandMethod(  "  dblclick  "  )]
         
public     void   doubleClick()
          {
            DoubleClickAction dblClickAction  
=     new   DoubleClickAction(cs.MenuGroup,  "  My Double click  "  ,  -  1  );
            dblClickAction.Description  
=     "  Double Click Customization  "  ;
            dblClickAction.ElementID  
=     "  EID_mydblclick  "  ;
            dblClickAction.DxfName  
=     "  Polyline  "  ;
            DoubleClickCmd dblClickCmd  
=     new   DoubleClickCmd(dblClickAction);
            dblClickCmd.MacroID  
=     "  ID_Ai_propch  "  ;
            dblClickAction.DoubleClickCmd  
=   dblClickCmd;
        } 
         
//   Lisp callable function: dblclick
         
//   Lisp wrapper for dblclick command 
         [LispFunction(  "  dblclick  "  )]
         
public     void   doubleClick(ResultBuffer args)
          {
            doubleClick();
        } 
 
        
         
//   Command: cuiall
         
//   Issuing this command will run the methods to make all changes to the UI
         
//   This will add the custom menu, toolbar, and shortcut, as well as 
         
//   dock the info palette on the right side. 
         [CommandMethod(  "  cuiall  "  )]
         
public     void   callForAllChanges()
          {
            addMenu();
            shortCut();
            addToolbar();
            dockInfoPalR();
            saveCui();
        } 
         
//   Lisp callable function: cuiall
         
//   Lisp wrapper for cuiall command 
         [LispFunction(  "  cuiall  "  )]
         
public     void   callForAllChanges(ResultBuffer args)
          {
            callForAllChanges();
        } 
 
    } 
}
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_33819479/article/details/85441687

智能推荐

Python 入门的60个基础练习_练习python基础语法-程序员宅基地

文章浏览阅读4.2w次,点赞329次,收藏2.7k次。Python 入门的60个基础练习_练习python基础语法

iOS6和iOS7代码的适配(2)——status bar_ios7 statusbar-程序员宅基地

文章浏览阅读1w次。用Xcode5运行一下应用,第一个看到的就是status bar的变化。在iOS6中,status bar是系统在处理,应用_ios7 statusbar

gdb调试时No symbol "var" defined in current context && No Register_no registers调试显示-程序员宅基地

文章浏览阅读2.1k次。问题描述:,在gdb调试程序输出变量:p var,会提示No symbol "var" in current context.原因:程序编译时开启了优化选项,那么在用GDB调试被优化过的程序时,可能会发生某些变量不能访问,或是取值错误码的情况。这个是很正常的,因为优化程序会删改程序,整理程序的语句顺序,剔除一些无意义的变量等,所以在GDB调试这种程序时,运行时的指令和你所编写指_no registers调试显示

IDGeneratorUtil 主键id生成工具类_idgeneratorutils.generateid()-程序员宅基地

文章浏览阅读3.4k次。import java.util.Random;import org.drools.util.UUIDGenerator;/** * * * 类名称:GenerateIdUtil * 类描述: 主键生成工具类 * @author chenly * 创建时间:Jul 10, 2012 8:10:43 AM * 修改人: * 修改时间:Jul 10, 2012 8..._idgeneratorutils.generateid()

关于汇编 BX 和 BLX 跳转指令_汇编blx-程序员宅基地

文章浏览阅读5k次。BX:跳转到寄存器reg给出的目的地址处,如:BX R2BLX:跳转到寄存区reg给出的目的地址处并将返回地址存储到LR(R14)使用这两个指令时有一点特别需要注意:跳转的目的地址必须是奇数,若不是奇数则在后面加1,如某函数的起始地址是0x80000f00,则要跳转到此函数则应该跳转到0x80000f01处!否则会进入硬件错误中断!..._汇编blx

前端vue,打包整合进后端springboot的resources里面后,运行只要刷新就报404_前端项目放入resource-程序员宅基地

文章浏览阅读2.6k次,点赞2次,收藏4次。vue打包后,其实就剩index.html和一堆静态资源,页面的加载和替换都是通过刷新index.html种的dom来实现的(应该是这样,可能表述不是很好),所以做个重定向就可以了。(博主是这么解决的,网上还有很多人是各种路径错误,大家可以尝试下自己是哪个原因)import org.springframework.boot.web.server.ConfigurableWebServerFa..._前端项目放入resource

随便推点

添加远程github仓库时报错 Warning: Permanently added the RSA host key for IP address 52.74.223.119_cmd warning: permanently added-程序员宅基地

文章浏览阅读9.7k次。1.问题展示2.解决方案1.任意窗口, 打开git bash2.命令行界面, 输入cd C:3.cat ~/.ssh/id_rsa.pub正常下面应该显示一大串公钥如果没有,显示如下图, 则进行下一步, 创建公钥4.创建公钥, 输入 ssh-keygen5.然后一直下一步, 直到出现6.再次输入cat ~/.ssh/id_rsa.pub下面一大串数字便是公钥,复制这些字符串, 打开github, 点击头像, 打开settings, 打开SSH and GPG Keys_cmd warning: permanently added

SQL*Plus 使用技巧1-程序员宅基地

文章浏览阅读154次。[code="java"]1. SQL/Plus 常用命令 a. help [topic] 查看命令的使用方法,topic表示需要查看的命令名称。 如: help desc; b. host 该命令可以从SQL*Plus环境切换到操作系统环境,以便执行操作系统命名。 c. host [command] 在sql*plus环境中执行操作系统命令,如:host notepad.exe..._sql+plus的使用方法

域控服务器搭建与管理论文,校园网络服务器的配置与管理 毕业论文.doc-程序员宅基地

文章浏览阅读441次。该文档均来自互联网,如果侵犯了您的个人权益,请联系我们将立即删除!**学校毕 业 论 文**学校园网络服务器的配置与管理姓 名: **学 号: **指导老师:系 名:专 业: 计算机网络技术班 级:二0一一年十二月十五日摘 要随着网络技术的不断发展和Internet的日益普及,许多学校都建立了校园网络并投入使用,这无疑对加快信息处理,提高工作效..._服务器配置与应用论文

mysql单实例多库与多实例单库_数据库单实例和多实例-程序员宅基地

文章浏览阅读1k次。一、单实例多库:一个mysql实例,创建多个数据目录。规划:实例路径:/usr/local/mysql数据目录路径:(1)/usr/local/mysql/data(2)/usr/local/mysql/data2步骤:安装mysql。配置my.cnf文件。初始化各个数据库。用mysqld_multi启动。1、安装mysql。平常安装。2、m..._数据库单实例和多实例

MFC解决找不到MFC90.DLL的问题_microsoft v90.debugmfc-程序员宅基地

文章浏览阅读6.3k次。今天装了第三方的MFC软件库Xtreme ToolkitPro v15.0.1,听说搞MFC的人都知道它的强大,我刚学习,所以装了一个,然后想运行一下它自带的例子看看。出现一个“找不到mfc90.dll“的问题,百度一下,记录如下:vs2008已经打过sp1补丁,编译C++程序会提示找不到mfc90.dll文件的错误,但是如果是release版的话就能正常运行csdn看到解决方案,粘贴_microsoft v90.debugmfc

XeLaTeX-中文排版解决方案_latex 中文排版 texlive-程序员宅基地

文章浏览阅读2.1k次。以前使用CJK进行中文的排版,需要自己生成字体库,近日,出现了XeTeX,可以比较好的解决中文字体问题,不需要额外生成LaTeX字体库,直接使用计算机系统里的字体,本文以在Linux下为例说明XeTeX的使用。操作系统: UbuntuTeX:除了texlive包外,还需要安装的包是texlive-xetex。字体:可以使用fc-list查看你自己的字体库,注意字体的完整名称,在XeTe..._latex 中文排版 texlive