Пример #1
0
        void lisansDosyasiYukle_Click(object sender, EventArgs e)
        {
            try
            {
                this.Hide();
                using (xFrmValidate v = new xFrmValidate())
                {
                    switch (v.ShowDialog())
                    {
                    case DialogResult.OK:
                        this.DialogResult = DialogResult.OK;
                        return;

                    default:
                        Application.Exit();
                        return;
                    }
                }
            }
            catch (Exception)
            {
                Commons.Status(Commons.GetErrorCode("FTL", 1) + " TRIAL VERSION");
            }
        }
Пример #2
0
        void rFrmMain_Load(object sender, EventArgs e)
        {
            try
            {
                this.Text = "EasySupply v" + Application.ProductVersion;
                this.ribbon.SelectedPage = FaturaHazir;

                #region --- Application Loading ---
                Commons.Loading("Uygulama başlatılıyor. ..");
                bool isJSonFile = jSonData.ReadFile();
                Commons.GetLastAccessTime();
                #endregion

                #region --- Validate Design Control ---
                if (!Commons.ValidateApplication())
                {
                    Commons.Loaded();
                    using (xFrmValidate v = new xFrmValidate())
                    {
                        switch (v.ShowDialog())
                        {
                        case DialogResult.OK:
                            m_LisansKeyValidate = true;
                            Application.Restart();
                            return;

                        default:
                            Application.ExitThread();
                            Application.Exit();
                            return;
                        }
                    }
                }
                #endregion

                #region --- Trial Version Warning ---
                if (Commons.ExpariedDay <= 10)
                {
                    this.yeniLisanSatinAlButton.Visibility = BarItemVisibility.Always;
                }
                else
                {
                    this.yeniLisanSatinAlButton.Visibility = BarItemVisibility.Never;
                }
                this.m_TrialVersionWarning = this.m_TrialVersionWarning.AddHours(1);
                this.timer1.Start();
                #endregion

                #region --- Default Settings ---
                Commons.Loading("Uygulama ayarları okunuyor. ..");
                DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(rgbTemalar, true);
                if (!isJSonFile)
                {
                    Commons.Loaded();
                    xFrmSettings settings = new xFrmSettings();
                    settings.ShowDialog();
                }
                Commons.ColorLoad();
                Commons.RestoreHeader();
                Commons.Loading("Bağlantı ayarları kontrol ediliyor.. .");
                if (!Commons.ConnectionStates())
                {
                    Commons.Loaded();
                    xFrmSettings settings = new xFrmSettings();
                    settings.ShowDialog();
                }
                Commons.Loading("Güncel doviz kurları ve datalar getiriliyor.. .");
                Commons.CurrentDoviz();
                #endregion

                this.urunFiyatKarsilasitirmaButton.PerformClick();
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FMN", 2) + ex.Message);
            }
            finally
            {
                Commons.Loaded();
            }
        }