示例#1
0
文件: Window.cs 项目: Jebeli/Tiles
 public Window(Screen screen, string title = "", Orientation orientation = Orientation.Vertical)
     : base(screen, title)
 {
     Clipped = true;
     layout  = new BoxLayout(orientation, Alignment.Fill, 10, 10);
     CalcBorders();
     InitBorderPanels();
 }
示例#2
0
 public PopupWindow(Gadget parent)
     : base(parent.Screen)
 {
     layout       = new BoxLayout(Orientation.Vertical, Alignment.Fill);
     parentGadget = parent;
     parentWindow = parent.Window;
     ThinBorder   = true;
 }
示例#3
0
        public FileGadget(Gadget parent, IFileResolver fileResolver)
            : base(parent)
        {
            this.fileResolver = fileResolver;
            layout            = new BoxLayout(Orientation.Vertical, Alignment.Fill);
            table             = new TableGadget(this)
            {
                EvenColumns = false,
                SelectedCellChangedEvent = (o, i) => { TableSelectedChanged(); }
            };
            table.AddColumn("Name", -1);
            table.AddColumn("Size", 64);
            table.AddColumn("Date", 130);
            table.AddColumn("Comment", 140);
            var dirBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill);

            new LabelGadget(dirBox, "Drawer")
            {
                FixedWidth = 100
            };
            dirName = new StrGadget(dirBox)
            {
                FixedWidth = 300
            };

            var fileBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill);

            new LabelGadget(fileBox, "File")
            {
                FixedWidth = 100
            };
            fileName = new StrGadget(fileBox)
            {
                FixedWidth = 300
            };
            var buttonBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill, 0, 100);

            butOk = new ButtonGadget(buttonBox, "Open")
            {
                GadgetUpEvent = (o, i) => { Ok(); }
            };
            butVolumes = new ButtonGadget(buttonBox, "Volumes")
            {
                GadgetUpEvent = (o, i) => { Volumes(); }
            };
            butParent = new ButtonGadget(buttonBox, "Parent")
            {
                GadgetUpEvent = (o, i) => { GoToParent(); }
            };
            butCancel = new ButtonGadget(buttonBox, "Cancel")
            {
                GadgetUpEvent = (o, i) => { Cancel(); }
            };
        }
示例#4
0
文件: BoxGadget.cs 项目: Jebeli/Tiles
 public BoxGadget(Gadget parent, Orientation orientation, Alignment alignment = Alignment.Middle, int margin = 0, int spacing = 0)
     : base(parent)
 {
     layout = new BoxLayout(orientation, alignment, margin, spacing);
 }