⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
                        sensor.Reset();
                    }
                }
                finally
                {
                    this.isActiving = false;
                }
            }
        }

        private void ActiveUser_PersonalInfoChanged(object sender, PropertiesChangedEventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._main_form, delegate {
                if (e.ContainsProperty("nickname"))
                {
                    this.ctlNickname.DisplayName = this._main_form.AccountManager.CurrentUser.Nickname;
                }
                if (e.ContainsProperty("impresa"))
                {
                    this.SetMoodPhrase(this._main_form.AccountManager.CurrentUser.Presence.MoodPhrase.Value);
                }
                if (e.ContainsProperty("Portrait"))
                {
                    this._portrait_button.Icon = this._main_form.AccountManager.CurrentUser.PersonalInfo.PortraitSamllMedium;
                    this.Invalidate(this._portrait_button.Rectangle);
                }
            });
        }

        private void AddEntryPointElements()
        {
            base.AddElement(this._close_button);
            base.AddElement(this._minimize_button);
            base.AddElement(this._status_link);
            base.AddElement(this._title_caption);
        }

        private void AddUserInfoElements()
        {
            base.AddElement(this._adv_panel);
            base.AddElement(this._mail_button);
            base.AddElement(this._regist_mail_button);
            base.AddElement(this._close_button);
            base.AddElement(this._minimize_button);
            base.AddElement(this._title_menu_button);
            base.AddElement(this._chg_color_button);
            base.AddElement(this._portrait_button);
            base.AddElement(this._portrait_dropdown_buttons);
            base.AddElement(this._group_panel);
            base.AddElement(this._chanel_tab_name);
            base.AddElement(this._group_push_button);
            base.AddElement(this._contact_push_button);
            base.AddElement(this._friend_button);
            base.AddElement(this._scrollup_button);
            base.AddElement(this._scrolldown_button);
            base.AddElement(this._chanel_panel);
            base.AddElement(this._add_button);
            base.AddElement(this._chat_button);
            base.AddElement(this._sms_button);
            base.AddElement(this._phone_chat_button);
            base.AddElement(this._menu_button);
        }

        private void AdStatusBar_Changed(object sender, EventArgs e)
        {
            try
            {
                if (this.AccountManager.CurrentUser.AdManager.AdStatusBar.Items.get_Count() == 1)
                {
                    TextAdItem item = this.AccountManager.CurrentUser.AdManager.AdStatusBar.Items.get_Item(0) as TextAdItem;
                }
            }
            catch
            {
            }
        }

        private void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            ClientLogger.WriteException("线程 Exception", e.Exception);
            this.UnifiedMessageBox.ShowException(this, e.Exception);
        }

        private menu_widget BuildChangeColorMenu()
        {
            menu_widget _widget = new menu_widget(this.components);
            menu_radioitem _radioitem = new menu_radioitem("默认颜色");
            _radioitem.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem2 = new menu_radioitem("海洋之心");
            _radioitem2.set_Image(ImpsIcons.Blue);
            _radioitem2.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem3 = new menu_radioitem("玫瑰之吻");
            _radioitem3.set_Image(ImpsIcons.Red);
            _radioitem3.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem4 = new menu_radioitem("粉可爱");
            _radioitem4.set_Image(ImpsIcons.Pink);
            _radioitem4.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem5 = new menu_radioitem("动感之橙");
            _radioitem5.set_Image(ImpsIcons.Oriange);
            _radioitem5.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem6 = new menu_radioitem("紫罗兰");
            _radioitem6.set_Image(ImpsIcons.Yellow);
            _radioitem6.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem7 = new menu_radioitem("森林探险");
            _radioitem7.set_Image(ImpsIcons.Green);
            _radioitem7.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem8 = new menu_radioitem("青涩年代");
            _radioitem8.set_Image(ImpsIcons.Blade);
            _radioitem8.add_Click(new EventHandler(this.chgColorItem_Click));
            menu_radioitem _radioitem9 = new menu_radioitem("纯黑本色");
            _radioitem9.set_Image(ImpsIcons.Black);
            _radioitem9.add_Click(new EventHandler(this.chgColorItem_Click));
            ToolStripSeparator separator = new ToolStripSeparator();
            separator.set_Enabled(false);
            ToolStripMenuItem item = new ToolStripMenuItem("更换界面风格...", null, new EventHandler(this.miChange_Click));
            ToolStripSeparator separator2 = new ToolStripSeparator();
            separator2.set_Enabled(false);
            _widget.get_Items().AddRange(new ToolStripItem[] { _radioitem, separator, _radioitem2, _radioitem3, _radioitem4, _radioitem5, _radioitem6, _radioitem7, _radioitem8, _radioitem9, separator2, item });
            return _widget;
        }

        private menu_widget BuildHelpMenu(bool log)
        {
            ToolStripMenuItem item4 = new ToolStripMenuItem(StringTable.Framework.MI_HelpTopic, ImpsResources.GetImage("Images.Help.png"));
            ToolStripMenuItem item5 = new ToolStripMenuItem(string.Format(StringTable.Framework.MI_HelpAbout, AppDictionary.CurrentClientName), null, new EventHandler(this.miHelpAbout_Click));
            item5.set_Name("miHelpAbout");
            ToolStripMenuItem item2 = new ToolStripMenuItem(StringTable.Framework.MI_Forum);
            item2.add_Click(new EventHandler(this.miForum_Click));
            ToolStripMenuItem item3 = new ToolStripMenuItem(StringTable.Framework.MI_Feedback);
            item3.add_Click(new EventHandler(this.miFeedback_Click));
            ToolStripMenuItem item = new ToolStripMenuItem(StringTable.Framework.MI_FetionWebsite);
            item.add_Click(new EventHandler(this.miWebsite_Click));
            item4.set_ShortcutKeys(Keys.F1);
            item4.add_Click(new EventHandler(this.miHelpTopic_Click));
            ToolStripSeparator separator = new ToolStripSeparator();
            separator.set_Enabled(false);
            menu_widget _widget = new menu_widget(this.components);
            if (log)
            {
                ToolStripMenuItem item6 = new ToolStripMenuItem(StringTable.Framework.MI_ToolsOptions);
                item6.add_Click(new EventHandler(this.miToolOption_Click));
                ToolStripSeparator separator2 = new ToolStripSeparator();
                separator2.set_Enabled(false);
                _widget.get_Items().AddRange(new ToolStripItem[] { item6, separator2, item4, item, item2, item3, separator, item5 });
                return _widget;
            }
            _widget.get_Items().AddRange(new ToolStripItem[] { item4, item, item2, item3, separator, item5 });
            return _widget;
        }

        private void BuildMainMenu()
        {
            this.menuMain = new menu_widget(this.components);
            this.menuMain.add_Opening(new CancelEventHandler(this.MainMenuOpening));
            ToolStripMenuItem item = new ToolStripMenuItem(StringTable.Framework.MI_Help);
            this.miOperation = new ToolStripMenuItem(StringTable.Framework.MI_Operation);
            this.miToolsOptions = new ToolStripMenuItem(StringTable.Framework.MI_ToolsOptions);
            this.menuMain.SuspendLayout();
            item.set_DropDown(this.BuildHelpMenu(false));
            item.set_Name("miHelp");
            item.add_DropDownOpening(new EventHandler(this.miHelp_DropDownOpening));
            this.miOperation.set_Name("miOperation");
            this.miOperation.set_DropDown(new menu_widget(this.components));
            this.miOperation.add_DropDownOpening(new EventHandler(this.miOperation_DropDownOpening));
            this.miToolsOptions.add_Click(new EventHandler(this.miToolOption_Click));
            this.miSignOut = new ToolStripMenuItem(StringTable.Framework.MI_SignOut);
            this.miSignOut.add_Click(new EventHandler(this.miSignOut_Click));
            ToolStripSeparator separator = new ToolStripSeparator();
            separator.set_Enabled(false);
            ToolStripMenuItem item2 = new ToolStripMenuItem(string.Format(StringTable.Framework.MI_Exit, AppDictionary.CurrentClientName));
            item2.add_Click(new EventHandler(this.miExit_Click));
            this.menuMain.set_BackColor(Color.Transparent);
            this.menuMain.get_Items().AddRange(new ToolStripItem[] { this.miOperation, item, separator, this.miSignOut, item2 });
            this.menuMain.Name = "menuMain";
            this.menuMain.ResumeLayout(false);
        }

        private menu_widget BuildPortraitDropDownMenu()
        {
            Imps.Client.Pc.ContactManager contactManager = (Imps.Client.Pc.ContactManager) this.ContactManager;
            UserAccountManager accountManager = (UserAccountManager) this.AccountManager;
            menu_widget _widget = new menu_widget(this.components);
            ToolStripSeparator separator = new ToolStripSeparator();
            ToolStripSeparator separator2 = new ToolStripSeparator();
            ToolStripSeparator separator3 = new ToolStripSeparator();
            separator.set_Enabled(false);
            separator2.set_Enabled(false);
            separator3.set_Enabled(false);
            ToolStripMenuItem item = new ToolStripMenuItem(StringTable.MI_CL_AddContact, ImpsIcons.AddBuddy, new EventHandler(contactManager.miAddContact_Click));
            ToolStripMenuItem item2 = new ToolStripMenuItem(StringTable.MI_SendSmsToMe, null, new EventHandler(contactManager.mi_SendSmsToMe_Click));
            ToolStripMenuItem item3 = new ToolStripMenuItem(StringTable.MI_SendFileToMe, null, new EventHandler(contactManager.mi_SendFileToMe_Click));
            ToolStripMenuItem item4 = new ToolStripMenuItem(StringTable.MI_Feike, null, new EventHandler(contactManager.mi_Feike_Click));
            this._miMobilemail = new ToolStripMenuItem(StringTable.MI_MobileMailBox, ImpsIcons.Mail, new EventHandler(contactManager.mi_MobileMail_Click));
            this._miMessageBySms = new menu_radioitem(StringTable.Presence.MI_MessageBySms);
            this._miMessageBySms.add_Click(new EventHandler(accountManager.miBySms_Click));
            this._miMessageNotBySms = new menu_radioitem(StringTable.Presence.MI_MessageNotBySms);
            this._miMessageNotBySms.add_Click(new EventHandler(accountManager.miNotBySms_Click));
            ToolStripMenuItem item5 = new ToolStripMenuItem(StringTable.Framework.MI_PersonalInfo, null, new EventHandler(accountManager.miInfo_Click));
            _widget.get_Items().AddRange(new ToolStripItem[] { item, separator, item2, item3, this._miMobilemail, item4, separator3, item5 });
            return _widget;
        }

        public void Chanel_ButtonDown(object sender, EventArgs e)
        {
            ElementPushButton button = sender as ElementPushButton;
            for (int i = 0; i < this._chanel_buttons.get_Count(); i++)
            {
                if ((this._chanel_buttons.get_Item(i) != null) && (this._chanel_buttons.get_Item(i) != button))
                {
                    this._chanel_buttons.get_Item(i).Down = false;
                }
            }
        }

        public void chanel_click(object sender, EventArgs e)
        {
            this._group_push_button.Visible = false;
            this._contact_push_button.Visible = false;
            this._chanel_tab_name.Visible = true;
            try
            {
                ElementPushButton button = sender as ElementPushButton;
                string channelName = button.NameID;
                ChannelItem index = this._main_form.InnerChannelManager.Items.IndexOf(channelName);
                if (index != null)
                {
                    if (index.Channel == null)
                    {
                        index.CreateChannel();
                    }
                    Control channelControl = index.Channel.ChannelControl;
                    channelControl.Dock = DockStyle.Fill;
                    this.PanelControl = channelControl;
                    index.Channel.Load(index.StrUri, index.Args);
                    this._chanel_tab_name.Text = index.Text;
                    base.Invalidate(this._chanel_tab_name.Rectangle);
                }
            }
            catch (Exception exception)
            {
                UiErrorHelper.HandExceptionSafely(this._main_form, exception);
            }
        }

        private void ChangeColor(string color)
        {
            ThemeManagerTemp.ApplyTheme((string) this.CurrentUser.Configuration.UserSetting.SkinSetting.CurrentSkinName);
            this.CurrentUser.Configuration.UserSetting.ColorSetting = color;
            this.SkinColor = color;
        }

        public void changecolor_click(object sender, EventArgs e)
        {
            System.Drawing.Point point = base.PointToScreen(new System.Drawing.Point(this._chg_color_button._location.X, this._chg_color_button._location.Y + this._chg_color_button._size.Height));
            this._main_form.ChangeColorMenu.Show(point, 3);
        }

        private void ChangeColorMenu_Opening(object sender, CancelEventArgs e)
        {
            bool flag = false;
            foreach (ToolStripItem item in this.ChangeColorMenu.get_Items())
            {
                if (!(item is ToolStripSeparator))
                {
                    if (!(item is menu_radioitem))
                    {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -