Example #1
0
 public SCLView(string fname)
 {
     filename = fname;
     _env     = Env.getEnv();
     InitializeComponent();
     this.toolStrip1.Renderer = new MyRenderer();
     try
     {
         //dataModels = new SCLParser().CreateTree(filename);
         dataModels = new SCLParserDOM2().CreateTree(filename);
     }
     catch (Exception e)
     {
         Logger.getLogger().LogError(" Reading SCL file: " + filename + ": " + e.Message);
         return;
     }
     IedTreeView.makeImageList(treeViewSCL);
     IedTreeView.makeImageList(treeViewSCL_IEC);
     makeTreeScl(dataModels[0], treeViewSCL);
     makeTreeScl(dataModels[0], treeViewSCL_IEC);
     foreach (Iec61850Model dataModel in dataModels)
     {
         makeTreeIed(dataModel);
         makeTreeIec(dataModel);
     }
     string[] fparts = filename.Split(new char[] { '/', '\\' });
     filename_short = fparts[fparts.Length - 1];
     this.Text      = filename_short;
 }
Example #2
0
        public WindowManager(DockPanel dockPanel, MainWindow mWin)
        {
            this.dockPanel = dockPanel;
            _env           = Env.getEnv();
            _env.winMgr    = this;
            mainWindow     = mWin;
            //Create toolwindows
            iedWindow = new IedTreeView(this);
            iedWindow.CloseButtonVisible = false;
            iedWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            iedWindow.Show(dockPanel, DockState.DockLeft);

            dataWindow                    = new IedDataView();
            dataWindow.ShowHint           = DockState.Document;
            dataWindow.CloseButtonVisible = false;
            dataWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            dataWindow.Show(dockPanel);

            reportWindow                    = new ReportsView();
            reportWindow.ShowHint           = DockState.Document;
            reportWindow.CloseButtonVisible = false;
            reportWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            reportWindow.Show(dockPanel);

            pollWindow                    = new PollView();
            pollWindow.ShowHint           = DockState.Document;
            pollWindow.CloseButtonVisible = false;
            pollWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            pollWindow.Show(dockPanel);

            captureWindow                    = new CaptureView();
            captureWindow.ShowHint           = DockState.Document;
            captureWindow.CloseButtonVisible = false;
            captureWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            captureWindow.Show(dockPanel);

            watchWindow                    = new WatchDataView();
            watchWindow.ShowHint           = DockState.Document;
            watchWindow.CloseButtonVisible = false;
            watchWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            //watchWindow.Show(dockPanel);

            logWindow                    = new LogView();
            logWindow.ShowHint           = DockState.DockBottom;
            logWindow.CloseButtonVisible = false;
            logWindow.FormClosing       += new FormClosingEventHandler(persistentWindows_FormClosing);
            logWindow.Show(dockPanel);

            //Connect Windows Manager to helper events
            dockPanel.ActiveDocumentChanged += new EventHandler(OnActiveDocumentChanged);
        }