protected void OpenInformation() { System.Diagnostics.Debug.WriteLine("call information"); using (var infoView = new InformationViewModel()) { Messenger.Raise(new TransitionMessage(infoView, "InformationCommand")); this.isLicenseActivate = infoView.IsLicenceActivate; // license が正常に認識されれば true System.Diagnostics.Debug.WriteLine("retuen license is " + infoView.IsLicenceActivate); // open URL or PDF // ライセンス認証が通って居ればそのまま。 if (this.isLicenseActivate) { return; } // ライセンス認証通ってなければ再検査。 if (EnvInfo.IsLicenceInvalid())// license invalid { MessageBox.Show("License error. " + Environment.NewLine + "License is invalid!"); System.Threading.Thread.Sleep(1800); Application.Current.Shutdown(); } }; /* * if (ShowConfirmDialog("your address : " + Utils.EnvInfo.firstAddress + Environment.NewLine + * "contact us? (open web page)", "information") ) { * * Utils.Approbate.OpenUrl("https://www.w-fusion.co.jp/J/contactus.php"); * System.Diagnostics.Debug.WriteLine("information click."); // open URL or PDF * } */ }
public void CallAcceptLicense() { if (File.Exists(this._licenseFile)) { var message = string.Empty; WfComponent.Utils.FileUtils.FileCopy( _licenseFile, // user select file pass Approbate.DefaultLicenceFilePath, ref message); System.Threading.Thread.Sleep(1000); if (string.IsNullOrEmpty(message)) { // copy success. if (EnvInfo.IsLicenceInvalid()) // license invalid { ViewClose(); // 閉じる return; // IsActivateLicence = false; } else { // ShowInfoDialog("license is activated.", "license file accept."); Properties.Settings.Default.demo_mode = string.Empty; Properties.Settings.Default.Save(); isActivate = true; } } else { ShowErrorDialog("license file copy error"); } } // File null (close window) => IsActivateLicence = false; ViewClose(); // 閉じる }