Пример #1
0
        internal NullAccountWindow() : base(false, 3)
        {
            BorderWidth = 20;
            var attr = new AttrList();

            attr.Insert(new AttrScale(Pango.Scale.Large));
            attr.Insert(new AttrWeight(Weight.Bold));
            Add(new Label("Hang on, there!")
            {
                Justify    = Justification.Center,
                Attributes = attr
            });
            Add(new Label("We need an account to be able to display any useful data here. \n " +
                          "To continue, please add a default account in the application settings."));
            Add(new VBox());
            Add(new VBox());
        }
Пример #2
0
 public void AddAttr(string name, string value)
 {
     AttrList.Add(new AttributeEntity {
         AttrName = name, AttrValue = value
     });
 }
Пример #3
0
 public void AddAttr(AttributeEntity arg)
 {
     AttrList.Add(arg);
 }
Пример #4
0
        public WelcomeWidget(Builder builder, IntPtr handle) : base(handle)
        {
            builder.Autoconnect(this);
            FontDescription fontDescription2 = base.PangoContext.FontDescription;
            int             defsize          = fontDescription2.Size;

            fontDescription2.Size = 30520;
            var attr1 = new AttrList();

            attr1.Insert(new AttrFontDesc(fontDescription2));
            _label2.Attributes = attr1;

            FontDescription fontDescription = base.PangoContext.FontDescription;

            fontDescription.Size   = defsize * 4;
            fontDescription.Weight = Weight.Bold;
            this._label1.UseMarkup = true;
            var attr = new AttrList();

            attr.Insert(new AttrFontDesc(fontDescription));
            _label1.Attributes = attr;

            _button1.Clicked += ProjectButton_Activated;
            _button2.Clicked += ProjectButton_Activated;
            _button3.Clicked += ProjectButton_Activated;
            _button4.Clicked += ProjectButton_Activated;
            _button5.Clicked += Button5_Activated;
            _button6.Clicked += Button6_Activated;

            if (File.Exists(System.IO.Path.Combine(Program.ConfigPath, "RecentProjects")))
            {
                string text  = File.ReadAllText(System.IO.Path.Combine(Program.ConfigPath, "RecentProjects"));
                var    paths = text.Split('\n');

                foreach (var path in from p in paths where File.Exists(System.IO.Path.Combine(p, "project.json")) select p)
                {
                    if (_button4.Label == "Placeholder project")
                    {
                        _button4.Label = JObject.Parse(File.ReadAllText(System.IO.Path.Combine(path, "project.json")))["name"] + "\n" + path;
                    }
                    else if (_button3.Label == "Placeholder project")
                    {
                        _button3.Label = JObject.Parse(File.ReadAllText(System.IO.Path.Combine(path, "project.json")))["name"] + "\n" + path;
                    }
                    else if (_button2.Label == "Placeholder project")
                    {
                        _button2.Label = JObject.Parse(File.ReadAllText(System.IO.Path.Combine(path, "project.json")))["name"] + "\n" + path;
                    }
                    else if (_button1.Label == "Placeholder project")
                    {
                        _button1.Label = JObject.Parse(File.ReadAllText(System.IO.Path.Combine(path, "project.json")))["name"] + "\n" + path;
                    }
                }
            }

            if (_button1.Label == "Placeholder project")
            {
                _button1.Dispose();
            }

            if (_button2.Label == "Placeholder project")
            {
                _button2.Dispose();
            }

            if (_button3.Label == "Placeholder project")
            {
                _button3.Dispose();
            }

            if (_button4.Label == "Placeholder project")
            {
                _button4.Dispose();
            }
        }
Пример #5
0
 internal static extern void cvSave(
     string filename,
     CVHandle struct_ptr,
     string name,
     string comment,
     AttrList attributes);
Пример #6
0
 internal static extern void cvWrite(FileStorage fs, string name, CVHandle ptr, AttrList attributes);
Пример #7
0
 internal static extern void cvStartWriteStruct(
     FileStorage fs,
     string name,
     StructStorageFlags struct_flags,
     string type_name,
     AttrList attributes);
Пример #8
0
 internal static extern string cvAttrValue(ref AttrList attr, string attr_name);