Beispiel #1
0
 public static SWidgetManager getInstance()
 {
     if (instance == null)
     {
         instance = new SWidgetManager();
     }
     return instance;
 }
Beispiel #2
0
 public static SWidgetManager getInstance()
 {
     if (instance == null)
     {
         instance = new SWidgetManager();
     }
     return(instance);
 }
		public ApplicationRibbonFormBase()
		{
			InitializeComponent();

			/*
			 * Assembly locating
			 */

			if (!DesignMode)
			{
				documentManager.View.DocumentProperties.UseFormIconAsDocumentImage = true;
				documentManager.View.UseDocumentSelector = DevExpress.Utils.DefaultBoolean.True;
				tabbedView.FloatingDocumentContainer = FloatingDocumentContainer.DocumentsHost;

				// Security context must be call first time in main app and 
				// must have providers set
				_user = SecurityContext.getInstance().CurrentUser;

				_proxy = SEventProxy.getInstance();
				_proxy.addEventHandler<AddToolBarRequestEvent>(EventType.AddToolBarRequestEvent, HandleAddToolbarRequestEvent);
				_proxy.addEventHandler<OpenPanelRequestEvent>(EventType.OpenPanelRequestEvent, HandleOpenPanelRequestEvent);
				_proxy.addEventHandler<VisualControlActionEvent>(EventType.VisualControlActionEvent, HandleVisualControlAction);

				//do it here before any other plugin will be loaded!!!!!
				_widgetManager = SWidgetManager.getInstance();

				//now we can load plugins
				_loader = SPluginsLoader.getInstance();
				_loader.LoadPlugins(this, ".");

				controls.ViewBaseEventsHandler.AttachToView(documentManager.View);

				_managerSupport = new DocumentManagerSupport(documentManager,
																new DevExpress.XtraBars.BarItem[] { barButtonItem_FileSave },
																new DevExpress.XtraBars.BarItem[] { barButtonItem_FileSaveAll });
				ribbonControl.SelectedPage = ribbonPagePlugins;
			}

		}