Esempio n. 1
0
            async void ButtonClicked(object sender, EventArgs args)
            {
                var results = await jitter.Update((Jitter)combo.SelectedItem);

                var text = results.FirstOrDefault()?.Asm;

                if (text == null)
                {
                    textView.LoadText("Nothing JITted", Xwt.Formats.TextFormat.Plain);
                }
                else
                {
                    textView.LoadText(text, Xwt.Formats.TextFormat.Plain);
                }
            }
Esempio n. 2
0
 void ChangeCodepage(int CP)
 {
     Codepage = Convert.ToInt32(CP);
     Txt      = Encoding.GetEncoding(Codepage).GetString(fileContent ?? new byte[] { 0, 0 });
     RTV.LoadText(Txt, new Xwt.Formats.PlainTextFormat());
     mbCodepage.Label = Encoding.GetEncoding(Codepage).EncodingName;
 }
Esempio n. 3
0
        void ShowDebugInfo(object sender, EventArgs e)
        {
            Xwt.Dialog Fcdbg = new Xwt.Dialog();
            Fcdbg.Buttons.Add(Xwt.Command.Close);
            Fcdbg.Buttons[0].Clicked += (o, ea) => { Fcdbg.Hide(); };
            Fcdbg.Title = "FC debug output";
            string txt = "" +
                         "===THE FILE COMMANDER, VERSION " + Winforms.Application.ProductVersion + (Environment.Is64BitProcess ? " 64-BIT" : " 32-BIT") + "===\n" +
                         Environment.CommandLine + " @ .NET fw " + Environment.Version + (Environment.Is64BitOperatingSystem ? " 64-bit" : " 32-bit") + " on " + Environment.MachineName + "-" + Environment.OSVersion + " (" + Environment.OSVersion.Platform + " v" + Environment.OSVersion.Version.Major + "." + Environment.OSVersion.Version.Minor + ")\n" +
                         "The current drawing toolkit is " + Xwt.Toolkit.CurrentEngine.GetSafeBackend(this) + "\n" +
                         "\nPanel debug:\n---------\n" +
                         "The active panel is: " + ((ActivePanel == p1) ? "LEFT\n" : "RIGHT\n") +
                         "The passive panel is: " + ((ActivePanel == p2) ? "LEFT\n" : "RIGHT\n") +
                         "They are different? " + (ActivePanel != PassivePanel).ToString().ToUpper() + " (should be true)\n" +
                         "The LEFT filesystem: " + p1.FS.ToString() + " at \"" + p1.FS.CurrentDirectory + "\"\n" +
                         "The RIGHT filesystem: " + p2.FS.ToString() + " at \"" + p2.FS.CurrentDirectory + "\"\n" +
                         "Filesystems are same by type? " + (p1.FS.GetType() == p2.FS.GetType()).ToString().ToUpper() + ".\n" +
                         "Filesystems are identically? " + (p1.FS == p2.FS).ToString().ToUpper() + " (should be false).\n" +
                         "\nTheme debug:\n---------\n" +
                         "Using external theme? " + (!(fcmd.Properties.Settings.Default.UserTheme == null || fcmd.Properties.Settings.Default.UserTheme == "")).ToString().ToUpper() + "\n" +
                         "Theme's cascade style sheet file: \"" + fcmd.Properties.Settings.Default.UserTheme + "\"\n\nIf you having some troubles, please report this to https://github.com/atauenis/fcmd bug tracker or http://atauenis.ru/phpBB3/viewtopic.php?f=4&t=211 topic. \nThe End.";

            Xwt.RichTextView rtv = new Xwt.RichTextView();
            rtv.LoadText(txt, new Xwt.Formats.PlainTextFormat());
            Fcdbg.Content = rtv;
            Fcdbg.Width   = 500;
            Fcdbg.Run();
        }
