コード例 #1
0
        public MainForm()
        {
            SetUILanguage();
            InitializeComponent();

            Text            = string.Format(Text, String.Format(Constants.Software, Core.Version));
            notifyIcon.Icon = Icon;
            notifyIcon.Text = Text;

            m_ConnectionsControl      = new ConnectionsControl(this);
            m_ConnectionsControl.Dock = DockStyle.Fill;
            m_SearchControl           = new SearchControl(this);
            m_SearchControl.Dock      = DockStyle.Fill;
            m_DownloadsControl        = new DownloadsControl(this);
            m_DownloadsControl.Dock   = DockStyle.Fill;
            m_UploadsControl          = new UploadsControl(this);
            m_UploadsControl.Dock     = DockStyle.Fill;
            m_SharedFilesControl      = new SharedFilesControl(this);
            m_SharedFilesControl.Dock = DockStyle.Fill;
            m_StatisticsControl       = new StatisticsControl(this);
            m_StatisticsControl.Dock  = DockStyle.Fill;
            switch (m_Settings["MainFormLastTab"])
            {
            case "1":
                searchToolStripButton.PerformClick();
                break;

            case "2":
                downloadsToolStripButton.PerformClick();
                break;

            case "3":
                uploadsToolStripButton.PerformClick();
                break;

            case "4":
                sharedFilesToolStripButton.PerformClick();
                break;

            case "5":
                statisticsToolStripButton.PerformClick();
                break;

            default:
                connectionsToolStripButton.PerformClick();
                break;
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Steeslice/StealthNet-Alt
        public MainForm()
        {
            SetUILanguage();
            InitializeComponent();

            Text = string.Format(Text, String.Format(Constants.Software, Core.Version));
            notifyIcon.Icon = Icon;
            notifyIcon.Text = Text;

            m_ConnectionsControl = new ConnectionsControl(this);
            m_ConnectionsControl.Dock = DockStyle.Fill;
            m_SearchControl = new SearchControl(this);
            m_SearchControl.Dock = DockStyle.Fill;
            m_DownloadsControl = new DownloadsControl(this);
            m_DownloadsControl.Dock = DockStyle.Fill;
            m_UploadsControl = new UploadsControl(this);
            m_UploadsControl.Dock = DockStyle.Fill;
            m_SharedFilesControl = new SharedFilesControl(this);
            m_SharedFilesControl.Dock = DockStyle.Fill;
            m_StatisticsControl = new StatisticsControl(this);
            m_StatisticsControl.Dock = DockStyle.Fill;
            switch (m_Settings["MainFormLastTab"])
            {
                case "1":
                    searchToolStripButton.PerformClick();
                    break;
                case "2":
                    downloadsToolStripButton.PerformClick();
                    break;
                case "3":
                    uploadsToolStripButton.PerformClick();
                    break;
                case "4":
                    sharedFilesToolStripButton.PerformClick();
                    break;
                case "5":
                    statisticsToolStripButton.PerformClick();
                    break;
                default:
                    connectionsToolStripButton.PerformClick();
                    break;
            }
        }