Ejemplo n.º 1
0
 /// <summary>
 /// Save Command.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="executedRoutedEventArgs"></param>
 public void SaveAsCommand(object sender, ExecutedRoutedEventArgs executedRoutedEventArgs)
 {
     var dialog = new SaveFileDialog { Filter = "License key|*.xml", Title = "Savie license key" };
     var showDialog = dialog.ShowDialog();
     if (showDialog != null && (bool)showDialog)
     {
         var xmlWriter=new XmlFileWriter();
         xmlWriter.WriteOrder(this.Order,dialog.FileName);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Execute encrypt.
 /// </summary>
 public void ExecuteEncrypt()
 {
     var dialog = new SaveFileDialog{ Filter = "Save License key|*.xml", Title = "Save license file" };
     var showDialog = dialog.ShowDialog();
     if (showDialog != null && (bool)showDialog)
     {
         this.Order.SerialNumber=Encrypt.Enctypt(Guid.NewGuid());
         var xmlWriter = new XmlFileWriter();
         xmlWriter.WriteOrder(this.Order,dialog.FileName);
     }
 }