Esempio n. 4
0
        public override Xwt.Widget Makeup(IXwtWrapper Parent)
        {
            Xwt.RichTextView Target = new Xwt.RichTextView();
            Target.LoadText(this.Text, Xwt.Formats.TextFormat.Markdown);

            if (Source != "")
            {
                Target.LoadText((string)PathBind.GetValue(Source, Parent, ""), Xwt.Formats.TextFormat.Markdown);
                Parent.PropertyChanged += (o, e) =>
                {
                    if (e.PropertyName == this.Source.Split('.')[0])
                        Xwt.Application.Invoke(() =>
                            Target.LoadText((string)PathBind.GetValue(Source, Parent, 0), Xwt.Formats.TextFormat.Markdown)
                            );
                };
            }

            WindowController.TryAttachEvent(Target, "NavigateToUrl", Parent, Navigated);
            InitWidget(Target, Parent);
            return Target;
        }
Esempio n. 5
0
        void ShowDebugInfo(object sender, EventArgs e)
        {
            System.Configuration.Configuration confLR = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal);
            System.Configuration.Configuration confR = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoaming);
            System.Configuration.Configuration confEXE = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);

            Xwt.Dialog Fcdbg = new Xwt.Dialog();
            Fcdbg.Buttons.Add(Xwt.Command.Close);
            Fcdbg.Buttons[0].Clicked += (o, ea) => {Fcdbg.Hide();};
            Fcdbg.Title="FC debug output";
            string txt = ""+
                "===THE FILE COMMANDER, VERSION " + Winforms.Application.ProductVersion + (Environment.Is64BitProcess ? " 64-BIT" : " 32-BIT") + "===\n"+
                Environment.CommandLine + " @ .NET fw " + Environment.Version + (Environment.Is64BitOperatingSystem ? " 64-bit" : " 32-bit") + " on " + Environment.MachineName + "-" + Environment.OSVersion + " (" + Environment.OSVersion.Platform + " v" + Environment.OSVersion.Version.Major + "." + Environment.OSVersion.Version.Minor + ")\n" +
                "The current drawing toolkit is " + Xwt.Toolkit.CurrentEngine.GetSafeBackend (this) + "\n" +
                "\nCONFIGuration files:\n---------\n"+
                "Local: "+confLR.FilePath + " (exists? " + b2s(confLR.HasFile) +")\n"+
                "Roaming: " + confR.FilePath + " (exists? " + b2s(confR.HasFile) + ")\n" +
                "Overall: " + confEXE.FilePath + " (exists? " + b2s(confEXE.HasFile) + ")\n" +
                "\nPanel debug:\n---------\n"+
                "The active panel is: " + ((ActivePanel == p1) ? "LEFT\n" : "RIGHT\n") +
                "The passive panel is: " + ((ActivePanel == p2) ? "LEFT\n" : "RIGHT\n")+
                "They are different? "+ b2s(ActivePanel != PassivePanel) + " (should be yes)\n"+
                "The LEFT filesystem: " + p1.FS.ToString() + " at \"" + p1.FS.CurrentDirectory + "\"\n"+
                "The RIGHT filesystem: " + p2.FS.ToString() + " at \"" + p2.FS.CurrentDirectory + "\"\n"+
                "Filesystems are same by type? " + b2s(p1.FS.GetType()==p2.FS.GetType()) + ".\n"+
                "Filesystems are identically? " + b2s(p1.FS==p2.FS) + " (should be no).\n"+
                "\nTheme debug:\n---------\n"+
                "Using external theme? " + b2s(!(fcmd.Properties.Settings.Default.UserTheme == null || fcmd.Properties.Settings.Default.UserTheme == ""))+"\n"+
                "Theme's cascade style sheet file: \"" + fcmd.Properties.Settings.Default.UserTheme + "\"\n\nIf you having some troubles, please report this to https://github.com/atauenis/fcmd bug tracker or http://atauenis.ru/phpBB3/viewtopic.php?f=4&t=211 topic. \nThe End.";
            Xwt.RichTextView rtv = new Xwt.RichTextView();
            rtv.LoadText(txt, new Xwt.Formats.PlainTextFormat());
            Xwt.ScrollView sv = new Xwt.ScrollView(rtv);
            Fcdbg.Content = sv;
            Fcdbg.Width = 500;
            Fcdbg.Run();
        }