// Token: 0x0600002E RID: 46 RVA: 0x00003BB4 File Offset: 0x00003BB4 private void timer1_Tick(object sender, EventArgs e) { new StringBuilder(); int num = 1; foreach (Process process in Process.GetProcesses(".")) { try { if (process.MainWindowTitle.Length > 0) { if (process.MainWindowTitle == "SA-MP 0.3" && Client.GetTimestamp() > this.izinsuresi) { Process.GetProcessesByName(process.MainWindowTitle.ToString()); process.Kill(); MessageBoxWrapper.Show("Client açıkken SA-MP çalıştırılamaz.", "Rina Anti-Cheat"); this.izinsuresi = 0; } num++; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } }
public void EditFromOutside() { if (CurrentAccount != null) { if (CurrentAccount.Num < 1) { return; } if (CurrentAccount.SubNum == 0) { MainAcc ds = new MainAcc(CurrentAccount, EditMode.Edit, true); ds.ShowDialog(); if (ds.DialogResult.HasValue && ds.DialogResult.Value) { Refresh(); } } else { MainAcc dSubAcc = new MainAcc(CurrentAccount, EditMode.Edit, false); dSubAcc.ShowDialog(); if (dSubAcc.DialogResult.HasValue && dSubAcc.DialogResult.Value) { Refresh(); } } ; } else { MessageBoxWrapper.Show("Моля, изберете сметка"); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (vm.CopyCommand.CanExecute(null)) { if (dataGrid2D.SelectedItems != null && dataGrid2D.SelectedItems.Count > 0) { vm.SFields = new ObservableCollection <ObservableCollection <string> >(); foreach (var item in dataGrid2D.SelectedItems) { var iii = item as DataRowView; var newrow = new ObservableCollection <string>(); if (iii != null) { foreach (var o in iii.Row.ItemArray) { newrow.Add((o as DataGrid2DLibrary.Ref <System.String>).Value); } vm.SFields.Add(newrow); } } vm.CopyCommand.Execute(null); } } else { MessageBoxWrapper.Show("Не е избрана фирма, от която да се копират номенклатури"); } }
private void CheckForIncompatibilities() { var incompatibleMods = Compatibility.IncompatibleMods; if (incompatibleMods.Count > 0) { var incompatibleStrings = new List <string>(); foreach (var incompatibleMod in incompatibleMods) { if (incompatibleMod != null) { var pluginName = incompatibleMod.PluginInfo.name; var instances = incompatibleMod.PluginInfo.GetInstances <IUserMod>(); if (instances.Length > 0) { pluginName = instances[0].Name; } incompatibleStrings.Add($"{pluginName}:\n{incompatibleMod.Description}"); } } if (incompatibleStrings.Count > 0) { MessageBoxWrapper.Show(MessageBoxWrapper.MessageType.Warning, $"{Details.ModName} incompatibilities", $"{Details.BaseModName} has detected some mod incompatibilities. These mods are known to not work with this mod: \n\n{string.Join("\n\n", incompatibleStrings.ToArray())}"); } } }
protected override void MovePrevius() { // Create OpenFileDialog OpenFileDialog dlg = new OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".conf"; // Display OpenFileDialog by calling ShowDialog method bool?result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { try { builder.LoadSettings(dlg.FileName); _reportItems = new ObservableCollection <ReportItem>(builder.ReportItems); } catch (Exception e) { MessageBoxWrapper.Show(e.Message); } OnPropertyChanged("ReportItems"); } }
public static bool PatchAll() { var patchSuccess = false; LoggingWrapper.Log(LoggingWrapper.LogArea.All, LoggingWrapper.LogType.Message, $"Patching..."); try { LoggingWrapper.Log(LoggingWrapper.LogArea.All, LoggingWrapper.LogType.Message, $"Patching {PatchAssembly.GetName().Name}..."); patchSuccess = Patcher.PatchAll(); LoggingWrapper.Log(LoggingWrapper.LogArea.All, LoggingWrapper.LogType.Message, "Done!"); } catch (Exception ex) { LoggingWrapper.Log(LoggingWrapper.LogArea.All, LoggingWrapper.LogType.Error, $"Couldn't patch the required methods!"); LoggingWrapper.Log(LoggingWrapper.LogArea.Hidden, ex, true); } if (!patchSuccess) { MessageBoxWrapper.Show(MessageBoxWrapper.MessageType.Warning, $"{Details.ModName} couldn't start", $"{Details.ModName} couldn't fully start due to an issue overriding parts of the game.\n\n" + $"This is likely due to a recent update to Cities, and in order to prevent potential compatibility issues {Details.BaseModName} has disabled some functionality by reverting changes until a solution is found. This will result in most mod functionaity being disabled.\n\n" + $"If this has not previously been reported please do so, otherwise an update to the mod is required to fix the incompatibilites."); UnPatchAll(); } return(patchSuccess); }
private void Button_Click(object sender, RoutedEventArgs e) { IInputElement focusedElement = FocusManager.GetFocusedElement(this); if (focusedElement is TextBox) { var expression = (focusedElement as TextBox).GetBindingExpression(TextBox.TextProperty); if (expression != null) { expression.UpdateSource(); } } if (vm.IsEdit) { vm.UpdateCommand.Execute(sender); DialogResult = true; this.Close(); } else { if (vm.CheckSaldoItem()) { vm.SaveCommand.Execute(sender); DialogResult = true; this.Close(); } else { MessageBoxWrapper.Show("Вече е въведено салдо по тази номенклаура"); } } }
protected override void MoveNext() { // Create OpenFileDialog SaveFileDialog dlg = new SaveFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".conf"; // Display OpenFileDialog by calling ShowDialog method bool?result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { try { builder.SaveSettings(dlg.FileName); } catch (Exception e) { MessageBoxWrapper.Show(e.Message); } } }
protected override void Delete() { if (Lookup != null) { if ((this.CurrentRowIndex == -1)) { return; } if (MessageBoxWrapper.Show("Сигурни ли сте, че желаете да изтриете този запис?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { if (Context.CheckLookup(Lookup.Id, this.Fields[this.CurrentRowIndex + 1][1])) { if (Context.DeleteRow(new List <string>(this.Fields[this.CurrentRowIndex + 1]), LookupModelm)) { CalculateFields(); OnPropertyChanged("Fields"); MessageBoxWrapper.Show("Записът е изтрит"); } else { MessageBoxWrapper.Show("Грешка при триене"); } } else { MessageBoxWrapper.Show("Записа не може да бъде изтрит защото се използва в салда или контировки"); } } } }
protected override void Save() { if (Mode == EditMode.Edit) { if (_LookupModel != null) { if (Context.UpdateLookup(_LookupModel)) { MessageBoxWrapper.Show("Записа е променен"); } else { MessageBoxWrapper.Show("Грешка по време на запис"); } } } if (Mode == EditMode.Add) { _LookupModel.Fields = new List <TableField>(this._NomenclatureFieldsSelected); //this._LookupModel.Fields.Add(new TableField { Name = "Номер", DbField = "Integer", NameEng = "Id", Length = 10, IsNull = false }); Context.CreateTable(this._LookupModel); this._Lookups = new ObservableCollection <LookUpMetaData>(Context.GetAllLookups("")); OnPropertyChanged("Lookups"); } base.Save(); }
protected override void Add() { HoldingViewModel holding = new HoldingViewModel(new HoldingModel { Name = "New", IpServer = "localhost", Nom = Holdings.Count + 1 }); var conf = ConfigTempoSinglenton.GetInstance(); holding.ConnectionString = string.Format(Entrence.ConectionStringTemplate, holding.IpServer, conf.BaseDbPath, "H" + holding.Nom); Holdings.Add(holding); if ( MessageBoxWrapper.Show("Копиране на празна база от темплейтите?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { IoHelper.DirectoryCopy(ConfigTempoSinglenton.GetInstance().BaseTemplatePath, Path.Combine(ConfigTempoSinglenton.GetInstance().BaseDbPath, "H" + holding.Nom), true); } foreach (var item in conf.ConfigNames) { var spliter = item.Split('|'); FirmSettingModel newsett = new FirmSettingModel(); newsett.Key = spliter[0]; newsett.Name = spliter[1]; newsett.Value = spliter[2]; newsett.FirmaId = 1; newsett.HoldingId = holding.Nom; conf.FirmSettings.Add(newsett); } conf.SaveConfiguration(); }
protected override void Delete() { if (MessageBoxWrapper.Show("Сигурни ли сте, че желаете да изтриете този запис?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { if (CurrentIndex != -1) { if (Context.DeleteFirma(CurrentFirma.Id)) { AllFirms.Remove(AllFirms[CurrentIndex]); MoveNext(); MessageBoxWrapper.Show("Записът е изтрит"); } else { MessageBoxWrapper.Show("Грешка при триене"); } } else { MessageBoxWrapper.Show("Не е избрана фирма за триене"); } } }
protected override void Delete() { LookupModel lookup = null; if (Lookup != null) { if ((this.CurrentRowIndex == -1)) { return; } lookup = Context.GetSysLookup(Lookup.Id); lookup.LookUpMetaData = Lookup; if (MessageBoxWrapper.Show(Resources.AnaliticManagerViewModel_Delete_res3, Resources.AnaliticManagerViewModel_Delete_res4, MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { if (Context.DeleteRow(new List <string>(this.Fields[this.CurrentRowIndex + 1]), lookup)) { CalculateFields(); OnPropertyChanged("Fields"); MessageBoxWrapper.Show(Resources.AnaliticManagerViewModel_Delete_res5); } else { MessageBoxWrapper.Show(Resources.AnaliticManagerViewModel_Delete_res2); } } } }
private void CopyFirmToFirm() { var allacc = Context.GetAllAccounts(CurrentFirmaWraperSource.Id); var oldcursor = Mouse.OverrideCursor; Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; var AllAnaliticTypes = new ObservableCollection <AnaliticalAccountType>(Context.GetAllAnaliticalAccountType()); var AllAnaliticalFields = new ObservableCollection <AnaliticalFields>(Context.GetAllAnaliticalFields()); var AllConnectors = new ObservableCollection <MapAnanaliticAccToAnaliticField>(Context.GetAllConnectorAnaliticField()); var AlaMapToType = new ObservableCollection <MapAnanaliticAccToAnaliticField>(Context.GetAllConnectorTypeField()); foreach (AccountsModel accountsModel in allacc) { accountsModel.FirmaId = CurrentFirmaWraperDest.Id; var SelectedConnectors = new ObservableCollection <MapAnanaliticAccToAnaliticField>( AllConnectors.Where(e => e.AnaliticalNameID == accountsModel.AnaliticalNum)); ObservableCollection <AnaliticalFields> SelectedAnaliticalFields = new ObservableCollection <AnaliticalFields>(); foreach (var curr in SelectedConnectors) { var addfield = AllAnaliticalFields.Where(e => e.Id == curr.AnaliticalFieldId).FirstOrDefault(); if (addfield != null) { addfield.Requared = curr.Required; if (addfield != null) { SelectedAnaliticalFields.Add(addfield); } } } Context.LoadMapToLookUps(SelectedAnaliticalFields, accountsModel.Id, accountsModel.AnaliticalNum); var CurrentAllTypeAccount = AllAnaliticTypes.Where(e => e.Id == accountsModel.TypeAnaliticalKey).FirstOrDefault(); //SelectedConnectors = // new ObservableCollection<MapAnanaliticAccToAnaliticField>( // AlaMapToType.Where(e => e.AnaliticalFieldId == accountsModel.TypeAnaliticalKey)); //ObservableCollection<AnaliticalFields> SelectedAnaliticalTypeFields=new ObservableCollection<AnaliticalFields>(); //foreach (var curr in SelectedConnectors) //{ // var addfield = AllAnaliticalFields.FirstOrDefault(e => e.Id == curr.AnaliticalNameID); // if (addfield != null) // { // addfield.Requared = curr.Required; // SelectedAnaliticalTypeFields.Add(addfield); // } //} string errormessage; if (!Context.UpdateAccount(accountsModel, true, SelectedAnaliticalFields, out errormessage)) { MessageBoxWrapper.Show(string.Format(" Грешка при копиране на сметкоплана от фирма {0} е копиран на фирма {1} заради грешка {2}", CurrentFirmaWraperSource.CurrentFirma.Name, CurrentFirmaWraperDest.CurrentFirma.Name, errormessage), "Предупреждение"); } } Mouse.OverrideCursor = oldcursor; MessageBoxWrapper.Show(string.Format("Сметкоплана от Фирма {0} е копиран на {1}", CurrentFirmaWraperSource.CurrentFirma.Name, CurrentFirmaWraperDest.CurrentFirma.Name), "Известие"); }
private static void CheckForExperimentalVersion() { if (Details.ExperimentalBuild && UserModSettings.RecentlyUpdated) { var title = string.Format(LocalisationHolder.Translate(LocalisationHolder.CurrentLocalisation.ExperimentalBuild_Title), Details.BaseModName); var description = string.Format(LocalisationHolder.Translate(LocalisationHolder.CurrentLocalisation.ExperimentalBuild_Description), Details.BaseModName); MessageBoxWrapper.Show(MessageBoxWrapper.MessageType.Warning, title, description); } }
private static void PatchOptional() { var patched = true; patched = patched && OptionalPatch(new NewCommonBuildingAI_GetColor(), ref FeatureToggles.LightingModificationsActive); if (!patched) { MessageBoxWrapper.Show(MessageBoxWrapper.MessageType.Warning, string.Format(LocalisationHolder.Translate(LocalisationHolder.CurrentLocalisation.Incompatibility_Title), Details.BaseModName), LocalisationHolder.Translate(LocalisationHolder.CurrentLocalisation.Incompatibility_Description)); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (CheckForPermition) { ConfigTempoSinglenton currentconfig = ConfigTempoSinglenton.GetInstance(); if (currentconfig.Periods.FirstOrDefault(e1 => e1.Fr <= dater.SelectedDate && e1.To >= dater.SelectedDate && e1.Firma == currentconfig.ActiveFirma && e1.Holding == currentconfig.ActiveHolding) != null) { MessageBoxWrapper.Show("Забранен период не може да се сетне датата " + dater.SelectedDate); return; } } DialogResult = true; }
private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { Visible = System.Windows.Visibility.Hidden; if (String.IsNullOrWhiteSpace(Error)) { MessageBoxWrapper.Show("Приключването е готово"); } else { MessageBoxWrapper.Show(Error); Error = null; } }
protected override void Delete() { if (MessageBoxWrapper.Show("Сигурни ли сте, че желаете да изтриете този запис?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { if (!Context.DeleteDdsDnevnicModel(ddsDnevnikModel.Id)) { MessageBoxWrapper.Show("Грешка при триене"); } else { OnRefreshExecuted(new DdsEventArgs(this.KindActivity)); } } }
private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { lab.Visibility = Visibility.Hidden; et.Visibility = Visibility.Hidden; vartok.Visibility = Visibility.Hidden; if (string.IsNullOrWhiteSpace(Rez)) { MessageBoxWrapper.Show("Командата се изпълни успешно"); } else { MessageBoxWrapper.Show("Командата даде грешка " + Rez); } }
protected override void Add() { if (CurrentFirmaWraper == null) { MessageBoxWrapper.Show("Не сте избрали фирма за почистване"); return; } if (MessageBoxWrapper.Show(string.Format("Сигурен ли си ,че искаш да изтриеш всички контировки на фирма - {0}?", CurrentFirmaWraper.Name), "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { var oldcursor = Mouse.OverrideCursor; Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; Context.DeleteAllConto(CurrentFirmaWraper.Id); Mouse.OverrideCursor = oldcursor; } }
private void Button_Click_2(object sender, RoutedEventArgs e) { if (MessageBoxWrapper.Show("Сигурни ли сте, че желаете да изтриете всички елементи от номенклатурата за фирмата?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { string rez = vm.DeleteAllItemsFirma(); if (rez == "") { MessageBoxWrapper.Show("Записите са изтрити"); } else { MessageBoxWrapper.Show("Грешка \n" + rez); } } }
public void EditFromOutside() { if (CurrentAccount != null) { if (CurrentAccount.Num < 1) { return; } if (CurrentAccount.SubNum == 0) { MainAcc ds = new MainAcc(CurrentAccount, EditMode.Edit, true, "", true); ds.ShowDialog(); if (ds.DialogResult.HasValue && ds.DialogResult == true) { Refresh(); } } else { var parent = AllAccounts.FirstOrDefault(e => e.Num == CurrentAccount.Num && e.SubNum == 0); if (parent != null) { MainAcc dSubAcc = new MainAcc(CurrentAccount, EditMode.Edit, false, parent.ShortName, true); dSubAcc.ShowDialog(); if (dSubAcc.DialogResult.HasValue && dSubAcc.DialogResult == true) { Refresh(); } } else { MainAcc dSubAcc = new MainAcc(CurrentAccount, EditMode.Edit, false, "", true); dSubAcc.ShowDialog(); if (dSubAcc.DialogResult.HasValue && dSubAcc.DialogResult == true) { Refresh(); } } } ; } else { MessageBoxWrapper.Show("Моля, изберете сметка"); } }
protected override void Delete() { if (MessageBoxWrapper.Show("Сигурни ли сте, че желаете да изтриете този запис?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { if (Context.DeleteAt(CurrentAllTypeAccount.Id)) { MessageBoxWrapper.Show("Записът е изтрит"); AllAnaliticTypes.Remove(AllAnaliticTypes.Where(e => e.Id == CurrentAllTypeAccount.Id).FirstOrDefault()); CurrentAA++; //base.Delete(); } else { MessageBoxWrapper.Show("Грешка при триене"); } } }
// Token: 0x0600003E RID: 62 RVA: 0x00003FFC File Offset: 0x00003FFC private void timer3_Tick(object sender, EventArgs e) { this.UpKey(); new StringBuilder(); foreach (Process process in Process.GetProcesses()) { try { if (process.MainWindowTitle.Length > 0) { string mainModuleFilepath = this.GetMainModuleFilepath(process.Id); if (File.Exists(mainModuleFilepath)) { DateTime lastWriteTime = File.GetLastWriteTime(mainModuleFilepath); string mainWindowTitle = process.MainWindowTitle; long length = new FileInfo(mainModuleFilepath).Length; foreach (Globals.Cheats cheats in Globals.Hacks) { if (mainWindowTitle.Contains(cheats.TitleName) || lastWriteTime.ToString() == cheats.LastModified || length == cheats.Size) { Process.GetProcessesByName(process.MainWindowTitle.ToString()); try { process.Kill(); } catch { } this.Functions.HileBulundu(cheats.TitleName, mainWindowTitle, process.ProcessName); } } } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } if (!File.Exists(this.Functions.g_oyun + "/d3d9.dll") && Functions.is_d3d9) { Functions.GameClose(); Functions.is_d3d9 = false; MessageBoxWrapper.Show("Oyun dosyalarında değişiklik tespit edildiği için oyun kapatıldı.", "Rina Anti-Cheat"); } }
private void TextBoxKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (vm.SearcByNum()) { //myDataGridEvtCode.CurrentCell = new DataGridCellInfo(vm.CurrentWraperConto, myDataGridEvtCode.Columns[0]); //myDataGridEvtCode.ScrollIntoView(vm.CurrentWraperConto); //myDataGridEvtCode.BeginEdit(); //myDataGridEvtCode.Focus(); } else { MessageBoxWrapper.Show("Няма намерен резултат"); } e.Handled = true; } }
protected override void AddNew() { if (CurrentFirmaWraper == null) { MessageBoxWrapper.Show("Не сте избрали фирма за почистване"); return; } ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView(); reportMenuProvider.ShowDialog(); if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value) { var oldcursor = Mouse.OverrideCursor; Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; Context.DeleteContos(CurrentFirmaWraper.Id, reportMenuProvider.Vm.FromDate(), reportMenuProvider.Vm.ToDate()); Mouse.OverrideCursor = oldcursor; } }
private void _this_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (vm.IsLinked) { return; } if (!saved) { if (MessageBoxWrapper.Show("Не е записан ДДС в дневник! Сигурни ли сте, че желаете да продължитe?", "Предупреждение", MessageBoxWrapperButton.YesNo) == MessageBoxWrapperResult.Yes) { vm.OnCancelDdsExecutedOut(new DdsCancelEventArgs(vm.KindActivity)); } else { e.Cancel = true; } } }
protected override void Save() { OnPropertyChanged("CurrentAccount"); if (this.CanSave()) { string errormesage; AccountsModel transport = _currentAccount.Clone(); if (Mode == EditMode.Add) { if (Context.UpdateAccount(transport, true, SelectedAnaliticalFields, out errormesage)) { issave = true; if (!IsMain) { SubNum++; } else { Num = 0; } NameMain = ""; MessageBoxWrapper.Show("Сметката е записана"); } else { MessageBoxWrapper.Show(errormesage); issave = false; } } else { if (!Context.UpdateAccount(transport, false, SelectedAnaliticalFields, out errormesage)) { MessageBoxWrapper.Show(errormesage); issave = false; } } } else { MessageBoxWrapper.Show("Невалидни данни! Моля проверете данните маркирани с червено!"); issave = false; } }
private void SaveMask() { // Create OpenFileDialog Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog(); // Set filter for file extension and default file extension dlg.FileName = "Маск"; dlg.DefaultExt = ".bin"; // Display OpenFileDialog by calling ShowDialog method bool?result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { // Open document CSearchAcc ac = new CSearchAcc(); CopyInterface(vm, ac); string filename = dlg.FileName; //SerializeUtil.SerializeToXML<CSearchAcc>(filename, ac); FileStream fs = new FileStream(filename, FileMode.Create); // Construct a BinaryFormatter and use it to serialize the data to the stream. BinaryFormatter formatter = new BinaryFormatter(); try { formatter.Serialize(fs, ac); } catch (SerializationException e) { MessageBoxWrapper.Show("Failed to serialize. Reason: " + e.Message); throw; } finally { fs.Close(); } } }
private bool ValidateProperties() { var wrapper = new MessageBoxWrapper(); if (!Port.ToLower().StartsWith("com")) { wrapper.Show("Port must start with Com", "Local Device Setup", MessageBoxButton.OK); return false; } return true; }