Пример #1
0
        internal void MenuBtn_Click(object sender, EventArgs e)
        {
            string s = ((Button)sender).Text + ((Button)sender).Name;

            switch (s)
            {
            case "Work Sheet":
                frmWorkSheet pWS = new frmWorkSheet(_pdalStock);
                pWS.MdiParent = this;
                pWS.Show();
                break;

            case "Stock":
                Form1 pf2 = new Form1(_pdalStock);
                pf2.ShowDialog();
                break;

            case "OO":
                //Do nothing for the moment
                break;

            case "Trade Book":
                ((Button)sender).Enabled = false;
                tbMain.SelectedIndex     = 1;
                ((Button)sender).Enabled = true;
                break;

            case "Profit && Loss":
                tbMain.SelectedIndex = 2;
                break;

            case "Trend Graph":
                frmTrendGr pSimpleGr = new frmTrendGr(_pdalStock);
                pSimpleGr.MdiParent = this;
                pSimpleGr.Show();
                break;

            case "Investment Category Graph":
                frmCatGraph pCatGr = new frmCatGraph(_pdalStock);
                pCatGr.MdiParent = this;
                pCatGr.Show();
                break;

            case "Online Update":
                ((Button)sender).Enabled = false;
                UpdateOnline();
                scrtxtStock.ScrollText   = CommonDoubleM.MarqueeString;
                ((Button)sender).Enabled = true;
                break;

            case "Update Traker":
                ((Button)sender).Enabled = false;
                _pdalStock.MarqueeUpdate();
                scrtxtStock.ScrollText   = CommonDoubleM.MarqueeString;
                ((Button)sender).Enabled = true;
                break;

            case "Online Portfolio":
                frmOnlinePortfolio pOnlinePF = new frmOnlinePortfolio(_pdalStock);
                pOnlinePF.MdiParent = this;
                pOnlinePF.Show();
                //frmWatchlist
                break;

            case "Watch List":
                frmWatchlist pWatchList = new frmWatchlist(_pdalStock);
                pWatchList.MdiParent = this;
                pWatchList.Show();
                //frmWatchlist
                break;

            case "New Trad":
                frmNewTrad pNewTrad = new frmNewTrad(_pdalStock);
                //pNewTrad.MdiParent = this;
                pNewTrad.ShowDialog();
                break;

            case "Quick View - Avg":
                frmlAvgView pQuickView = new frmlAvgView(_pdalStock, "Quick View - Average");
                pQuickView.MdiParent = this;
                pQuickView.Show();
                break;

            case "Cumulative Average":
                frmlAvgView pCumulAvg = new frmlAvgView(_pdalStock, "Quick View - Cumulative Average");
                pCumulAvg.MdiParent = this;
                pCumulAvg.Show();
                break;

            case "Stock Edit":
                frmStocks pStocks = new frmStocks(_pdalStock);
                pStocks.MdiParent = this;
                pStocks.Show();
                break;

            /*Views panel*/
            case "Cascade":
                this.LayoutMdi(MdiLayout.Cascade);
                break;

            case "Horizontal":
                this.LayoutMdi(MdiLayout.TileHorizontal);
                break;

            case "Vertical":
                this.LayoutMdi(MdiLayout.TileVertical);
                break;

            case "Arrange":
                this.LayoutMdi(MdiLayout.ArrangeIcons);
                break;

            /*Configuration panel*/
            case "Settings":
                //Do nothing for the moment
                break;

            case "Proxy":
                tbMain.SelectedIndex = 2;

                /*string s1 = AppWRDoubleM.ReadSetting("Setting1");
                 * MessageBox.Show(s1);
                 * AppWRDoubleM.WriteSetting("Setting1", "abc");*/

                //int n = Int32.Parse(dks,System.Globalization.StringInfo.ParseCombiningCharacters);

                /* string dks = CryptorEngine.Encrypt("Nestle", true);
                 * string dk = CryptorEngine.Decrypt(dks, true);*/
                break;


            default:
                break;
            }
        }
