public void ConnectToControler(FractalDataHandlerControler Controler)
 {
     Controler.Deactivate += () => { this._isactive = false;
                                     _fractal.CancelParallelCreating(); };
     Controler.SetZoomEvent += (Degree) => { if (_isactive)
                                             {
                                                 GetZoom(Degree);
                                             }
     };
     Controler.GetFractalDataHandlersHasStarted += (Handler, ActiveOnly) => {
         if (ActiveOnly && (!IsActive))
         {
             return;
         }
         Handler.Add(this);
     };
     Controler.GetBack += () => {
         if (!_isactive)
         {
             return;
         }
         Controler.DeactivateHandlers();
         if (this._fractal.GetBack())
         {
             this.Show(_width, _height);
         }
     };
     Controler.ChangeSizeFromSizeEditor += () => { if (_isactive)
                                                   {
                                                       ChangeSizeFromWindow(Controler);
                                                   }
     };
     this.NeedDeactivate += () => { Controler.DeactivateHandlers(); };
 }
        public void CreateInSize(FractalDataHandlerControler Controler)
        {
            SizeEditor se = new SizeEditor("Фрактал джулии");

            se.BuldButtonClick        += (o, size) => { Controler.DeactivateHandlers(); this.Reset(size.Width, size.Height); };
            se.OtherWindowButtonClick += (o, size) => { this.Create_in_other_window(_fractal.GetClone(), size.Width, size.Height, Controler); };
            se.ShowDialog(_owner);
        }
        public void ChangeSizeFromWindow(FractalDataHandlerControler controler)
        {
            SizeEditor se = new SizeEditor("Новый размер");

            se.BuldButtonClick        += (sender, size) => { controler.DeactivateHandlers(); this.ReShow(size.Width, size.Height); };
            se.OtherWindowButtonClick += (sender, size) => { this.Create_in_other_window(_fractal.GetClone(), size.Width, size.Height, 0, 0, _width, _height, controler); };
            se.ShowDialog(_owner);
        }
 public void ConnectShowToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Deactivator, int Width, int Height)
 {
     _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height)));
     menuitem.Click               += (sender, EventArg) => { Deactivator.DeactivateHandlers(); this.Show(); };
     this.FractalChanged          += (sender, fractal) => { _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(fractal.GetClone().CreateFractal(Width, Height))); };
     this.FractalColorModeChanged += (sender, mode) => { _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height))); };
     this.SetNewFractalEvent      += (sender) => { _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height))); };
 }
 public FractalDataHandler(Control Owner, Fractal Fractal, FractalPictureBox FPB, FractalColorMode FCM, Size Size,FractalDataHandlerControler Deactivator, FractalAssociationParametrs FAP = null)
 {
     if (Owner == null || Fractal == null || FPB == null || FCM == null) throw new ArgumentNullException("Нельзя передавать пустые значения!");
     if (Size.Width < 1 || Size.Height < 1) throw new ArgumentException("Ширина и Высота не могут быть меньше единицы!");
     _fractal = Fractal;
     _fpb = FPB;
     _fcm = FCM;
     _width = Size.Width;
     _height = Size.Height;
     _fap = FAP;
     _owner = Owner;
     Connect();
     ConnectToControler(Deactivator);
 }
        private void Create_in_other_window(Fractal Fractal, int Width, int Height, FractalDataHandlerControler Controler)
        {
            IsolatedFractalWindowsCreator OtherWindow = new IsolatedFractalWindowsCreator(Fractal, _fcm);

            OtherWindow.FractalToken += (fractal, fap) =>
            {
                Disconnect();
                _fractal = fractal;
                Connect();
                _fap    = fap;
                _width  = fap.Width;
                _height = fap.Height;
                Controler.DeactivateHandlers();
                Show();
            };
            OtherWindow.StartProcess(Width, Height);
        }
 public void ChangeSizeFromWindow(FractalDataHandlerControler controler)
 {
     SizeEditor se = new SizeEditor("Новый размер");
     se.BuldButtonClick += (sender, size) => { controler.DeactivateHandlers(); this.ReShow(size.Width,size.Height); };
     se.OtherWindowButtonClick += (sender, size) => {this.Create_in_other_window(_fractal.GetClone(),size.Width,size.Height,0,0,_width,_height,controler); };
     se.ShowDialog(_owner);
 }
 public void ConnectResetWithSizeFromWindowToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Controler)
 {
     menuitem.Click+=(sender,e)=>{
     SizeEditor se = new SizeEditor("Новый фрактал");
     se.BuldButtonClick += (o, size) => { Controler.DeactivateHandlers(); this.Reset(size.Width,size.Height); };
     se.OtherWindowButtonClick += (o, size) => { this.Create_in_other_window(_fractal.GetClone(), size.Width, size.Height, Controler); };
     se.ShowDialog(_owner);
 };
 }
 public void ConnectStandartResetToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Controler)
 {
     menuitem.Click += (sender, e) => { Controler.DeactivateHandlers();
     this.Reset(960,640);
     };
 }
 public void ConnectShowToMenuItem(ToolStripMenuItem menuitem,FractalDataHandlerControler Deactivator,int Width,int Height)
 {
     _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height)));
     menuitem.Click += (sender, EventArg) => { Deactivator.DeactivateHandlers(); this.Show(); };
     this.FractalChanged += (sender, fractal) => { _owner.Invoke(SetMenuItemImage, menuitem,_fcm.GetDrawnBitmap(fractal.GetClone().CreateFractal(Width, Height))); };
     this.FractalColorModeChanged += (sender, mode) => { _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height))); };
     this.SetNewFractalEvent += (sender) => { _owner.Invoke(SetMenuItemImage, menuitem, _fcm.GetDrawnBitmap(_fractal.GetClone().CreateFractal(Width, Height))); };
 }
 public void ConnectShowToMenuItem(ToolStripMenuItem menuitem,FractalDataHandlerControler Deactivator)
 {
     menuitem.Click+=(sender,EventArg)=>{/*Deactivator.DeactivateHandlers();*/ this.Show();};
 }
 public void ConnectShowToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Deactivator)
 {
     menuitem.Click += (sender, EventArg) => { /*Deactivator.DeactivateHandlers();*/ this.Show(); };
 }
 public FractalDataHandler(Control Owner, Fractal Fractal, FractalPictureBox FPB, FractalColorMode FCM, Size Size, FractalDataHandlerControler Deactivator, FractalAssociationParametrs FAP = null)
 {
     if (Owner == null || Fractal == null || FPB == null || FCM == null)
     {
         throw new ArgumentNullException("Нельзя передавать пустые значения!");
     }
     if (Size.Width < 1 || Size.Height < 1)
     {
         throw new ArgumentException("Ширина и Высота не могут быть меньше единицы!");
     }
     _fractal = Fractal;
     _fpb     = FPB;
     _fcm     = FCM;
     _width   = Size.Width;
     _height  = Size.Height;
     _fap     = FAP;
     _owner   = Owner;
     Connect();
     ConnectToControler(Deactivator);
 }
 public void ConnectResetWithSizeFromWindowToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Controler)
 {
     menuitem.Click += (sender, e) => {
         SizeEditor se = new SizeEditor("Новый фрактал");
         se.BuldButtonClick        += (o, size) => { Controler.DeactivateHandlers(); this.Reset(size.Width, size.Height); };
         se.OtherWindowButtonClick += (o, size) => { this.Create_in_other_window(_fractal.GetClone(), size.Width, size.Height, Controler); };
         se.ShowDialog(_owner);
     };
 }
 public void ConnectStandartResetToMenuItem(ToolStripMenuItem menuitem, FractalDataHandlerControler Controler)
 {
     menuitem.Click += (sender, e) => { Controler.DeactivateHandlers();
                                        this.Reset(960, 640); };
 }
 public void CreateInSize(FractalDataHandlerControler Controler)
 {
     SizeEditor se = new SizeEditor("Фрактал джулии");
     se.BuldButtonClick += (o, size) => { Controler.DeactivateHandlers(); this.Reset(size.Width, size.Height); };
     se.OtherWindowButtonClick += (o, size) => { this.Create_in_other_window(_fractal.GetClone(), size.Width, size.Height, Controler); };
     se.ShowDialog(_owner);
 }
 private void Create_in_other_window(Fractal Fractal, int Width, int Height, int HorizontalStart, int VerticalStart, int SelectedWidth, int SelectedHeight, FractalDataHandlerControler Controler)
 {
     IsolatedFractalWindowsCreator OtherWindow = new IsolatedFractalWindowsCreator(Fractal,_fcm);
     OtherWindow.FractalToken += (fractal, fap) =>
     {
         Disconnect();
         _fractal = fractal;
         Connect();
         _fap = fap;
         _width = fap.Width;
         _height = fap.Height;
         Controler.DeactivateHandlers();
         Show();
     };
     OtherWindow.StartProcess(Width, Height,HorizontalStart,VerticalStart,SelectedWidth,SelectedHeight,UseSafeZoom);
 }
