Esempio n. 1
0
        public void AddandShowWindow(Window w)
        {
            if (w is graphWindow)
            {
                WinCollection.Insert(0, new WinData(w, WindowType.Graph, ((graphWindow)w).filename));
                activeGraphCanvas = ((graphWindow)w).graphGUI;
            }
            else if (w is ruleWindow)
            {
                WinCollection.Insert(0, new WinData(w, WindowType.Rule, ((ruleWindow)w).filename));
                activeGraphCanvas = ((ruleWindow)w).graphCanvasK;
            }
            else if (w is ruleSetWindow)
            {
                WinCollection.Insert(0, new WinData(w, WindowType.RuleSet, ((ruleSetWindow)w).Filename));
            }
            else if (w is searchProcessController)
            {
                WinCollection.Insert(0, new WinData(w, WindowType.SearchProcessController,
                                                    "SearchProcessController" + _searchProcessID));
            }
            else if (w is GlobalSettingWindow)
            {
                gSW = (GlobalSettingWindow)w;
                WinCollection.Insert(0, new WinData(w, WindowType.GlobalSetting,
                                                    "GlobalSettingWindow"));
            }
            w.Closed += Window_Closed;

            w.Show();
        }
Esempio n. 2
0
        internal void FocusNextWindow()
        {
            ignoreSelectionChange = true;
            var lastWd = WinCollection[0];

            WinCollection.RemoveAt(0);
            WinCollection.Insert(NumberOfWindows, lastWd);
            activeWindow.Focus();
            ignoreSelectionChange = false;
        }
Esempio n. 3
0
        internal void SetAsActive(Window win)
        {
            main.MoveFocus(new TraversalRequest(FocusNavigationDirection.Last));
            var activeWd = (from wd in WinCollection
                            where (wd.Win == win)
                            select wd).FirstOrDefault();

            if (WinCollection[0] == activeWd)
            {
                return;
            }
            ignoreSelectionChange = true;
            WinCollection.Remove(activeWd);
            WinCollection.Insert(0, activeWd);
            ignoreSelectionChange = false;
        }