/// <summary>
        /// Główne wejście aplikacji
        /// </summary>
        public MainWindow()
        {
            // Załadowanie kontrolek
            InitializeComponent();

            if (Environment.GetCommandLineArgs() != null)
            {
                if (Environment.GetCommandLineArgs().Any(arg => arg.Contains("getkey")))
                {
                    MessageBox.Show("Your beta key: " + ID.GetFingerprint());
                }
            }

            Thread thr = new Thread(delegate()
            {
                // Aktualizacja
                Updater.Update("SkypeTalkBot");
            })
            {
                IsBackground = true
            };

            thr.Start();

            // Wyślij statystyki
            Stats = new ProgStats();
            Stats.AppLicenseType = LicenseType.Free;
            Stats.AppVersion     = Updater.GetActiveVersion();
            Stats.AppStart("aa53533c18a451bfb80749f96081aac4399ed59e");
        }
示例#2
0
        /// <summary>
        ///     The default constructor.
        /// </summary>
        static Data()
        {
            Icon                      = Resources.Icon;
            PointChar                 = '.';
            Dfs                       = "dd.MM";
            Df                        = "dd.MM.yy";
            AutoUsePrvBarValue        = true;
            FirstBar                  = 40;
            PeriodColor               = new Dictionary <DataPeriod, Color>();
            AdditionalFolder          = "Additional" + Path.DirectorySeparatorChar;
            SourceFolder              = "Indicators" + Path.DirectorySeparatorChar;
            DefaultStrategyDir        = "Strategies" + Path.DirectorySeparatorChar;
            ColorDir                  = "Colors" + Path.DirectorySeparatorChar;
            LanguageDir               = "Languages" + Path.DirectorySeparatorChar;
            SystemDir                 = "System" + Path.DirectorySeparatorChar;
            LibraryDir                = "Libraries" + Path.DirectorySeparatorChar;
            UserFilesDir              = "User Files";
            ProgramName               = "Forex Strategy Builder";
            IsProgramReleaseCandidate = false;
            IsProgramBeta             = false;
            LoadedSavedStrategy       = "";
            StrategyName              = "New.xml";
            StrategyDir               = "Strategies" + Path.DirectorySeparatorChar;
            OfflineDocsDir            = "Docs" + Path.DirectorySeparatorChar;
            DefaultOfflineDataDir     = "Data" + Path.DirectorySeparatorChar;
            OfflineDataDir            = "Data" + Path.DirectorySeparatorChar;
            Debug                     = false;
            IsData                    = false;
            IsResult                  = false;
            IsStrategyChanged         = false;
            StackStrategy             = new Stack <Strategy>();
            GeneratorHistory          = new List <Strategy>();
            ProgStats                 = new ProgStats {
                AppLicenseType = LicenseType.Valid
            };
            ProgStats.AppStart("980834a958e961563091a670660243e7dd17d543");
            IsIntrabarData = false;
            SingleOrder    = false;
            WorkingMinutes = 0;
            MaxDD          = 100;
            MM             = 0;
            AutoSave       = false;
            AutoMM         = false;
            AutoOptimize   = "";

            // Program's Major, Minor, Version and Build numbers must be <= 99.
            ProgramVersion = Application.ProductVersion;
            string[] version = ProgramVersion.Split('.');
            ProgramId = 1000000 * int.Parse(version[0]) +
                        10000 * int.Parse(version[1]) +
                        100 * int.Parse(version[2]) +
                        1 * int.Parse(version[3]);
            Strategy.GenerateNew();
        }
示例#3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            stats = new ProgStats();

            // If your application uses licensing, you can set the license type of your app.
            // Available license types are: Free, Trial, Expired, Valid, NotValid, Unknown
            stats.AppLicenseType = LicenseType.Free;

            // Sets application version.
            stats.AppVersion = Application.ProductVersion;

            // Begin proceding stats
            // Sets the particular application Id.
            stats.AppStart("cbc15a23946e34067c0085b2087ac33bf221a7d5");
        }