コード例 #1
0
ファイル: Pad.cs プロジェクト: Therzok/JITPad
            public PadWidget()
            {
                jitter = new DocumentJitter();

                var box = new Xwt.VBox();

                combo = new Xwt.ComboBox();
                combo.Items.Add(Jitter.Mono, "Mono JIT");
                combo.Items.Add(Jitter.MonoAOT, "Mono AOT");
                combo.SelectedIndex = 0;
                box.PackStart(combo);

                btn          = new Xwt.Button("JIT");
                btn.Clicked += ButtonClicked;
                box.PackStart(btn);

                textView = new Xwt.RichTextView
                {
                    MinHeight = 400,
                    MinWidth  = 400
                };
                box.PackStart(textView, true, true);

                Content = box;
            }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: AVert/fcmd
        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();
        }
コード例 #3
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;
        }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: raeno/fcmd
        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();
        }