예제 #1
0
        public SortSearchAndFilterMenuManager()
        {
            // Create the contextual menu instances.
            Assembly assembly = Assembly.GetExecutingAssembly();

            using (TextReader textReader = new StreamReader(assembly.GetManifestResourceStream("Etk.Excel.Resources.ViewSortSearchAndFilterContextualMenu.xml")))
            {
                string menuXml = textReader.ReadToEnd();
                sortSearchAndFilersMenu = ContextualMenuFactory.CreateInstance(menuXml);
            }
        }
예제 #2
0
 public RequestsManager([Import] IContextualMenuManager contextualMenuManager)
 {
     try
     {
         // Create the contextual menu instances.
         Assembly assembly = Assembly.GetExecutingAssembly();
         using (TextReader textReader = new StreamReader(assembly.GetManifestResourceStream("Etk.Excel.Resources.RequestsManagerContextualMenu.xml")))
         {
             string menuXml = textReader.ReadToEnd();
             RequestManagementMenu = ContextualMenuFactory.CreateInstance(menuXml);
         }
         // Declare the contextual menus activators.
         contextualMenuManager.OnContextualMenusRequested += ManageRequestsContexualMenu;
     }
     catch (Exception ex)
     {
         throw new EtkException($"UDF manager initialization failed:{ex.Message}", ex);
     }
 }