Ignore:
Timestamp:
Jul 5, 2010, 3:51:42 PM (11 years ago)
Author:
Paul Lelgemann
Message:

+ P2PEditor can display the status of jobs, if available; Participating displays overlay while loading workspace data
+ KeySearcher can upload status for P2PEditor display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/KeySearcherSettings.cs

    r1701 r1727  
    11using System;
    22using System.Numerics;
     3using System.Windows;
     4using Cryptool.P2P;
    35using Cryptool.PluginBase;
    46using System.ComponentModel;
    57using System.Collections.ObjectModel;
    68using KeySearcher.KeyPattern;
     9using KeySearcher.P2P.Storage;
    710
    811namespace KeySearcher
     
    132135        }
    133136
     137        [TaskPane("Copy status key", "Copy status key to clipboard. The key can than be used to upload it together with the job using the P2PEditor.", GroupPeerToPeer, 4, true, DisplayLevel.Professional, ControlType.Button)]
     138        public void StatusKeyButton()
     139        {
     140            if (!keysearcher.IsKeySearcherRunning)
     141            {
     142                keysearcher.GuiLogMessage("KeySearcher must be running to copy the status key.", NotificationLevel.Error);
     143                return;
     144            }
     145
     146            var generator = new StorageKeyGenerator(keysearcher, this);
     147            var statusKey = generator.GenerateStatusKey();
     148
     149            Clipboard.SetDataObject(statusKey, true);
     150            keysearcher.GuiLogMessage("Status key '" + statusKey + "' has been copied to clipboard.",
     151                                      NotificationLevel.Info);
     152        }
     153
    134154        private ObservableCollection<string> coresAvailable = new ObservableCollection<string>();
    135155        public ObservableCollection<string> CoresAvailable
Note: See TracChangeset for help on using the changeset viewer.