Esempio n. 1
0
        public MainPage()
        {
            InitializeComponent();

            if (Preferences.Get("SamplesLoad", true))
            {
                UzorProjectFileManager.CopySamplesToInternalStorage();
            }

            //videoView1.Start();

            //Assets.
            //   videoView1.Source = ImageSource.FromFile("bg.mp4");
            //mediaElement.Source = "ms-appx:///bg.mp4";

            MakeUzorItemList();
            int i = new Random().Next(0, 2);

            switch (i)
            {
            case 1:
                this.backGroundImage.Source = "uzor2BackGround.PNG";
                break;

            case 2:
                this.backGroundImage.Source = "uzor3BackGround.PNG";
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        private void sliderValue_Changed(object sender, ValueChangedEventArgs e)
        {
            this.preview.HeightRequest = e.NewValue;
            LongUzorView v = this.preview;

            v.Data = UzorProjectFileManager.LoadLongUzorData("/data/user/0/com.companyname.uzor/files/.local/share/new Uzor5.lubf");
            v.Draw();
        }
Esempio n. 3
0
        public void MakeUzorItemList()
        {
            this.itemStack.Children.Clear();

            var fileList = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));

            foreach (string fileName in fileList)
            {
                if (fileName.Substring(fileName.Length - 4) == ".ubf")
                {
                    var i = new UzorItem(UzorProjectFileManager.LoadUzorData(fileName));
                    i.Tapped += item_Tapped;
                    this.itemStack.Children.Add(i);
                }
            }
        }
Esempio n. 4
0
        private void uzorCreatingPage_Closed(object sender, EventArgs e)
        {
            var p = (UzorCreatingPage)sender;

            if (p.Action == UzorCreatingPage.ActionStatus.Saved)
            {
                UzorProjectFileManager.ReSave(this.data, path);
                pageForAlert.MakeUzorItemList();
            }

            else if (p.Action == UzorCreatingPage.ActionStatus.Canceled)
            {
                this.data = UzorProjectFileManager.LoadUzorData(path);
            }

            buildUzorPreview();
        }
Esempio n. 5
0
        public void MakeUzorItemList()
        {
            this.itemStack.Children.Clear();

            var fileList = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));

            sort(ref fileList);

            foreach (string fileName in fileList)
            {
                if (fileName.Substring(fileName.Length - 4) == ".ubf")
                {
                    this.itemStack.Children.Add(new UzorItem(UzorProjectFileManager.LoadUzorData(fileName), fileName, this));
                }
                else if (fileName.Substring(fileName.Length - 5) == ".lubf") //{   File.Delete(fileName); }
                {
                    this.itemStack.Children.Add(new LongUzorItem(UzorProjectFileManager.LoadLongUzorData(fileName), fileName, this));
                }
            }
        }
Esempio n. 6
0
 private void nameEdited(object sender, EventArgs e)
 {
     this.itemNameLabel.Text = data.Name;
     UzorProjectFileManager.ReSave(this.data, path);
     pageForAlert.MakeUzorItemList();
 }