public OpenForm(TeaseLibrary teaseLibrary) { InitializeComponent(); this.teaseLibrary = teaseLibrary; TeaseFolderTextBox.Text = teaseLibrary.TeasesFolder; FillTeaseListView(); }
public OpenForm(TeaseLibrary teaseLibrary) { InitializeComponent(); this.teaseLibrary = teaseLibrary; TeaseFolderTextBox.Text = teaseLibrary.TeasesFolder; milovanaDownloadControl.TeasesFolder = new DirectoryInfo(teaseLibrary.TeasesFolder); milovanaDownloadControl.DownloadCompleted += milovanaDownloadControl_DownloadCompleted; FillTeaseListView(); }
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()); } }
private void TeaseForm_Load(object sender, EventArgs e) { Text = AboutForm.AssemblyTitle + " " + AboutForm.AssemblyVersion; teaseLibrary = new TeaseLibrary(ApplicationDirectory); SetCurrentTease(teaseLibrary.EmptyTease()); DebugPanel.Visible = false; }