Beispiel #1
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            Debug.WriteLine(this.GetType().Namespace + "." + this.GetType().Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()");

            if (Enabled)
            {
                if (!_storage.IsSaved)
                {
                    /*Prject még soha nem volt mentve, itt az idő hogy megtegye a felhasználó*/
                    var sps = new ShowingParameters();
                    if (sps.Show())
                    {
                        _storage.Parameters.ProductName    = sps.ProudctName;
                        _storage.Parameters.ProductVersion = sps.ProductVersion;
                        _storage.Parameters.ProductCode    = sps.ProcutCode;
                        _storage.Parameters.CustomerName   = sps.CustomerName;
                        _storage.Parameters.CustomerCode   = sps.CustomerCode;
                        _storage.SaveAs(sps.Path);
                        _adapter.Play();
                    }
                }
                else
                {
                    /*Ha nincs vadapater kiválasztva akkor kényszerítjük  felhsználót hogy vállaszon valamit.*/
                    if (!AdapterService.GetAdapters().Contains(_storage.Parameters.DeviceName))
                    {
                        IAdapterSelectForm selector = new SelectAdapterForm();
                        selector.ShowDialog();
                        _storage.Parameters.DeviceName = selector.SelectedAdapter;
                    }
                    _adapter.Play();
                }
            }
        }
Beispiel #2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            if (Enabled)
            {
                if (!_storage.IsSaved)
                {
                    var sps = new ShowingParameters();
                    if (!sps.Show())
                    {
                        return;
                    }
                    _storage.Parameters.ProductName    = sps.ProudctName;
                    _storage.Parameters.ProductVersion = sps.ProductVersion;
                    _storage.Parameters.ProductCode    = sps.ProcutCode;
                    _storage.Parameters.CustomerName   = sps.CustomerName;
                    _storage.Parameters.CustomerCode   = sps.CustomerCode;
                    _storage.SaveAs(sps.Path);
                }
                else
                {
                    _storage.Save();
                }
            }
        }
Beispiel #3
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            var saps = new ShowingParameters
            {
                ProudctName    = _storage.Parameters.ProductName,
                ProductVersion = _storage.Parameters.ProductVersion,
                ProcutCode     = _storage.Parameters.ProductCode,
                CustomerName   = _storage.Parameters.CustomerName,
                CustomerCode   = _storage.Parameters.CustomerCode,
            };

            if (saps.Show())
            {
                _storage.Parameters.ProductName    = saps.ProudctName;
                _storage.Parameters.ProductVersion = saps.ProductVersion;
                _storage.Parameters.ProductCode    = saps.ProcutCode;
                _storage.Parameters.CustomerName   = saps.CustomerName;
                _storage.Parameters.CustomerCode   = saps.CustomerCode;
                _storage.SaveAs(saps.Path);
            }
        }