Exemplo n.º 1
0
        public MainWindow() {
            InitializeComponent();

            // Load!

            if (KNUserDefaults.StandardUserDefaults().ObjectForKey("Keys") != null) {
                foreach (Dictionary<string, object> dict in (ArrayList)KNUserDefaults.StandardUserDefaults().ObjectForKey("Keys")) {
                    keys.Add(new UpdateSigningKey(dict));
                }
            }

            KNTableView keyTable = new KNTableView();
            keyTable.CornerCell = new KNLeopardCornerCell();
            KNCell cell = new KNTextCell();
            ((KNTextCell)cell).IsEditable = true;
            KNTableColumnDelegate del = null;
            KNHeaderCell header = new KNLeopardStyleHeaderCell("Name", false, true, System.Drawing.StringAlignment.Near);
            KNTableColumn col = new KNTableColumn("name", ref cell, ref header, ref del);
            col.Width = (int)KeyListHost.Width;
            keyTable.AddColumn(col);

            keyTable.TableDelegate = this;
            keyTable.DataSource = this;
            keyTable.AlternatingRowBackgrounds = true;

            keyTable.CellPerformedAction += Action;
            keyTable.SelectionChanged += TableSelectionChanged;

            KeyListHost.Child = keyTable;

            KNLeopardStyleHeaderButton button = new KNLeopardStyleHeaderButton();
            button.Enabled = false;
            ButtonBarHost.Child = button;

            SUUpdater updater = SUUpdater.SharedUpdater();

            this.AddObserverToKeyPathWithOptions(this, "SelectedKey", KNKeyValueObservingOptions.KNKeyValueObservingOptionInitial, null);

        }
Exemplo n.º 2
0
        public KNCell Copy()
        {
            KNTextCell cell = new KNTextCell();
            cell.TextAlignment = this.TextAlignment;
            cell.TextSize = this.TextSize;
            cell.TextFont = this.TextFont;
            cell.TextColor = this.TextColor;
            cell.TextAlignment = this.TextAlignment;
            cell.HighlightedTextColor = this.HighlightedTextColor;
            cell.HorizontalPadding = this.HorizontalPadding;

            return cell;
        }