static void Current_OpitonsChanged(object sender, EventArgs e) { UITheme.Default.Colors = UIColorThemeManage.GetNamedTheme(CommonOptions.Appearances.UIThemeName); LanguageManage.ChangeLanguage(CommonOptions.Localization.LanguageID); //D.Message(string.Format("Test: Options => {0}", Lang._("Options"))); }
void InitializeComponent() { propertyGrid1 = new PropertyGrid(); MenuReset = new ToolStripMenuItem(); MenuDescription = new ToolStripMenuItem(); MenuProperty = new ContextMenuStrip(); SuspendLayout(); // propertyGrid1 = new PropertyGrid(); // MenuReset.Text = LanguageManage.GetText("Reset"); MenuReset.Image = Properties.Resources.reset; MenuReset.Click += MenuReset_Click; // MenuDescription.Text = LanguageManage.GetText("Show Description"); MenuDescription.Click += MenuDescription_Click; // MenuProperty.Items.AddRange(new ToolStripItem[] { MenuReset, new ToolStripSeparator(), MenuDescription }); MenuProperty.Opening += MenuProperty_Opening; // Controls.Add(propertyGrid1); ContextMenuStrip = MenuProperty; ResumeLayout(); }
private void OpenLocalFile() { var dialog = new OpenFileDialog(); dialog.Multiselect = false; dialog.Filter = string.Format("{0} (*.*)|*.*", LanguageManage.GetText("All Files")); if (dialog.ShowDialog() == DialogResult.OK) { CurrentObject = dialog.FileName; } }
void InitializePreviewMap() { MindMap map = new MindMap(); map.Margin = Padding.Empty; map.Root.Text = LanguageManage.GetText("Center Topic"); map.Root.Children.Add(new Topic("Topic 1")); map.Root.Children.Add(new Topic("Topic 2")); map.Root.Children.Add(new Topic("Topic 3")); mindMapView1.Map = map; }
protected void BuildStyleString(StringBuilder sb, string name, bool validate, object value) { if (validate) { if (sb.Length > 0) { sb.Append(", "); } sb.Append(LanguageManage.GetText(name)); sb.Append(":"); sb.Append(value.ToString()); } }
public UrlEditUI() { Items.Add(new ListItem <string>(LanguageManage.GetText("Cut"), "Cut", Properties.Resources.cut)); Items.Add(new ListItem <string>(LanguageManage.GetText("Copy"), "Copy", Properties.Resources.copy)); Items.Add(new ListItem <string>(LanguageManage.GetText("Paste"), "Paste", Properties.Resources.paste)); Items.Add(new ListItem <string>(LanguageManage.GetTextWithEllipsis("Select Local File"), "Open", Properties.Resources.open)); Items.Add(new ListItem <string>(LanguageManage.GetTextWithEllipsis("Internet"), "Internet", Properties.Resources.internet)); DrawMode = DrawMode.OwnerDrawFixed; ItemHeight += 10; BorderStyle = BorderStyle.None; this.Size = new Size(Math.Max(Width, 200), ItemHeight * Math.Min(12, Items.Count) + 20); }
public AboutDialog() { InitializeComponent(); Text = LanguageManage.GetText("About");// String.Format("{0} {1}", LanguageManage.GetText("About"), ProductInfo.Title); LabVersion.Text = ProductInfo.Version; labelCopyright.Text = ProductInfo.Copyright; //labelCompanyName.Text = ProductInfo.Company; LnkWebSite.Text = LnkWebSite.LinkUrl = ProductInfo.WebSite; LnkEmail.Text = ProductInfo.SupportEmail; LnkEmail.LinkUrl = string.Format("mailto:{0}", ProductInfo.SupportEmail); labelIcons.Text = "Some Icons are Copyright © Yusuke Kamiyamane."; labelIcons.LinkUrl = @"http://p.yusukekamiyamane.com/?client=blumind"; ListThanks(); AfterInitialize(); }
public AboutDialogBox() { InitializeComponent(); Text = LanguageManage.GetText("About"); ShowIcon = false; this.SetFontNotScale(SystemFonts.MessageBoxFont); LabProductName.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 36); LabVersion.Text = string.Format("{0}({1})", Lang._("Version"), ProductInfo.Version); TxbEmail.Text = ProductInfo.SupportEmail; LnkWebSite.Text = ProductInfo.WebSite; LnkWebSite.LinkUrl = ProductInfo.WebSite; LabAboutProduct.Text = string.Format("{0}\n{1}\n\n{2}\n{3}", ProductInfo.GetInformation(), ProductInfo.Copyright, "Some Icons are Copyright © Yusuke Kamiyamane.", string.Format("Pdfsharp {0}({1})", Lang._("Version"), PdfSharp.ProductVersionInfo.Version)); AfterInitialize(); }
static void Main(params string[] args) { if (PreProcessApplicationArgs(args)) { return; } // 如果需要打开文件, 偿试寻找是否有已经存在的应用实例打开 if (!args.IsNullOrEmpty() && TryOpenByOtherInstance(args)) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); IsRunTime = true; Options.Current.OpitonsChanged += Current_OpitonsChanged; Options.Current.Load(args); //D.Message("ProgramEnvironment.RunMode is {0}", ProgramEnvironment.RunMode); //D.Message("ApplicationDataDirectory is {0}", ProgramEnvironment.ApplicationDataDirectory); //D.Message(new string('-', 40)); UIColorThemeManage.Initialize(); //D.Message("LanguageManage.Initialize"); LanguageManage.Initialize(); RecentFilesManage.Default.Initialize(); Current_OpitonsChanged(null, EventArgs.Empty); LicenseForm licForm = new LicenseForm(); if (licForm.ShowDialog() != DialogResult.OK) { return; } if (false) { // Check trial period => 10 days bool bTrialExpired = true; string appName = "WinRAR NT"; string subKey = "General"; string firstRunKey = "FRT"; string lastRunKey = "LRT"; int nMaxTrialDays = 10; RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", true); bool bKeyExists = key.ContainsSubKey(appName); TimeSpan elapsedSpan = new TimeSpan(); if (!bKeyExists) { key.CreateSubKey(appName); key = key.OpenSubKey(appName, true); key.CreateSubKey(subKey); key = key.OpenSubKey(subKey, true); key.SetValue(firstRunKey, DateTime.Now.Ticks.ToString()); bTrialExpired = false; } else { if (key.ContainsSubKey(appName)) { key = key.OpenSubKey(appName); if (key.ContainsSubKey(subKey)) { key = key.OpenSubKey(subKey); object value = key.GetValue(firstRunKey); if (value != null) { long firstTicks = Convert.ToInt64(value.ToString()); long currTicks = DateTime.Now.Ticks; if (currTicks > firstTicks) { elapsedSpan = new TimeSpan(currTicks - firstTicks); if (elapsedSpan.TotalDays <= nMaxTrialDays) { value = key.GetValue(lastRunKey); if (value != null) { long lastTicks = Convert.ToInt64(value.ToString()); if (currTicks >= lastTicks) { bTrialExpired = false; } } } } } } } } if (bTrialExpired) { MessageBox.Show(Lang._("Your trial is expired!"), "BowTie Presenter"); return; } MessageBox.Show(String.Format(Lang._("Your trial version will expire in {0} days."), nMaxTrialDays - Convert.ToInt32(elapsedSpan.TotalDays)), "BowTie Presenter"); Registry.CurrentUser.OpenSubKey("Software", true).OpenSubKey(appName, true) .OpenSubKey(subKey, true).SetValue(lastRunKey, DateTime.Now.Ticks); } #if DEBUG // NotesWidget nw = new NotesWidget() // { // Remark = @" //<P><STRONG>发布时间:<SPAN>2014年4月29日</SPAN> </STRONG></P> //<DIV> //<P>美国总统奥巴马8天4国的亚太之行,在今天画上句点。美国与日本、韩国、马来西亚以及<WBR>­ //菲律宾等亚太盟国的关系是否更加紧密,亚太局势是否取得平衡?奥巴马极力推动的跨太平<WBR>­洋伙伴协议TPP是否有所进展? //而虽然不在奥巴马的访问行程之内,但正如中国外交部发<WBR>­言人秦刚所说:" 你来,或者不来,我就在这里",中国就像"房间里的大象", // 是美国与盟国即使不直接说<WBR>­明白,却也无法视而不见的议题。奥巴马此行取得哪些成果?我们邀请到两位嘉宾来为我们<WBR>­ // 解读。一位是香港亚洲周刊资深特派员纪硕鸣先生,另外一位是中国复旦大学美国研究中心<WBR>­沈丁立教授。</P></DIV>" // }; // var dlg = new RemarkDialog(); // dlg.ShowInTaskbar = true; // dlg.Widget = nw; // dlg.ShowDialog(); // dlg.Widget = new NotesWidget() // { // Remark = "abc" // }; // dlg.ShowDialog(); MainForm = new MainForm(args); Application.Run(MainForm); #else MainForm = new MainForm(args); Application.Run(MainForm); #endif Blumind.Configuration.Options.Current.Save(); }
protected override void OnCurrentLanguageChanged() { base.OnCurrentLanguageChanged(); propertyControl1.Text = LanguageManage.GetText("Property"); }
void LanguageManage_CurrentChanged(object sender, EventArgs e) { MenuDescription.Text = LanguageManage.GetText("Show Description"); MenuReset.Text = LanguageManage.GetText("Reset"); }
static void Main(params string[] args) { if (PreProcessApplicationArgs(args)) { return; } // 如果需要打开文件, 偿试寻找是否有已经存在的应用实例打开 if (!args.IsNullOrEmpty() && TryOpenByOtherInstance(args)) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); IsRunTime = true; Options.Current.OpitonsChanged += Current_OpitonsChanged; Options.Current.Load(args); //D.Message("ProgramEnvironment.RunMode is {0}", ProgramEnvironment.RunMode); //D.Message("ApplicationDataDirectory is {0}", ProgramEnvironment.ApplicationDataDirectory); //D.Message(new string('-', 40)); UIColorThemeManage.Initialize(); //D.Message("LanguageManage.Initialize"); LanguageManage.Initialize(); RecentFilesManage.Default.Initialize(); Current_OpitonsChanged(null, EventArgs.Empty); #if DEBUG // NotesWidget nw = new NotesWidget() // { // Remark = @" //<P><STRONG>发布时间:<SPAN>2014年4月29日</SPAN> </STRONG></P> //<DIV> //<P>美国总统奥巴马8天4国的亚太之行,在今天画上句点。美国与日本、韩国、马来西亚以及<WBR>­ //菲律宾等亚太盟国的关系是否更加紧密,亚太局势是否取得平衡?奥巴马极力推动的跨太平<WBR>­洋伙伴协议TPP是否有所进展? //而虽然不在奥巴马的访问行程之内,但正如中国外交部发<WBR>­言人秦刚所说:" 你来,或者不来,我就在这里",中国就像"房间里的大象", // 是美国与盟国即使不直接说<WBR>­明白,却也无法视而不见的议题。奥巴马此行取得哪些成果?我们邀请到两位嘉宾来为我们<WBR>­ // 解读。一位是香港亚洲周刊资深特派员纪硕鸣先生,另外一位是中国复旦大学美国研究中心<WBR>­沈丁立教授。</P></DIV>" // }; // var dlg = new RemarkDialog(); // dlg.ShowInTaskbar = true; // dlg.Widget = nw; // dlg.ShowDialog(); // dlg.Widget = new NotesWidget() // { // Remark = "abc" // }; // dlg.ShowDialog(); MainForm = new MainForm(args); Application.Run(MainForm); #else MainForm = new MainForm(args); Application.Run(MainForm); #endif Blumind.Configuration.Options.Current.Save(); }