public static void Main() { Rectangle rec = new Rectangle(); GraphicEditor gr = new GraphicEditor(); gr.DrawShape(rec); }
public static void Main() { IShape sq = new Square(); GraphicEditor gr = new GraphicEditor(); gr.DrawShape(sq); }
public static void Main() { Cube cube = new Cube(); GraphicEditor editor = new GraphicEditor(); editor.DrawShape(cube); }
static void Main(string[] args) { IShape shape = new Rectangle(); GraphicEditor ge = new GraphicEditor(); ge.DrawShape(shape); }
public static void Main() { IShape rectangle = new Rectangle(); GraphicEditor grEditor = new GraphicEditor(); grEditor.DrawShape(rectangle); }
public MainWindowVM() { CurrentSign = new PLSign(); EffectCommand = new RelayCommand <SignEffect>(s => { int oldIndex = Window.MessageBoxCaretIndex; MessageText = MessageText.Insert(oldIndex, s.Text); Window.MessageBoxCaretIndex = oldIndex + s.Text.Length; }); SendMessageCommand = new RelayCommand(() => { if (!string.IsNullOrEmpty(msg)) { CurrentSign.SendMessage(msg, SelectedPage); } }); NewGraphicCommand = new RelayCommand(() => { graphicsWindow = new GraphicEditor(); GraphicEditorVM vm = graphicsWindow.DataContext as GraphicEditorVM; vm.CurrentSign = CurrentSign; vm.MainWindow = this; graphicsWindow.Show(); }); RefreshComPortsCommand = new RelayCommand(() => { OpenComPorts = SerialSign.OpenComPorts(); RaisePropertyChanged(""); }); }
public static void Main() { IShape circle = new Circle(); GraphicEditor editor = new GraphicEditor(); editor.DrawShape(circle); }
private void ReloadGraphicEditor() { if (GraphicEditor != null) { GraphicEditor.Reload(Tileset.Graphics, Tileset.Graphics.Length, 0, PaletteSet, 0, 0x20); } }
static GraphicEditor ReadFromFile(string filename) { try { var serializer = new JsonSerializer { NullValueHandling = NullValueHandling.Include, TypeNameHandling = TypeNameHandling.All, Formatting = Formatting.Indented }; List <Figure> tmp; using (var sr = new JsonTextReader(new StreamReader(filename))) { tmp = serializer.Deserialize <List <Figure> >(sr); } var editor = new GraphicEditor(); editor.AddFigures(tmp); return(editor); } catch (Exception) { throw new Exception("Неверный формат файла"); } }
private void openGraphics_Click(object sender, EventArgs e) { if (GraphicEditor == null) { LoadGraphicEditor(); } GraphicEditor.Show(); }
public static void Main(string[] args) { IShape rectangle = new Rectangle(); GraphicEditor myGraphEditor = new GraphicEditor(); myGraphEditor.DrawShape(rectangle); }
static void Main(string[] args) { GraphicEditor graphicEditor = new GraphicEditor(); graphicEditor.DrawShape(new Circle()); graphicEditor.DrawShape(new Square()); graphicEditor.DrawShape(new Rectangle()); }
static void Main() { IShape circle = new Circle(); IShape square = new Square(); IShape rexctanle = new Rectangle(); var graphEditor = new GraphicEditor(square); graphEditor.DrawShape(); }
public static void Main() { var circle = new Circle(); var square = new Square(); var editor = new GraphicEditor(); editor.DrawShape(circle); editor.DrawShape(square); }
public void LoadGraphicEditor() { if (graphicEditor == null) { graphicEditor = new GraphicEditor(new GraphicUpdater(), graphics, graphics.Length, 0, PaletteSet, 1, 0x20); graphicEditor.Owner = this; } else { ReloadGraphicEditor(); } }
static void Main() { var circle = new Circle(); var rectangle = new Rectangle(); var square = new Square(); var graphicEditor = new GraphicEditor(); graphicEditor.DrawShape(circle); graphicEditor.DrawShape(rectangle); graphicEditor.DrawShape(square); }
public static void Main() { IShape circle = new Circle(); IShape square = new Square(); IShape rectangle = new Rectangle(); GraphicEditor editor = new GraphicEditor(); editor.DrawShape(circle); editor.DrawShape(square); editor.DrawShape(rectangle); }
private static void Main() { GraphicEditor graphicEditor = new GraphicEditor(); Circle circle = new Circle("Circle"); Rectangle rectangle = new Rectangle("Rectangle"); Square square = new Square("Square"); graphicEditor.DrawShape(circle); graphicEditor.DrawShape(rectangle); graphicEditor.DrawShape(square); }
private void LoadLogoGraphicEditor() { if (logoGraphicEditor == null) { logoGraphicEditor = new GraphicEditor(new LogoGraphicUpdater(), Model.Logos_Graphics, Model.Logos_Graphics.Length, 0, Model.Logos_PaletteSet, 0, 0x20); logoGraphicEditor.Owner = this; } else { logoGraphicEditor.Reload(Model.Logos_Graphics, Model.Logos_Graphics.Length, 0, Model.Logos_PaletteSet, 0, 0x20); } }
private void LoadGraphicEditor() { if (graphicEditor == null) { graphicEditor = new GraphicEditor(new GraphicUpdater(), tileset.Graphics, tileset.Graphics.Length, 0, paletteSets[palette], 1, 0x20); graphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); } else { graphicEditor.Reload(tileset.Graphics, tileset.Graphics.Length, 0, paletteSets[palette], 1, 0x20); } }
private void LoadMenuGraphicEditor() { if (menuGraphicEditor == null) { menuGraphicEditor = new GraphicEditor(new GraphicMenuUpdater(), Model.Graphics_BattleMenu, Model.Graphics_BattleMenu.Length, 0, Model.Palette_BattleMenu, 0, 0x20); menuGraphicEditor.Owner = this; } else { ReloadMenuGraphicEditor(); } }
private void LoadSpriteGraphicEditor() { if (spriteGraphicEditor == null) { spriteGraphicEditor = new GraphicEditor(new GraphicSpritesUpdater(), Model.ObjectGraphics, Model.ObjectGraphics.Length, 0, Model.ObjectPaletteSet, 0, 0x20); spriteGraphicEditor.Owner = this; } else { ReloadSpriteGraphicEditor(); } }
// Loading private void LoadNumeralGraphicEditor() { if (numeralGraphicEditor == null) { numeralGraphicEditor = new GraphicEditor(new GraphicUpdater(), Model.Graphics_Numerals, Model.Graphics_Numerals.Length, 0, Model.Palette_Numerals, 0, 0x20); numeralGraphicEditor.Owner = this; } else { ReloadNumeralGraphicEditor(); } }
private void LoadGraphicEditor() { if (GraphicEditor == null) { GraphicEditor = new GraphicEditor(new GraphicUpdater(), Tileset.Graphics, Tileset.Graphics.Length, 0, PaletteSet, 0, 0x20); GraphicEditor.Owner = this; } else { ReloadGraphicEditor(); } }
private void LoadGraphicEditor() { if (graphicEditor == null) { graphicEditor = new GraphicEditor(new GraphicPreGameUpdater(), castGraphics, castGraphics.Length, 0, paletteSet, 0, 0x10); graphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); graphicEditor.Owner = this.Owner; } else { graphicEditor.Reload(castGraphics, castGraphics.Length, 0, paletteSet, 0, 0x10); } }
private void LoadSpriteGraphicEditor() { if (spriteGraphicEditor == null) { spriteGraphicEditor = new GraphicEditor(new GraphicSpriteUpdater(), Model.Title_SpriteGraphics, Model.Title_SpriteGraphics.Length, 0, spritePaletteSet, 0, 0x20); spriteGraphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); spriteGraphicEditor.Owner = this; } else { spriteGraphicEditor.Reload(Model.Title_SpriteGraphics, Model.Title_SpriteGraphics.Length, 0, spritePaletteSet, 0, 0x20); } }
private void LoadMenuGraphicEditor() { if (menuGraphicEditor == null) { menuGraphicEditor = new GraphicEditor(new Function(MenuGraphicUpdate), Model.BattleMenuGraphics, Model.BattleMenuGraphics.Length, 0, Model.BattleMenuPalette, 0, 0x20); menuGraphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); } else { menuGraphicEditor.Reload(new Function(MenuGraphicUpdate), Model.BattleMenuGraphics, Model.BattleMenuGraphics.Length, 0, Model.BattleMenuPalette, 0, 0x20); } }
// private void LoadGraphicEditor() { if (numeralGraphicEditor == null) { numeralGraphicEditor = new GraphicEditor(new Function(GraphicUpdate), Model.NumeralGraphics, Model.NumeralGraphics.Length, 0, Model.NumeralPaletteSet, 0, 0x20); numeralGraphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); } else { numeralGraphicEditor.Reload(new Function(GraphicUpdate), Model.NumeralGraphics, Model.NumeralGraphics.Length, 0, Model.NumeralPaletteSet, 0, 0x20); } }
static void WriteInFile(string filename, GraphicEditor editor) { var serializer = new JsonSerializer { NullValueHandling = NullValueHandling.Include, TypeNameHandling = TypeNameHandling.All, Formatting = Formatting.Indented }; using (StreamWriter sw = new StreamWriter(filename)) { serializer.Serialize(sw, editor.Figures); } }
public void LoadGraphicEditor() { if (graphicEditor == null) { graphicEditor = new GraphicEditor(new Function(GraphicUpdate), graphics, graphics.Length, 0, paletteSet, 0, 0x20, 1); graphicEditor.FormClosing += new FormClosingEventHandler(editor_FormClosing); } else { graphicEditor.Reload(new Function(GraphicUpdate), graphics, graphics.Length, 0, paletteSet, 0, 0x20, 1); } }