Example #1
0
        private void btnEmbedPersistedObject_Click(object sender, EventArgs e)
        {
            PeriodType      type     = PeriodType.DAYS;
            CWSteganography cwStegan = new CWSteganography();


            switch (cbPeriodType.SelectedItem.ToString())
            {
            case "HOURS":
                type = PeriodType.HOURS;
                break;

            case "DAYS":
                type = PeriodType.DAYS;
                break;

            case "MONTHS":
                type = PeriodType.MONTHS;
                break;

            case "ACTIVATIONS":
                type = PeriodType.ACTIVATIONS;
                break;

            default:
                type = PeriodType.DAYS;
                break;
            }
            //Initilize The Object With Basic Information.
            CWProductProtection.Initilize(@".\Temp.po", 0, txtPackageName.Text, DateTime.Now, Convert.ToInt32(txtTrialPeriod.Text), type);
            cwStegan.AppendBinaryFileToBinaryFile(@".\Temp.po", findLogoFileDialog.FileName);
            File.Delete(@".\Temp.po");
        }
        private void button4_Click(object sender, EventArgs e)
        {
            CWSteganography temp = new CWSteganography();

            temp.AppendBinaryFileToBinaryFile(@".\Persist.fl", @".\IEEE.logosm.jpg");
        }