هل يمكنك شرح هذا الجزء من الكلاس  Class67  بالتفصيل   using DevExpress.DataAccess.EntityFramework;
using DevExpress.DataAccess.Sql;
using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports;
using DevExpress.XtraReports.Parameters;
using DevExpress.XtraReports.UI;
using DevExpress.XtraSplashScreen;
using Microsoft.Win32;
using MrSales;
using MrSales.MrSControls;
using MrSales.MrSControls.E_Invoices;
using MrSales.MrSLanguages;
using MrSales.MrSModels;
using MrSales.MrSModels.dataObjects;
using MrSales.MrSReports;
using MrSales.MrSReports.R_Bonds;
using MrSales.MrSReports.R_Purchases;
using MrSales.MrSReports.R_Sales;
using MrSales.MrSViews;
using MrSales.MrSViews.Decomentations;
using MrSales.Properties;
using MySql.Data.MySqlClient;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.Entity;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Management;
using System.Media;
using System.Net;
using System.Net.Mail;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using WMPLib;


internal class Class67
{
  public static account_items account_items_0 = new account_items();
  public static Regex regex_0 = new Regex("(?<=SERVER\\s*=\\s*)localhost(?=\\$)", RegexOptions.Multiline | RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.CultureInvariant);
  public static List<Class67.Class69> list_0 = new List<Class67.Class69>();

  public static Font smethod_0()
  {
    Font font = new Font(Class60.string_0, (float) Class60.int_0);
    switch (BasicVars.Languages)
    {
      case "en":
        font = new Font(Class60.string_0, (float) Class60.int_0);
        break;
      case "ar-EG":
        font = new Font(Class60.string_1, (float) Class60.int_1);
        break;
    }
    return font;
  }

  public static void smethod_1(object object_0)
  {
    ((Form) object_0).FormBorderStyle = FormBorderStyle.None;
    object obj = object_0;
    ((Control) object_0).Top = 0;
    ((Control) obj).Left = 0;
    ((Control) object_0).Width = Screen.PrimaryScreen.WorkingArea.Width;
    ((Control) object_0).Height = Screen.PrimaryScreen.WorkingArea.Height;
  }

  public static string smethod_2()
  {
    return FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
  }

  public static void smethod_3(string string_0)
  {
    if (!PathingVars.UpdatesInProgress)
    {
      SplashScreenManager.ShowForm(new Form(), typeof (waitForm), true, true, false);
      try
      {
        SplashScreenManager.Default.SetWaitFormDescription(string.Format(strings.APPLY_IMPROVEMENTS, (object) (" " + string_0 + " ...")));
      }
      catch
      {
      }
      Thread.Sleep(1000);
      try
      {
        SplashScreenManager.Default.SetWaitFormDescription(string.Format(strings.PLEASE_WAIT, (object) " 3 "));
      }
      catch
      {
      }
      Thread.Sleep(1000);
      try
      {
        SplashScreenManager.Default.SetWaitFormDescription(string.Format(strings.PLEASE_WAIT, (object) " 2 "));
      }
      catch
      {
      }
      Thread.Sleep(1000);
      try
      {
        SplashScreenManager.Default.SetWaitFormDescription(string.Format(strings.PLEASE_WAIT, (object) " 1 "));
      }
      catch
      {
      }
      Thread.Sleep(1000);
      try
      {
        SplashScreenManager.Default.SetWaitFormDescription(string.Format(strings.Updating_in_progress, (object) " 1 "));
      }
      catch
      {
      }
      try
      {
        if (Settings.Default.UpgradeRequired)
        {
          Settings.Default.Upgrade();
          Settings.Default.UpgradeRequired = false;
          Settings.Default.Save();
        }
      }
      catch (Exception ex)
      {
        LogWriter.errLog("Upgrade proprties file", ex);
      }
    }
    PathingVars.UpdatesInProgress = true;
  }

  public static void smethod_4(string string_0) => Class67.smethod_32(string_0);

  public static PopupFilterMode smethod_5(int int_0 = 0)
  {
    PopupFilterMode popupFilterMode = PopupFilterMode.Default;
    try
    {
      switch (int_0)
      {
        case 0:
          popupFilterMode = Settings.Default.items_PopupFilterMode == 0 ? PopupFilterMode.Default : (Settings.Default.items_PopupFilterMode == 1 ? PopupFilterMode.Contains : PopupFilterMode.StartsWith);
          break;
        case 1:
          popupFilterMode = Settings.Default.people_PopupFilterMode == 0 ? PopupFilterMode.Default : (Settings.Default.people_PopupFilterMode == 1 ? PopupFilterMode.Contains : PopupFilterMode.StartsWith);
          break;
        case 2:
          popupFilterMode = Settings.Default.emp_PopupFilterMode == 0 ? PopupFilterMode.Default : (Settings.Default.emp_PopupFilterMode == 1 ? PopupFilterMode.Contains : PopupFilterMode.StartsWith);
          break;
      }
    }
    catch (Exception ex)
    {
      LogWriter.errLog("Get Filter Mode", ex);
    }
    return popupFilterMode;
  }

  public static bool smethod_6()
  {
    bool flag;
    using (ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("Select * from Win32_ComputerSystem"))
    {
      using (ManagementObjectCollection objectCollection = managementObjectSearcher.Get())
      {
        foreach (ManagementBaseObject managementBaseObject in objectCollection)
        {
          string lower = managementBaseObject["Manufacturer"].ToString().ToLower();
          if ((lower == "microsoft corporation" && managementBaseObject["Model"].ToString().ToUpperInvariant().Contains("VIRTUAL") || lower.Contains("vmware") ? 1 : (managementBaseObject["Model"].ToString() == "VirtualBox" ? 1 : 0)) != 0)
          {
            flag = true;
            goto label_17;
          }
        }
      }
    }
    flag = false;
label_17:
    return flag;
  }

