Ejemplo n.º 1
0
        private static void openXDDfile(string path, string outpath)
        {
            CanOpenXDD coxml = new CanOpenXDD();

            eds = coxml.readXML(path);

            if (eds == null)
            {
                return;
            }

            eds.xddfilename = path;
            exportCOOD(outpath);
        }
Ejemplo n.º 2
0
        private void openXDDfile(string path)
        {
            try
            {
                EDSsharp eds;

                //fixme
                //ISO15745ProfileContainer devs; //one day this will be multiple devices

                CanOpenXDD coxml = new CanOpenXDD();
                eds = coxml.readXML(path);

                if (eds == null)
                {
                    return;
                }

                eds.xddfilename = path;

                tabControl1.TabPages.Add(eds.di.ProductName);

                DeviceView device = new DeviceView();

                eds.OnDataDirty += Eds_onDataDirty;

                device.eds = eds;
                tabControl1.TabPages[tabControl1.TabPages.Count - 1].Controls.Add(device);
                device.Dock = DockStyle.Fill;

                device.dispatch_updateOD();

                network.Add(eds);
            }
            catch (Exception ex)
            {
                Warnings.warning_list.Add(ex.ToString());
            }

            if (Warnings.warning_list.Count != 0)
            {
                WarningsFrm frm = new WarningsFrm();
                frm.ShowDialog();
            }
        }