Esempio n. 1
0
        private void Me_Startup(object sender, StartupEventArgs e)
        {
            //Discarded unreachable code: IL_012d, IL_017b, IL_017d, IL_018d, IL_01af
            int num  = default(int);
            int num3 = default(int);

            try
            {
                ProjectData.ClearProjectError();
                num = 1;
                int num2 = 2;
                Declarer.startPath = AppDomain.CurrentDomain.BaseDirectory;
                num2 = 3;
                Declarer.startPath = Declarer.startPath.Substring(0, checked (Declarer.startPath.Length - 1));
                num2 = 4;
                if (MySettingsProperty.Settings.lang.Length < 1)
                {
                    num2 = 5;
                    MySettingsProperty.Settings.lang = TFile.ReadIni(Declarer.startPath + "\\lang.ini", "Language", "lang");
                    num2 = 6;
                    MySettingsProperty.Settings.Save();
                }
                num2 = 7;
                Declarer.xd.Load(Declarer.startPath + "\\langs\\" + MySettingsProperty.Settings.lang + ".xml");
                num2         = 8;
                Declarer.xeL = Declarer.xd["LANG_TEXT"];
                num2         = 9;
                SelfService.UpgradeSettings();
                num2 = 10;
                if (MySettingsProperty.Settings.types.Length < 1)
                {
                    num2 = 11;
                    SelfService.InitSettings();
                }
                num2 = 12;
                SelfService.UpdateExts();
                num2 = 13;
                SelfService.VerifyKey(MySettingsProperty.Settings.key, ref Declarer.licenseType, ref Declarer.licensedPCs);
                num2 = 14;
                Thread thread = new Thread(CheckLatestVerOnStartup);
                num2 = 15;
                thread.Start();
            }
            catch (Exception obj) when((obj is Exception && num != 0) & (num3 == 0))
            {
                ProjectData.SetProjectError((Exception)obj);
                /*Error near IL_01ad: Could not find block for branch target IL_017d*/;
            }
            if (num3 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Esempio n. 2
0
    private void Buttons_Click(object sender, EventArgs e)
    {
        //Discarded unreachable code: IL_0498, IL_0576, IL_0578, IL_0588, IL_05aa
        int num2 = default(int);
        int num3 = default(int);

        try
        {
            int num = 1;
            if (!LikeOperator.LikeString(Declarer.startPath, "*Debug", CompareMethod.Binary))
            {
                ProjectData.ClearProjectError();
                num2 = 1;
            }
            num = 3;
            string name = ((Control)sender).Name;
            if (Operators.CompareString(name, "lAdd", TextCompare: false) != 0)
            {
                if (Operators.CompareString(name, "lEdit", TextCompare: false) != 0)
                {
                    if (Operators.CompareString(name, "lDel", TextCompare: false) == 0)
                    {
                        num = 40;
                        if (tlv.SelectedItems.Count > 0)
                        {
                            num = 41;
                            if (Interaction.MsgBox(SelfService.GetWord("del_ext") + "\r\n" + tlv.SelectedItems[0].Text, MsgBoxStyle.OkCancel | MsgBoxStyle.AbortRetryIgnore | MsgBoxStyle.Question) == MsgBoxResult.Yes)
                            {
                                num = 46;
                                My.MySettingsProperty.Settings.types = My.MySettingsProperty.Settings.types.Replace("|U:" + tlv.SelectedItems[0].SubItems[1].Text + ":" + tlv.SelectedItems[0].Text.Substring(1), "");
                                num = 47;
                                SelfService.UpdateExts();
                                num = 48;
                                My.MySettingsProperty.Settings.Save();
                                num = 49;
                                tlv.Items.Remove(tlv.SelectedItems[0]);
                                num = 50;
                                tlv.Items[0].Selected = true;
                            }
                        }
                        else
                        {
                            num = 44;
                            Interaction.MsgBox(SelfService.GetWord("sel_ext_d"), MsgBoxStyle.Information);
                        }
                    }
                }
                else
                {
                    num = 23;
                    if (tlv.SelectedItems.Count < 1)
                    {
                        num = 24;
                        Interaction.MsgBox(SelfService.GetWord("ext_edit"), MsgBoxStyle.Information);
                    }
                    else
                    {
                        while (true)
                        {
                            num = 26;
                            string text = Interaction.InputBox(SelfService.GetWord("edit_ext"), "", tlv.SelectedItems[0].Text).Trim().ToLower();
                            num = 27;
                            if (text.Length < 1)
                            {
                                break;
                            }
                            num = 29;
                            if (checkExts(text, edit: true))
                            {
                                string text2;
                                do
                                {
                                    num   = 31;
                                    text2 = Interaction.InputBox(SelfService.GetWord("desc_type") + "\r\n" + text, "", tlv.SelectedItems[0].SubItems[1].Text).Trim();
                                    num   = 32;
                                }while (text2.Length < 1);
                                num = 34;
                                My.MySettingsProperty.Settings.types = My.MySettingsProperty.Settings.types.Replace("|U:" + tlv.SelectedItems[0].SubItems[1].Text + ":" + tlv.SelectedItems[0].Text.Substring(1), "|U:" + text2 + ":" + text.Substring(1));
                                num = 35;
                                SelfService.UpdateExts();
                                num = 36;
                                My.MySettingsProperty.Settings.Save();
                                num = 37;
                                tlv.SelectedItems[0].Text = text;
                                num = 38;
                                tlv.SelectedItems[0].SubItems[1].Text = text2;
                                break;
                            }
                        }
                    }
                }
            }
            else
            {
                num = 5;
                string text3 = string.Empty;
                while (true)
                {
                    num   = 6;
                    text3 = Interaction.InputBox(SelfService.GetWord("input_ext"), "", text3).Trim().ToLower();
                    num   = 7;
                    if (text3.Length < 1)
                    {
                        break;
                    }
                    num = 9;
                    if (checkExts(text3))
                    {
                        string text4;
                        do
                        {
                            num   = 11;
                            text4 = Interaction.InputBox(SelfService.GetWord("desc_type") + "\r\n" + text3).Trim();
                            num   = 12;
                        }while (text4.Length < 1);
                        num = 14;
                        ListViewItem listViewItem = tlv.Items.Add(text3);
                        num = 15;
                        listViewItem.SubItems.Add(text4);
                        num = 16;
                        listViewItem.SubItems.Add(SelfService.GetWord("no"));
                        num = 17;
                        listViewItem.Selected = true;
                        num         = 18;
                        tlv.TopItem = listViewItem;
                        num         = 19;
                        My.MySettings settings;
                        (settings = My.MySettingsProperty.Settings).types = settings.types + "|U:" + text4 + ":" + text3.Substring(1);
                        num = 20;
                        SelfService.UpdateExts();
                        num = 21;
                        My.MySettingsProperty.Settings.Save();
                        break;
                    }
                }
            }
        }
        catch (Exception obj) when((obj is Exception && num2 != 0) & (num3 == 0))
        {
            ProjectData.SetProjectError((Exception)obj);
            /*Error near IL_05a8: Could not find block for branch target IL_0578*/;
        }
        if (num3 != 0)
        {
            ProjectData.ClearProjectError();
        }
    }