Example #1
0
        public UzorItem(UzorData data) // for SelectionItemPage
        {
            InitializeComponent();

            selectItemMode = true;
            this.Data      = data;

            UzorPixelFieldView upv = this.preview;

            DemonstrateUzorEditorObject udb = new DemonstrateUzorEditorObject();

            udb.Data         = data;
            udb.GradientMode = false;

            //upv.ThisData = data;
            upv.EditorObjectssList.Add(udb);
            upv.DrawView();

            if (data.Name == null)
            {
                data.Name = "";
            }

            this.itemName.Text             = data.Name.Split("/".ToCharArray()).Last();
            this.itemDate.Text             = data.DataOfCreation.ToString();
            this.mineFrame.BackgroundColor = Color.FromRgba(data.Layers[0].BackColor.R,
                                                            data.Layers[0].BackColor.G,
                                                            data.Layers[0].BackColor.B,
                                                            data.Layers[0].BackColor.A);

            this.deleteButton.IsVisible = false;
            this.shadow.IsVisible       = false;
        }
Example #2
0
        public UzorItem(UzorData data, string path, MainPage p)
        {
            InitializeComponent();
            this.Data = data;
            this.path = path;
            UzorPixelFieldView upv = this.preview;

            DemonstrateUzorEditorObject udb = new DemonstrateUzorEditorObject();

            udb.Data         = data;
            udb.GradientMode = false;

            //upv.ThisData = data;
            upv.EditorObjectssList.Add(udb);
            upv.DrawView();
            this.itemName.Text = data.Name.Split("/".ToCharArray()).Last();
            this.itemDate.Text = data.DataOfCreation.ToString();

            /** WTF??? **/

            /*this.mineFrame.BackgroundColor = new Xamarin.Forms.Color( data.Layers[0].BackColor.R,
             *                                          data.Layers[0].BackColor.G,
             *                                          data.Layers[0].BackColor.B,
             *                                          data.Layers[0].BackColor.A);*/

            this.mineFrame.BackgroundColor = Color.FromRgba(data.Layers[0].BackColor.R,
                                                            data.Layers[0].BackColor.G,
                                                            data.Layers[0].BackColor.B,
                                                            data.Layers[0].BackColor.A);
            this.pageForAlert = p;
        }