Exemplo n.º 18
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     FractalControler               = new FractalDataHandlerControler();
     MainFractalPictureBox          = new FractalPictureBox();
     MainFractalPictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
     MainPanel.Controls.Add(MainFractalPictureBox);
     #region Julia creating
     FirstJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.523D, 1.523D, -0.9D, 0.9D, new Complex(-0.8D, 0.156D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     FirstJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FirstJulia.ConnectShowToMenuItem(первыйФракталToolStripMenuItem, FractalControler, 32, 32);
     FirstJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem, FractalControler);
     FirstJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem, FractalControler);
     FirstJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SecondJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -0.91D, 0.91D, -1.12D, 1.12D, new Complex(0.285D, 0.0126D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     SecondJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     SecondJulia.ConnectShowToMenuItem(второйФракталToolStripMenuItem, FractalControler, 32, 32);
     SecondJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem1, FractalControler);
     SecondJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem1, FractalControler);
     SecondJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     ThirdJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.35D, 1.35D, -1.12D, 1.12D, new Complex(-0.0085D, 0.71D)), MainFractalPictureBox, new My2DClassicColorMode(1.1D, 1.1D, 1.1D), new Size(960, 640), FractalControler);
     ThirdJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     ThirdJulia.ConnectShowToMenuItem(третийToolStripMenuItem, FractalControler, 32, 32);
     ThirdJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem2, FractalControler);
     ThirdJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem2, FractalControler);
     ThirdJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     FourthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -0.88D, 0.88D, -1.12D, 1.12D, new Complex(0.285D, 0.01D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     FourthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FourthJulia.ConnectShowToMenuItem(четвёртыйФракталToolStripMenuItem, FractalControler, 32, 32);
     FourthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem3, FractalControler);
     FourthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem3, FractalControler);
     FourthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     FifthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.505D, 1.505D, -0.9D, 0.9D, new Complex(-0.74534D, 0.11301D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     FifthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FifthJulia.ConnectShowToMenuItem(пятыйФракталToolStripMenuItem, FractalControler, 32, 32);
     FifthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem4, FractalControler);
     FifthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem4, FractalControler);
     FifthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SixthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.5D, 1.5D, -1D, 1D, new Complex(-0.75D, -0.03125D)), MainFractalPictureBox, new Simple2DFractalColorMode(), new Size(960, 640), FractalControler);
     SixthJulia.ConnectShowToMenuItem(шестойФракталToolStripMenuItem, FractalControler, 32, 32);
     SixthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem7, FractalControler);
     SixthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem7, FractalControler);
     SixthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SixthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     #endregion /Julia creating
     MandelbrotHandler = new FractalDataHandler(this, new MandelbrotWithClouds(), MainFractalPictureBox, new CosColorMode(), new Size(960, 640), FractalControler);
     MandelbrotHandler.ConnectToolStripProgressBar(toolStripProgressBar1);
     MandelbrotHandler.ConnectShowToMenuItem(обыкновенныйToolStripMenuItem, FractalControler, 32, 32);
     MandelbrotHandler.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem5, FractalControler);
     MandelbrotHandler.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem5, FractalControler);
     MandelbrotHandler.ConntectToStatusLabel(toolStripStatusLabel1);
     AmoebaLasVegas = new FractalDataHandler(this, new AmoebaLasVegas(), MainFractalPictureBox, new TrioArgsCosColorMode(), new Size(900, 900), FractalControler);
     AmoebaLasVegas.ConnectToolStripProgressBar(toolStripProgressBar1);
     AmoebaLasVegas.ConnectShowToMenuItem(amoebaLasVegasToolStripMenuItem, FractalControler, 16, 16);
     AmoebaLasVegas.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem8, FractalControler);
     AmoebaLasVegas.ConntectToStatusLabel(toolStripStatusLabel1);
     _differenсe_in_width                 = this.Width - MainPanel.Width;
     _difference_in_height                = this.Height - MainPanel.Height;
     FractalDataHandler.UseSafeZoom       = true;
     FractalDataHandler.MaxGlobalPercent  = toolStripProgressBar1.Maximum;
     MainFractalPictureBox.OpenMenuEvent += () => { contextMenuStrip1.Show(Cursor.Position); };
     MainFractalPictureBox.SelectionPen   = null;
     fractalTemplates = FractalTemplates.LoadFromFile(FileToSave);
     #region GlobalTemplates
     GlobalTemplates.Initializate(FileToGlobalTemplates);
     GlobalTemplates.AddDefaultTemplate("Шрифт меню главного окна", Color.Black, menuStrip1.Font);
     GlobalTemplates.AddDefaultTemplate("Шрифт окна с шаблонами", Color.Black, new Font("Microsoft Sans Serif", 12.25f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для настройки цветового режима", Color.Black, new Font("Microsoft sans serif", 12.25f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для ввода фрактала джулии", Color.Black, new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для ввода нового разрешения", Color.Black, new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна вращения фрактала", Color.Black, new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.SetTemplate(menuStrip1, "Шрифт меню главного окна");
     this.FormClosing += (s, _e) => { GlobalTemplates.SaveTemplates(FileToGlobalTemplates); };
     #endregion /GlobalTemplates
 }
 public void ConnectToControler(FractalDataHandlerControler Controler)
 {
     Controler.Deactivate += () => { this._isactive = false;
     _fractal.CancelParallelCreating();
     };
     Controler.SetZoomEvent += (Degree) => {if(_isactive)GetZoom(Degree);};
     Controler.GetFractalDataHandlersHasStarted += (Handler, ActiveOnly) => {
         if (ActiveOnly && (!IsActive)) return;
         Handler.Add(this);
     };
     Controler.GetBack += () => {
         if (!_isactive) return;
         Controler.DeactivateHandlers();
         if(this._fractal.GetBack())
         this.Show(_width, _height);
     };
     Controler.ChangeSizeFromSizeEditor += () => { if(_isactive)ChangeSizeFromWindow(Controler); };
     this.NeedDeactivate += () => { Controler.DeactivateHandlers(); };
 }
Exemplo n.º 20
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     FractalControler = new FractalDataHandlerControler();
     MainFractalPictureBox = new FractalPictureBox();
     MainFractalPictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
     MainPanel.Controls.Add(MainFractalPictureBox);
     #region Julia creating
     FirstJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.523D, 1.523D, -0.9D, 0.9D, new Complex(-0.8D, 0.156D)),MainFractalPictureBox,new My2DClassicColorMode(),new Size(960,640),FractalControler);
     FirstJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FirstJulia.ConnectShowToMenuItem(первыйФракталToolStripMenuItem, FractalControler,32,32);
     FirstJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem, FractalControler);
     FirstJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem, FractalControler);
     FirstJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SecondJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -0.91D, 0.91D, -1.12D, 1.12D, new Complex(0.285D, 0.0126D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     SecondJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     SecondJulia.ConnectShowToMenuItem(второйФракталToolStripMenuItem, FractalControler,32,32);
     SecondJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem1,FractalControler);
     SecondJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem1,FractalControler);
     SecondJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     ThirdJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.35D, 1.35D, -1.12D, 1.12D, new Complex(-0.0085D, 0.71D)), MainFractalPictureBox, new My2DClassicColorMode(1.1D, 1.1D, 1.1D), new Size(960, 640), FractalControler);
     ThirdJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     ThirdJulia.ConnectShowToMenuItem(третийToolStripMenuItem, FractalControler, 32, 32);
     ThirdJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem2, FractalControler);
     ThirdJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem2,FractalControler);
     ThirdJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     FourthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -0.88D, 0.88D, -1.12D, 1.12D, new Complex(0.285D, 0.01D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     FourthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FourthJulia.ConnectShowToMenuItem(четвёртыйФракталToolStripMenuItem, FractalControler, 32, 32);
     FourthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem3, FractalControler);
     FourthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem3, FractalControler);
     FourthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     FifthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.505D, 1.505D, -0.9D, 0.9D, new Complex(-0.74534D, 0.11301D)), MainFractalPictureBox, new My2DClassicColorMode(), new Size(960, 640), FractalControler);
     FifthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     FifthJulia.ConnectShowToMenuItem(пятыйФракталToolStripMenuItem, FractalControler, 32, 32);
     FifthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem4, FractalControler);
     FifthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem4, FractalControler);
     FifthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SixthJulia = new FractalDataHandler(this, new JuliaWithClouds(FractalStaticData.RecomendJuliaIterationsCount, -1.5D, 1.5D, -1D, 1D, new Complex(-0.75D,-0.03125D)), MainFractalPictureBox, new Simple2DFractalColorMode(), new Size(960, 640),FractalControler);
     SixthJulia.ConnectShowToMenuItem(шестойФракталToolStripMenuItem, FractalControler, 32, 32);
     SixthJulia.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem7, FractalControler);
     SixthJulia.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem7, FractalControler);
     SixthJulia.ConntectToStatusLabel(toolStripStatusLabel1);
     SixthJulia.ConnectToolStripProgressBar(toolStripProgressBar1);
     #endregion /Julia creating
     MandelbrotHandler = new FractalDataHandler(this, new MandelbrotWithClouds(), MainFractalPictureBox, new CosColorMode(), new Size(960, 640), FractalControler);
     MandelbrotHandler.ConnectToolStripProgressBar(toolStripProgressBar1);
     MandelbrotHandler.ConnectShowToMenuItem(обыкновенныйToolStripMenuItem,FractalControler,32,32);
     MandelbrotHandler.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem5, FractalControler);
     MandelbrotHandler.ConnectResetWithSizeFromWindowToMenuItem(новыйСЗаданнымРазмеромToolStripMenuItem5,FractalControler);
     MandelbrotHandler.ConntectToStatusLabel(toolStripStatusLabel1);
     AmoebaLasVegas = new FractalDataHandler(this, new AmoebaLasVegas(), MainFractalPictureBox, new TrioArgsCosColorMode(), new Size(900, 900),FractalControler);
     AmoebaLasVegas.ConnectToolStripProgressBar(toolStripProgressBar1);
     AmoebaLasVegas.ConnectShowToMenuItem(amoebaLasVegasToolStripMenuItem,FractalControler,16,16);
     AmoebaLasVegas.ConnectStandartResetToMenuItem(новыйСтандартногоРазмераToolStripMenuItem8, FractalControler);
     AmoebaLasVegas.ConntectToStatusLabel(toolStripStatusLabel1);
     _differenсe_in_width = this.Width - MainPanel.Width;
     _difference_in_height = this.Height - MainPanel.Height;
     FractalDataHandler.UseSafeZoom = true;
     FractalDataHandler.MaxGlobalPercent = toolStripProgressBar1.Maximum;
     MainFractalPictureBox.OpenMenuEvent += () => { contextMenuStrip1.Show(Cursor.Position); };
     MainFractalPictureBox.SelectionPen = null;
     fractalTemplates = FractalTemplates.LoadFromFile(FileToSave);
     #region GlobalTemplates
     GlobalTemplates.Initializate(FileToGlobalTemplates);
     GlobalTemplates.AddDefaultTemplate("Шрифт меню главного окна", Color.Black, menuStrip1.Font);
     GlobalTemplates.AddDefaultTemplate("Шрифт окна с шаблонами", Color.Black, new Font("Microsoft Sans Serif", 12.25f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для настройки цветового режима", Color.Black, new Font("Microsoft sans serif", 12.25f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для ввода фрактала джулии", Color.Black, new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна для ввода нового разрешения", Color.Black, new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.AddDefaultTemplate("Шрифт окна вращения фрактала",Color.Black,new Font("Microsoft sans serif", 12.35f));
     GlobalTemplates.SetTemplate(menuStrip1, "Шрифт меню главного окна");
     this.FormClosing += (s, _e) => { GlobalTemplates.SaveTemplates(FileToGlobalTemplates); };
     #endregion /GlobalTemplates
 }