private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_psWord != null); if (m_psWord == null) { throw new InvalidOperationException(); } m_bInFormLoad = true; GlobalWindowManager.AddWindow(this); m_nFormHeight = this.Height; // Before restoring the position/size string strRect = Program.Config.UI.CharPickerRect; if (strRect.Length > 0) { UIUtil.SetWindowScreenRect(this, strRect); } m_strInitialFormRect = UIUtil.GetWindowScreenRect(this); m_fontChars = FontUtil.CreateFont("Tahoma", 8.25f, FontStyle.Bold); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.PickCharacters + " - " + PwDefs.ShortProductName; m_secWord.Attach(m_tbSelected, OnSelectedTextChangedEx, true); AceColumn colPw = Program.Config.MainWindow.FindColumn(AceColumnType.Password); bool bHide = ((colPw != null) ? colPw.HideWithAsterisks : true); if (m_bInitHide.HasValue) { bHide = m_bInitHide.Value; } bHide |= !AppPolicy.Current.UnhidePasswords; m_cbHideChars.Checked = bHide; RecreateResizableWindowControls(); if (m_uCharCount > 0) { m_btnOK.Enabled = false; // m_btnOK.Visible = false; } if (m_bSetForeground) { this.BringToFront(); this.Activate(); } m_bInFormLoad = false; }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_KGPG_Sign, KPRes.CreateMasterKey, m_ioInfo.GetDisplayName()); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.CreateMasterKey; FontUtil.SetDefaultFont(m_cbPassword); FontUtil.AssignDefaultBold(m_cbPassword); FontUtil.AssignDefaultBold(m_cbKeyFile); FontUtil.AssignDefaultBold(m_cbUserAccount); Bitmap bmpBig = SystemIcons.Warning.ToBitmap(); m_imgAccWarning = UIUtil.CreateScaledImage(bmpBig, 16, 16); bmpBig.Dispose(); m_picAccWarning.Image = m_imgAccWarning; m_ttRect.SetToolTip(m_cbHidePassword, KPRes.TogglePasswordAsterisks); m_ttRect.SetToolTip(m_btnSaveKeyFile, KPRes.KeyFileCreate); m_ttRect.SetToolTip(m_btnOpenKeyFile, KPRes.KeyFileUseExisting); m_ttRect.SetToolTip(m_tbRepeatPassword, KPRes.PasswordRepeatHint); if(!m_bCreatingNew) m_lblIntro.Text = KPRes.ChangeMasterKeyIntroShort; m_icgPassword.Attach(m_tbPassword, m_cbHidePassword, m_lblRepeatPassword, m_tbRepeatPassword, m_lblEstimatedQuality, m_pbPasswordQuality, m_lblQualityBits, this, true, false); m_cmbKeyFile.Items.Add(KPRes.NoKeyFileSpecifiedMeta); foreach(KeyProvider prov in Program.KeyProviderPool) m_cmbKeyFile.Items.Add(prov.Name); m_cmbKeyFile.SelectedIndex = 0; m_cbPassword.Checked = true; UIUtil.ApplyKeyUIFlags(Program.Config.UI.KeyCreationFlags, m_cbPassword, m_cbKeyFile, m_cbUserAccount, m_cbHidePassword); if(WinUtil.IsWindows9x || NativeLib.IsUnix()) { UIUtil.SetChecked(m_cbUserAccount, false); UIUtil.SetEnabled(m_cbUserAccount, false); UIUtil.SetEnabled(m_lblWindowsAccDesc, false); UIUtil.SetEnabled(m_lblWindowsAccDesc2, false); } CustomizeForScreenReader(); EnableUserControls(); // UIUtil.SetFocus(m_tbPassword, this); // See OnFormShown }
/* * 四、编辑控件后 - 更新到页面 */ public void updateElement(DControl ctl, bool isDesign) { currDControl = ctl; textBlock.FontSize = FontUtil.getFontSize(currDControl.fontSize); textBlock.FontFamily = FontUtil.getFontFamily(currDControl.fontFamily); textBlock.Foreground = FontUtil.getFontColor(currDControl.fontColor); textBlock.FontWeight = FontUtil.getFontWeight(currDControl.fontWeight); textBlock.TextAlignment = FontUtil.getFontTextAlignment(currDControl.fontTextAlignment); TextBlock.SetLineHeight(textBlock, FontUtil.getFontLineHeight(currDControl.fontLineHeight)); updateContent(currDControl.content); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_psWord != null); if (m_psWord == null) { throw new InvalidOperationException(); } m_bFormLoaded = false; GlobalWindowManager.AddWindow(this); m_nFormHeight = this.Height; // Before restoring the position/size m_strInitialFormRect = UIUtil.SetWindowScreenRectEx(this, Program.Config.UI.CharPickerRect); m_fontChars = FontUtil.CreateFont("Tahoma", 8.25f, FontStyle.Bold); this.Icon = AppIcons.Default; this.Text = KPRes.PickCharacters + " - " + PwDefs.ShortProductName; // Must be set manually due to possible object override m_tbSelected.TextChanged += this.OnSelectedTextChangedEx; PwInputControlGroup.ConfigureHideButton(m_cbHideChars, null); AceColumn colPw = Program.Config.MainWindow.FindColumn(AceColumnType.Password); bool bHide = ((colPw != null) ? colPw.HideWithAsterisks : true); if (m_bInitHide.HasValue) { bHide = m_bInitHide.Value; } bHide |= !AppPolicy.Current.UnhidePasswords; m_cbHideChars.Checked = bHide; RecreateResizableWindowControls(); if (m_uCharCount > 0) { m_btnOK.Enabled = false; // m_btnOK.Visible = false; } if (m_bSetForeground) { this.BringToFront(); this.Activate(); } UIUtil.SetFocus(m_tbSelected, this, m_bSetForeground); m_bFormLoaded = true; }
public Font ToFont() { if (m_bCacheValid) { return(m_fCached); } m_fCached = FontUtil.CreateFont(m_strFamily, m_fSize, m_fStyle, m_gu); m_bCacheValid = true; return(m_fCached); }
public SAV_Trainer(SaveFile sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV6)(Origin = sav).Clone(); if (Main.Unicode) { TB_OTName.Font = FontUtil.GetPKXFont(); if (SAV is SAV6XY) TB_TRNick.Font = TB_OTName.Font; } B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999"; CB_Gender.Items.Clear(); CB_Gender.Items.AddRange(Main.GenderSymbols.Take(2).ToArray()); // m/f depending on unicode selection TrainerStats.LoadRecords(SAV, Records.RecordList_6); TrainerStats.GetToolTipText = UpdateTip; MaisonRecords = new[] { TB_MCSN,TB_MCSS,TB_MBSN,TB_MBSS, TB_MCDN,TB_MCDS,TB_MBDN,TB_MBDS, TB_MCTN,TB_MCTS,TB_MBTN,TB_MBTS, TB_MCRN,TB_MCRS,TB_MBRN,TB_MBRS, TB_MCMN,TB_MCMS,TB_MBMN,TB_MBMS, }; cba = new[] { CHK_Badge1, CHK_Badge2, CHK_Badge3, CHK_Badge4, CHK_Badge5, CHK_Badge6, CHK_Badge7, CHK_Badge8 }; L_MultiplayerSprite.Enabled = CB_MultiplayerSprite.Enabled = L_MultiplayerSprite.Visible = CB_MultiplayerSprite.Visible = PB_Sprite.Visible = SAV is not SAV6AODemo; CHK_MegaRayquazaUnlocked.Visible = SAV is SAV6AO; L_Style.Visible = TB_Style.Visible = SAV is SAV6XY; if (SAV is not SAV6XY) TC_Editor.TabPages.Remove(Tab_Appearance); if (SAV is SAV6AODemo) { TC_Editor.TabPages.Remove(Tab_Multiplayer); TC_Editor.TabPages.Remove(Tab_Maison); } editing = true; GetComboBoxes(); GetTextBoxes(); editing = false; var status = SAV.Status; CHK_MegaUnlocked.Checked = status.IsMegaEvolutionUnlocked; CHK_MegaRayquazaUnlocked.Checked = status.IsMegaRayquazaUnlocked; }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); this.Icon = Properties.Resources.KeePass; FontUtil.AssignDefaultBold(m_cbAppendCopy); FontUtil.AssignDefaultBold(m_cbFieldRefs); m_cbAppendCopy.Checked = m_bAppendCopy; m_cbFieldRefs.Checked = m_bFieldRefs; }
void Start() { InitView(); InitEvents(); winOpenAnim.Play(); AudioModel.Instance.ClearAllActorSound(); FontUtil.FixCN(); }
void Start() { InitView(); InitEvents(); winOpenAnim.Play(); GameMgr.audioMgr.ClearAllActorSound(); FontUtil.FixCN(); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { FontFamily fontFamily = (FontFamily)value; XmlLanguage language = XmlLanguage.GetLanguage(culture.IetfLanguageTag); string name; if (!fontFamily.FamilyNames.TryGetValue(language, out name)) { name = FontUtil.GetName(fontFamily); } return((object)name); }
public void UpdateNoItems(GameTime gameTime) { noItemsImg.Update(gameTime); noItemsHead.SetText(FontUtil.SplitToLines(RetroEnvironment.GetLanguageManager().TryGetValue(noItemsHead.GetOriginalText()), 30)); noItemsHead.Update(gameTime); noItemsBody.SetText(FontUtil.SplitToLines(RetroEnvironment.GetLanguageManager().TryGetValue(noItemsBody.GetOriginalText()), 30)); noItemsBody.Update(gameTime); openCataButton.Update(gameTime); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KGPG_Sign, KPRes.CreateMasterKey, m_ioInfo.GetDisplayName()); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.CreateMasterKey; FontUtil.AssignDefaultBold(m_cbPassword); FontUtil.AssignDefaultBold(m_cbKeyFile); FontUtil.AssignDefaultBold(m_cbUserAccount); m_ttRect.SetToolTip(m_cbHidePassword, KPRes.TogglePasswordAsterisks); m_ttRect.SetToolTip(m_btnSaveKeyFile, KPRes.KeyFileCreate); m_ttRect.SetToolTip(m_btnOpenKeyFile, KPRes.KeyFileUseExisting); if (!m_bCreatingNew) { m_lblIntro.Text = KPRes.ChangeMasterKeyIntroShort; } m_secPassword.Attach(m_tbPassword, ProcessTextChangedPassword, true); m_secRepeat.Attach(m_tbRepeatPassword, null, true); m_cbHidePassword.Checked = true; m_cbPassword.Checked = true; ProcessTextChangedPassword(sender, e); // Update quality estimation m_cmbKeyFile.Items.Add(KPRes.NoKeyFileSpecifiedMeta); foreach (KeyProvider prov in Program.KeyProviderPool) { m_cmbKeyFile.Items.Add(prov.Name); } m_cmbKeyFile.SelectedIndex = 0; UIUtil.ApplyKeyUIFlags(Program.Config.UI.KeyCreationFlags, m_cbPassword, m_cbKeyFile, m_cbUserAccount, m_cbHidePassword); if (WinUtil.IsWindows9x || NativeLib.IsUnix()) { UIUtil.SetChecked(m_cbUserAccount, false); UIUtil.SetEnabled(m_cbUserAccount, false); UIUtil.SetEnabled(m_lblWindowsAccDesc, false); UIUtil.SetEnabled(m_lblWindowsAccDesc2, false); } CustomizeForScreenReader(); EnableUserControls(); }
/* * 初始化定时器 */ private void init() { textBlock.FontSize = FontUtil.getFontSize(currDControl.fontSize); textBlock.FontFamily = FontUtil.getFontFamily(currDControl.fontFamily); textBlock.Foreground = FontUtil.getFontColor(currDControl.fontColor); textBlock.FontWeight = FontUtil.getFontWeight(currDControl.fontWeight); textBlock.TextAlignment = FontUtil.getFontTextAlignment(currDControl.fontTextAlignment); TextBlock.SetLineHeight(textBlock, FontUtil.getFontLineHeight(currDControl.fontLineHeight)); updateContent(currDControl.content); timer.Tick += new EventHandler(Timer_Tick); //超过计时间隔时发生 timer.Start(); //DT启动 }
public FontKey(System.Drawing.Font font) { this.string_0 = font.FontFamily.Name.Replace(" ", string.Empty); this.string_1 = !FontUtil.IsItalic(font) ? "normal" : "italic"; if (FontUtil.IsBold(font)) { this.string_2 = "bold"; } else { this.string_2 = "normal"; } }
public SAV_HallOfFame(SAV6 sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV6)(Origin = sav).Clone(); data = SAV.Data.Slice(SAV.HoF, 0x1B40); // Copy HoF section of save into Data Setup(); LB_DataEntry.SelectedIndex = 0; NUP_PartyIndex_ValueChanged(this, EventArgs.Empty); TB_Nickname.Font = TB_OT.Font = FontUtil.GetPKXFont(); editing = true; }
private void OnFormLoad(object sender, EventArgs e) { ++m_cBlockUIUpdate; GlobalWindowManager.AddWindow(this); BannerFactory.CreateBannerEx(this, m_bannerImage, KeePass.Properties.Resources.B48x48_KGPG_Gen, KPRes.KeyFileCreateTitle, KPRes.KeyFileCreate + "."); this.Icon = AppIcons.Default; this.Text = KPRes.KeyFileCreateTitle; FontUtil.AssignDefaultBold(m_rbCreate); FontUtil.AssignDefaultBold(m_rbRecreate); FontUtil.AssignDefaultMono(m_tbRecKeyHash, false); FontUtil.AssignDefaultMono(m_tbRecKey, false); if (m_bRecreateOnly) { m_rbRecreate.Checked = true; m_rbCreate.Enabled = false; } else { m_rbCreate.Checked = true; } m_cbNewEntropy.Checked = true; Debug.Assert(!m_cmbNewFormat.Sorted); foreach (KfcfInfo kfi in m_vNewFormat) { m_cmbNewFormat.Items.Add(kfi.Name); } m_cmbNewFormat.SelectedIndex = 0; Debug.Assert(!m_cmbRecFormat.Sorted); foreach (KfcfInfo kfi in m_vRecFormat) { m_cmbRecFormat.Items.Add(kfi.Name); } m_cmbRecFormat.SelectedIndex = 0; m_rbCreate.CheckedChanged += this.OnShouldUpdateUIState; m_rbRecreate.CheckedChanged += this.OnShouldUpdateUIState; m_cmbRecFormat.SelectedIndexChanged += this.OnShouldUpdateUIState; m_tbRecKey.TextChanged += this.OnShouldUpdateUIState; --m_cBlockUIUpdate; UpdateUIState(); }
private void InitializeComponent() { this.menuHelpHelpTopics = new PdnMenuItem(); this.menuHelpSeparator1 = new ToolStripSeparator(); this.menuHelpPdnWebsite = new PdnMenuItem(); this.menuHelpPdnSearch = new PdnMenuItem(); this.menuHelpDonate = new PdnMenuItem(); this.menuHelpForum = new PdnMenuItem(); this.menuHelpTutorials = new PdnMenuItem(); this.menuHelpPlugins = new PdnMenuItem(); this.menuHelpSendFeedback = new PdnMenuItem(); this.menuHelpSeparator2 = new ToolStripSeparator(); this.menuHelpAbout = new PdnMenuItem(); ToolStripItem[] toolStripItems = new ToolStripItem[] { this.menuHelpHelpTopics, this.menuHelpSeparator1, this.menuHelpPdnWebsite, this.menuHelpPdnSearch }; base.DropDownItems.AddRange(toolStripItems); if (!WinAppModel.HasCurrentPackage) { base.DropDownItems.Add(this.menuHelpDonate); } ToolStripItem[] itemArray2 = new ToolStripItem[] { this.menuHelpForum, this.menuHelpTutorials, this.menuHelpPlugins, this.menuHelpSendFeedback, this.menuHelpSeparator2, this.menuHelpAbout }; base.DropDownItems.AddRange(itemArray2); base.Name = "Menu.Help"; this.Text = PdnResources.GetString("Menu.Help.Text"); this.Image = PdnResources.GetImageResource("Icons.MenuHelpIcon.png").Reference; this.DisplayStyle = ToolStripItemDisplayStyle.Image; base.AutoToolTip = true; base.AutoSize = false; this.Size = new Size(UIUtil.ScaleWidth(0x10) + 6, UIUtil.ScaleHeight(0x10) + 6); this.menuHelpHelpTopics.Name = "HelpTopics"; this.menuHelpHelpTopics.ShortcutKeys = Keys.F1; this.menuHelpHelpTopics.Click += new EventHandler(this.OnMenuHelpHelpTopicsClick); this.menuHelpPdnWebsite.Name = "PdnWebsite"; this.menuHelpPdnWebsite.Click += new EventHandler(this.OnMenuHelpPdnWebsiteClick); this.menuHelpPdnSearch.Name = "PdnSearch"; this.menuHelpPdnSearch.Click += new EventHandler(this.OnMenuHelpPdnSearchEngineClick); this.menuHelpPdnSearch.ShortcutKeys = Keys.Control | Keys.E; this.menuHelpDonate.Name = "Donate"; this.menuHelpDonate.Click += new EventHandler(this.OnMenuHelpDonateClick); this.menuHelpDonate.Font = FontUtil.CreateGdipFont(this.menuHelpDonate.Font.Name, this.menuHelpDonate.Font.Size, this.menuHelpDonate.Font.Style | FontStyle.Italic); this.menuHelpForum.Name = "Forum"; this.menuHelpForum.Click += new EventHandler(this.OnMenuHelpForumClick); this.menuHelpTutorials.Name = "Tutorials"; this.menuHelpTutorials.Click += new EventHandler(this.OnMenuHelpTutorialsClick); this.menuHelpPlugins.Name = "Plugins"; this.menuHelpPlugins.Click += new EventHandler(this.OnMenuHelpPluginsClick); this.menuHelpSendFeedback.Name = "SendFeedback"; this.menuHelpSendFeedback.Click += new EventHandler(this.OnMenuHelpSendFeedbackClick); this.menuHelpAbout.Name = "About"; this.menuHelpAbout.Click += new EventHandler(this.OnMenuHelpAboutClick); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); this.Icon = AppIcons.Default; FontUtil.AssignDefaultBold(m_cbAppendCopy); FontUtil.AssignDefaultBold(m_cbFieldRefs); FontUtil.AssignDefaultBold(m_cbCopyHistory); m_cbAppendCopy.Checked = m_bAppendCopy; m_cbFieldRefs.Checked = m_bFieldRefs; m_cbCopyHistory.Checked = m_bCopyHistory; }
public static FontFace GetFontFaceInfo(string font, MediaCenterTheme theme) { FontFace fontFace = new FontFace(); List <FontFamily> list = new List <FontFamily>(); if (theme != null) { list.AddRange(theme.Fonts); } InstallMediaCenterFonts(); list.AddRange(Fonts.SystemFontFamilies); foreach (FontFamily fontFamily in list) { string name = FontUtil.GetName(fontFamily); if (font.StartsWith(name)) { fontFace.FontFamily = name; FontWeightConverter fontWeightConverter = new FontWeightConverter(); string str = font.Substring(name.Length).Trim(); char[] chArray = new char[1] { ' ' }; foreach (string text in str.Split(chArray)) { if (!string.IsNullOrEmpty(text)) { try { fontFace.FontWeight = (FontWeight)fontWeightConverter.ConvertFromString(text); } catch (FormatException) { } } } break; } } if (fontFace.FontFamily == null) { return((FontFace)null); } else { return(fontFace); } }
public void InitTasks() { list.ClearList(); List <TIVInfo> taskList = BattleModel.Instance.crtConfig.GetTaskList(); int taskLen = taskList.Count; for (int i = 0; i < taskLen; i++) { CreateTaskItem(i, taskList[i]); } FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT); }
private void SetRtbData(string strData, bool bRtf, bool bFixedFont, bool bLinkify) { if (strData == null) { Debug.Assert(false); strData = string.Empty; } m_rtbText.Clear(); // Clear formatting (esp. induced by Unicode) if (bFixedFont) { FontUtil.AssignDefaultMono(m_rtbText, false); } else { FontUtil.AssignDefault(m_rtbText); } if (bRtf) { m_rtbText.Rtf = StrUtil.RtfFix(strData); } else { m_rtbText.Text = strData; } if (bLinkify) { UIUtil.RtfLinkifyUrls(m_rtbText); } if (!bRtf) { Font f = (bFixedFont ? FontUtil.MonoFont : FontUtil.DefaultFont); if (f != null) { m_rtbText.SelectAll(); m_rtbText.SelectionFont = f; } else { Debug.Assert(false); } } m_rtbText.Select(0, 0); }
private void OnFormLoad(object sender, EventArgs e) { // Must work without a parent window Debug.Assert(this.StartPosition == FormStartPosition.CenterScreen); InitAdvancedTab(); // After translation, before resize GlobalWindowManager.AddWindow(this); string strTitle = (m_bSave ? KPRes.UrlSaveTitle : KPRes.UrlOpenTitle); string strDesc = (m_bSave ? KPRes.UrlSaveDesc : KPRes.UrlOpenDesc); BannerFactory.CreateBannerEx(this, m_bannerImage, KeePass.Properties.Resources.B48x48_WWW, strTitle, strDesc); this.Icon = Properties.Resources.KeePass; this.Text = strTitle; FontUtil.AssignDefaultBold(m_lblUrl); FontUtil.AssignDefaultBold(m_lblUserName); FontUtil.AssignDefaultBold(m_lblPassword); FontUtil.AssignDefaultBold(m_lblRemember); m_tbUrl.Text = (m_ioc.IsLocalFile() ? string.Empty : m_ioc.Path); m_tbUserName.Text = m_ioc.UserName; m_tbPassword.Text = m_ioc.Password; m_cmbCredSaveMode.Items.Add(KPRes.CredSaveNone); m_cmbCredSaveMode.Items.Add(KPRes.CredSaveUserOnly); m_cmbCredSaveMode.Items.Add(KPRes.CredSaveAll); if(m_ioc.CredSaveMode == IOCredSaveMode.UserNameOnly) m_cmbCredSaveMode.SelectedIndex = 1; else if(m_ioc.CredSaveMode == IOCredSaveMode.SaveCred) m_cmbCredSaveMode.SelectedIndex = 2; else m_cmbCredSaveMode.SelectedIndex = 0; if(!m_bCanRememberCred) { m_cmbCredSaveMode.SelectedIndex = 0; m_cmbCredSaveMode.Enabled = false; } if((m_tbUrl.TextLength > 0) && (m_tbUserName.TextLength > 0)) UIUtil.SetFocus(m_tbPassword, this); else if(m_tbUrl.TextLength > 0) UIUtil.SetFocus(m_tbUserName, this); else UIUtil.SetFocus(m_tbUrl, this); }
private void fontWeight_Checked(object sender, RoutedEventArgs e) { Boolean b = (Boolean)fontWeight.IsChecked; TextBox textBox = (TextBox)currElement; textBox.Text = content.Text; string fontWeightVal = "Normal"; if (b) { fontWeightVal = "Bold"; } textBox.FontWeight = FontUtil.getFontWeight(fontWeightVal); }
public void UpdateCell(string title, string subtitle, bool shouldShowLottie) { FontUtil.ApplyFontAttribute(this); this.TitleLabel.Text = title; this.SubtitleLabel.Text = subtitle; if (shouldShowLottie) { LOTAnimationView animation = LOTAnimationView.AnimationNamed("RightArrow"); animation.Frame = this.ImageView.Bounds; animation.LoopAnimation = true; this.ImageView.AddSubview(animation); animation.Play(); } }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_ilIcons != null); if (m_ilIcons == null) { throw new InvalidOperationException(); } Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); this.Icon = Properties.Resources.KeePass; FontUtil.AssignDefaultBold(m_radioStandard); FontUtil.AssignDefaultBold(m_radioCustom); m_lvIcons.SmallImageList = m_ilIcons; for (uint i = 0; i < m_uNumberOfStandardIcons; ++i) { m_lvIcons.Items.Add(i.ToString(), (int)i); } int iFoundCustom = RecreateCustomIconList(false); if (!m_pwDefaultCustomIcon.Equals(PwUuid.Zero) && (iFoundCustom >= 0)) { m_radioCustom.Checked = true; m_lvCustomIcons.Items[iFoundCustom].Selected = true; m_lvCustomIcons.EnsureVisible(iFoundCustom); UIUtil.SetFocus(m_lvCustomIcons, this); } else if (m_uDefaultIcon < m_uNumberOfStandardIcons) { m_radioStandard.Checked = true; m_lvIcons.Items[(int)m_uDefaultIcon].Selected = true; m_lvIcons.EnsureVisible((int)m_uDefaultIcon); UIUtil.SetFocus(m_lvIcons, this); } else { Debug.Assert(false); m_radioStandard.Checked = true; } EnableControlsEx(); }
private void This_Close(object sender, EventArgs e) { //同步到页面 currElement.Tag = currDControl; TextBox textBox = (TextBox)currElement; textBox.Text = content.Text; textBox.FontSize = FontUtil.getFontSize(currDControl.fontSize); textBox.FontFamily = FontUtil.getFontFamily(currDControl.fontFamily); textBox.Foreground = FontUtil.getFontColor(currDControl.fontColor); textBox.FontWeight = FontUtil.getFontWeight(currDControl.fontWeight); textBox.TextAlignment = FontUtil.getFontTextAlignment(currDControl.fontTextAlignment); TextBlock.SetLineHeight(textBox, FontUtil.getFontLineHeight(currDControl.fontLineHeight)); }
private void OnFontSizeComboSelectedIndexChanged(object sender, EventArgs e) { if ((m_uBlockEvents > 0) || (m_bdc != BinaryDataClass.RichText)) { return; } try { Font f = m_rtbText.SelectionFont; float fSize; if (!float.TryParse(m_tbFontSizeCombo.Text, out fSize)) { if (f != null) { fSize = f.SizeInPoints; } else if (FontUtil.DefaultFont != null) { fSize = FontUtil.DefaultFont.SizeInPoints; } else { fSize = 12.0f; } } if (f != null) { m_rtbText.SelectionFont = new Font(f.Name, fSize, f.Style, GraphicsUnit.Point, f.GdiCharSet, f.GdiVerticalFont); } else if (!NativeLib.IsUnix()) { UIUtil.RtfSetFontSize(m_rtbText, fSize); } else // Unix { m_rtbText.SelectionFont = FontUtil.CreateFont( FontFamily.GenericSansSerif, fSize, FontStyle.Regular); } } catch (Exception ex) { MessageService.ShowWarning(ex); } UpdateUIState(true, true); }
public SAV_SecretBase(SaveFile sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV6AO)(Origin = sav).Clone(); NUD_FObject.Maximum = SecretBase6.COUNT_GOODS - 1; // zero indexed! NUD_FPKM.Maximum = SecretBase6Other.COUNT_TEAM - 1; // zero indexed! PG_Base.Font = FontUtil.GetPKXFont(); SetupComboBoxes(); ReloadSecretBaseList(); LB_Bases.SelectedIndex = 0; // Extra data NUD_CapturedRecord.Value = SAV.Records.GetRecord(080); }
public IEnumerator LoadCommonRes() { if (Application.platform == RuntimePlatform.IPhonePlayer) { yield return(StartCoroutine(LoadManifest(true))); } else { yield return(StartCoroutine(LoadManifest(false))); } yield return(StartCoroutine(LoadFont())); yield return(StartCoroutine(LoadConfigs())); yield return(StartCoroutine(LoadIcons())); yield return(StartCoroutine(LoadDats())); yield return(StartCoroutine(LoadTxts())); yield return(StartCoroutine(LoadEffect())); GameModel.Instance.InitGameConfig(); //if (Application.platform == RuntimePlatform.IPhonePlayer) { SocialModel.Instance.StartUp(); //ADModel.Instance.Init (); } IAPModel.Instance.Init(); LanguageUtil.InitLang(); FontUtil.ChangeFont(LanguageUtil.GetTxt(10002)); //ClockModel.Instance.SetClock (new ClockInfo (1)); ClockModel.Instance.StartUp(); yield return(StartCoroutine(LoadDependenciesAb("prefab/base.ab"))); yield return(StartCoroutine(LoadDependenciesAb("audio.ab"))); Debug.Log("LoadRes " + ResourceStatic.COMMON); if (EventHandler != null) { EventHandler(ResourceEventType.load_complete, ResourceStatic.COMMON); } }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this, this); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_Folder_Download, KPRes.HelpSourceSelection, KPRes.HelpSourceSelectionDesc); this.Icon = AppIcons.Default; this.Text = KPRes.HelpSourceSelection; FontUtil.AssignDefaultBold(m_radioLocal); FontUtil.AssignDefaultBold(m_radioOnline); Debug.Assert(!m_lblLocal.AutoSize); // For RTL support if (!AppHelp.LocalHelpAvailable) { UIUtil.SetEnabledFast(false, m_radioLocal, m_lblLocal); m_lblLocal.Text = KPRes.HelpSourceNoLocalOption; AppHelp.PreferredHelpSource = AppHelpSource.Online; } bool bOverride = !string.IsNullOrEmpty(Program.Config.Application.HelpUrl); bool bEnforced = AppConfigEx.IsOptionEnforced(Program.Config.Application, "HelpUseLocal"); if (!bOverride) { if (AppHelp.PreferredHelpSource == AppHelpSource.Local) { m_radioLocal.Checked = true; } else { m_radioOnline.Checked = true; } } if (bOverride || bEnforced) { UIUtil.SetEnabledFast(false, m_radioLocal, m_lblLocal, m_radioOnline, m_lblOnline, m_btnOK); UIUtil.SetFocus(m_btnCancel, this); } }