  public static bool smethod_7()
  {
    string str = System.IO.File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "drivers/etc/hosts"));
    return (str.Contains("vatoce.com") ? 1 : (str.Contains("www.vatoce.com") ? 1 : 0)) != 0;
  }

  public static async void smethod_8(
    int int_0,
    string string_0,
    string string_1 = "",
    int int_1 = 0,
    DateTime? nullable_0 = null)
  {
    nullable_0 = !nullable_0.HasValue ? new DateTime?(DateTime.Now) : nullable_0;
    if ((int_0 == 1 ? 1 : (int_0 == 2 ? 1 : 0)) != 0 || int_0 != 3)
      ;
    int QueryExcuteStatus = 0;
    if ((int_0 != 0 ? 0 : (BasicVars.OCP_Show != 0 ? 1 : 0)) != 0)
      QueryExcuteStatus = 1;
    else if ((int_0 != 1 ? 0 : (BasicVars.OCP_Insert != 0 ? 1 : 0)) == 0)
    {
      if ((int_0 != 2 ? 0 : (BasicVars.OCP_Update != 0 ? 1 : 0)) == 0)
      {
        if ((int_0 != 3 ? 0 : (BasicVars.OCP_Delete != 0 ? 1 : 0)) == 0)
        {
          if ((int_0 != 4 ? 0 : (BasicVars.OCP_Print != 0 ? 1 : 0)) != 0)
            QueryExcuteStatus = 1;
        }
        else
          QueryExcuteStatus = 1;
      }
      else
        QueryExcuteStatus = 1;
    }
    else
      QueryExcuteStatus = 1;
    if (QueryExcuteStatus != 1)
      return;
    mrsalesdbEntities MrSalesContext = ConnectionTools.OpenConn();
    MrSalesContext.ad_operations.Add(new ad_operations()
    {
      ado_OperationName = string_0,
      ado_Date = nullable_0,
      ado_Status = new int?(1),
      Operation_Type = string_1,
      Operation_ID = new int?(int_1),
      r_user_ID = new int?(BasicVars.UserID),
      r_branche_ID = new int?(BasicVars.Branche),
      r_device_ID = new int?(BasicVars.Device),
      shift = new int?(BasicVars.Shift)
    });
    MrSalesContext.SaveChanges();
    MrSalesContext = (mrsalesdbEntities) null;
  }

  public static void smethod_9(
    int int_0,
    string string_0,
    string string_1,
    int int_1,
    DateTime dateTime_0,
    DateTime dateTime_1,
    int int_2,
    Decimal decimal_0,
    Decimal decimal_1,
    Decimal decimal_2,
    Decimal decimal_3,
    string string_2)
  {
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    IQueryable<invoices_notices> source = mrsalesdbEntities.invoices_notices.Where<invoices_notices>((Expression<System.Func<invoices_notices, bool>>) (u => u.invoice_type == string_0 && u.mainID == (int?) int_1));
    if (source.Count<invoices_notices>() > 0)
    {
      dateTime_0 = source.OrderBy<invoices_notices, int>((Expression<System.Func<invoices_notices, int>>) (o => o.id)).FirstOrDefault<invoices_notices>().createdDate.Value;
      Decimal num1 = source.OrderByDescending<invoices_notices, int>((Expression<System.Func<invoices_notices, int>>) (o => o.id)).FirstOrDefault<invoices_notices>().netvalue.Value;
      Decimal num2 = source.OrderByDescending<invoices_notices, int>((Expression<System.Func<invoices_notices, int>>) (o => o.id)).FirstOrDefault<invoices_notices>().taxvlaue.Value;
      if (string_0 == "SALES")
      {
        switch (string_1)
        {
          case "UPDATE_SALES_INVOICE":
            int_0 = num1 > decimal_0 ? 1 : 0;
            break;
          case "RETURN_ITEM":
            int_0 = 1;
            decimal_0 = num1 - decimal_0;
            decimal_1 = num2 - decimal_1;
            break;
        }
      }
    }
    mrsalesdbEntities.invoices_notices.Add(new invoices_notices()
    {
      notice_type = new sbyte?((sbyte) int_0),
      invoice_type = string_0,
      reason = string_1,
      mainID = new int?(int_1),
      createdDate = new DateTime?(dateTime_0),
      updateDate = new DateTime?(dateTime_1),
      status = new sbyte?((sbyte) int_2),
      netvalue = new Decimal?(decimal_0),
      taxvlaue = new Decimal?(decimal_1),
      paidvalue = new Decimal?(decimal_2),
      resetvalue = new Decimal?(decimal_3),
      itemsnotes = string_2,
      r_branche_ID = new int?(BasicVars.Branche),
      r_device_ID = new int?(BasicVars.Device),
      r_user_ID = new int?(BasicVars.UserID),
      r_shift_ID = new int?(BasicVars.Shift)
    });
    mrsalesdbEntities.SaveChanges();
  }

  public static IEnumerable<FileInfo> smethod_10(
    DirectoryInfo directoryInfo_0,
    params string[] extensions)
  {
    if (extensions == null)
      throw new ArgumentNullException(nameof (extensions));
    return directoryInfo_0.EnumerateFiles().Where<FileInfo>((System.Func<FileInfo, bool>) (f => ((IEnumerable<string>) extensions).Contains<string>(f.Extension)));
  }

  public static void smethod_11(string string_0)
  {
    try
    {
      if (checkWavFile.isWave(string_0))
      {
        new SoundPlayer(string_0).Play();
      }
      else
      {
        // ISSUE: variable of a compiler-generated type
        WindowsMediaPlayer instance = (WindowsMediaPlayer) Activator.CreateInstance(Marshal.GetTypeFromCLSID(new Guid("6BF52A52-394A-11D3-B153-00C04F79FAA6")));
        instance.URL = string_0;
        // ISSUE: reference to a compiler-generated method
        instance.controls.play();
      }
    }
    catch
    {
    }
  }

  public static string smethod_12()
  {
    string str = "";
    using (System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog())
    {
      openFileDialog.Filter = "wav files (*.wav)|*.wav";
      openFileDialog.FilterIndex = 2;
      openFileDialog.RestoreDirectory = true;
      if (openFileDialog.ShowDialog() == DialogResult.OK)
        str = openFileDialog.FileName;
    }
    return str;
  }

  public static Decimal smethod_13(object object_0, int int_0, int int_1, DateTime dateTime_0)
  {
    int?[] nullable_0 = new int?[3]
    {
      new int?(MainAccountsIDs.CUSTOMERS),
      new int?(MainAccountsIDs.VENDOR),
      new int?(MainAccountsIDs.MixPeople)
    };
    ParameterExpression parameterExpression;
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    List<Class44> list = ConnectionTools.OpenConn().view_accounts_allrecords.Where<view_accounts_allrecords>((Expression<System.Func<view_accounts_allrecords, bool>>) (u => nullable_0.Contains<int?>(u.accitem_AccID) && u.accitem_PeplID == (int?) int_1)).Select<view_accounts_allrecords, Class44>(Expression.Lambda<System.Func<view_accounts_allrecords, Class44>>((Expression) Expression.MemberInit(Expression.New(typeof (Class44)), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Class44.set_accitem_AccID)), )))); // Unable to render the statement
    foreach (Class44 class44_1 in list)
    {
      Class44 class44_0 = class44_1;
      Decimal? nullable1 = AddationalCurrencies.usedCurrencies.Where<ad_additional_currencies>((System.Func<ad_additional_currencies, bool>) (u =>
      {
        int id = u.id;
        int? currId = class44_0.currID;
        int valueOrDefault = currId.GetValueOrDefault();
        return id == valueOrDefault & currId.HasValue;
      })).FirstOrDefault<ad_additional_currencies>().value;
      Decimal num1 = nullable1.Value;
      Class44 class44_2 = class44_0;
      nullable1 = class44_0.accitem_Debit;
      Decimal num2 = num1;
      Decimal? nullable2;
      Decimal? nullable3;
      if (!nullable1.HasValue)
      {
        nullable2 = new Decimal?();
        nullable3 = nullable2;
      }
      else
        nullable3 = new Decimal?(nullable1.GetValueOrDefault() * num2);
      nullable2 = nullable3;
      Decimal? nullable4 = new Decimal?(nullable2.Value.GetDecimalParts(false));
      class44_2.accitem_Debit = nullable4;
      Class44 class44_3 = class44_0;
      nullable1 = class44_0.accitem_Credit;
      Decimal num3 = num1;
      Decimal? nullable5;
      if (!nullable1.HasValue)
      {
        nullable2 = new Decimal?();
        nullable5 = nullable2;
      }
      else
        nullable5 = new Decimal?(nullable1.GetValueOrDefault() * num3);
      nullable2 = nullable5;
      Decimal? nullable6 = new Decimal?(nullable2.Value.GetDecimalParts(false));
      class44_3.accitem_Credit = nullable6;
    }
    try
    {
      return (list.Where<Class44>((System.Func<Class44, bool>) (u =>
      {
        DateTime? accitemDate = u.accitem_Date;
        DateTime dateTime = dateTime_0;
        return accitemDate.HasValue && accitemDate.GetValueOrDefault() < dateTime;
      })).Sum<Class44>((System.Func<Class44, Decimal>) (s => s.accitem_Credit.Value)) - list.Where<Class44>((System.Func<Class44, bool>) (u =>
      {
        DateTime? accitemDate = u.accitem_Date;
        DateTime dateTime = dateTime_0;
        return accitemDate.HasValue && accitemDate.GetValueOrDefault() < dateTime;
      })).Sum<Class44>((System.Func<Class44, Decimal>) (s => s.accitem_Debit.Value))).GetDecimalParts(false);
    }
    catch (Exception ex)
    {
      return 0M;
    }
  }

  public static view_customers_balance smethod_14(int int_0)
  {
    view_customers_balance customersBalance = new view_customers_balance();
    try
    {
      int?[] nullableArray = new int?[3]
      {
        new int?(MainAccountsIDs.CUSTOMERS),
        new int?(MainAccountsIDs.VENDOR),
        new int?(MainAccountsIDs.MixPeople)
      };
      CurrencyInfo.currencyShortcut();
      ParameterExpression parameterExpression;
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      Class57 class57 = ConnectionTools.OpenConn().view_customers_balance.Where<view_customers_balance>((Expression<System.Func<view_customers_balance, bool>>) (u => u.pepole_ID == int_0)).GroupBy(s => new
      {
        pepole_ID = s.pepole_ID
      }).Select<IGrouping<\u003C\u003Ef__AnonymousType6<int>, view_customers_balance>, Class57>(Expression.Lambda<System.Func<IGrouping<\u003C\u003Ef__AnonymousType6<int>, view_customers_balance>, Class57>>((Expression) Expression.MemberInit(Expression.New(typeof (Class57)), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Class57.set_pepole_ID)), )))); // Unable to render the statement
      customersBalance.balance = new Decimal?(class57.balance.Value.GetDecimalParts(false));
      customersBalance.credit = new Decimal?(class57.credit.Value.GetDecimalParts(false));
      customersBalance.debit = new Decimal?(class57.debit.Value.GetDecimalParts(false));
    }
    catch (Exception ex)
    {
      customersBalance.balance = new Decimal?(0M);
      customersBalance.credit = new Decimal?(0M);
      customersBalance.debit = new Decimal?(0M);
    }
    return customersBalance;
  }

  public static List<view_customers_balance> smethod_15(int int_0)
  {
    List<view_customers_balance> customersBalanceList = new List<view_customers_balance>();
    try
    {
      int?[] nullableArray = new int?[3]
      {
        new int?(MainAccountsIDs.CUSTOMERS),
        new int?(MainAccountsIDs.VENDOR),
        new int?(MainAccountsIDs.MixPeople)
      };
      CurrencyInfo.currencyShortcut();
      ParameterExpression parameterExpression;
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      // ISSUE: method reference
      List<Class57> list = ConnectionTools.OpenConn().view_customers_balance.Where<view_customers_balance>((Expression<System.Func<view_customers_balance, bool>>) (u => u.pepole_ID == int_0)).GroupBy(s => new
      {
        pepole_ID = s.pepole_ID,
        Currency_ID = s.Currency_ID,
        Currency_Index = s.Currency_Index,
        Factor = s.Factor
      }).Select<IGrouping<\u003C\u003Ef__AnonymousType7<int, int?, int?, Decimal?>, view_customers_balance>, Class57>(Expression.Lambda<System.Func<IGrouping<\u003C\u003Ef__AnonymousType7<int, int?, int?, Decimal?>, view_customers_balance>, Class57>>((Expression) Expression.MemberInit(Expression.New(typeof (Class57)), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Class57.set_pepole_ID)), )))); // Unable to render the statement
      list.Count<Class57>();
      foreach (Class57 class57 in list)
      {
        int id = AddationalCurrencies.usedCurrencies.Where<ad_additional_currencies>((System.Func<ad_additional_currencies, bool>) (u =>
        {
          Decimal? nullable = u.value;
          Decimal num = (Decimal) 1;
          return nullable.GetValueOrDefault() == num & nullable.HasValue;
        })).FirstOrDefault<ad_additional_currencies>().id;
        int? nullable1 = class57.Currency_ID;
        int num1;
        if (nullable1.HasValue)
        {
          nullable1 = class57.Currency_ID;
          num1 = nullable1.Value;
        }
        else
          num1 = id;
        int currID = num1;
        nullable1 = class57.Currency_ID;
        if (nullable1.HasValue)
        {
          nullable1 = class57.Currency_Index;
          1 = nullable1.Value;
        }
        class57.credit = new Decimal?(class57.credit.Value.GetDecimalParts(false, currID));
        class57.debit = new Decimal?(class57.debit.Value.GetDecimalParts(false, currID));
        class57.balance = new Decimal?(class57.balance.Value.GetDecimalParts(false, currID));
      }
      customersBalanceList = list.Select<Class57, view_customers_balance>((System.Func<Class57, view_customers_balance>) (s => new view_customers_balance()
      {
        pepole_ID = s.pepole_ID,
        Currency_ID = s.Currency_ID,
        Currency_Index = s.Currency_Index,
        credit = s.credit,
        debit = s.debit,
        balance = s.balance
      })).ToList<view_customers_balance>();
    }
    catch (Exception ex)
    {
      int num = (int) MessageBox.Show(ex.Message.ToString());
    }
    return customersBalanceList;
  }