release/0.3.6 #2
@ -6,7 +6,7 @@ using RyzStudio.Windows.ThemedForms.PickerBox;
|
|||||||
|
|
||||||
namespace RokettoLaunch
|
namespace RokettoLaunch
|
||||||
{
|
{
|
||||||
public class EditGroupForm : Form
|
public class EditSectionForm : Form
|
||||||
{
|
{
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
@ -18,7 +18,7 @@ namespace RokettoLaunch
|
|||||||
private TileGroupModel result = null;
|
private TileGroupModel result = null;
|
||||||
|
|
||||||
|
|
||||||
public EditGroupForm(TileGroupModel model = null)
|
public EditSectionForm(TileGroupModel model = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
@ -62,6 +62,7 @@ namespace RokettoLaunch
|
|||||||
textBox1.IconSize = 13F;
|
textBox1.IconSize = 13F;
|
||||||
textBox1.Location = new System.Drawing.Point(192, 20);
|
textBox1.Location = new System.Drawing.Point(192, 20);
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
|
textBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
textBox1.Size = new System.Drawing.Size(177, 32);
|
textBox1.Size = new System.Drawing.Size(177, 32);
|
||||||
textBox1.TabIndex = 152;
|
textBox1.TabIndex = 152;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
@ -103,6 +104,7 @@ namespace RokettoLaunch
|
|||||||
pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||||
pickerBox1.Location = new System.Drawing.Point(285, 62);
|
pickerBox1.Location = new System.Drawing.Point(285, 62);
|
||||||
pickerBox1.Name = "pickerBox1";
|
pickerBox1.Name = "pickerBox1";
|
||||||
|
pickerBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
pickerBox1.SelectedIndex = 0;
|
pickerBox1.SelectedIndex = 0;
|
||||||
pickerBox1.Size = new System.Drawing.Size(84, 34);
|
pickerBox1.Size = new System.Drawing.Size(84, 34);
|
||||||
pickerBox1.TabIndex = 174;
|
pickerBox1.TabIndex = 174;
|
||||||
@ -115,11 +117,12 @@ namespace RokettoLaunch
|
|||||||
dialogFooter1.Button1Text = "&Save";
|
dialogFooter1.Button1Text = "&Save";
|
||||||
dialogFooter1.Dialog = this;
|
dialogFooter1.Dialog = this;
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
|
dialogFooter1.IsBusy = false;
|
||||||
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new System.Drawing.Size(384, 84);
|
dialogFooter1.Size = new System.Drawing.Size(384, 84);
|
||||||
//
|
//
|
||||||
// EditGroupForm
|
// EditSectionForm
|
||||||
//
|
//
|
||||||
BackColor = System.Drawing.Color.White;
|
BackColor = System.Drawing.Color.White;
|
||||||
ClientSize = new System.Drawing.Size(384, 521);
|
ClientSize = new System.Drawing.Size(384, 521);
|
||||||
@ -129,8 +132,8 @@ namespace RokettoLaunch
|
|||||||
Controls.Add(label1);
|
Controls.Add(label1);
|
||||||
Controls.Add(textBox1);
|
Controls.Add(textBox1);
|
||||||
MinimumSize = new System.Drawing.Size(400, 560);
|
MinimumSize = new System.Drawing.Size(400, 560);
|
||||||
Name = "EditGroupForm";
|
Name = "EditSectionForm";
|
||||||
Text = "Edit Group";
|
Text = "Edit Section";
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@ -66,6 +66,7 @@ namespace RokettoLaunch
|
|||||||
textBox1.IconSize = 13F;
|
textBox1.IconSize = 13F;
|
||||||
textBox1.Location = new Point(109, 20);
|
textBox1.Location = new Point(109, 20);
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
|
textBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
textBox1.Size = new Size(260, 32);
|
textBox1.Size = new Size(260, 32);
|
||||||
textBox1.TabIndex = 152;
|
textBox1.TabIndex = 152;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
@ -94,6 +95,7 @@ namespace RokettoLaunch
|
|||||||
listBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
listBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
||||||
listBox1.Location = new Point(109, 62);
|
listBox1.Location = new Point(109, 62);
|
||||||
listBox1.Name = "listBox1";
|
listBox1.Name = "listBox1";
|
||||||
|
listBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
listBox1.Size = new Size(260, 366);
|
listBox1.Size = new Size(260, 366);
|
||||||
listBox1.TabIndex = 180;
|
listBox1.TabIndex = 180;
|
||||||
listBox1.OnAdd += listBox1_OnAdd;
|
listBox1.OnAdd += listBox1_OnAdd;
|
||||||
@ -127,7 +129,7 @@ namespace RokettoLaunch
|
|||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new Size(384, 84);
|
dialogFooter1.Size = new Size(384, 84);
|
||||||
//
|
//
|
||||||
// EditTileFolderForm
|
// EditFolderForm
|
||||||
//
|
//
|
||||||
BackColor = Color.White;
|
BackColor = Color.White;
|
||||||
ClientSize = new Size(384, 521);
|
ClientSize = new Size(384, 521);
|
||||||
@ -137,8 +139,8 @@ namespace RokettoLaunch
|
|||||||
Controls.Add(label1);
|
Controls.Add(label1);
|
||||||
Controls.Add(textBox1);
|
Controls.Add(textBox1);
|
||||||
MinimumSize = new Size(400, 560);
|
MinimumSize = new Size(400, 560);
|
||||||
Name = "EditTileFolderForm";
|
Name = "EditFolderForm";
|
||||||
Text = "Add List Tile";
|
Text = "Add Tile Folder";
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@ -236,44 +238,43 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(fileList[0]))
|
foreach (var item in fileList)
|
||||||
{
|
{
|
||||||
return;
|
if (string.IsNullOrWhiteSpace(item))
|
||||||
}
|
|
||||||
|
|
||||||
var model = new TileModel()
|
|
||||||
{
|
|
||||||
ProcessFilename = fileList[0],
|
|
||||||
Title = Path.GetFileName(fileList[0])
|
|
||||||
};
|
|
||||||
|
|
||||||
// exe
|
|
||||||
if (Path.GetExtension(fileList[0]).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
if (File.Exists(fileList[0]))
|
|
||||||
{
|
{
|
||||||
try
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var model = new TileModel()
|
||||||
|
{
|
||||||
|
ProcessFilename = item,
|
||||||
|
Title = Path.GetFileName(item)
|
||||||
|
};
|
||||||
|
|
||||||
|
// exe
|
||||||
|
if (Path.GetExtension(item).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
if (File.Exists(item))
|
||||||
{
|
{
|
||||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileList[0]);
|
try
|
||||||
if (fvi != null)
|
|
||||||
{
|
{
|
||||||
model.Title = fvi.ProductName;
|
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(item);
|
||||||
|
if (fvi != null)
|
||||||
|
{
|
||||||
|
model.Title = fvi.ProductName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
model.Title = (string.IsNullOrWhiteSpace(model.Title) ? "Untitled" : Path.GetFileNameWithoutExtension(item));
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listBox1.ListBox.Items.Add(model);
|
||||||
if (string.IsNullOrWhiteSpace(model.Title))
|
|
||||||
{
|
|
||||||
model.Title = Path.GetFileNameWithoutExtension(fileList[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listBox1.ListBox.Items.Add(model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
209
MainForm.cs
209
MainForm.cs
@ -224,6 +224,7 @@ namespace RokettoLaunch
|
|||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Main Menu
|
#region Main Menu
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -510,22 +511,11 @@ namespace RokettoLaunch
|
|||||||
this.CurrentSession.Height = this.Height;
|
this.CurrentSession.Height = this.Height;
|
||||||
|
|
||||||
this.CurrentSession.Groups = new List<TileGroupModel>();
|
this.CurrentSession.Groups = new List<TileGroupModel>();
|
||||||
foreach (var container in flowLayoutPanel1.Controls.OfType<RyzStudio.Windows.TileForms.TileContainer>())
|
foreach (var section in flowLayoutPanel1.Controls.OfType<RyzStudio.Windows.TileForms.TileContainer>())
|
||||||
{
|
{
|
||||||
var newTag = (TileGroupModel)container.Tag;
|
var newTag = GetSectionTag(section);
|
||||||
if (newTag == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
newTag.Items = new List<TileModel>();
|
section.Tag = newTag;
|
||||||
|
|
||||||
foreach (var tile in container.Controls.OfType<TilePanel>())
|
|
||||||
{
|
|
||||||
tile.ModelInfo.Position = container.GetCoord(tile);
|
|
||||||
|
|
||||||
newTag.Items.Add(tile.ModelInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.CurrentSession.Groups.Add(newTag);
|
this.CurrentSession.Groups.Add(newTag);
|
||||||
}
|
}
|
||||||
@ -578,7 +568,9 @@ namespace RokettoLaunch
|
|||||||
|
|
||||||
private async Task<bool> fileSessionManager_OnClearSession(FileSessionManager sender)
|
private async Task<bool> fileSessionManager_OnClearSession(FileSessionManager sender)
|
||||||
{
|
{
|
||||||
return await fileSessionManager_OnNewSession(sender);
|
UIControl.Clear(flowLayoutPanel1);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task fileSessionManager_OnFilenameChanged(FileSessionManager sender, string filename)
|
private async Task fileSessionManager_OnFilenameChanged(FileSessionManager sender, string filename)
|
||||||
@ -613,8 +605,8 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void addGroupToolStripMenuItem1_Click(object sender, EventArgs e)
|
private void addGroupToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var container = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
var section = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
||||||
if (container == null)
|
if (section == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -623,13 +615,13 @@ namespace RokettoLaunch
|
|||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
var result = form.Result;
|
var result = form.Result;
|
||||||
var newCoord = container.GetNextCoord();
|
var newCoord = section.GetNextCoord();
|
||||||
|
|
||||||
var newTile = new RokettoLaunch.Windows.Forms.TilePanel();
|
var newTile = new TilePanel();
|
||||||
newTile.ContextMenuStrip = tileMenu1;
|
newTile.ContextMenuStrip = tileMenu1;
|
||||||
newTile.LoadInfo(result);
|
newTile.LoadInfo(result);
|
||||||
|
|
||||||
container.Add(newTile, newCoord.X, newCoord.Y);
|
section.Add(newTile, newCoord.X, newCoord.Y);
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
};
|
};
|
||||||
@ -679,7 +671,7 @@ namespace RokettoLaunch
|
|||||||
|
|
||||||
var model = UIControl.GetTag<TileGroupModel>(container);
|
var model = UIControl.GetTag<TileGroupModel>(container);
|
||||||
|
|
||||||
var form = new EditGroupForm(model);
|
var form = new EditSectionForm(model);
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
var result = form.Result;
|
var result = form.Result;
|
||||||
@ -700,21 +692,22 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private async void toolStripMenuItem5_Click(object sender, EventArgs e)
|
private async void toolStripMenuItem5_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var container = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
var section = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
||||||
if (container == null)
|
if (section == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var model = UIControl.GetTag<TileGroupModel>(container);
|
var newTag = GetSectionTag(section);
|
||||||
model.IsExpanded = true;
|
section.Tag = newTag;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var newModel = JsonSerializer.Deserialize<TileGroupModel>(JsonSerializer.Serialize(model));
|
var newerTag = JsonSerializer.Deserialize<TileGroupModel>(JsonSerializer.Serialize(newTag));
|
||||||
newModel.Title = (string.IsNullOrWhiteSpace(newModel.Title) ? "New Section" : newModel.Title?.Trim()) + " (Copy)";
|
newerTag.IsExpanded = true;
|
||||||
|
newerTag.Title = (string.IsNullOrWhiteSpace(newerTag.Title) ? "New Section" : newerTag.Title?.Trim()) + " (Copy)";
|
||||||
|
|
||||||
await AddSection(newModel);
|
await AddSection(newerTag);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
@ -724,41 +717,6 @@ namespace RokettoLaunch
|
|||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Section - Add Section
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private async void addRowToolStripMenuItem_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
await AddNewSection();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Section - Remove Section
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void removeRowToolStripMenuItem_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show("Are you sure you want to remove section?", "Remove Section", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
|
||||||
if (result != DialogResult.Yes)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var container = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripDropDownItem)sender);
|
|
||||||
if (container == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
container?.Parent.Controls?.Remove(container);
|
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Move Top
|
/// Move Top
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -838,13 +796,19 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
var result = MessageBox.Show("Are you sure you want to remove section?", "Remove Section", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||||
|
if (result != DialogResult.Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var container = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
var container = UIControl.GetOwner<RyzStudio.Windows.TileForms.TileContainer>((ToolStripMenuItem)sender);
|
||||||
if (container == null)
|
if (container == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
flowLayoutPanel1.Controls.Remove(container);
|
container?.Parent.Controls?.Remove(container);
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
}
|
}
|
||||||
@ -901,33 +865,7 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var container = UIControl.GetParentsUntil<TileContainer>(tile);
|
DuplicateTile(tile);
|
||||||
if (container == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newModel = new TileModel();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
newModel = JsonSerializer.Deserialize<TileModel>(JsonSerializer.Serialize(tile.ModelInfo));
|
|
||||||
newModel.Title = (string.IsNullOrWhiteSpace(newModel.Title) ? "New Tile" : newModel.Title?.Trim()) + " (Copy)";
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newCoord = container.GetNextCoord();
|
|
||||||
|
|
||||||
var newTile = new RokettoLaunch.Windows.Forms.TilePanel();
|
|
||||||
newTile.ContextMenuStrip = tileMenu1;
|
|
||||||
newTile.LoadInfo(newModel);
|
|
||||||
|
|
||||||
container.Add(newTile, newCoord.X, newCoord.Y);
|
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -977,35 +915,31 @@ namespace RokettoLaunch
|
|||||||
|
|
||||||
private async Task AddSection(TileGroupModel model)
|
private async Task AddSection(TileGroupModel model)
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
var panel = new RyzStudio.Windows.TileForms.TileContainer();
|
||||||
{
|
panel.Title = model.Title;
|
||||||
var panel = new RyzStudio.Windows.TileForms.TileContainer();
|
panel.IsOpen = model.IsExpanded;
|
||||||
panel.Title = model.Title;
|
panel.TitleContextMenuStrip = tileContainerMenu1;
|
||||||
panel.IsOpen = model.IsExpanded;
|
panel.AutoSizeHeight = true;
|
||||||
panel.TitleContextMenuStrip = tileContainerMenu1;
|
panel.Tag = model;
|
||||||
panel.AutoSizeHeight = true;
|
panel.AutoSize(model.GridSize.Width, model.GridSize.Height);
|
||||||
panel.Tag = model;
|
|
||||||
panel.AutoSize(model.GridSize.Width, model.GridSize.Height);
|
|
||||||
panel.Height += 4;
|
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
panel.BackColor = Color.LightSteelBlue;
|
panel.BackColor = Color.LightSteelBlue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
panel.MouseClick += tileContainer_MouseClick;
|
panel.MouseClick += tileContainer_MouseClick;
|
||||||
|
|
||||||
UIControl.Add(flowLayoutPanel1, panel);
|
UIControl.Add(flowLayoutPanel1, panel);
|
||||||
|
|
||||||
// Load tiles
|
// Load tiles
|
||||||
foreach (var item2 in model.Items ?? new List<TileModel>())
|
foreach (var item2 in model.Items ?? new List<TileModel>())
|
||||||
{
|
{
|
||||||
var newTile = new RokettoLaunch.Windows.Forms.TilePanel();
|
var newTile = new RokettoLaunch.Windows.Forms.TilePanel();
|
||||||
newTile.ContextMenuStrip = tileMenu1;
|
newTile.ContextMenuStrip = tileMenu1;
|
||||||
newTile.LoadInfo(item2);
|
newTile.LoadInfo(item2);
|
||||||
|
|
||||||
panel.Add(newTile, item2.Position.X, item2.Position.Y);
|
panel.Add(newTile, item2.Position.X, item2.Position.Y);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AutoResizeWidth()
|
private void AutoResizeWidth()
|
||||||
@ -1026,5 +960,54 @@ namespace RokettoLaunch
|
|||||||
UIControl.SetClientWidth(this, width + padding);
|
UIControl.SetClientWidth(this, width + padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void DuplicateTile(TilePanel tile)
|
||||||
|
{
|
||||||
|
var container = UIControl.GetParentsUntil<TileContainer>(tile);
|
||||||
|
if (container == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newModel = new TileModel();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
newModel = JsonSerializer.Deserialize<TileModel>(JsonSerializer.Serialize(tile.ModelInfo));
|
||||||
|
newModel.Title = (string.IsNullOrWhiteSpace(newModel.Title) ? "New Tile" : newModel.Title?.Trim()) + " (Copy)";
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newCoord = container.GetNextCoord();
|
||||||
|
|
||||||
|
var newTile = new RokettoLaunch.Windows.Forms.TilePanel();
|
||||||
|
newTile.ContextMenuStrip = tileMenu1;
|
||||||
|
newTile.LoadInfo(newModel);
|
||||||
|
|
||||||
|
container.Add(newTile, newCoord.X, newCoord.Y);
|
||||||
|
|
||||||
|
_fileSessionManager.HasChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private TileGroupModel GetSectionTag(TileContainer section)
|
||||||
|
{
|
||||||
|
var newTag = new TileGroupModel();
|
||||||
|
newTag.Title = section.Title ?? "New Section";
|
||||||
|
newTag.IsExpanded = section.IsOpen;
|
||||||
|
newTag.GridSize = section.GridSize;
|
||||||
|
newTag.Items = new List<TileModel>();
|
||||||
|
|
||||||
|
foreach (var tile in section?.Controls?.OfType<TilePanel>() ?? new List<TilePanel>())
|
||||||
|
{
|
||||||
|
tile.ModelInfo.Position = section.GetCoord(tile);
|
||||||
|
|
||||||
|
newTag.Items.Add(tile.ModelInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return newTag;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,13 +94,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// yesNoPickerBox2
|
// yesNoPickerBox2
|
||||||
//
|
//
|
||||||
yesNoPickerBox2.AcceptButton = null;
|
|
||||||
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox2.EnableReactiveVisual = true;
|
yesNoPickerBox2.EnableReactiveVisual = true;
|
||||||
yesNoPickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
yesNoPickerBox2.Location = new System.Drawing.Point(307, 63);
|
yesNoPickerBox2.Location = new System.Drawing.Point(307, 63);
|
||||||
yesNoPickerBox2.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
yesNoPickerBox2.Name = "yesNoPickerBox2";
|
yesNoPickerBox2.Name = "yesNoPickerBox2";
|
||||||
yesNoPickerBox2.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox2.Padding = new Padding(4, 4, 3, 3);
|
||||||
yesNoPickerBox2.SelectedIndex = 1;
|
yesNoPickerBox2.SelectedIndex = 1;
|
||||||
@ -125,13 +123,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// yesNoPickerBox3
|
// yesNoPickerBox3
|
||||||
//
|
//
|
||||||
yesNoPickerBox3.AcceptButton = null;
|
|
||||||
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox3.EnableReactiveVisual = true;
|
yesNoPickerBox3.EnableReactiveVisual = true;
|
||||||
yesNoPickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
yesNoPickerBox3.Location = new System.Drawing.Point(307, 107);
|
yesNoPickerBox3.Location = new System.Drawing.Point(307, 107);
|
||||||
yesNoPickerBox3.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
yesNoPickerBox3.Name = "yesNoPickerBox3";
|
yesNoPickerBox3.Name = "yesNoPickerBox3";
|
||||||
yesNoPickerBox3.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox3.Padding = new Padding(4, 4, 3, 3);
|
||||||
yesNoPickerBox3.SelectedIndex = 1;
|
yesNoPickerBox3.SelectedIndex = 1;
|
||||||
@ -156,7 +152,6 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// textBox1
|
// textBox1
|
||||||
//
|
//
|
||||||
textBox1.AcceptButton = null;
|
|
||||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox1.BackColor = System.Drawing.Color.Transparent;
|
textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
textBox1.EnableReactiveVisual = true;
|
textBox1.EnableReactiveVisual = true;
|
||||||
@ -169,7 +164,6 @@ namespace RokettoLaunch
|
|||||||
results1.Key = Keys.None;
|
results1.Key = Keys.None;
|
||||||
textBox1.KeyCodeResults = results1;
|
textBox1.KeyCodeResults = results1;
|
||||||
textBox1.Location = new System.Drawing.Point(192, 21);
|
textBox1.Location = new System.Drawing.Point(192, 21);
|
||||||
textBox1.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
textBox1.Padding = new Padding(4, 4, 3, 3);
|
textBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
textBox1.Size = new System.Drawing.Size(199, 32);
|
textBox1.Size = new System.Drawing.Size(199, 32);
|
||||||
@ -179,13 +173,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// numericBox1
|
// numericBox1
|
||||||
//
|
//
|
||||||
numericBox1.AcceptButton = null;
|
|
||||||
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
numericBox1.EnableReactiveVisual = true;
|
numericBox1.EnableReactiveVisual = true;
|
||||||
numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
numericBox1.Location = new System.Drawing.Point(252, 22);
|
numericBox1.Location = new System.Drawing.Point(252, 22);
|
||||||
numericBox1.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
numericBox1.Maximum = 100;
|
numericBox1.Maximum = 100;
|
||||||
numericBox1.Minimum = 1;
|
numericBox1.Minimum = 1;
|
||||||
numericBox1.Name = "numericBox1";
|
numericBox1.Name = "numericBox1";
|
||||||
@ -232,8 +224,9 @@ namespace RokettoLaunch
|
|||||||
tTogglePanel1.Controls.Add(label2);
|
tTogglePanel1.Controls.Add(label2);
|
||||||
tTogglePanel1.Controls.Add(label4);
|
tTogglePanel1.Controls.Add(label4);
|
||||||
tTogglePanel1.Controls.Add(numericBox1);
|
tTogglePanel1.Controls.Add(numericBox1);
|
||||||
tTogglePanel1.ExpandedHeight = 100;
|
tTogglePanel1.ExpandedHeight = 119;
|
||||||
tTogglePanel1.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
tTogglePanel1.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
||||||
|
tTogglePanel1.HeaderPadding = new Padding(4, 0, 0, 2);
|
||||||
tTogglePanel1.IsOpen = true;
|
tTogglePanel1.IsOpen = true;
|
||||||
tTogglePanel1.Location = new System.Drawing.Point(0, 0);
|
tTogglePanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
tTogglePanel1.Margin = new Padding(0);
|
tTogglePanel1.Margin = new Padding(0);
|
||||||
@ -247,13 +240,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// yesNoPickerBox1
|
// yesNoPickerBox1
|
||||||
//
|
//
|
||||||
yesNoPickerBox1.AcceptButton = null;
|
|
||||||
yesNoPickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox1.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox1.EnableReactiveVisual = true;
|
yesNoPickerBox1.EnableReactiveVisual = true;
|
||||||
yesNoPickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
yesNoPickerBox1.Location = new System.Drawing.Point(307, 64);
|
yesNoPickerBox1.Location = new System.Drawing.Point(307, 64);
|
||||||
yesNoPickerBox1.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
yesNoPickerBox1.Name = "yesNoPickerBox1";
|
yesNoPickerBox1.Name = "yesNoPickerBox1";
|
||||||
yesNoPickerBox1.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox1.Padding = new Padding(4, 4, 3, 3);
|
||||||
yesNoPickerBox1.SelectedIndex = 1;
|
yesNoPickerBox1.SelectedIndex = 1;
|
||||||
@ -288,8 +279,9 @@ namespace RokettoLaunch
|
|||||||
tTogglePanel2.Controls.Add(yesNoPickerBox3);
|
tTogglePanel2.Controls.Add(yesNoPickerBox3);
|
||||||
tTogglePanel2.Controls.Add(label6);
|
tTogglePanel2.Controls.Add(label6);
|
||||||
tTogglePanel2.Controls.Add(label7);
|
tTogglePanel2.Controls.Add(label7);
|
||||||
tTogglePanel2.ExpandedHeight = 100;
|
tTogglePanel2.ExpandedHeight = 206;
|
||||||
tTogglePanel2.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
tTogglePanel2.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
||||||
|
tTogglePanel2.HeaderPadding = new Padding(4, 0, 0, 2);
|
||||||
tTogglePanel2.IsOpen = true;
|
tTogglePanel2.IsOpen = true;
|
||||||
tTogglePanel2.Location = new System.Drawing.Point(0, 119);
|
tTogglePanel2.Location = new System.Drawing.Point(0, 119);
|
||||||
tTogglePanel2.Margin = new Padding(0);
|
tTogglePanel2.Margin = new Padding(0);
|
||||||
@ -303,13 +295,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// yesNoPickerBox4
|
// yesNoPickerBox4
|
||||||
//
|
//
|
||||||
yesNoPickerBox4.AcceptButton = null;
|
|
||||||
yesNoPickerBox4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox4.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox4.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox4.EnableReactiveVisual = true;
|
yesNoPickerBox4.EnableReactiveVisual = true;
|
||||||
yesNoPickerBox4.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox4.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
yesNoPickerBox4.Location = new System.Drawing.Point(307, 151);
|
yesNoPickerBox4.Location = new System.Drawing.Point(307, 151);
|
||||||
yesNoPickerBox4.Margin = new Padding(10, 10, 10, 0);
|
|
||||||
yesNoPickerBox4.Name = "yesNoPickerBox4";
|
yesNoPickerBox4.Name = "yesNoPickerBox4";
|
||||||
yesNoPickerBox4.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox4.Padding = new Padding(4, 4, 3, 3);
|
||||||
yesNoPickerBox4.SelectedIndex = 1;
|
yesNoPickerBox4.SelectedIndex = 1;
|
||||||
@ -338,6 +328,7 @@ namespace RokettoLaunch
|
|||||||
dialogFooter1.Button1Text = "&Save";
|
dialogFooter1.Button1Text = "&Save";
|
||||||
dialogFooter1.Dialog = this;
|
dialogFooter1.Dialog = this;
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
|
dialogFooter1.IsBusy = false;
|
||||||
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new System.Drawing.Size(444, 84);
|
dialogFooter1.Size = new System.Drawing.Size(444, 84);
|
||||||
|
|||||||
@ -79,8 +79,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ryzstudio8\core\RyzStudio.csproj" />
|
<PackageReference Include="RyzStudio" Version="8.1.6.125" />
|
||||||
<ProjectReference Include="..\ryzstudio8\windows.forms\RyzStudio.Windows.Forms.csproj" />
|
<PackageReference Include="RyzStudio.Windows.Forms" Version="8.1.6.25" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
@ -12,9 +11,6 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
{
|
{
|
||||||
public partial class TilePanel : RyzStudio.Windows.TileForms.Tile
|
public partial class TilePanel : RyzStudio.Windows.TileForms.Tile
|
||||||
{
|
{
|
||||||
protected TileModel modelInfo = new TileModel();
|
|
||||||
|
|
||||||
|
|
||||||
public TilePanel()
|
public TilePanel()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -29,7 +25,7 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
|
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public TileModel ModelInfo => modelInfo;
|
public TileModel ModelInfo { get; protected set; } = new TileModel();
|
||||||
|
|
||||||
public RyzStudio.Windows.TileForms.TileContainer TileContainer { get => UIControl.GetParentsUntil<RyzStudio.Windows.TileForms.TileContainer>(this); }
|
public RyzStudio.Windows.TileForms.TileContainer TileContainer { get => UIControl.GetParentsUntil<RyzStudio.Windows.TileForms.TileContainer>(this); }
|
||||||
|
|
||||||
@ -46,10 +42,16 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
protected override void OnDragDrop(DragEventArgs e)
|
protected override void OnDragDrop(DragEventArgs e)
|
||||||
{
|
{
|
||||||
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||||
|
fileList = fileList ?? new string[0];
|
||||||
|
|
||||||
|
if (fileList.Length <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.ModelInfo.IsGroup)
|
if (this.ModelInfo.IsGroup)
|
||||||
{
|
{
|
||||||
foreach (var item in fileList ?? new string[0])
|
foreach (var item in fileList)
|
||||||
{
|
{
|
||||||
var model = GetTileModel(item);
|
var model = GetTileModel(item);
|
||||||
if (model == null)
|
if (model == null)
|
||||||
@ -60,11 +62,37 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
this.ModelInfo.Items.Add(model);
|
this.ModelInfo.Items.Add(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateGroupMenu(this.ModelInfo);
|
InvalidateGroupMenu();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((fileList?.Length ?? 0) > 0)
|
if (fileList.Length > 1)
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show("Do you want to add this as a folder ?", "Convert to Folder", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||||
|
if (result == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
this.ModelInfo.Title = "New Folder";
|
||||||
|
this.ModelInfo.IsGroup = true;
|
||||||
|
|
||||||
|
foreach (var item in fileList)
|
||||||
|
{
|
||||||
|
var model = GetTileModel(item);
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ModelInfo.Items.Add(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidateGroupMenu();
|
||||||
|
}
|
||||||
|
else if (result == DialogResult.No)
|
||||||
|
{
|
||||||
|
LoadInfo(fileList[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
LoadInfo(fileList[0]);
|
LoadInfo(fileList[0]);
|
||||||
}
|
}
|
||||||
@ -98,6 +126,25 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
OnMouseDoubleClick(e);
|
OnMouseDoubleClick(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (e.Button == MouseButtons.Middle)
|
||||||
|
{
|
||||||
|
var mainForm = UIControl.GetParentsUntil<MainForm>(this);
|
||||||
|
if (mainForm == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.ModelInfo.IsGroup)
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show("Are you sure you want to duplicate tile?", "Duplicate Tile", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||||
|
if (result != DialogResult.Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mainForm.DuplicateTile(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||||
@ -118,23 +165,9 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
|
|
||||||
public void LoadInfo(TileModel model)
|
public void LoadInfo(TileModel model)
|
||||||
{
|
{
|
||||||
this.modelInfo = model;
|
this.ModelInfo = model;
|
||||||
|
|
||||||
this.LargeIcon = null;
|
InvalidateGroupMenu();
|
||||||
this.Title = model.Title;
|
|
||||||
|
|
||||||
if (this.modelInfo.IsGroup)
|
|
||||||
{
|
|
||||||
this.LargeIcon = AppResource.folder_32;
|
|
||||||
|
|
||||||
InvalidateGroupMenu(this.modelInfo);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.LargeIcon = RyzStudio.IO.File.GetIcon(model.CleanProcessFilename);
|
|
||||||
}
|
|
||||||
|
|
||||||
toolTip1.SetToolTip(this, this.Title);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadInfo(string filename)
|
public void LoadInfo(string filename)
|
||||||
@ -171,37 +204,48 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
RyzStudio.Diagnostics.Process.Execute(model.CleanProcessFilename, model.CleanProcessWorkingDirectory, model.CleanProcessArgument, model.ProcessWindowStyle, model.ProcessAsAdmin);
|
RyzStudio.Diagnostics.Process.Execute(model.CleanProcessFilename, model.CleanProcessWorkingDirectory, model.CleanProcessArgument, model.ProcessWindowStyle, model.ProcessAsAdmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InvalidateGroupMenu(TileModel model)
|
private void InvalidateGroupMenu()
|
||||||
{
|
{
|
||||||
if (this.LeftContextMenuStrip == null)
|
this.Title = this.ModelInfo.Title;
|
||||||
{
|
this.LargeIcon = (this.ModelInfo.IsGroup ? AppResource.folder_32 : RyzStudio.IO.File.GetIcon(this.ModelInfo.CleanProcessFilename));
|
||||||
this.LeftContextMenuStrip = new ContextMenuStrip();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.LeftContextMenuStrip.Items.Clear();
|
if (this.ModelInfo.IsGroup)
|
||||||
|
|
||||||
foreach (TileModel item in model?.Items ?? new System.Collections.Generic.List<TileModel>())
|
|
||||||
{
|
{
|
||||||
ToolStripItem toolItem = this.LeftContextMenuStrip.Items.Add(item.Title);
|
this.ModelInfo.ProcessFilename = "";
|
||||||
toolItem.Image = RyzStudio.IO.File.GetIcon(item.CleanProcessFilename);
|
this.ModelInfo.ProcessArgument = "";
|
||||||
toolItem.Tag = item;
|
this.ModelInfo.ProcessAsAdmin = false;
|
||||||
toolItem.Click += (object sender, EventArgs e) =>
|
this.ModelInfo.ProcessWindowStyle = ProcessWindowStyle.Normal;
|
||||||
|
this.ModelInfo.ProcessWorkingDirectory = "";
|
||||||
|
this.ModelInfo.Version = "";
|
||||||
|
|
||||||
|
if (this.LeftContextMenuStrip == null) this.LeftContextMenuStrip = new ContextMenuStrip();
|
||||||
|
this.LeftContextMenuStrip.Items.Clear();
|
||||||
|
|
||||||
|
foreach (var item in this.ModelInfo?.Items ?? new System.Collections.Generic.List<TileModel>())
|
||||||
{
|
{
|
||||||
var menuItem = (System.Windows.Forms.ToolStripMenuItem)sender;
|
ToolStripItem toolItem = this.LeftContextMenuStrip.Items.Add(item.Title);
|
||||||
if (menuItem == null)
|
toolItem.Image = RyzStudio.IO.File.GetIcon(item.CleanProcessFilename);
|
||||||
|
toolItem.Tag = item;
|
||||||
|
toolItem.Click += (object sender, EventArgs e) =>
|
||||||
{
|
{
|
||||||
return;
|
var menuItem = (System.Windows.Forms.ToolStripMenuItem)sender;
|
||||||
}
|
if (menuItem == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var model = (menuItem.Tag as TileModel);
|
var model = (menuItem.Tag as TileModel);
|
||||||
if (model == null)
|
if (model == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Execute(model);
|
Execute(model);
|
||||||
};
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toolTip1.SetToolTip(this, this.Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TileModel GetTileModel(string filename)
|
private TileModel GetTileModel(string filename)
|
||||||
|
|||||||
12
skye.sln
12
skye.sln
@ -5,10 +5,6 @@ VisualStudioVersion = 17.4.33205.214
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RokettoLaunch", "RokettoLaunch.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RokettoLaunch", "RokettoLaunch.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RyzStudio", "..\ryzstudio8\core\RyzStudio.csproj", "{BBB7657A-3CE7-4333-9DCE-3137973F538E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RyzStudio.Windows.Forms", "..\ryzstudio8\windows.forms\RyzStudio.Windows.Forms.csproj", "{EF73F363-4F93-5128-6F96-C797FA7CD94B}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -19,14 +15,6 @@ Global
|
|||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.Build.0 = Release|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user