Example #1
0
        public MainWindow()
        {
            InitializeComponent();

            m_NotifyIcon             = new System.Windows.Forms.NotifyIcon();
            m_NotifyIcon.Text        = Cracker.Properties.Resources.Title;
            m_NotifyIcon.Icon        = Cracker.Properties.Resources.xiaonh;
            m_NotifyIcon.MouseClick += M_NotifyIcon_MouseClick;
            m_NotifyIcon.Visible     = true;
            m_ContextMenuStrip       = new System.Windows.Forms.ContextMenuStrip();
            m_ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripMenuItem(Cracker.Properties.Resources.ShowWindow, null, new EventHandler(miShow_Click)));
            m_ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripMenuItem(Cracker.Properties.Resources.HideWindow, null, new EventHandler(miHide_Click)));
            m_ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator());
            m_ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripMenuItem(Cracker.Properties.Resources.Exit, null, new EventHandler(miExit_Click)));
            m_NotifyIcon.ContextMenuStrip = m_ContextMenuStrip;
            m_CancelClose = true;

            m_IsLoaded             = false;
            m_IsStarted            = false;
            m_Log                  = new SimpleLog(tbOutput);
            m_Loader               = new AddressLoader(LoadCallback, LoadCompleteCallback);
            m_Crackers             = new List <AddressCracker>();
            m_Counter              = new Counter();
            m_CrackTimer           = new DispatcherTimer();
            m_CrackTimer.Tick     += m_CrackTimer_Tick;
            m_CrackTimer.Interval  = TimeSpan.FromSeconds(1);
            m_UpdateTimer          = new DispatcherTimer();
            m_UpdateTimer.Tick    += M_UpdateTimer_Tick;
            m_UpdateTimer.Interval = TimeSpan.FromMinutes(1);
        }
Example #2
0
 public AddressCracker(AddressLoader loader, SimpleLog log, Counter counter)
 {
     m_Loader    = loader;
     m_Log       = log;
     m_Counter   = counter;
     m_IsRunning = false;
     m_Thread    = new Thread(new ThreadStart(Crack));
 }