示例#1
0
 void ResetProjekt()
 {
     odstranEventy();
     tabControl1.TabPages.Clear();
     projekt = null;
     modul   = null;
 }
示例#2
0
 void OtvorProjekt(String cesta, String meno)
 {
     ResetProjekt();
     Text    = "DataWolf - " + meno;
     projekt = new Projekt(meno, cesta);
     foreach (Modul m in projekt.moduly)
     {
         pridajTabPage(m.meno);
     }
     modul = projekt.moduly[0];
     ResetModul();
 }
示例#3
0
        void NovyProjektDialog(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter = "dw files (*.dw)|*.dw|All files (*.*)|*.*";
            saveFileDialog1.Title  = "Ulož projekt";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                String cesta = Path.GetDirectoryName(saveFileDialog1.FileName);
                String meno  = Path.GetFileNameWithoutExtension(saveFileDialog1.FileName);
                File.WriteAllText(@cesta + "\\" + meno + ".dw", Projekt.vytvorMain());
                OtvorProjekt(cesta, meno);
            }
        }