예제 #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
파일: PopupWindow.cs 프로젝트: Jebeli/Tiles
 public PopupWindow(Gadget parent)
     : base(parent.Screen)
 {
     layout       = new BoxLayout(Orientation.Vertical, Alignment.Fill);
     parentGadget = parent;
     parentWindow = parent.Window;
     ThinBorder   = true;
 }
예제 #3
0
파일: FileGadget.cs 프로젝트: Jebeli/Tiles
        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);
 }