Esempio n. 1
0
        public MovableUserControl addWindowToGrid(UserControl userControl, String title, bool noSavingFlag)
        {
            MovableUserControl currentInnerWindow = new MovableUserControl(RootGrid);

            currentInnerWindow.setTitle(title);
            currentInnerWindow.setGridContent(userControl);
            currentInnerWindow.Visibility = Visibility.Hidden;
            if (noSavingFlag)
            {
                currentInnerWindow.disableSaving();
            }
            RootGrid.Children.Add(currentInnerWindow);
            return(currentInnerWindow);
        }
Esempio n. 2
0
        public MacroManager()
        {
            macros       = new ConcurrentDictionary <String, CycleMacro>();
            macroGallery = new MacroGallery();
            macroGallery.initialize();

            macroAddControl = new MacroAddControl();

            ownParentWindow   = App.overlay.addWindowToGrid(macroGallery, "Macros", false);
            macroCreateWindow = App.overlay.addWindowToGrid(macroAddControl, "Create new macro", false);
            App.overlay.addMenuItemToMenu("pack://application:,,,/Resources/macroMenuIcon.png", "Macros").Click += macroMenu_Click;

            PersistenceContainer[] savedMacros = PersistenceUnitThread.persistenceUnit.loadContainersByType(typeof(CycleMacro).Name);
            foreach (PersistenceContainer currentPersistenceContainer in savedMacros)
            {
                CycleMacro newMacro = new CycleMacro();
                newMacro.updateCycleMacroByPersistenceContainer(currentPersistenceContainer);
                macros.GetOrAdd(newMacro.name, newMacro);
            }
        }
Esempio n. 3
0
 public BdmtSettings()
 {
     settingsWindow  = new SettingsWindow();
     ownParentWindow = App.overlay.addWindowToGrid(settingsWindow, "Settings", true);
 }