Exemplo n.º 1
0
        public void Window_Closed(object sender, EventArgs e)
        {
            var remWd = (from wd in WinCollection
                         where (wd.Win == sender)
                         select wd).FirstOrDefault();

            WinCollection.Remove(remWd);
            if (remWd.WinType == WindowType.GlobalSetting)
            {
                isGlobalSettingWindowOpen = false;
                gSW = null;
            }
            if (activeWindow is graphWindow)
            {
                activeGraphCanvas = ((graphWindow)activeWindow).graphGUI;
            }
            else if (activeWindow is ruleWindow)
            {
                activeGraphCanvas = ((ruleWindow)activeWindow).graphCanvasK;
            }
            else
            {
                activeGraphCanvas = null;
            }
            main.propertyUpdate();
        }
Exemplo n.º 2
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();
        }