Ejemplo n.º 1
0
 internal ItemFactors(Class71 class71_1)
 {
     this.class71_0 = class71_1;
     this.InitializeComponent();
     if (class71_1.CustomItemFactors == null)
     {
         class71_1.CustomItemFactors = new Dictionary<D3Attribute, float>();
     }
     foreach (D3Attribute d3Attribute in Enum.GetValues(typeof(D3Attribute)))
     {
         DataGridViewRow dataGridViewRow = new DataGridViewRow();
         float num = 0f;
         if (!class71_1.CustomItemFactors.TryGetValue(d3Attribute, out num))
         {
             num = 0f;
         }
         dataGridViewRow.CreateCells(this.dataGridView1, new object[]
         {
             d3Attribute.ToString(),
             num
         });
         dataGridViewRow.Tag = d3Attribute;
         this.dataGridView1.Rows.Add(dataGridViewRow);
     }
     this.textBox1.Text = class71_1.CustomItemFactors_MinimumValue.ToString();
     this.textBox2.Text = class71_1.CustomItemFactors_MaximumValue.ToString();
 }
Ejemplo n.º 2
0
 internal static Class71 smethod_0(string string_6)
 {
     string_6 = Path.GetFileNameWithoutExtension(string_6) + ".settings";
     string_6 = Path.Combine(Class71.string_3, string_6);
     if (!File.Exists(string_6) || new FileInfo(string_6).Length == 0L)
     {
         new Class71
         {
             LoadedFromFileName = string_6
         }.method_0();
     }
     FileStream fileStream = null;
     Class71 result;
     try
     {
         fileStream = new FileStream(string_6, FileMode.Open);
         Rijndael rijndael = Rijndael.Create();
         ICryptoTransform transform = rijndael.CreateDecryptor(Encoding.ASCII.GetBytes("aniow8qqaniow8qqaniow8qqaniow8qq"), Encoding.ASCII.GetBytes("o34f57heaniow8qq"));
         using (CryptoStream cryptoStream = new CryptoStream(fileStream, transform, CryptoStreamMode.Read))
         {
             using (Stream stream = new GZipStream(cryptoStream, CompressionMode.Decompress))
             {
                 using (StreamReader streamReader = new StreamReader(stream, new UTF8Encoding()))
                 {
                     string value = streamReader.ReadToEnd();
                     Class71 @class = JsonConvert.DeserializeObject<Class71>(value);
                     @class.LoadedFromFileName = string_6;
                     @class.fileStream_0 = fileStream;
                     result = @class;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error loading Profile: " + ex.Message + "\r\nA new profile will be created and the old one will be overwritten when you click ok. So backup your profile now if you need.", "HellBuddy Bot", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         Class71 class2 = new Class71();
         class2.LoadedFromFileName = string_6;
         class2.method_0();
         result = class2;
     }
     finally
     {
         fileStream.Close();
     }
     return result;
 }