public ActionResult ForFrameType(int canvasId = 0, int panelId = 0, FrameTypes?frameType = null) { if (canvasId == 0) { Canvas canvas = db.Canvases .OrderBy(c => c.Name) .FirstOrDefault() ; if (canvas != null) { canvasId = canvas.CanvasId; } } FrameSelector selector = new FrameSelector() { CanvasId = canvasId, PanelId = panelId, FrameType = frameType.HasValue ? frameType.Value : 0, }; FillCanvasesSelectList(canvasId); FillPanelsSelectList(panelId, canvasId); FillFrameTypeSelectList(frameType); return(View(selector)); }
public FramesPalette() { _framesScroll = new FramesesScroll(20, X + 170, Y); _frameSelector = new FrameSelector(X, Y, YIncrement, _framesScroll); _frameNameEditor = new FrameNameEditor(_frameSelector, _framesScroll, X + 41, Y); _addFrameButton = new AddFrameButton(_frameSelector, _framesScroll, X + 120, Y); }
private void button8_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { BaseItem bi = (BaseItem)listBox1.SelectedItem; if (bi.itemTexLoc.Equals("")) { MessageBox.Show("Please select base texture file."); OpenFileDialog openTex = new OpenFileDialog(); openTex.Title = "Open texture file"; if (Game1.bIsDebug) { openTex.Filter = "Texture File|*.jpg;*.png;*.jpeg;*.xnb"; openTex.InitialDirectory = Game1.rootContent; } else { openTex.Filter = "Texture File|*.jpg;*.png;*.jpeg"; openTex.InitialDirectory = Game1.rootContentExtra; } bool bDone = false; while (!bDone) { DialogResult dia = openTex.ShowDialog(); if (dia == DialogResult.OK && openTex.FileName.Contains(openTex.InitialDirectory)) { bi.itemTexLoc = openTex.FileName.Replace(Game1.rootContent, "").Substring(0, openTex.FileName.Replace(Game1.rootContent, "").LastIndexOf(".")); Console.WriteLine("Successful item texture selection"); bDone = true; } else if (!openTex.FileName.Contains(openTex.InitialDirectory)) { MessageBox.Show(@"Please select a file within the application folder under Content\Mods and it's subfolders"); } else if (dia == DialogResult.Cancel) { bDone = true; } } } try { bi.ReloadTexture(); FrameSelector.StartComplex(bi.itemTexAndAnimation, (int)frameWidth.Value, (int)frameHeight.Value, (int)xOffSet.Value, (int)yOffSet.Value); } catch { throw; } } }
private void button7_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { ParticleSystemSource ba = (ParticleSystemSource)listBox1.SelectedItem; if (ba.particleTexSource.Equals("")) { MessageBox.Show("Please select base texture file."); OpenFileDialog openTex = new OpenFileDialog(); openTex.Title = "Open texture file"; if (Game1.bIsDebug) { openTex.Filter = "Texture File|*.jpg;*.png;*.jpeg;*.xnb"; openTex.InitialDirectory = Game1.rootContent; } else { openTex.Filter = "Texture File|*.jpg;*.png;*.jpeg"; openTex.InitialDirectory = Game1.rootContentExtra; } bool bDone = false; while (!bDone) { DialogResult dia = openTex.ShowDialog(); if (dia == DialogResult.OK && openTex.FileName.Contains(openTex.InitialDirectory)) { ba.particleTexSource = openTex.FileName.Replace(Game1.rootContent, "").Substring(0, openTex.FileName.Replace(Game1.rootContent, "").LastIndexOf(".")); Console.WriteLine("Successful item texture selection"); bDone = true; } else if (!openTex.FileName.Contains(openTex.InitialDirectory)) { MessageBox.Show(@"Please select a file within the application folder under Content\Mods and it's subfolders"); } else if (dia == DialogResult.Cancel) { bDone = true; } } } try { ba.ReloadTextures(); FrameSelector.StartComplex(ba.particleTex, ba.particleFrames, (int)numericUpDown2.Value, (int)numericUpDown1.Value, (int)numericUpDown4.Value, (int)numericUpDown3.Value); } catch { throw; } } }
private void button2_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { Form1.MakeSureFormClosed(ae); if (FrameSelector.bIsRunning) { FrameSelector.Stop(); } ae = new Animation.AnimationEditor(); ae.Start(listBox1.SelectedItem as ShapeAnimation); } }
public ActionResult ForFrameType([Bind(Include = "CanvasId,PanelId,FrameType")] FrameSelector selector) { if (selector.PanelId != 0 && selector.FrameType != null) { Panel panel = db.Panels .Include(p => p.Canvas) .FirstOrDefault(p => p.PanelId == selector.PanelId) ; selector.Panel = panel; //selector.CacheInterval = 0; TempData[SelectorFrameKey] = selector; return(RedirectToAction("Create", selector.FrameType.ToString())); } return(RedirectToAction("ForFrameType", new { canvasId = selector.CanvasId, panelId = selector.PanelId, frameType = selector.FrameType })); }
private void button10_Click(object sender, EventArgs e) { FrameSelector.Stop(); }
//Constructor internal AppManager(List <Frame> frames) { this.mode = Mode.Browse; this.frameSelector = new FrameSelector(frames); this.currentPatient = null; }
public ChainDrawer(FrameSelector selector) { EvenFrame = default; OddFrame = default; frameSelector = selector; }
public ChainDrawer(Rectangle evenFrame) { EvenFrame = evenFrame; OddFrame = evenFrame; frameSelector = null; }