Пример #2
0
        internal void MenuBtn_Click(object sender, EventArgs e)
        {
            string s = ((Button)sender).Text + ((Button)sender).Name;

            switch (s)
            {
            case "Work Sheet":
                frmWorkSheet pWS = new frmWorkSheet(_pdalStock);
                pWS.MdiParent = this;
                pWS.Show();
                //frmWorkSheet.ActiveForm.Activate();
                break;

            case "Manage Stock Rates":
                if (pMngSPrice == null)
                {
                    pMngSPrice = new frmMngStockPrice(_pdalStock);
                }
                pMngSPrice.MdiParent = this;
                pMngSPrice.Show();
                pMngSPrice.Select();
                break;

            case "Manage Tradings":
                MessageBox.Show("Features - 'Manage Tradings' will be included in next version of DoubleM", "Coming with next version", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            case "Trade Book":
                ((Button)sender).Enabled = false;
                tbMain.SelectedIndex     = 1;
                ((Button)sender).Enabled = true;
                break;

            case "Profit && Loss":
                tbMain.SelectedIndex = 0;
                break;

            case "Trend Graph":
                frmTrendGr pSimpleGr = new frmTrendGr(_pdalStock);
                pSimpleGr.MdiParent = this;
                pSimpleGr.Show();
                break;

            case "Investment Category Graph":
                frmCatGraph pCatGr = new frmCatGraph(_pdalStock);
                pCatGr.MdiParent = this;
                pCatGr.Show();
                break;

            case "Online DB Update":
                ((Button)sender).Enabled = false;
                UpdateOnline();
                scrtxtStock.ScrollText   = CommonDoubleM.MarqueeString;
                ((Button)sender).Enabled = true;
                break;

            case "BSE direct":
                frmReadBSE pBSE = new frmReadBSE(_pdalStock);
                pBSE.MdiParent = this;
                pBSE.Show();
                break;

            case "Yahoo direct":
                frmReadYF_MR pYF = new frmReadYF_MR(_pdalStock, "Yahoo");
                pYF.MdiParent = this;
                pYF.Show();
                break;

            case "Rediff direct":
                frmReadYF_MR pMR = new frmReadYF_MR(_pdalStock, "Rediff");
                pMR.MdiParent = this;
                pMR.Show();
                break;

            case "Update Traker":
                ((Button)sender).Enabled = false;
                _pdalStock.MarqueeUpdate();
                scrtxtStock.ScrollText   = CommonDoubleM.MarqueeString;
                ((Button)sender).Enabled = true;
                break;

            case "New Trad":
                frmNewTrad pNewTrad = new frmNewTrad(_pdalStock);
                //pNewTrad.MdiParent = this;
                pNewTrad.ShowDialog();
                break;

            case "Quick View - Avg":
                frmlAvgView pQuickView = new frmlAvgView(_pdalStock, "Quick View - Average");
                pQuickView.MdiParent = this;
                pQuickView.Show();
                break;

            case "Cumulative Average":
                frmlAvgView pCumulAvg = new frmlAvgView(_pdalStock, "Quick View - Cumulative Average");
                pCumulAvg.MdiParent = this;
                pCumulAvg.Show();
                break;

            case "Manage Scripts":
                //frmStocks pStocks = new frmStocks(_pdalStock);
                frmMngStocks pStocks = new frmMngStocks(_pdalStock);
                pStocks.MdiParent = this;
                pStocks.Show();
                break;

            /*Views panel*/
            case "Cascade":
                this.LayoutMdi(MdiLayout.Cascade);
                break;

            case "Horizontal":
                this.LayoutMdi(MdiLayout.TileHorizontal);
                break;

            case "Vertical":
                this.LayoutMdi(MdiLayout.TileVertical);
                break;

            case "Arrange":
                this.LayoutMdi(MdiLayout.ArrangeIcons);
                break;

            /*Configuration panel*/
            case "Settings":
                //Do nothing for the moment
                break;

            case "Proxy":
                tbMain.SelectedIndex = 2;

                /*string s1 = AppWRDoubleM.ReadSetting("Setting1");
                 * MessageBox.Show(s1);
                 * AppWRDoubleM.WriteSetting("Setting1", "abc");*/

                //int n = Int32.Parse(dks,System.Globalization.StringInfo.ParseCombiningCharacters);

                /* string dks = CryptorEngine.Encrypt("Nestle", true);
                 * string dk = CryptorEngine.Decrypt(dks, true);*/
                break;

            case "About":
                ShowAbout();
                break;

            case "Credit":
                MessageBox.Show(".:" + Application.ProductName +
                                ":. - Market Manager\n\t\t Ver " +
                                Application.ProductVersion +
                                " \n\nAll rights reserved by OM Soft Pvt. Ltd." +
                                "\nContact:[email protected] for further details.",
                                "Rights Reserved", MessageBoxButtons.OK, MessageBoxIcon.Information);

                break;

            case "Licence":
                MessageBox.Show(".:" + Application.ProductName +
                                ":. - Market Manager\n\t\t Ver " +
                                Application.ProductVersion +
                                " \n\nIt's Beta release." +
                                "\nPlease let us know your feedback:-\[email protected]",
                                "Free Licence", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                break;

            default:
                break;
            }
        }