Esempio n. 1
0
        void ExecuteEODControlClicked(object parameter)
        {
            Action <string> mydelegate = AddMessageToLog;

            if (parameter.Equals("btnStart"))
            {
                bool bRetval = false;

                // if (objSettings.ChkNseEquity)
                // {

                if (ValidateInputs())
                {
                    bRetval = true;
                }

                if (bRetval)
                {
                    objSettings.Load();
                    EODData.StartButtonClicked(objSettings, AddMessageToLog);
                    System.Windows.MessageBox.Show("Finished!");
                }
                // }
            }
            else if (parameter.Equals("btnExit"))
            {
                //App.Current.Shutdown();
            }
        }
Esempio n. 2
0
        void ExecuteEODControlClicked(object parameter)
        {
            Action <string> mydelegate = AddMessageToLog;


            if (parameter.Equals("btnStart"))
            {
                bool bRetval = false;

                // if (objSettings.ChkNseEquity)
                // {

                if (ValidateInputs())
                {
                    bRetval = true;
                }

                if (bRetval)
                {
                    objSettings.Load();


                    EODData.StartButtonClicked(objSettings, AddMessageToLog);
                    AddMessageToLog("Download Finished!\n");
                    //System.Windows.MessageBox.Show("Unzip CM*.* Files Manually in the same folder\n");

                    AddMessageToLog("Unzipping files ...\n");

                    string[] words           = null;
                    string   strOutputFormat = objSettings.OutputFormat;
                    words = strOutputFormat.Split(',');

                    Process pd = new Process();
                    foreach (string item in words)
                    {
                        if (item == "StdCSV")
                        {
                            if (objSettings.ChkNseEquity)
                            {
                                pd.ProcessNSEEQUITY(objSettings, AddMessageToLog);
                            }

                            if (objSettings.ChkBseEquity)
                            {
                                pd.ProcessBSEEQUITY(objSettings, AddMessageToLog);
                            }
                        }
                    }

                    //pd.ProcessNSEEQUITY(objSettings, AddMessageToLog);
                    //pd.ProcessBSEEQUITY(objSettings, AddMessageToLog);
                    System.Windows.MessageBox.Show("Finished!\n");
                }
                // }
            }
            else if (parameter.Equals("btnExit"))
            {
                App.Current.Shutdown();
            }
        }