示例#1
0
 private void txtPathImportImage_DoubleClick(object sender, EventArgs e)
 {
     if (txtPathImportImage.Text != "")
     {
         Commons.ProcessStartLink(txtPathImportImage.Text);
     }
 }
示例#2
0
 private void btnCreateFileGroups_Click(object sender, EventArgs e)
 {
     string fileName = Commons.PathDatabase + "\\" +
         "Groups_" + schoolClass.Abbreviation + "_" + schoolClass.SchoolYear +
         ".txt";
     TextFile.StringToFile(fileName, txtGroups.Text, false);
     Commons.ProcessStartLink(Commons.PathDatabase);
 }
示例#3
0
 private void DgwClass_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         if (e.ColumnIndex == 6) // column of the path; opens the folder with that path
         {
             Commons.ProcessStartLink(DgwClass.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
         }
     }
 }
示例#4
0
        private void txtSubFolderStorage_DoubleClick(object sender, EventArgs e)
        {
            string directory = Commons.PathImages + "\\" + txtSubFolderStorage.Text;

            if (txtSubFolderStorage.Text != "" && Directory.Exists(directory))
            {
                Commons.ProcessStartLink(directory);
            }
            else
            {
                Console.Beep();
            }
        }
示例#5
0
        private void btnCreateFileGroups_Click(object sender, EventArgs e)
        {
            if (txtGroups.Text == "")
            {
                MessageBox.Show("Prima di salvare un file, generare i gruppi");
                return;
            }
            string fileName = Commons.PathDatabase + "\\" +
                              "Groups_" + schoolClass.Abbreviation + "_" + schoolClass.SchoolYear +
                              ".txt";

            TextFile.StringToFile(fileName, txtGroups.Text, false);
            Commons.ProcessStartLink(fileName);
        }
 private void txtStartLink_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         if (TxtStartLink.Text.Substring(0, 4) == "http")
         {
             Commons.ProcessStartLink(TxtStartLink.Text);
         }
         else
         {
             Commons.ProcessStartLink(currentClass.PathRestrictedApplication + "\\" + TxtStartLink.Text);
         }
     }
     catch
     {
         Console.Beep();
     }
 }
        private void btnClassBackup_Click(object sender, EventArgs e)
        {
            if (currentClass == null)
            {
                MessageBox.Show("Scegliere la classe da tenere nel database");
                return;
            }
            string imagesFolder = db.CreateOneClassOnlyDatabase(currentClass);

            if (imagesFolder != "")
            {
                Commons.ProcessStartLink(imagesFolder);
            }
            else
            {
                MessageBox.Show("Cartella del database della classe non trovata");
            }
            //MessageBox.Show("Fatto");
        }
 private void DgwLinks_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         try {
             DataRow row          = ((DataTable)(DgwLinks.DataSource)).Rows[e.RowIndex];
             string  link         = (string)row["startLink"];
             Class   clickedClass = db.GetClassById((int)row["idClass"]);
             if (link.Substring(0, 4) == "http" || link.Contains(".exe"))
             {
                 Commons.ProcessStartLink(link);
             }
             else
             {
                 Commons.ProcessStartLink(clickedClass.PathRestrictedApplication + "\\" + link);
             }
         }
         catch (Exception ex)
         {
             Console.Beep();
         }
     }
 }
示例#9
0
 internal static void StartLinks(Class Class, List <string> LinksOfClass)
 {
     foreach (string link in LinksOfClass)
     {
         try
         {
             string startLink;
             if (link.Substring(0, 4) == "http" || link.Contains(".exe"))
             {
                 startLink = link;
             }
             else
             {
                 startLink = Class.PathRestrictedApplication + "\\" + link;
             }
             Commons.ProcessStartLink(startLink);
         }
         catch
         {
             Console.Beep();
         }
     }
 }
示例#10
0
 private void TxtPaths_DoubleClick(object sender, EventArgs e)
 {
     Commons.ProcessStartLink(((TextBox)sender).Text);
 }
示例#11
0
 private void btnOpenConfigurationFolder_Click(object sender, EventArgs e)
 {
     Commons.ProcessStartLink(Commons.PathConfig);
 }
 private void TxtPathStartLink_DoubleClick(object sender, EventArgs e)
 {
     Commons.ProcessStartLink(TxtPathStartLink.Text);
 }
示例#13
0
 private void picImage_DoubleClick(object sender, EventArgs e)
 {
     Commons.ProcessStartLink(Commons.PathImages + "\\" +
                              currentImage.RelativePathAndFilename);
 }
示例#14
0
        private void dgwLessonsImages_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string RelativePath = Path.GetDirectoryName(currentImage.RelativePathAndFilename);

            Commons.ProcessStartLink(Commons.PathImages + "\\" + RelativePath);
        }