コード例 #1
0
        public static void Main()
        {
            Rectangle     rec = new Rectangle();
            GraphicEditor gr  = new GraphicEditor();

            gr.DrawShape(rec);
        }
コード例 #2
0
        public static void Main()
        {
            IShape        sq = new Square();
            GraphicEditor gr = new GraphicEditor();

            gr.DrawShape(sq);
        }
コード例 #3
0
ファイル: StartUp.cs プロジェクト: NeikoGrozev/CSharpAdvanced
        public static void Main()
        {
            Cube          cube   = new Cube();
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(cube);
        }
コード例 #4
0
ファイル: StartUp.cs プロジェクト: zjelev/SoftuniCourses
        static void Main(string[] args)
        {
            IShape        shape = new Rectangle();
            GraphicEditor ge    = new GraphicEditor();

            ge.DrawShape(shape);
        }
コード例 #5
0
        public static void Main()
        {
            IShape        rectangle = new Rectangle();
            GraphicEditor grEditor  = new GraphicEditor();

            grEditor.DrawShape(rectangle);
        }
コード例 #6
0
        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("");
            });
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: IvelinMarinov/SoftUni
        public static void Main()
        {
            IShape        circle = new Circle();
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(circle);
        }
コード例 #8
0
 private void ReloadGraphicEditor()
 {
     if (GraphicEditor != null)
     {
         GraphicEditor.Reload(Tileset.Graphics, Tileset.Graphics.Length, 0, PaletteSet, 0, 0x20);
     }
 }
コード例 #9
0
ファイル: Program.cs プロジェクト: 10486/lab3_7
        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("Неверный формат файла");
            }
        }
コード例 #10
0
 private void openGraphics_Click(object sender, EventArgs e)
 {
     if (GraphicEditor == null)
     {
         LoadGraphicEditor();
     }
     GraphicEditor.Show();
 }
コード例 #11
0
        public static void Main(string[] args)
        {
            IShape rectangle = new Rectangle();

            GraphicEditor myGraphEditor = new GraphicEditor();

            myGraphEditor.DrawShape(rectangle);
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: NikolayMirchev/CSharp-OOP
        static void Main(string[] args)
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(new Circle());
            graphicEditor.DrawShape(new Square());
            graphicEditor.DrawShape(new Rectangle());
        }
コード例 #13
0
        static void Main()
        {
            IShape circle    = new Circle();
            IShape square    = new Square();
            IShape rexctanle = new Rectangle();

            var graphEditor = new GraphicEditor(square);

            graphEditor.DrawShape();
        }
コード例 #14
0
        public static void Main()
        {
            var circle = new Circle();
            var square = new Square();

            var editor = new GraphicEditor();

            editor.DrawShape(circle);
            editor.DrawShape(square);
        }
コード例 #15
0
 public void LoadGraphicEditor()
 {
     if (graphicEditor == null)
     {
         graphicEditor       = new GraphicEditor(new GraphicUpdater(), graphics, graphics.Length, 0, PaletteSet, 1, 0x20);
         graphicEditor.Owner = this;
     }
     else
     {
         ReloadGraphicEditor();
     }
 }
コード例 #16
0
ファイル: Program.cs プロジェクト: astanchev/CSharp-OOP
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
ファイル: Program.cs プロジェクト: GabrielaVasileva/SoftUni
        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);
        }
コード例 #19
0
ファイル: OwnerForm.cs プロジェクト: jpmac26/LazyShell
 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);
     }
 }
コード例 #20
0
 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);
     }
 }
コード例 #21
0
 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();
     }
 }
コード例 #22
0
 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();
     }
 }
コード例 #23
0
 // 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();
     }
 }
コード例 #24
0
 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();
     }
 }
コード例 #25
0
 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);
     }
 }
コード例 #26
0
 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);
     }
 }
コード例 #27
0
 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);
     }
 }
コード例 #28
0
 //
 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);
     }
 }
コード例 #29
0
ファイル: Program.cs プロジェクト: 10486/lab3_7
        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);
            }
        }
コード例 #30
0
 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);
     }
 }