Beispiel #1
0
 public CPSManager()
 {
     Console.WriteLine("Version: " + typeof(CPSManager).Assembly.GetName().Version.ToString());
     //DBAccess.GetInstance();
     InitializeComponent();
     codeplugStatusLabel.Alignment = ToolStripItemAlignment.Right;
     projectStatusLabel.Text       = "No active project";
     codeplugStatusLabel.Text      = "No codeplug imported";
     cp = new Codeplug();
 }
Beispiel #2
0
        /*private void importFromCodeplugToolStripMenuItem_Click(object sender, EventArgs e)
         * {
         *  if (Tools.IsEmpty(folderPath))
         *  {
         *      if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
         *      {
         *          folderPath = folderBrowserDialog1.SelectedPath + "\\";
         *          projectStatusLabel.Text = folderPath;
         *      }
         *  }
         *
         *  if (openFileDialog1.ShowDialog() == DialogResult.OK)
         *  {
         *      byte[] data = System.IO.File.ReadAllBytes(openFileDialog1.FileName);
         *      cp.RawData = data;
         *      Console.WriteLine("Read " + data.Length + " bytes. OK.");
         *  }
         *  exportXMLData();
         * }*/

        private void createProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (saveProjectFileDialog.ShowDialog() == DialogResult.OK)
            {
                cp                      = new Codeplug();
                project                 = new Project();
                project.ProjectPath     = saveProjectFileDialog.FileName;
                projectStatusLabel.Text = project.ProjectPath;
                String basePath = project.ProjectPath.Substring(0, project.ProjectPath.LastIndexOf("."));
                project.ChannelPath  = basePath + XMLCHANNEL;
                project.ScanListPath = basePath + XMLSCANLIST;
                project.ZonePath     = basePath + XMLZONE;
                project.ContactPath  = basePath + XMLCONTACT;
                project.RxGroupPath  = basePath + XMLRXGROUP;
                project.ExportToXML(project.ProjectPath);
                exportXMLData();
            }
        }