mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-25 12:49:26 +01:00
Case-sensitive rename operation (1/2)
This commit is contained in:
266
Code/Forms/BatchForm.Designer.cs
generated
266
Code/Forms/BatchForm.Designer.cs
generated
@@ -1,266 +0,0 @@
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class BatchForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BatchForm));
|
||||
this.titleLabel = new System.Windows.Forms.Label();
|
||||
this.stopBtn = new System.Windows.Forms.Button();
|
||||
this.runBtn = new System.Windows.Forms.Button();
|
||||
this.addToQueue = new System.Windows.Forms.Button();
|
||||
this.forceStopBtn = new System.Windows.Forms.Button();
|
||||
this.clearBtn = new System.Windows.Forms.Button();
|
||||
this.taskList = new System.Windows.Forms.ListBox();
|
||||
this.clearSelectedBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.moveDownBtn = new System.Windows.Forms.Button();
|
||||
this.moveUpBtn = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
this.titleLabel.AutoSize = true;
|
||||
this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.titleLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.titleLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.titleLabel.Name = "titleLabel";
|
||||
this.titleLabel.Size = new System.Drawing.Size(323, 40);
|
||||
this.titleLabel.TabIndex = 1;
|
||||
this.titleLabel.Text = "Batch Processing Queue";
|
||||
//
|
||||
// stopBtn
|
||||
//
|
||||
this.stopBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.stopBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.stopBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.stopBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.stopBtn.Location = new System.Drawing.Point(682, 351);
|
||||
this.stopBtn.Name = "stopBtn";
|
||||
this.stopBtn.Size = new System.Drawing.Size(250, 40);
|
||||
this.stopBtn.TabIndex = 35;
|
||||
this.stopBtn.Text = "Stop After Current Task";
|
||||
this.stopBtn.UseVisualStyleBackColor = false;
|
||||
this.stopBtn.Visible = false;
|
||||
this.stopBtn.Click += new System.EventHandler(this.stopBtn_Click);
|
||||
//
|
||||
// runBtn
|
||||
//
|
||||
this.runBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.runBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.runBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.runBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.runBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.runBtn.Location = new System.Drawing.Point(682, 443);
|
||||
this.runBtn.Name = "runBtn";
|
||||
this.runBtn.Size = new System.Drawing.Size(250, 42);
|
||||
this.runBtn.TabIndex = 36;
|
||||
this.runBtn.Text = "Start";
|
||||
this.runBtn.UseVisualStyleBackColor = false;
|
||||
this.runBtn.Click += new System.EventHandler(this.runBtn_Click);
|
||||
//
|
||||
// addToQueue
|
||||
//
|
||||
this.addToQueue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.addToQueue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.addToQueue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.addToQueue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.addToQueue.ForeColor = System.Drawing.Color.White;
|
||||
this.addToQueue.Location = new System.Drawing.Point(682, 65);
|
||||
this.addToQueue.Name = "addToQueue";
|
||||
this.addToQueue.Size = new System.Drawing.Size(250, 40);
|
||||
this.addToQueue.TabIndex = 39;
|
||||
this.addToQueue.Text = "Add Current Configuration To Queue";
|
||||
this.addToQueue.UseVisualStyleBackColor = false;
|
||||
this.addToQueue.Click += new System.EventHandler(this.addToQueue_Click);
|
||||
//
|
||||
// forceStopBtn
|
||||
//
|
||||
this.forceStopBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.forceStopBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.forceStopBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.forceStopBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.forceStopBtn.Location = new System.Drawing.Point(682, 397);
|
||||
this.forceStopBtn.Name = "forceStopBtn";
|
||||
this.forceStopBtn.Size = new System.Drawing.Size(250, 40);
|
||||
this.forceStopBtn.TabIndex = 40;
|
||||
this.forceStopBtn.Text = "Force Stop Now";
|
||||
this.forceStopBtn.UseVisualStyleBackColor = false;
|
||||
this.forceStopBtn.Visible = false;
|
||||
this.forceStopBtn.Click += new System.EventHandler(this.forceStopBtn_Click);
|
||||
//
|
||||
// clearBtn
|
||||
//
|
||||
this.clearBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.clearBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.clearBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.clearBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.clearBtn.Location = new System.Drawing.Point(682, 157);
|
||||
this.clearBtn.Name = "clearBtn";
|
||||
this.clearBtn.Size = new System.Drawing.Size(250, 40);
|
||||
this.clearBtn.TabIndex = 41;
|
||||
this.clearBtn.Text = "Clear All Queue Entries";
|
||||
this.clearBtn.UseVisualStyleBackColor = false;
|
||||
this.clearBtn.Click += new System.EventHandler(this.clearBtn_Click);
|
||||
//
|
||||
// taskList
|
||||
//
|
||||
this.taskList.AllowDrop = true;
|
||||
this.taskList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.taskList.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.taskList.ForeColor = System.Drawing.Color.White;
|
||||
this.taskList.FormattingEnabled = true;
|
||||
this.taskList.ItemHeight = 16;
|
||||
this.taskList.Location = new System.Drawing.Point(12, 65);
|
||||
this.taskList.Name = "taskList";
|
||||
this.taskList.Size = new System.Drawing.Size(664, 420);
|
||||
this.taskList.TabIndex = 43;
|
||||
this.taskList.SelectedIndexChanged += new System.EventHandler(this.taskList_SelectedIndexChanged);
|
||||
this.taskList.DragDrop += new System.Windows.Forms.DragEventHandler(this.taskList_DragDrop);
|
||||
this.taskList.DragEnter += new System.Windows.Forms.DragEventHandler(this.taskList_DragEnter);
|
||||
//
|
||||
// clearSelectedBtn
|
||||
//
|
||||
this.clearSelectedBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.clearSelectedBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.clearSelectedBtn.Enabled = false;
|
||||
this.clearSelectedBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.clearSelectedBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.clearSelectedBtn.Location = new System.Drawing.Point(682, 111);
|
||||
this.clearSelectedBtn.Name = "clearSelectedBtn";
|
||||
this.clearSelectedBtn.Size = new System.Drawing.Size(250, 40);
|
||||
this.clearSelectedBtn.TabIndex = 44;
|
||||
this.clearSelectedBtn.Text = "Clear Selected Queue Entry";
|
||||
this.clearSelectedBtn.UseVisualStyleBackColor = false;
|
||||
this.clearSelectedBtn.Click += new System.EventHandler(this.clearSelectedBtn_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.Location = new System.Drawing.Point(6, 6);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(238, 111);
|
||||
this.label1.TabIndex = 45;
|
||||
this.label1.Text = "Tip:\r\nYou can also drag and drop multiple videos into the list.\r\nThey will be add" +
|
||||
"ed to the queue using the interpolation settings set in the GUI.";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.panel1.Location = new System.Drawing.Point(682, 203);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(250, 142);
|
||||
this.panel1.TabIndex = 46;
|
||||
//
|
||||
// moveDownBtn
|
||||
//
|
||||
this.moveDownBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.moveDownBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.moveDownBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.moveDownBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.moveDownBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.moveDownBtn.Location = new System.Drawing.Point(636, 445);
|
||||
this.moveDownBtn.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.moveDownBtn.Name = "moveDownBtn";
|
||||
this.moveDownBtn.Size = new System.Drawing.Size(35, 35);
|
||||
this.moveDownBtn.TabIndex = 47;
|
||||
this.moveDownBtn.Text = "↓";
|
||||
this.moveDownBtn.UseVisualStyleBackColor = false;
|
||||
this.moveDownBtn.Visible = false;
|
||||
this.moveDownBtn.Click += new System.EventHandler(this.moveDownBtn_Click);
|
||||
//
|
||||
// moveUpBtn
|
||||
//
|
||||
this.moveUpBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.moveUpBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.moveUpBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.moveUpBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.moveUpBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.moveUpBtn.Location = new System.Drawing.Point(597, 445);
|
||||
this.moveUpBtn.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.moveUpBtn.Name = "moveUpBtn";
|
||||
this.moveUpBtn.Size = new System.Drawing.Size(35, 35);
|
||||
this.moveUpBtn.TabIndex = 48;
|
||||
this.moveUpBtn.Text = "↑";
|
||||
this.moveUpBtn.UseVisualStyleBackColor = false;
|
||||
this.moveUpBtn.Visible = false;
|
||||
this.moveUpBtn.Click += new System.EventHandler(this.moveUpBtn_Click);
|
||||
//
|
||||
// BatchForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(944, 501);
|
||||
this.Controls.Add(this.moveUpBtn);
|
||||
this.Controls.Add(this.moveDownBtn);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.clearSelectedBtn);
|
||||
this.Controls.Add(this.taskList);
|
||||
this.Controls.Add(this.clearBtn);
|
||||
this.Controls.Add(this.forceStopBtn);
|
||||
this.Controls.Add(this.addToQueue);
|
||||
this.Controls.Add(this.runBtn);
|
||||
this.Controls.Add(this.stopBtn);
|
||||
this.Controls.Add(this.titleLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "BatchForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Batch Processing";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BatchForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.BatchForm_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label titleLabel;
|
||||
private System.Windows.Forms.Button stopBtn;
|
||||
private System.Windows.Forms.Button runBtn;
|
||||
private System.Windows.Forms.Button addToQueue;
|
||||
private System.Windows.Forms.Button forceStopBtn;
|
||||
private System.Windows.Forms.Button clearBtn;
|
||||
private System.Windows.Forms.ListBox taskList;
|
||||
private System.Windows.Forms.Button clearSelectedBtn;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button moveDownBtn;
|
||||
private System.Windows.Forms.Button moveUpBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,181 +0,0 @@
|
||||
using Flowframes.IO;
|
||||
using Flowframes.Main;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.Data;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class BatchForm : Form
|
||||
{
|
||||
public BatchForm()
|
||||
{
|
||||
AutoScaleMode = AutoScaleMode.None;
|
||||
InitializeComponent();
|
||||
BatchProcessing.currentBatchForm = this;
|
||||
}
|
||||
|
||||
private void addToQueue_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.batchQueue.Enqueue(Program.mainForm.GetCurrentSettings());
|
||||
RefreshGui();
|
||||
}
|
||||
|
||||
public void RefreshGui ()
|
||||
{
|
||||
taskList.Items.Clear();
|
||||
|
||||
for (int i = 0; i < Program.batchQueue.Count; i++)
|
||||
{
|
||||
InterpSettings entry = Program.batchQueue.ElementAt(i);
|
||||
string niceOutMode = entry.outMode.ToString().ToUpper().Remove("VID").Remove("IMG");
|
||||
string str = $"#{i+1}: {Path.GetFileName(entry.inPath).Trunc(40)} - {entry.inFps.GetFloat()} FPS => " +
|
||||
$"{entry.interpFactor}x {entry.ai.aiNameShort} ({entry.model.name}) => {niceOutMode}";
|
||||
taskList.Items.Add(str);
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshIndex ()
|
||||
{
|
||||
for(int i = 0; i < taskList.Items.Count; i++)
|
||||
{
|
||||
string[] split = taskList.Items[i].ToString().Split(':');
|
||||
split[0] = $"#{i+1}";
|
||||
taskList.Items[i] = string.Join(":", split);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetWorking (bool working)
|
||||
{
|
||||
runBtn.Enabled = !working;
|
||||
addToQueue.Enabled = !working;
|
||||
stopBtn.Visible = working;
|
||||
forceStopBtn.Visible = working;
|
||||
stopBtn.Enabled = working;
|
||||
}
|
||||
|
||||
private void BatchForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
SetWorking(BatchProcessing.busy);
|
||||
RefreshGui();
|
||||
}
|
||||
|
||||
private void MoveListItem(int direction)
|
||||
{
|
||||
if (taskList.SelectedItem == null || taskList.SelectedIndex < 0)
|
||||
return;
|
||||
|
||||
int newIndex = taskList.SelectedIndex + direction;
|
||||
|
||||
if (newIndex < 0 || newIndex >= taskList.Items.Count)
|
||||
return; // Index out of range - nothing to do
|
||||
|
||||
object selected = taskList.SelectedItem;
|
||||
|
||||
taskList.Items.Remove(selected);
|
||||
taskList.Items.Insert(newIndex, selected);
|
||||
RefreshIndex();
|
||||
taskList.SetSelected(newIndex, true);
|
||||
}
|
||||
|
||||
private void runBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
stopBtn.Enabled = true;
|
||||
BatchProcessing.Start();
|
||||
Program.mainForm.WindowState = FormWindowState.Normal;
|
||||
Program.mainForm.BringToFront();
|
||||
}
|
||||
|
||||
private void clearBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.batchQueue.Clear();
|
||||
RefreshGui();
|
||||
}
|
||||
|
||||
private void stopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
stopBtn.Enabled = false;
|
||||
BatchProcessing.stopped = true;
|
||||
}
|
||||
|
||||
private void forceStopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Interpolate.Cancel("Force stopped by user.");
|
||||
BatchProcessing.stopped = true;
|
||||
}
|
||||
|
||||
private void BatchForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
BatchProcessing.currentBatchForm = null;
|
||||
}
|
||||
|
||||
private void clearSelectedBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (taskList.SelectedItem == null) return;
|
||||
|
||||
Queue<InterpSettings> temp = new Queue<InterpSettings>();
|
||||
|
||||
for(int i = 0; i < Program.batchQueue.Count; i++)
|
||||
{
|
||||
if (i != taskList.SelectedIndex)
|
||||
temp.Enqueue(Program.batchQueue.ElementAt(i));
|
||||
}
|
||||
|
||||
Program.batchQueue = temp;
|
||||
|
||||
RefreshGui();
|
||||
}
|
||||
|
||||
private void taskList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool sel = taskList.SelectedItem != null;
|
||||
clearSelectedBtn.Enabled = sel;
|
||||
moveUpBtn.Visible = sel;
|
||||
moveDownBtn.Visible = sel;
|
||||
}
|
||||
|
||||
private void taskList_DragEnter(object sender, DragEventArgs e) { e.Effect = DragDropEffects.Copy; }
|
||||
|
||||
private async void taskList_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] droppedPaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
await LoadDroppedPaths(droppedPaths);
|
||||
}
|
||||
|
||||
public async Task LoadDroppedPaths (string[] droppedPaths, bool start = false)
|
||||
{
|
||||
foreach (string path in droppedPaths)
|
||||
{
|
||||
Logger.Log($"BatchForm: Dropped path: '{path}'", true);
|
||||
|
||||
InterpSettings current = Program.mainForm.GetCurrentSettings();
|
||||
string outDir = (Config.GetInt("outFolderLoc") == 0) ? path.GetParentDir() : Config.Get("custOutDir").Trim();
|
||||
current.UpdatePaths(path, outDir);
|
||||
|
||||
current.inFpsDetected = await IOUtils.GetFpsFolderOrVideo(path);
|
||||
current.inFps = current.inFpsDetected;
|
||||
current.outFps = current.inFps * current.interpFactor;
|
||||
|
||||
Program.batchQueue.Enqueue(current);
|
||||
RefreshGui();
|
||||
}
|
||||
|
||||
if (start)
|
||||
runBtn_Click(null, null);
|
||||
}
|
||||
|
||||
private void moveUpBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveListItem(-1);
|
||||
}
|
||||
|
||||
private void moveDownBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveListItem(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
70
Code/Forms/BigPreviewForm.Designer.cs
generated
70
Code/Forms/BigPreviewForm.Designer.cs
generated
@@ -1,70 +0,0 @@
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class BigPreviewForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BigPreviewForm));
|
||||
this.picBox = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// picBox
|
||||
//
|
||||
this.picBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.picBox.Image = global::Flowframes.Properties.Resources.baseline_image_white_48dp_4x_25pcAlpha;
|
||||
this.picBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.picBox.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.picBox.Name = "picBox";
|
||||
this.picBox.Size = new System.Drawing.Size(704, 601);
|
||||
this.picBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.picBox.TabIndex = 0;
|
||||
this.picBox.TabStop = false;
|
||||
//
|
||||
// BigPreviewForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(704, 601);
|
||||
this.Controls.Add(this.picBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "BigPreviewForm";
|
||||
this.Text = "Resizable Preview";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BigPreviewForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.BigPreviewForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox picBox;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using Flowframes.Main;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.UI;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class BigPreviewForm : Form
|
||||
{
|
||||
public BigPreviewForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BigPreviewForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetImage (Image img)
|
||||
{
|
||||
picBox.Image = img;
|
||||
}
|
||||
|
||||
private void BigPreviewForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
InterpolationProgress.bigPreviewForm = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
356
Code/Forms/DebugForm.Designer.cs
generated
356
Code/Forms/DebugForm.Designer.cs
generated
@@ -1,356 +0,0 @@
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class DebugForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DebugForm));
|
||||
this.titleLabel = new System.Windows.Forms.Label();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.configDataGrid = new System.Windows.Forms.DataGridView();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.copyTextClipboardBtn = new HTAlt.WinForms.HTButton();
|
||||
this.monospaceBtn = new HTAlt.WinForms.HTButton();
|
||||
this.refreshBtn = new HTAlt.WinForms.HTButton();
|
||||
this.textWrapBtn = new HTAlt.WinForms.HTButton();
|
||||
this.clearLogsBtn = new HTAlt.WinForms.HTButton();
|
||||
this.openLogFolderBtn = new HTAlt.WinForms.HTButton();
|
||||
this.logFilesDropdown = new System.Windows.Forms.ComboBox();
|
||||
this.logBox = new System.Windows.Forms.TextBox();
|
||||
this.htTabControl1 = new HTAlt.WinForms.HTTabControl();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.configDataGrid)).BeginInit();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.htTabControl1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
this.titleLabel.AutoSize = true;
|
||||
this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.titleLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.titleLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.titleLabel.Name = "titleLabel";
|
||||
this.titleLabel.Size = new System.Drawing.Size(175, 40);
|
||||
this.titleLabel.TabIndex = 2;
|
||||
this.titleLabel.Text = "Debug Tools";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.tabPage2.Controls.Add(this.panel2);
|
||||
this.tabPage2.Controls.Add(this.panel1);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 27);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(912, 396);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Config Editor";
|
||||
this.tabPage2.Enter += new System.EventHandler(this.tabPage2_Enter);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.label1);
|
||||
this.panel2.Location = new System.Drawing.Point(6, 6);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(900, 68);
|
||||
this.panel2.TabIndex = 5;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(415, 60);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = resources.GetString("label1.Text");
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.Controls.Add(this.configDataGrid);
|
||||
this.panel1.Location = new System.Drawing.Point(6, 80);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(900, 310);
|
||||
this.panel1.TabIndex = 4;
|
||||
//
|
||||
// configDataGrid
|
||||
//
|
||||
this.configDataGrid.AllowUserToResizeColumns = false;
|
||||
this.configDataGrid.AllowUserToResizeRows = false;
|
||||
this.configDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.configDataGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.configDataGrid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||
this.configDataGrid.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
|
||||
this.configDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.configDataGrid.Location = new System.Drawing.Point(0, 0);
|
||||
this.configDataGrid.MultiSelect = false;
|
||||
this.configDataGrid.Name = "configDataGrid";
|
||||
this.configDataGrid.Size = new System.Drawing.Size(900, 310);
|
||||
this.configDataGrid.TabIndex = 0;
|
||||
this.configDataGrid.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.configDataGrid_CellValueChanged);
|
||||
this.configDataGrid.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.configDataGrid_RowsAdded);
|
||||
this.configDataGrid.RowsRemoved += new System.Windows.Forms.DataGridViewRowsRemovedEventHandler(this.configDataGrid_RowsRemoved);
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.tabPage1.Controls.Add(this.copyTextClipboardBtn);
|
||||
this.tabPage1.Controls.Add(this.monospaceBtn);
|
||||
this.tabPage1.Controls.Add(this.refreshBtn);
|
||||
this.tabPage1.Controls.Add(this.textWrapBtn);
|
||||
this.tabPage1.Controls.Add(this.clearLogsBtn);
|
||||
this.tabPage1.Controls.Add(this.openLogFolderBtn);
|
||||
this.tabPage1.Controls.Add(this.logFilesDropdown);
|
||||
this.tabPage1.Controls.Add(this.logBox);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 27);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(912, 396);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Log Viewer";
|
||||
//
|
||||
// copyTextClipboardBtn
|
||||
//
|
||||
this.copyTextClipboardBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.copyTextClipboardBtn.FlatAppearance.BorderSize = 0;
|
||||
this.copyTextClipboardBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.copyTextClipboardBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.copyTextClipboardBtn.Location = new System.Drawing.Point(600, 6);
|
||||
this.copyTextClipboardBtn.Name = "copyTextClipboardBtn";
|
||||
this.copyTextClipboardBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.copyTextClipboardBtn.TabIndex = 80;
|
||||
this.copyTextClipboardBtn.Text = "Copy Text To Clipboard";
|
||||
this.copyTextClipboardBtn.UseVisualStyleBackColor = false;
|
||||
this.copyTextClipboardBtn.Click += new System.EventHandler(this.copyTextClipboardBtn_Click);
|
||||
//
|
||||
// monospaceBtn
|
||||
//
|
||||
this.monospaceBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.monospaceBtn.ButtonImage = global::Flowframes.Properties.Resources.baseline_format_size_white_48dp;
|
||||
this.monospaceBtn.DrawImage = true;
|
||||
this.monospaceBtn.FlatAppearance.BorderSize = 0;
|
||||
this.monospaceBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.monospaceBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.monospaceBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom;
|
||||
this.monospaceBtn.Location = new System.Drawing.Point(241, 6);
|
||||
this.monospaceBtn.Name = "monospaceBtn";
|
||||
this.monospaceBtn.Size = new System.Drawing.Size(23, 23);
|
||||
this.monospaceBtn.TabIndex = 79;
|
||||
this.toolTip.SetToolTip(this.monospaceBtn, "Toggle Monospace Font");
|
||||
this.monospaceBtn.UseVisualStyleBackColor = false;
|
||||
this.monospaceBtn.Click += new System.EventHandler(this.monospaceBtn_Click);
|
||||
//
|
||||
// refreshBtn
|
||||
//
|
||||
this.refreshBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.refreshBtn.ButtonImage = global::Flowframes.Properties.Resources.baseline_refresh_white_48dp;
|
||||
this.refreshBtn.DrawImage = true;
|
||||
this.refreshBtn.FlatAppearance.BorderSize = 0;
|
||||
this.refreshBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.refreshBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.refreshBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom;
|
||||
this.refreshBtn.Location = new System.Drawing.Point(212, 6);
|
||||
this.refreshBtn.Name = "refreshBtn";
|
||||
this.refreshBtn.Size = new System.Drawing.Size(23, 23);
|
||||
this.refreshBtn.TabIndex = 78;
|
||||
this.toolTip.SetToolTip(this.refreshBtn, "Refresh");
|
||||
this.refreshBtn.UseVisualStyleBackColor = false;
|
||||
this.refreshBtn.Click += new System.EventHandler(this.refreshBtn_Click);
|
||||
//
|
||||
// textWrapBtn
|
||||
//
|
||||
this.textWrapBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.textWrapBtn.ButtonImage = global::Flowframes.Properties.Resources.baseline_wrap_text_white_48dp;
|
||||
this.textWrapBtn.DrawImage = true;
|
||||
this.textWrapBtn.FlatAppearance.BorderSize = 0;
|
||||
this.textWrapBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.textWrapBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.textWrapBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom;
|
||||
this.textWrapBtn.Location = new System.Drawing.Point(270, 5);
|
||||
this.textWrapBtn.Name = "textWrapBtn";
|
||||
this.textWrapBtn.Size = new System.Drawing.Size(23, 23);
|
||||
this.textWrapBtn.TabIndex = 77;
|
||||
this.toolTip.SetToolTip(this.textWrapBtn, "Toggle Text Wrap");
|
||||
this.textWrapBtn.UseVisualStyleBackColor = false;
|
||||
this.textWrapBtn.Click += new System.EventHandler(this.textWrapBtn_Click);
|
||||
//
|
||||
// clearLogsBtn
|
||||
//
|
||||
this.clearLogsBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.clearLogsBtn.FlatAppearance.BorderSize = 0;
|
||||
this.clearLogsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.clearLogsBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.clearLogsBtn.Location = new System.Drawing.Point(756, 6);
|
||||
this.clearLogsBtn.Name = "clearLogsBtn";
|
||||
this.clearLogsBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.clearLogsBtn.TabIndex = 76;
|
||||
this.clearLogsBtn.Text = "Clear Logs";
|
||||
this.clearLogsBtn.UseVisualStyleBackColor = false;
|
||||
this.clearLogsBtn.Click += new System.EventHandler(this.clearLogsBtn_Click);
|
||||
//
|
||||
// openLogFolderBtn
|
||||
//
|
||||
this.openLogFolderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.openLogFolderBtn.FlatAppearance.BorderSize = 0;
|
||||
this.openLogFolderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.openLogFolderBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.openLogFolderBtn.Location = new System.Drawing.Point(444, 6);
|
||||
this.openLogFolderBtn.Name = "openLogFolderBtn";
|
||||
this.openLogFolderBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.openLogFolderBtn.TabIndex = 75;
|
||||
this.openLogFolderBtn.Text = "Open Log Folder";
|
||||
this.openLogFolderBtn.UseVisualStyleBackColor = false;
|
||||
this.openLogFolderBtn.Click += new System.EventHandler(this.openLogFolderBtn_Click);
|
||||
//
|
||||
// logFilesDropdown
|
||||
//
|
||||
this.logFilesDropdown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.logFilesDropdown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.logFilesDropdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.logFilesDropdown.ForeColor = System.Drawing.Color.White;
|
||||
this.logFilesDropdown.FormattingEnabled = true;
|
||||
this.logFilesDropdown.Location = new System.Drawing.Point(6, 6);
|
||||
this.logFilesDropdown.Name = "logFilesDropdown";
|
||||
this.logFilesDropdown.Size = new System.Drawing.Size(200, 23);
|
||||
this.logFilesDropdown.TabIndex = 73;
|
||||
this.logFilesDropdown.SelectedIndexChanged += new System.EventHandler(this.logFilesDropdown_SelectedIndexChanged);
|
||||
//
|
||||
// logBox
|
||||
//
|
||||
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.logBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.logBox.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.logBox.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.logBox.ForeColor = System.Drawing.Color.White;
|
||||
this.logBox.Location = new System.Drawing.Point(6, 35);
|
||||
this.logBox.MinimumSize = new System.Drawing.Size(4, 21);
|
||||
this.logBox.Multiline = true;
|
||||
this.logBox.Name = "logBox";
|
||||
this.logBox.ReadOnly = true;
|
||||
this.logBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.logBox.Size = new System.Drawing.Size(900, 355);
|
||||
this.logBox.TabIndex = 6;
|
||||
this.logBox.TabStop = false;
|
||||
this.logBox.WordWrap = false;
|
||||
//
|
||||
// htTabControl1
|
||||
//
|
||||
this.htTabControl1.AllowDrop = true;
|
||||
this.htTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.htTabControl1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
|
||||
this.htTabControl1.BorderTabLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
|
||||
this.htTabControl1.Controls.Add(this.tabPage1);
|
||||
this.htTabControl1.Controls.Add(this.tabPage2);
|
||||
this.htTabControl1.DisableClose = true;
|
||||
this.htTabControl1.DisableDragging = true;
|
||||
this.htTabControl1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.htTabControl1.HoverTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(82)))), ((int)(((byte)(176)))), ((int)(((byte)(239)))));
|
||||
this.htTabControl1.HoverTabColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(151)))), ((int)(((byte)(234)))));
|
||||
this.htTabControl1.HoverUnselectedTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(85)))), ((int)(((byte)(85)))), ((int)(((byte)(85)))));
|
||||
this.htTabControl1.Location = new System.Drawing.Point(12, 62);
|
||||
this.htTabControl1.Name = "htTabControl1";
|
||||
this.htTabControl1.Padding = new System.Drawing.Point(14, 4);
|
||||
this.htTabControl1.SelectedIndex = 0;
|
||||
this.htTabControl1.SelectedTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(151)))), ((int)(((byte)(234)))));
|
||||
this.htTabControl1.SelectedTabColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
|
||||
this.htTabControl1.Size = new System.Drawing.Size(920, 427);
|
||||
this.htTabControl1.TabIndex = 3;
|
||||
this.htTabControl1.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.htTabControl1.UnderBorderTabLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(70)))));
|
||||
this.htTabControl1.UnselectedBorderTabLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(70)))));
|
||||
this.htTabControl1.UnselectedTabColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(70)))));
|
||||
this.htTabControl1.UpDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(70)))));
|
||||
this.htTabControl1.UpDownTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(112)))));
|
||||
//
|
||||
// DebugForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(944, 501);
|
||||
this.Controls.Add(this.htTabControl1);
|
||||
this.Controls.Add(this.titleLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "DebugForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Debug Tools";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DebugForm_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.DebugForm_Shown);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.configDataGrid)).EndInit();
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage1.PerformLayout();
|
||||
this.htTabControl1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label titleLabel;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private HTAlt.WinForms.HTTabControl htTabControl1;
|
||||
private System.Windows.Forms.DataGridView configDataGrid;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.TextBox logBox;
|
||||
private System.Windows.Forms.ComboBox logFilesDropdown;
|
||||
private HTAlt.WinForms.HTButton clearLogsBtn;
|
||||
private HTAlt.WinForms.HTButton openLogFolderBtn;
|
||||
private HTAlt.WinForms.HTButton textWrapBtn;
|
||||
private HTAlt.WinForms.HTButton refreshBtn;
|
||||
private System.Windows.Forms.ToolTip toolTip;
|
||||
private HTAlt.WinForms.HTButton monospaceBtn;
|
||||
private HTAlt.WinForms.HTButton copyTextClipboardBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
using Flowframes.IO;
|
||||
using Flowframes.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class DebugForm : Form
|
||||
{
|
||||
public bool configGridChanged;
|
||||
|
||||
public DebugForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DebugForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
configDataGrid.Font = new Font("Consolas", 9f);
|
||||
RefreshLogs();
|
||||
}
|
||||
|
||||
void RefreshLogs ()
|
||||
{
|
||||
DebugFormHelper.FillLogDropdown(logFilesDropdown);
|
||||
}
|
||||
|
||||
private void DebugForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!configGridChanged)
|
||||
return;
|
||||
|
||||
DialogResult dialogResult = MessageBox.Show($"Save the modified configuration file?", "Save Configuration?", MessageBoxButtons.YesNo);
|
||||
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
DebugFormHelper.SaveGrid(configDataGrid);
|
||||
}
|
||||
|
||||
private void configDataGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex > -1)
|
||||
configGridChanged = true;
|
||||
}
|
||||
|
||||
private void configDataGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
|
||||
{
|
||||
configGridChanged = true;
|
||||
}
|
||||
|
||||
private void configDataGrid_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
|
||||
{
|
||||
configGridChanged = true;
|
||||
}
|
||||
|
||||
private void logFilesDropdown_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DebugFormHelper.RefreshLogBox(logBox, logFilesDropdown.Text);
|
||||
}
|
||||
|
||||
private void textWrapBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
logBox.WordWrap = !logBox.WordWrap;
|
||||
}
|
||||
|
||||
private void openLogFolderBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("explorer.exe", Paths.GetLogPath());
|
||||
}
|
||||
|
||||
private void clearLogsBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (string str in logFilesDropdown.Items)
|
||||
File.WriteAllText(Path.Combine(Paths.GetLogPath(), str), "");
|
||||
|
||||
logFilesDropdown_SelectedIndexChanged(null, null);
|
||||
}
|
||||
|
||||
private void refreshBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
RefreshLogs();
|
||||
}
|
||||
|
||||
private void monospaceBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DebugFormHelper.ToggleMonospace(logBox);
|
||||
}
|
||||
|
||||
private void copyTextClipboardBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Clipboard.SetText(logBox.Text);
|
||||
}
|
||||
|
||||
private void tabPage2_Enter(object sender, EventArgs e)
|
||||
{
|
||||
DebugFormHelper.LoadGrid(configDataGrid);
|
||||
configGridChanged = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
263
Code/Forms/ModelDownloadForm.Designer.cs
generated
263
Code/Forms/ModelDownloadForm.Designer.cs
generated
@@ -1,263 +0,0 @@
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class ModelDownloadForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ModelDownloadForm));
|
||||
this.longProgBar = new HTAlt.WinForms.HTProgressBar();
|
||||
this.downloadModelsBtn = new HTAlt.WinForms.HTButton();
|
||||
this.titleLabel = new System.Windows.Forms.Label();
|
||||
this.progressCircle = new CircularProgressBar.CircularProgressBar();
|
||||
this.label39 = new System.Windows.Forms.Label();
|
||||
this.closeBtn = new HTAlt.WinForms.HTButton();
|
||||
this.cancelBtn = new HTAlt.WinForms.HTButton();
|
||||
this.statusLabel = new System.Windows.Forms.Label();
|
||||
this.rifeCuda = new System.Windows.Forms.CheckBox();
|
||||
this.rifeNcnn = new System.Windows.Forms.CheckBox();
|
||||
this.dainNcnn = new System.Windows.Forms.CheckBox();
|
||||
this.flavrCuda = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// longProgBar
|
||||
//
|
||||
this.longProgBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.longProgBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.longProgBar.BorderThickness = 0;
|
||||
this.longProgBar.Location = new System.Drawing.Point(12, 274);
|
||||
this.longProgBar.Name = "longProgBar";
|
||||
this.longProgBar.Size = new System.Drawing.Size(600, 15);
|
||||
this.longProgBar.TabIndex = 34;
|
||||
//
|
||||
// downloadModelsBtn
|
||||
//
|
||||
this.downloadModelsBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.downloadModelsBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.downloadModelsBtn.FlatAppearance.BorderSize = 0;
|
||||
this.downloadModelsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.downloadModelsBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.downloadModelsBtn.Location = new System.Drawing.Point(12, 239);
|
||||
this.downloadModelsBtn.Name = "downloadModelsBtn";
|
||||
this.downloadModelsBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.downloadModelsBtn.TabIndex = 87;
|
||||
this.downloadModelsBtn.Text = "Download Model Files";
|
||||
this.downloadModelsBtn.UseVisualStyleBackColor = false;
|
||||
this.downloadModelsBtn.Click += new System.EventHandler(this.downloadModelsBtn_Click);
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
this.titleLabel.AutoSize = true;
|
||||
this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.titleLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.titleLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.titleLabel.Name = "titleLabel";
|
||||
this.titleLabel.Size = new System.Drawing.Size(262, 40);
|
||||
this.titleLabel.TabIndex = 89;
|
||||
this.titleLabel.Text = "Model Downloader";
|
||||
//
|
||||
// progressCircle
|
||||
//
|
||||
this.progressCircle.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner;
|
||||
this.progressCircle.AnimationSpeed = 500;
|
||||
this.progressCircle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.progressCircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 72F, System.Drawing.FontStyle.Bold);
|
||||
this.progressCircle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.progressCircle.InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.progressCircle.InnerMargin = 2;
|
||||
this.progressCircle.InnerWidth = -1;
|
||||
this.progressCircle.Location = new System.Drawing.Point(572, 12);
|
||||
this.progressCircle.MarqueeAnimationSpeed = 2000;
|
||||
this.progressCircle.Name = "progressCircle";
|
||||
this.progressCircle.OuterColor = System.Drawing.Color.Gray;
|
||||
this.progressCircle.OuterMargin = -21;
|
||||
this.progressCircle.OuterWidth = 21;
|
||||
this.progressCircle.ProgressColor = System.Drawing.Color.LimeGreen;
|
||||
this.progressCircle.ProgressWidth = 8;
|
||||
this.progressCircle.SecondaryFont = new System.Drawing.Font("Microsoft Sans Serif", 36F);
|
||||
this.progressCircle.Size = new System.Drawing.Size(40, 40);
|
||||
this.progressCircle.StartAngle = 270;
|
||||
this.progressCircle.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.progressCircle.SubscriptColor = System.Drawing.Color.FromArgb(((int)(((byte)(166)))), ((int)(((byte)(166)))), ((int)(((byte)(166)))));
|
||||
this.progressCircle.SubscriptMargin = new System.Windows.Forms.Padding(10, -35, 0, 0);
|
||||
this.progressCircle.SubscriptText = ".23";
|
||||
this.progressCircle.SuperscriptColor = System.Drawing.Color.FromArgb(((int)(((byte)(166)))), ((int)(((byte)(166)))), ((int)(((byte)(166)))));
|
||||
this.progressCircle.SuperscriptMargin = new System.Windows.Forms.Padding(10, 35, 0, 0);
|
||||
this.progressCircle.SuperscriptText = "°C";
|
||||
this.progressCircle.TabIndex = 90;
|
||||
this.progressCircle.TextMargin = new System.Windows.Forms.Padding(8, 8, 0, 0);
|
||||
this.progressCircle.Value = 33;
|
||||
this.progressCircle.Visible = false;
|
||||
//
|
||||
// label39
|
||||
//
|
||||
this.label39.Location = new System.Drawing.Point(12, 69);
|
||||
this.label39.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7);
|
||||
this.label39.Name = "label39";
|
||||
this.label39.Size = new System.Drawing.Size(600, 125);
|
||||
this.label39.TabIndex = 91;
|
||||
this.label39.Text = resources.GetString("label39.Text");
|
||||
//
|
||||
// closeBtn
|
||||
//
|
||||
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.closeBtn.FlatAppearance.BorderSize = 0;
|
||||
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.closeBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.closeBtn.Location = new System.Drawing.Point(168, 239);
|
||||
this.closeBtn.Name = "closeBtn";
|
||||
this.closeBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.closeBtn.TabIndex = 92;
|
||||
this.closeBtn.Text = "Close";
|
||||
this.closeBtn.UseVisualStyleBackColor = false;
|
||||
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
|
||||
//
|
||||
// cancelBtn
|
||||
//
|
||||
this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.cancelBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.cancelBtn.FlatAppearance.BorderSize = 0;
|
||||
this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.cancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.cancelBtn.Location = new System.Drawing.Point(168, 239);
|
||||
this.cancelBtn.Name = "cancelBtn";
|
||||
this.cancelBtn.Size = new System.Drawing.Size(150, 23);
|
||||
this.cancelBtn.TabIndex = 93;
|
||||
this.cancelBtn.Text = "Cancel";
|
||||
this.cancelBtn.UseVisualStyleBackColor = false;
|
||||
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
|
||||
//
|
||||
// statusLabel
|
||||
//
|
||||
this.statusLabel.AutoSize = true;
|
||||
this.statusLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.statusLabel.Location = new System.Drawing.Point(329, 244);
|
||||
this.statusLabel.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0);
|
||||
this.statusLabel.Name = "statusLabel";
|
||||
this.statusLabel.Size = new System.Drawing.Size(0, 13);
|
||||
this.statusLabel.TabIndex = 94;
|
||||
//
|
||||
// rifeCuda
|
||||
//
|
||||
this.rifeCuda.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.rifeCuda.AutoSize = true;
|
||||
this.rifeCuda.Checked = true;
|
||||
this.rifeCuda.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.rifeCuda.Location = new System.Drawing.Point(12, 203);
|
||||
this.rifeCuda.Name = "rifeCuda";
|
||||
this.rifeCuda.Size = new System.Drawing.Size(83, 17);
|
||||
this.rifeCuda.TabIndex = 95;
|
||||
this.rifeCuda.Text = "RIFE CUDA";
|
||||
this.rifeCuda.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rifeNcnn
|
||||
//
|
||||
this.rifeNcnn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.rifeNcnn.AutoSize = true;
|
||||
this.rifeNcnn.Checked = true;
|
||||
this.rifeNcnn.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.rifeNcnn.Location = new System.Drawing.Point(101, 203);
|
||||
this.rifeNcnn.Name = "rifeNcnn";
|
||||
this.rifeNcnn.Size = new System.Drawing.Size(84, 17);
|
||||
this.rifeNcnn.TabIndex = 96;
|
||||
this.rifeNcnn.Text = "RIFE NCNN";
|
||||
this.rifeNcnn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dainNcnn
|
||||
//
|
||||
this.dainNcnn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.dainNcnn.AutoSize = true;
|
||||
this.dainNcnn.Checked = true;
|
||||
this.dainNcnn.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.dainNcnn.Location = new System.Drawing.Point(191, 203);
|
||||
this.dainNcnn.Name = "dainNcnn";
|
||||
this.dainNcnn.Size = new System.Drawing.Size(86, 17);
|
||||
this.dainNcnn.TabIndex = 97;
|
||||
this.dainNcnn.Text = "DAIN NCNN";
|
||||
this.dainNcnn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flavrCuda
|
||||
//
|
||||
this.flavrCuda.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.flavrCuda.AutoSize = true;
|
||||
this.flavrCuda.Checked = true;
|
||||
this.flavrCuda.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.flavrCuda.Location = new System.Drawing.Point(283, 203);
|
||||
this.flavrCuda.Name = "flavrCuda";
|
||||
this.flavrCuda.Size = new System.Drawing.Size(93, 17);
|
||||
this.flavrCuda.TabIndex = 98;
|
||||
this.flavrCuda.Text = "FLAVR CUDA";
|
||||
this.flavrCuda.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ModelDownloadForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(624, 301);
|
||||
this.Controls.Add(this.flavrCuda);
|
||||
this.Controls.Add(this.dainNcnn);
|
||||
this.Controls.Add(this.rifeNcnn);
|
||||
this.Controls.Add(this.rifeCuda);
|
||||
this.Controls.Add(this.statusLabel);
|
||||
this.Controls.Add(this.closeBtn);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.label39);
|
||||
this.Controls.Add(this.progressCircle);
|
||||
this.Controls.Add(this.titleLabel);
|
||||
this.Controls.Add(this.downloadModelsBtn);
|
||||
this.Controls.Add(this.longProgBar);
|
||||
this.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "ModelDownloadForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Model Downloader";
|
||||
this.Load += new System.EventHandler(this.ModelDownloadForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private HTAlt.WinForms.HTProgressBar longProgBar;
|
||||
private HTAlt.WinForms.HTButton downloadModelsBtn;
|
||||
private System.Windows.Forms.Label titleLabel;
|
||||
private CircularProgressBar.CircularProgressBar progressCircle;
|
||||
private System.Windows.Forms.Label label39;
|
||||
private HTAlt.WinForms.HTButton closeBtn;
|
||||
private HTAlt.WinForms.HTButton cancelBtn;
|
||||
private System.Windows.Forms.Label statusLabel;
|
||||
private System.Windows.Forms.CheckBox rifeCuda;
|
||||
private System.Windows.Forms.CheckBox rifeNcnn;
|
||||
private System.Windows.Forms.CheckBox dainNcnn;
|
||||
private System.Windows.Forms.CheckBox flavrCuda;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
using Flowframes.MiscUtils;
|
||||
using Microsoft.WindowsAPICodePack.Taskbar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class ModelDownloadForm : Form
|
||||
{
|
||||
public ModelDownloadForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ModelDownloadForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetWorking(bool state, bool allowCancel = true)
|
||||
{
|
||||
Logger.Log($"ModelDownloadForm SetWorking({state})", true);
|
||||
SetProgress(-1);
|
||||
Control[] controlsToDisable = new Control[] { downloadModelsBtn };
|
||||
Control[] controlsToHide = new Control[] { closeBtn };
|
||||
progressCircle.Visible = state;
|
||||
|
||||
foreach (Control c in controlsToDisable)
|
||||
c.Enabled = !state;
|
||||
|
||||
foreach (Control c in controlsToHide)
|
||||
c.Visible = !state;
|
||||
|
||||
Program.busy = state;
|
||||
Program.mainForm.UpdateStepByStepControls();
|
||||
}
|
||||
|
||||
public void SetProgress(int percent)
|
||||
{
|
||||
percent = percent.Clamp(0, 100);
|
||||
TaskbarManager.Instance.SetProgressValue(percent, 100);
|
||||
longProgBar.Value = percent;
|
||||
longProgBar.Refresh();
|
||||
}
|
||||
|
||||
public void SetStatus(string status)
|
||||
{
|
||||
statusLabel.Text = status;
|
||||
}
|
||||
|
||||
public void SetDownloadBtnEnabled(bool state)
|
||||
{
|
||||
downloadModelsBtn.Enabled = state;
|
||||
}
|
||||
|
||||
private void downloadModelsBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
ModelDownloadFormUtils.form = this;
|
||||
bool rifeC = rifeCuda.Checked;
|
||||
bool rifeN = rifeNcnn.Checked;
|
||||
bool dainN = dainNcnn.Checked;
|
||||
bool flavrC = flavrCuda.Checked;
|
||||
ModelDownloadFormUtils.DownloadModels(rifeC, rifeN, dainN, flavrC);
|
||||
}
|
||||
|
||||
private void cancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
ModelDownloadFormUtils.Cancel();
|
||||
}
|
||||
|
||||
private void closeBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
ModelDownloadFormUtils.Cancel();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
2538
Code/Forms/SettingsForm.Designer.cs
generated
2538
Code/Forms/SettingsForm.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,286 +0,0 @@
|
||||
using Flowframes.IO;
|
||||
using Flowframes.Media;
|
||||
using Flowframes.MiscUtils;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class SettingsForm : Form
|
||||
{
|
||||
bool initialized = false;
|
||||
|
||||
public SettingsForm(int index = 0)
|
||||
{
|
||||
AutoScaleMode = AutoScaleMode.None;
|
||||
InitializeComponent();
|
||||
settingsTabList.SelectedIndex = index;
|
||||
}
|
||||
|
||||
private void SettingsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
MinimumSize = new Size(Width, Height);
|
||||
MaximumSize = new Size(Width, (Height * 1.5f).RoundToInt());
|
||||
|
||||
LoadSettings();
|
||||
initialized = true;
|
||||
Task.Run(() => CheckModelCacheSize());
|
||||
}
|
||||
|
||||
public async Task CheckModelCacheSize ()
|
||||
{
|
||||
await Task.Delay(200);
|
||||
|
||||
long modelFoldersBytes = 0;
|
||||
|
||||
foreach (string modelFolder in ModelDownloader.GetAllModelFolders())
|
||||
modelFoldersBytes += IOUtils.GetDirSize(modelFolder, true);
|
||||
|
||||
if (modelFoldersBytes > 1024 * 1024)
|
||||
{
|
||||
clearModelCacheBtn.Enabled = true;
|
||||
clearModelCacheBtn.Text = $"Clear Model Cache ({FormatUtils.Bytes(modelFoldersBytes)})";
|
||||
}
|
||||
else
|
||||
{
|
||||
clearModelCacheBtn.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void SettingsForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
Program.mainForm.UpdateStepByStepControls();
|
||||
Program.mainForm.LoadQuickSettings();
|
||||
}
|
||||
|
||||
void SaveSettings ()
|
||||
{
|
||||
// Clamp...
|
||||
mp4Crf.Text = ((int)mp4Crf.Value).Clamp(0, 50).ToString();
|
||||
vp9Crf.Text = ((int)vp9Crf.Value).Clamp(0, 63).ToString();
|
||||
// Remove spaces...
|
||||
torchGpus.Text = torchGpus.Text.Replace(" ", "");
|
||||
ncnnGpus.Text = ncnnGpus.Text.Replace(" ", "");
|
||||
|
||||
// General
|
||||
ConfigParser.SaveComboxIndex(processingMode);
|
||||
ConfigParser.SaveGuiElement(maxVidHeight, ConfigParser.StringMode.Int);
|
||||
ConfigParser.SaveComboxIndex(tempFolderLoc);
|
||||
ConfigParser.SaveComboxIndex(outFolderLoc);
|
||||
ConfigParser.SaveGuiElement(keepTempFolder);
|
||||
ConfigParser.SaveGuiElement(exportNamePattern);
|
||||
ConfigParser.SaveGuiElement(exportNamePatternLoop);
|
||||
ConfigParser.SaveGuiElement(delLogsOnStartup);
|
||||
ConfigParser.SaveGuiElement(clearLogOnInput);
|
||||
ConfigParser.SaveGuiElement(disablePreview);
|
||||
// Interpolation
|
||||
ConfigParser.SaveGuiElement(keepAudio);
|
||||
ConfigParser.SaveGuiElement(keepSubs);
|
||||
ConfigParser.SaveGuiElement(keepMeta);
|
||||
ConfigParser.SaveGuiElement(enableAlpha);
|
||||
ConfigParser.SaveGuiElement(jpegFrames);
|
||||
ConfigParser.SaveComboxIndex(dedupMode);
|
||||
ConfigParser.SaveComboxIndex(mpdecimateMode);
|
||||
ConfigParser.SaveGuiElement(dedupThresh);
|
||||
ConfigParser.SaveGuiElement(enableLoop);
|
||||
ConfigParser.SaveGuiElement(scnDetect);
|
||||
ConfigParser.SaveGuiElement(scnDetectValue);
|
||||
ConfigParser.SaveComboxIndex(sceneChangeFillMode);
|
||||
ConfigParser.SaveComboxIndex(autoEncMode);
|
||||
ConfigParser.SaveComboxIndex(autoEncBackupMode);
|
||||
ConfigParser.SaveGuiElement(sbsAllowAutoEnc);
|
||||
ConfigParser.SaveGuiElement(alwaysWaitForAutoEnc);
|
||||
// AI
|
||||
ConfigParser.SaveGuiElement(torchGpus);
|
||||
ConfigParser.SaveGuiElement(ncnnGpus);
|
||||
ConfigParser.SaveGuiElement(ncnnThreads);
|
||||
ConfigParser.SaveGuiElement(uhdThresh);
|
||||
ConfigParser.SaveGuiElement(rifeCudaFp16);
|
||||
ConfigParser.SaveGuiElement(dainNcnnTilesize, ConfigParser.StringMode.Int);
|
||||
// Export
|
||||
ConfigParser.SaveGuiElement(minOutVidLength, ConfigParser.StringMode.Int);
|
||||
ConfigParser.SaveGuiElement(maxFps);
|
||||
ConfigParser.SaveComboxIndex(maxFpsMode);
|
||||
ConfigParser.SaveComboxIndex(loopMode);
|
||||
ConfigParser.SaveGuiElement(fixOutputDuration);
|
||||
// Encoding
|
||||
ConfigParser.SaveComboxIndex(mp4Enc);
|
||||
ConfigParser.SaveComboxIndex(pixFmt);
|
||||
Config.Set(mp4CrfConfigKey, mp4Crf.Value.ToString());
|
||||
ConfigParser.SaveGuiElement(vp9Crf);
|
||||
ConfigParser.SaveComboxIndex(proResProfile);
|
||||
ConfigParser.SaveGuiElement(aviCodec);
|
||||
ConfigParser.SaveGuiElement(aviColors);
|
||||
ConfigParser.SaveGuiElement(gifColors);
|
||||
ConfigParser.SaveGuiElement(gifDitherType);
|
||||
ConfigParser.SaveGuiElement(imgSeqFormat);
|
||||
// Debugging
|
||||
ConfigParser.SaveComboxIndex(cmdDebugMode);
|
||||
ConfigParser.SaveGuiElement(autoDedupFrames);
|
||||
ConfigParser.SaveGuiElement(mdlBaseUrl);
|
||||
ConfigParser.SaveGuiElement(ffEncThreads, ConfigParser.StringMode.Int);
|
||||
ConfigParser.SaveGuiElement(ffEncPreset);
|
||||
ConfigParser.SaveGuiElement(ffEncArgs);
|
||||
}
|
||||
|
||||
void LoadSettings()
|
||||
{
|
||||
// General
|
||||
ConfigParser.LoadComboxIndex(processingMode);
|
||||
ConfigParser.LoadGuiElement(maxVidHeight);
|
||||
ConfigParser.LoadComboxIndex(tempFolderLoc); ConfigParser.LoadGuiElement(tempDirCustom);
|
||||
ConfigParser.LoadComboxIndex(outFolderLoc); ConfigParser.LoadGuiElement(custOutDir);
|
||||
ConfigParser.LoadGuiElement(delLogsOnStartup);
|
||||
ConfigParser.LoadGuiElement(keepTempFolder);
|
||||
ConfigParser.LoadGuiElement(exportNamePattern);
|
||||
ConfigParser.LoadGuiElement(exportNamePatternLoop);
|
||||
ConfigParser.LoadGuiElement(clearLogOnInput);
|
||||
ConfigParser.LoadGuiElement(disablePreview);
|
||||
// Interpolation
|
||||
ConfigParser.LoadGuiElement(keepAudio);
|
||||
ConfigParser.LoadGuiElement(keepSubs);
|
||||
ConfigParser.LoadGuiElement(keepMeta);
|
||||
ConfigParser.LoadGuiElement(enableAlpha);
|
||||
ConfigParser.LoadGuiElement(jpegFrames);
|
||||
ConfigParser.LoadComboxIndex(dedupMode);
|
||||
ConfigParser.LoadComboxIndex(mpdecimateMode);
|
||||
ConfigParser.LoadGuiElement(dedupThresh);
|
||||
ConfigParser.LoadGuiElement(enableLoop);
|
||||
ConfigParser.LoadGuiElement(scnDetect);
|
||||
ConfigParser.LoadGuiElement(scnDetectValue);
|
||||
ConfigParser.LoadComboxIndex(sceneChangeFillMode);
|
||||
ConfigParser.LoadComboxIndex(autoEncMode);
|
||||
ConfigParser.LoadComboxIndex(autoEncBackupMode);
|
||||
ConfigParser.LoadGuiElement(sbsAllowAutoEnc);
|
||||
ConfigParser.LoadGuiElement(alwaysWaitForAutoEnc);
|
||||
// AI
|
||||
ConfigParser.LoadGuiElement(torchGpus);
|
||||
ConfigParser.LoadGuiElement(ncnnGpus);
|
||||
ConfigParser.LoadGuiElement(ncnnThreads);
|
||||
ConfigParser.LoadGuiElement(uhdThresh);
|
||||
ConfigParser.LoadGuiElement(rifeCudaFp16);
|
||||
ConfigParser.LoadGuiElement(dainNcnnTilesize);
|
||||
// Export
|
||||
ConfigParser.LoadGuiElement(minOutVidLength);
|
||||
ConfigParser.LoadGuiElement(maxFps);
|
||||
ConfigParser.LoadComboxIndex(maxFpsMode);
|
||||
ConfigParser.LoadComboxIndex(loopMode);
|
||||
ConfigParser.LoadGuiElement(fixOutputDuration);
|
||||
// Encoding
|
||||
ConfigParser.LoadComboxIndex(mp4Enc);
|
||||
ConfigParser.LoadComboxIndex(pixFmt);
|
||||
ConfigParser.LoadGuiElement(vp9Crf);
|
||||
ConfigParser.LoadComboxIndex(proResProfile);
|
||||
ConfigParser.LoadGuiElement(aviCodec);
|
||||
ConfigParser.LoadGuiElement(aviColors);
|
||||
ConfigParser.LoadGuiElement(gifColors);
|
||||
ConfigParser.LoadGuiElement(gifDitherType);
|
||||
ConfigParser.LoadGuiElement(imgSeqFormat);
|
||||
// Debugging
|
||||
ConfigParser.LoadComboxIndex(cmdDebugMode);
|
||||
ConfigParser.LoadGuiElement(autoDedupFrames);
|
||||
ConfigParser.LoadGuiElement(mdlBaseUrl);
|
||||
ConfigParser.LoadGuiElement(ffEncThreads);
|
||||
ConfigParser.LoadGuiElement(ffEncPreset);
|
||||
ConfigParser.LoadGuiElement(ffEncArgs);
|
||||
}
|
||||
|
||||
private void tempFolderLoc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
tempDirBrowseBtn.Visible = tempFolderLoc.SelectedIndex == 4;
|
||||
tempDirCustom.Visible = tempFolderLoc.SelectedIndex == 4;
|
||||
}
|
||||
|
||||
private void outFolderLoc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
custOutDirBrowseBtn.Visible = outFolderLoc.SelectedIndex == 1;
|
||||
custOutDir.Visible = outFolderLoc.SelectedIndex == 1;
|
||||
}
|
||||
|
||||
private void tempDirBrowseBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
CommonOpenFileDialog dialog = new CommonOpenFileDialog { InitialDirectory = tempDirCustom.Text.Trim(), IsFolderPicker = true };
|
||||
|
||||
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
|
||||
tempDirCustom.Text = dialog.FileName;
|
||||
|
||||
ConfigParser.SaveGuiElement(tempDirCustom);
|
||||
}
|
||||
|
||||
private void custOutDirBrowseBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
CommonOpenFileDialog dialog = new CommonOpenFileDialog { InitialDirectory = custOutDir.Text.Trim(), IsFolderPicker = true };
|
||||
|
||||
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
|
||||
custOutDir.Text = dialog.FileName;
|
||||
|
||||
ConfigParser.SaveGuiElement(custOutDir);
|
||||
}
|
||||
|
||||
private void cmdDebugMode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (initialized && cmdDebugMode.SelectedIndex == 2)
|
||||
MessageBox.Show("If you enable this, you need to close the CMD window manually after the process has finished, otherwise processing will be paused!", "Notice");
|
||||
}
|
||||
|
||||
private void dedupMode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
dedupeSensLabel.Visible = dedupMode.SelectedIndex != 0;
|
||||
magickDedupePanel.Visible = dedupMode.SelectedIndex == 1;
|
||||
mpDedupePanel.Visible = dedupMode.SelectedIndex == 2;
|
||||
}
|
||||
|
||||
private void clearModelCacheBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
ModelDownloader.DeleteAllModels();
|
||||
clearModelCacheBtn.Text = "Clear Model Cache";
|
||||
CheckModelCacheSize();
|
||||
}
|
||||
|
||||
string mp4CrfConfigKey;
|
||||
|
||||
private void mp4Enc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string text = mp4Enc.Text.ToUpper().Remove(" ");
|
||||
|
||||
if (text.Contains(FFmpegUtils.Codec.H264.ToString().ToUpper()))
|
||||
mp4CrfConfigKey = "h264Crf";
|
||||
|
||||
if (text.Contains(FFmpegUtils.Codec.H265.ToString().ToUpper()))
|
||||
mp4CrfConfigKey = "h265Crf";
|
||||
|
||||
if (text.Contains(FFmpegUtils.Codec.AV1.ToString().ToUpper()))
|
||||
mp4CrfConfigKey = "av1Crf";
|
||||
|
||||
mp4Crf.Value = Config.GetInt(mp4CrfConfigKey);
|
||||
}
|
||||
|
||||
private void modelDownloaderBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
new ModelDownloadForm().ShowDialog();
|
||||
CheckModelCacheSize();
|
||||
}
|
||||
|
||||
private void autoEncMode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
autoEncBlockPanel.Visible = autoEncMode.SelectedIndex == 0;
|
||||
}
|
||||
|
||||
private async void resetBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult dialog = MessageBox.Show($"Are you sure you want to reset the configuration?", "Are you sure?", MessageBoxButtons.YesNo);
|
||||
|
||||
if (dialog == DialogResult.No)
|
||||
return;
|
||||
|
||||
await Config.Reset(3, this);
|
||||
SettingsForm_Load(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
118
Code/Forms/TimeoutForm.Designer.cs
generated
118
Code/Forms/TimeoutForm.Designer.cs
generated
@@ -1,118 +0,0 @@
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class TimeoutForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TimeoutForm));
|
||||
this.mainLabel = new System.Windows.Forms.Label();
|
||||
this.countdownLabel = new System.Windows.Forms.Label();
|
||||
this.cancelActionBtn = new HTAlt.WinForms.HTButton();
|
||||
this.skipCountdownBtn = new HTAlt.WinForms.HTButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainLabel
|
||||
//
|
||||
this.mainLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.mainLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.mainLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.mainLabel.Name = "mainLabel";
|
||||
this.mainLabel.Size = new System.Drawing.Size(320, 23);
|
||||
this.mainLabel.TabIndex = 0;
|
||||
this.mainLabel.Text = "Waiting before running action...";
|
||||
this.mainLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// countdownLabel
|
||||
//
|
||||
this.countdownLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.countdownLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.countdownLabel.Location = new System.Drawing.Point(12, 42);
|
||||
this.countdownLabel.Margin = new System.Windows.Forms.Padding(3, 10, 3, 0);
|
||||
this.countdownLabel.Name = "countdownLabel";
|
||||
this.countdownLabel.Size = new System.Drawing.Size(320, 23);
|
||||
this.countdownLabel.TabIndex = 1;
|
||||
this.countdownLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// cancelActionBtn
|
||||
//
|
||||
this.cancelActionBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.cancelActionBtn.FlatAppearance.BorderSize = 0;
|
||||
this.cancelActionBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.cancelActionBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.cancelActionBtn.Location = new System.Drawing.Point(12, 126);
|
||||
this.cancelActionBtn.Name = "cancelActionBtn";
|
||||
this.cancelActionBtn.Size = new System.Drawing.Size(320, 23);
|
||||
this.cancelActionBtn.TabIndex = 39;
|
||||
this.cancelActionBtn.Text = "Cancel Action";
|
||||
this.cancelActionBtn.UseVisualStyleBackColor = false;
|
||||
this.cancelActionBtn.Click += new System.EventHandler(this.cancelActionBtn_Click);
|
||||
//
|
||||
// skipCountdownBtn
|
||||
//
|
||||
this.skipCountdownBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.skipCountdownBtn.FlatAppearance.BorderSize = 0;
|
||||
this.skipCountdownBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.skipCountdownBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.skipCountdownBtn.Location = new System.Drawing.Point(12, 94);
|
||||
this.skipCountdownBtn.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
|
||||
this.skipCountdownBtn.Name = "skipCountdownBtn";
|
||||
this.skipCountdownBtn.Size = new System.Drawing.Size(320, 23);
|
||||
this.skipCountdownBtn.TabIndex = 40;
|
||||
this.skipCountdownBtn.Text = "Run Action Now";
|
||||
this.skipCountdownBtn.UseVisualStyleBackColor = false;
|
||||
this.skipCountdownBtn.Click += new System.EventHandler(this.skipCountdownBtn_Click);
|
||||
//
|
||||
// TimeoutForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(344, 161);
|
||||
this.Controls.Add(this.skipCountdownBtn);
|
||||
this.Controls.Add(this.cancelActionBtn);
|
||||
this.Controls.Add(this.countdownLabel);
|
||||
this.Controls.Add(this.mainLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "TimeoutForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Timeout";
|
||||
this.Load += new System.EventHandler(this.TimeoutForm_Load);
|
||||
this.Shown += new System.EventHandler(this.TimeoutForm_Shown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label mainLabel;
|
||||
private System.Windows.Forms.Label countdownLabel;
|
||||
private HTAlt.WinForms.HTButton cancelActionBtn;
|
||||
private HTAlt.WinForms.HTButton skipCountdownBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class TimeoutForm : Form
|
||||
{
|
||||
string actionName = "";
|
||||
int waitSeconds;
|
||||
|
||||
public delegate void ActionCallback();
|
||||
public static ActionCallback actionCallback;
|
||||
|
||||
bool cancelCountdown = false;
|
||||
|
||||
public TimeoutForm(string action, ActionCallback callback, int waitSecs = 20, string windowTitle = "Timeout")
|
||||
{
|
||||
actionName = action;
|
||||
Text = windowTitle;
|
||||
actionCallback = callback;
|
||||
waitSeconds = waitSecs;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TimeoutForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TimeoutForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
mainLabel.Text = $"Waiting before running action \"{actionName}\"";
|
||||
WaitAndRun();
|
||||
}
|
||||
|
||||
async Task WaitAndRun ()
|
||||
{
|
||||
Show();
|
||||
WindowState = FormWindowState.Normal;
|
||||
Activate();
|
||||
|
||||
for (int i = waitSeconds; i > 0; i--)
|
||||
{
|
||||
countdownLabel.Text = $"{i}s";
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
|
||||
if (cancelCountdown)
|
||||
return;
|
||||
|
||||
actionCallback();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void skipCountdownBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
cancelCountdown = true;
|
||||
actionCallback();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelActionBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
cancelCountdown = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
208
Code/Forms/UpdaterForm.Designer.cs
generated
208
Code/Forms/UpdaterForm.Designer.cs
generated
@@ -1,208 +0,0 @@
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
partial class UpdaterForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdaterForm));
|
||||
this.titleLabel = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.updatePatreonBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.installedLabel = new System.Windows.Forms.Label();
|
||||
this.latestLabel = new System.Windows.Forms.Label();
|
||||
this.statusLabel = new System.Windows.Forms.Label();
|
||||
this.downloadingLabel = new System.Windows.Forms.Label();
|
||||
this.updateFreeBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
this.titleLabel.AutoSize = true;
|
||||
this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.titleLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.titleLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.titleLabel.Name = "titleLabel";
|
||||
this.titleLabel.Size = new System.Drawing.Size(121, 40);
|
||||
this.titleLabel.TabIndex = 2;
|
||||
this.titleLabel.Text = "Updater";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label13.ForeColor = System.Drawing.Color.White;
|
||||
this.label13.Location = new System.Drawing.Point(17, 67);
|
||||
this.label13.Margin = new System.Windows.Forms.Padding(8, 8, 3, 0);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(110, 16);
|
||||
this.label13.TabIndex = 35;
|
||||
this.label13.Text = "Installed Version:";
|
||||
//
|
||||
// updatePatreonBtn
|
||||
//
|
||||
this.updatePatreonBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.updatePatreonBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.updatePatreonBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.updatePatreonBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.updatePatreonBtn.Location = new System.Drawing.Point(12, 229);
|
||||
this.updatePatreonBtn.Name = "updatePatreonBtn";
|
||||
this.updatePatreonBtn.Size = new System.Drawing.Size(203, 40);
|
||||
this.updatePatreonBtn.TabIndex = 36;
|
||||
this.updatePatreonBtn.Text = "Download Patreon Version";
|
||||
this.updatePatreonBtn.UseVisualStyleBackColor = true;
|
||||
this.updatePatreonBtn.Click += new System.EventHandler(this.updatePatreonBtn_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.Location = new System.Drawing.Point(16, 93);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(8, 10, 3, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(96, 16);
|
||||
this.label1.TabIndex = 37;
|
||||
this.label1.Text = "Latest Version:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.ForeColor = System.Drawing.Color.White;
|
||||
this.label2.Location = new System.Drawing.Point(16, 119);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(8, 10, 3, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(48, 16);
|
||||
this.label2.TabIndex = 38;
|
||||
this.label2.Text = "Status:";
|
||||
//
|
||||
// installedLabel
|
||||
//
|
||||
this.installedLabel.AutoSize = true;
|
||||
this.installedLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.installedLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.installedLabel.Location = new System.Drawing.Point(170, 67);
|
||||
this.installedLabel.Margin = new System.Windows.Forms.Padding(8, 8, 3, 0);
|
||||
this.installedLabel.Name = "installedLabel";
|
||||
this.installedLabel.Size = new System.Drawing.Size(76, 16);
|
||||
this.installedLabel.TabIndex = 39;
|
||||
this.installedLabel.Text = "Loading...";
|
||||
//
|
||||
// latestLabel
|
||||
//
|
||||
this.latestLabel.AutoSize = true;
|
||||
this.latestLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.latestLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.latestLabel.Location = new System.Drawing.Point(170, 93);
|
||||
this.latestLabel.Margin = new System.Windows.Forms.Padding(8, 8, 3, 0);
|
||||
this.latestLabel.Name = "latestLabel";
|
||||
this.latestLabel.Size = new System.Drawing.Size(76, 16);
|
||||
this.latestLabel.TabIndex = 40;
|
||||
this.latestLabel.Text = "Loading...";
|
||||
//
|
||||
// statusLabel
|
||||
//
|
||||
this.statusLabel.AutoSize = true;
|
||||
this.statusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.statusLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.statusLabel.Location = new System.Drawing.Point(170, 119);
|
||||
this.statusLabel.Margin = new System.Windows.Forms.Padding(8, 8, 3, 0);
|
||||
this.statusLabel.Name = "statusLabel";
|
||||
this.statusLabel.Size = new System.Drawing.Size(76, 16);
|
||||
this.statusLabel.TabIndex = 41;
|
||||
this.statusLabel.Text = "Loading...";
|
||||
//
|
||||
// downloadingLabel
|
||||
//
|
||||
this.downloadingLabel.AutoSize = true;
|
||||
this.downloadingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.downloadingLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.downloadingLabel.Location = new System.Drawing.Point(226, 241);
|
||||
this.downloadingLabel.Margin = new System.Windows.Forms.Padding(8, 10, 3, 0);
|
||||
this.downloadingLabel.Name = "downloadingLabel";
|
||||
this.downloadingLabel.Size = new System.Drawing.Size(0, 16);
|
||||
this.downloadingLabel.TabIndex = 42;
|
||||
//
|
||||
// updateFreeBtn
|
||||
//
|
||||
this.updateFreeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.updateFreeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
|
||||
this.updateFreeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.updateFreeBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.updateFreeBtn.Location = new System.Drawing.Point(221, 229);
|
||||
this.updateFreeBtn.Name = "updateFreeBtn";
|
||||
this.updateFreeBtn.Size = new System.Drawing.Size(203, 40);
|
||||
this.updateFreeBtn.TabIndex = 43;
|
||||
this.updateFreeBtn.Text = "Download Free Version";
|
||||
this.updateFreeBtn.UseVisualStyleBackColor = true;
|
||||
this.updateFreeBtn.Click += new System.EventHandler(this.updateFreeBtn_Click);
|
||||
//
|
||||
// UpdaterForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(624, 281);
|
||||
this.Controls.Add(this.updateFreeBtn);
|
||||
this.Controls.Add(this.downloadingLabel);
|
||||
this.Controls.Add(this.statusLabel);
|
||||
this.Controls.Add(this.latestLabel);
|
||||
this.Controls.Add(this.installedLabel);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.updatePatreonBtn);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.titleLabel);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "UpdaterForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Updater";
|
||||
this.Load += new System.EventHandler(this.UpdaterForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label titleLabel;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Button updatePatreonBtn;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label installedLabel;
|
||||
private System.Windows.Forms.Label latestLabel;
|
||||
private System.Windows.Forms.Label statusLabel;
|
||||
private System.Windows.Forms.Label downloadingLabel;
|
||||
private System.Windows.Forms.Button updateFreeBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
using Flowframes.Data;
|
||||
using Flowframes.OS;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Flowframes.Forms
|
||||
{
|
||||
public partial class UpdaterForm : Form
|
||||
{
|
||||
Version installed;
|
||||
Version latestPat;
|
||||
Version latestFree;
|
||||
|
||||
public UpdaterForm()
|
||||
{
|
||||
AutoScaleMode = AutoScaleMode.None;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void UpdaterForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
installed = Updater.GetInstalledVer();
|
||||
latestPat = Updater.GetLatestVer(true);
|
||||
latestFree = Updater.GetLatestVer(false);
|
||||
|
||||
installedLabel.Text = installed.ToString();
|
||||
await Task.Delay(100);
|
||||
latestLabel.Text = $"{latestPat} (Patreon/Beta) - {latestFree} (Free/Stable)";
|
||||
|
||||
if (Updater.CompareVersions(installed, latestFree) == Updater.VersionCompareResult.Equal)
|
||||
{
|
||||
statusLabel.Text = "Latest Free Version Is Installed.";
|
||||
|
||||
if (Updater.CompareVersions(installed, latestPat) == Updater.VersionCompareResult.Newer)
|
||||
statusLabel.Text += "\nBeta Update Available On Patreon.";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Updater.CompareVersions(installed, latestPat) == Updater.VersionCompareResult.Equal)
|
||||
{
|
||||
statusLabel.Text = "Latest Patreon/Beta Version Is Installed.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (Updater.CompareVersions(installed, latestPat) == Updater.VersionCompareResult.Newer)
|
||||
{
|
||||
statusLabel.Text = "Update available on Patreon!";
|
||||
|
||||
if (Updater.CompareVersions(installed, latestFree) == Updater.VersionCompareResult.Newer)
|
||||
statusLabel.Text = $"Beta Updates Available On Patreon and Itch.io.";
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
float lastProg = -1f;
|
||||
public void SetProgLabel (float prog, string str)
|
||||
{
|
||||
if (prog == lastProg) return;
|
||||
lastProg = prog;
|
||||
downloadingLabel.Text = str;
|
||||
}
|
||||
|
||||
private void updatePatreonBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
string link = Updater.GetLatestVerLink(true);
|
||||
if(!string.IsNullOrWhiteSpace(link))
|
||||
Process.Start(link);
|
||||
}
|
||||
|
||||
private void updateFreeBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
string link = Updater.GetLatestVerLink(false);
|
||||
if (!string.IsNullOrWhiteSpace(link))
|
||||
Process.Start(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user