コード例 #1
0
        public OpenForm(TeaseLibrary teaseLibrary)
        {
            InitializeComponent();
            this.teaseLibrary       = teaseLibrary;
            TeaseFolderTextBox.Text = teaseLibrary.TeasesFolder;

            FillTeaseListView();
        }
コード例 #2
0
ファイル: TeaseForm.cs プロジェクト: d3vi0n/TeaseMe
        private void TeaseForm_Load(object sender, EventArgs e)
        {
            Text = AboutForm.AssemblyTitle + " " + AboutForm.AssemblyVersion;

            teaseLibrary = new TeaseLibrary(ApplicationDirectory);

            SetCurrentTease(teaseLibrary.EmptyTease());

            DebugPanel.Visible = false;
        }
コード例 #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();
        }
コード例 #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());
            }
        }