Ejemplo n.º 1
0
    }    // END AddTorrentToolStripMenuItem_Click

    private void ExitMenu_Click(object sender, EventArgs e)
    {
        DllInterface.SetDebugStringOutputCb(null);
        DllInterface.DeInitTorrentManager();
        mAppNotifyIcon.Dispose();
        Application.Exit();
    }    // END ExitMenu_Click
Ejemplo n.º 2
0
    }    // END OptionsMenuItem_Click

    private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
    {
        lock (mThreadLock)
        {
            DllInterface.SetDebugStringOutputCb(null);
            DllInterface.DeInitTorrentManager();
            mAppNotifyIcon.Dispose();
            //mTorrentWorkerThread.Abort("MK Shutdown Abort.");
        }
    }    // END MainForm_FormClosed
Ejemplo n.º 3
0
    public MainForm()
    {
        mSelectedTorrentId = (TorrentHandle)Torrent.TorrentValues.INVALID_TORRENT;
        versionChecked     = false;

        mSyncContext = System.ComponentModel.AsyncOperationManager.SynchronizationContext;
        InitializeComponent();

#if DEBUG
        mOutputWnd = new ConsoleOutputWindow();
        mOutputWnd.AddString("App Startup\n");
#endif

        debugStringDelegate = new DllInterface.DebugString_Delegate(DebugStringCallback);
        DllInterface.SetDebugStringOutputCb(debugStringDelegate);

        torrentManager = new BitTorrentManager();
        DllInterface.InitTorrentManager(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));

        // Create an instance of a ListView column sorter and assign it to the ListView control.
        lvwColumnSorter = new ListViewColumnSorter();
        this.mPeersListView.ListViewItemSorter = lvwColumnSorter;
    }// END MainForm