Beispiel #1
0
        public OpenForm(TeaseLibrary teaseLibrary)
        {
            InitializeComponent();
            this.teaseLibrary       = teaseLibrary;
            TeaseFolderTextBox.Text = teaseLibrary.TeasesFolder;

            FillTeaseListView();
        }
Beispiel #2
0
        private void TeaseForm_Load(object sender, EventArgs e)
        {
            Text = AboutForm.AssemblyTitle + " " + AboutForm.AssemblyVersion;

            teaseLibrary = new TeaseLibrary(ApplicationDirectory);

            SetCurrentTease(teaseLibrary.EmptyTease());

            DebugPanel.Visible = false;
        }
Beispiel #3
0
        public OpenForm(TeaseLibrary teaseLibrary)
        {
            InitializeComponent();
            this.teaseLibrary       = teaseLibrary;
            TeaseFolderTextBox.Text = teaseLibrary.TeasesFolder;

            milovanaDownloadControl.TeasesFolder       = new DirectoryInfo(teaseLibrary.TeasesFolder);
            milovanaDownloadControl.DownloadCompleted += milovanaDownloadControl_DownloadCompleted;

            FillTeaseListView();
        }
Beispiel #4
0
        public TeaseForm(string[] args)
        {
            InitializeComponent();

            Text = AssemblyTitle + " " + AssemblyVersion;

            debugForm = new DebugForm(this);

            teaseLibrary = new TeaseLibrary(ApplicationDirectory);

            var arguments     = new List <string>(args);
            var fullscreenArg = arguments.FirstOrDefault(x => x.Equals("/full", StringComparison.OrdinalIgnoreCase));

            if (fullscreenArg != null)
            {
                Fullscreen();
                arguments.Remove(fullscreenArg);
            }
            var fileArg = arguments.FirstOrDefault(x => x.StartsWith("/tease:", StringComparison.OrdinalIgnoreCase));

            if (fileArg != null)
            {
                string fileName = fileArg.Remove(0, "/tease:".Length);
                if (File.Exists(fileName))
                {
                    SetCurrentTease(teaseLibrary.LoadTease(fileName));
                }
                else
                {
                    fileName = Path.Combine(teaseLibrary.TeasesFolder, fileName);
                    if (File.Exists(fileName))
                    {
                        SetCurrentTease(teaseLibrary.LoadTease(fileName));
                    }
                    else
                    {
                        SetCurrentTease(teaseLibrary.EmptyTease());
                    }
                }
            }
            else
            {
                SetCurrentTease(teaseLibrary.EmptyTease());
            }
        }