Ejemplo n.º 1
0
        public ListPanel()
        {
            Padding = new Padding(10);

            fListView                       = UIHelper.CreateListView("ListView");
            fListView.DoubleClick          += EditHandler;
            fListView.SelectedIndexChanged += ListView_SelectedIndexChanged;
            fListView.KeyDown              += ListView_KeyDown;
            Controls.Add(fListView);
        }
Ejemplo n.º 2
0
        public static ZListView CreateListView(string name)
        {
            var listView = new ZListView();

            listView.Dock          = DockStyle.Fill;
            listView.Name          = name;
            listView.HideSelection = false;
            listView.LabelEdit     = false;
            listView.FullRowSelect = true;
            listView.View          = View.Details;
            return(listView);
        }
Ejemplo n.º 3
0
        public AquaDetailsPanel() : base()
        {
            Padding = new Padding(10);

            fHeader             = new Label();
            fHeader.BorderStyle = BorderStyle.Fixed3D;
            fHeader.Dock        = DockStyle.Top;
            fHeader.Font        = new Font(this.Font.FontFamily, 10, FontStyle.Bold, this.Font.Unit);
            fHeader.TextAlign   = ContentAlignment.MiddleCenter;
            Controls.Add(fHeader);

            fLayoutPanel             = new TableLayoutPanel();
            fLayoutPanel.Dock        = DockStyle.Fill;
            fLayoutPanel.AutoSize    = true;
            fLayoutPanel.Padding     = new Padding(10);
            fLayoutPanel.ColumnCount = 2;
            fLayoutPanel.RowCount    = 3;
            Controls.Add(fLayoutPanel);

            fLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            fLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            fLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 40f));
            fLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 20f));
            fLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 40f));
            fLayoutPanel.Padding = new Padding(0);

            Controls.SetChildIndex(fLayoutPanel, 0);
            Controls.SetChildIndex(fHeader, 1);

            fInhabitantsLV = UIHelper.CreateListView("InhabitantsLV");
            SetCellGroup(Localizer.LS(LSID.Inhabitants), fInhabitantsLV, 0, 0);

            fMeasuresLV = UIHelper.CreateListView("MeasuresLV");
            SetCellGroup(Localizer.LS(LSID.Measures), fMeasuresLV, 1, 0);

            fNutritionLV = UIHelper.CreateListView("NutritionLV");
            SetCellGroup(Localizer.LS(LSID.Nutrition), fNutritionLV, 0, 1);

            fDevicesLV = UIHelper.CreateListView("DevicesLV");
            SetCellGroup(Localizer.LS(LSID.Devices), fDevicesLV, 1, 1);

            fMaintenanceLV = UIHelper.CreateListView("MaintenanceLV");
            SetCellGroup(Localizer.LS(LSID.Maintenance), fMaintenanceLV, 0, 2);

            fCompatibilityLV = UIHelper.CreateListView("CompatibilityLV");
            SetCellGroup(Localizer.LS(LSID.Compatibility), fCompatibilityLV, 1, 2);
        }
Ejemplo n.º 4
0
        public int CompareTo(object obj)
        {
            ZListSubItem otherItem = obj as ZListSubItem;

            if (otherItem == null)
            {
                return(-1);
            }

            if (fValue is string && otherItem.fValue is string)
            {
                return(ZListView.StrCompareEx((string)fValue, (string)otherItem.fValue));
            }

            IComparable cv1 = fValue as IComparable;
            IComparable cv2 = otherItem.fValue as IComparable;

            int compRes;

            if (cv1 != null && cv2 != null)
            {
                compRes = cv1.CompareTo(cv2);
            }
            else if (cv1 != null)
            {
                compRes = -1;
            }
            else if (cv2 != null)
            {
                compRes = 1;
            }
            else
            {
                compRes = 0;
            }
            return(compRes);
        }
Ejemplo n.º 5
0
 public ZListViewItems(ZListView listView)
 {
     fListView = listView;
 }