/// <summary> /// Fills the labels with content /// </summary> private void LoadFields() { LabelCustomerReference.Content = ManastoneClient.GetInstance().CustomerReference; LabelConfigVersion.Content = $"{Config.GetInstance().Directory["MPSVersion"]}"; LabelProgramVersion.Content = FileVersionInfo .GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductVersion; LabelOidVersion.Content = $"{Config.GetInstance().Directory["OidVersion"]}"; LabelUuid.Content = $"{Config.GetInstance().Directory["UUID"]}"; LabelFnLogVersion.Content = FnLog.FnLogClientVersion; LabelManastoneVersion.Content = ManastoneClient.ClientVersion; }
/// <summary> /// Downloads and updates the oid table /// </summary> /// <param name="oidVersion"></param> private void DownloadAndUpdateOidTable(string oidVersion) { ManastoneClient.GetInstance().CheckToken(); FnLog.GetInstance().AddToLogList(FnLog.LogType.MajorRuntimeInfo, "OpenMPSClient", "DownloadAndUpdateOidTable - " + ManastoneClient.GetInstance().Token); var oid = SocketIoClient.RetrieveSingleValue <List <Oid> >(_url, "OidOffer", "OidRequest", new OidRequest(ManastoneClient.GetInstance().Token).Serialize(), timeout: 30000); FnLog.GetInstance().AddToLogList(FnLog.LogType.MajorRuntimeInfo, "OpenMPSClient", "DownloadAndUpdateOidTable received" + oid.Count); Config.GetInstance().UpdateOids(oidVersion, oid); FnLog.GetInstance().AddToLogList(FnLog.LogType.MajorRuntimeInfo, "OpenMPSClient", "DownloadAndUpdateOidTable Complete"); }
/// <summary> /// Activate button click event /// triggers an activation via ManastoneClient /// prompts message-boxes if activation failed /// closes the dialog if activation is successful /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ButtonActivate_OnClick(object sender, RoutedEventArgs e) { if (CheckLength()) { if (ManastoneClient.GetInstance().Activate(SpliceSegments())) { Result = true; FnLog.GetInstance().AddToLogList(FnLog.LogType.RuntimeInfo, "LicenseDialog", "true close"); this.Close(); } else { MessageBox.Show("Fehlerhafe Seriennummer"); } } else { MessageBox.Show("Bitte geben Sie eine gültige Seriennummer ein!"); } }