FormTimestamp.cs - using using using using using using...

This preview shows page 1 - 3 out of 8 pages.

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DimatecLibrary; namespace CsDimatecSample.Forms { public partial class FormTimestamp : Form { public FormTimestamp() { InitializeComponent(); } private void ButtonBrowseFileForTimestamp_Click(object sender, EventArgs e) { // Apriamo la dialog di scelta files OpenFileDialogFileForTimestamp.Title = "Select the file for timestamp"; OpenFileDialogFileForTimestamp.InitialDirectory = "C:\\"; OpenFileDialogFileForTimestamp.Filter = "All files (*.*)|*.*"; OpenFileDialogFileForTimestamp.RestoreDirectory = true; OpenFileDialogFileForTimestamp.Multiselect = false; if (OpenFileDialogFileForTimestamp.ShowDialog() == DialogResult.OK) { if (OpenFileDialogFileForTimestamp.FileName.Length > 0) { LabelFileForTimestamp.Text = OpenFileDialogFileForTimestamp.FileName; } } } private void RadioButtonUseFreeServer_CheckedChanged(object sender, EventArgs e) { if (RadioButtonUseFreeServer.Checked) { GroupBoxUseFreeServer.Enabled = true; GroupBoxUseInfocamereServer.Enabled = false; } } private void RadioButtonUseInfocamereServer_CheckedChanged(object sender, EventArgs e) { if (RadioButtonUseInfocamereServer.Checked) { GroupBoxUseInfocamereServer.Enabled = true; GroupBoxUseFreeServer.Enabled = false; // TextBoxUseInfocamereServer.Text = ""; TextBoxUseInfocamereServer.Text = "";
} } private void UseFreeServer() { string sThisAlgorithm; if (ocheckboxsha256.Checked) { sThisAlgorithm = CDIMATECLIBRARY.szOID_NIST_sha256; } else { sThisAlgorithm = CDIMATECLIBRARY.szOID_OIWSEC_sha1; } // Check if (LabelFileForTimestamp.Text.Length == 0) { MessageBox.Show(this, "Any file selected to timestamp", "ExecTimestamp", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int TimestampResult = CDIMATECLIBRARY.DMT_OK; TimestampResult = CDIMATECLIBRARY.dmtTimeStamp( CDIMATECLIBRARY.ghDimatecObj, TextBoxUseFreeServer.Text, LabelFileForTimestamp.Text, CheckBoxSaveQuery.Checked, CheckBoxSaveTsr.Checked, CheckBoxSaveXmlResponse.Checked,

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture